Di_packages_parser

## Functions

di_parser_info * | di_packages_parser_info (void)
di_parser_info * | di_packages_minimal_parser_info (void)
di_parser_info * | di_packages_status_parser_info (void)
di_packages * | di_packages_special_read_file (const char *file, di_packages_allocator *allocator, di_parser_info *(info)(void))
int | di_packages_special_write_file (di_packages *packages, const char *file, di_parser_info *(info)(void))
static di_packages * | di_packages_read_file (const char *file, di_packages_allocator *allocator)
static di_packages * | di_packages_minimal_read_file (const char *file, di_packages_allocator *allocator)
static di_packages * | di_packages_status_read_file (const char *file, di_packages_allocator *allocator)
static int | di_packages_write_file (di_packages *packages, const char *file)
static int | di_packages_status_write_file (di_packages *packages, const char *file)

## Variables

const di_parser_fieldinfo * | di_packages_parser_fieldinfo []
const di_parser_fieldinfo * | di_packages_status_parser_fieldinfo []
const di_parser_fieldinfo * | di_packages_minimal_parser_fieldinfo []
di_parser_write_entry_next | internal_di_packages_parser_write_entry_next
const di_parser_fieldinfo | internal_di_packages_parser_field_package
const di_parser_fieldinfo | internal_di_packages_parser_field_package
const di_parser_fieldinfo * | di_packages_parser_fieldinfo []
const di_parser_fieldinfo * | di_packages_status_parser_fieldinfo []
const di_parser_fieldinfo * | di_packages_minimal_parser_fieldinfo []

## Detailed Description

## Function Documentation

## di_packages_minimal_parser_info()

di_parser_info* di_packages_minimal_parser_info | ( | void |  | ) |

Get parser info for minimal Packages file

{
di_parser_info *info;
info = di_parser_info_alloc ();
di_parser_info_add (info, di_packages_minimal_parser_fieldinfo);
return info;
}
di_packages_minimal_parser_fieldinfo
const di_parser_fieldinfo * di_packages_minimal_parser_fieldinfo[]
Definition: packages_parser.c:101
di_parser_info
Parse info.
Definition: parser.h:94

Referenced by di_packages_minimal_read_file().

## di_packages_minimal_read_file()

static di_packages* di_packages_minimal_read_file | ( | const char * | file,
|  | di_packages_allocator * | allocator
| ) |  |

inline static

Read a minimal Packages file

Parameters

  file | file to read
  allocator | the allocator for the packages structure

{
return di_packages_special_read_file (file, allocator, di_packages_minimal_parser_info);
}
di_packages_special_read_file
di_packages * di_packages_special_read_file(const char *file, di_packages_allocator *allocator, di_parser_info *(info)(void))
di_packages_minimal_parser_info
di_parser_info * di_packages_minimal_parser_info(void)
Definition: packages_parser.c:137

References di_packages_minimal_parser_info(), and di_packages_special_read_file().

## di_packages_parser_info()

di_parser_info* di_packages_parser_info | ( | void |  | ) |

Get parser info for standard Packages file

{
di_parser_info *info;
info = di_parser_info_alloc ();
di_parser_info_add (info, di_packages_parser_fieldinfo);
return info;
}
di_packages_parser_fieldinfo
const di_parser_fieldinfo * di_packages_parser_fieldinfo[]
Definition: packages_parser.c:48

Referenced by di_packages_read_file(), and di_packages_write_file().

## di_packages_read_file()

static di_packages* di_packages_read_file | ( | const char * | file,
|  | di_packages_allocator * | allocator
| ) |  |

inline static

Read a standard Packages file

Parameters

  file | file to read
  allocator | the allocator for the packages structure

{
return di_packages_special_read_file (file, allocator, di_packages_parser_info);
}
di_packages_parser_info
di_parser_info * di_packages_parser_info(void)
Definition: packages_parser.c:123

References di_packages_parser_info(), and di_packages_special_read_file().

## di_packages_special_read_file()

di_packages* di_packages_special_read_file | ( | const char * | file,
|  | di_packages_allocator * | allocator,
|  | di_parser_info * | info)(void
| ) |  |

Read a special Packages file

Parameters

  file | file to read

Referenced by di_packages_minimal_read_file(), di_packages_read_file(), di_packages_status_read_file(), di_system_packages_read_file(), and di_system_packages_status_read_file().

## di_packages_special_write_file()

int di_packages_special_write_file | ( | di_packages * | packages,
|  | const char * | file,
|  | di_parser_info * | info)(void
| ) |  |

Write a special Packages file

Parameters

  packages | the packages structure
  file | file to write

Returns
  number of written entries

Referenced by di_packages_status_write_file(), di_packages_write_file(), di_system_packages_status_write_file(), and di_system_packages_write_file().

## di_packages_status_parser_info()

di_parser_info* di_packages_status_parser_info | ( | void |  | ) |

Get parser info for standard status file

{
di_parser_info *info;
info = di_parser_info_alloc ();
di_parser_info_add (info, di_packages_status_parser_fieldinfo);
return info;
}
di_packages_status_parser_fieldinfo
const di_parser_fieldinfo * di_packages_status_parser_fieldinfo[]
Definition: packages_parser.c:76

Referenced by di_packages_status_read_file(), and di_packages_status_write_file().

## di_packages_status_read_file()

static di_packages* di_packages_status_read_file | ( | const char * | file,
|  | di_packages_allocator * | allocator
| ) |  |

inline static

Read a standard status file

Parameters

  file | file to read
  allocator | the allocator for the packages structure

{
return di_packages_special_read_file (file, allocator, di_packages_status_parser_info);
}
di_packages_status_parser_info
di_parser_info * di_packages_status_parser_info(void)
Definition: packages_parser.c:151

References di_packages_special_read_file(), and di_packages_status_parser_info().

## di_packages_status_write_file()

static int di_packages_status_write_file | ( | di_packages * | packages,
|  | const char * | file
| ) |  |

inline static

Write a standard status file

Parameters

  packages | the packages structure
  file | file to write

Returns
  number of written entries

{
return di_packages_special_write_file (packages, file, di_packages_status_parser_info);
}
di_packages_special_write_file
int di_packages_special_write_file(di_packages *packages, const char *file, di_parser_info *(info)(void))

References di_packages_special_write_file(), and di_packages_status_parser_info().

## di_packages_write_file()

static int di_packages_write_file | ( | di_packages * | packages,
|  | const char * | file
| ) |  |

inline static

Write a standard Packages file

Parameters

  packages | the packages structure
  file | file to write

Returns
  number of written entries

{
return di_packages_special_write_file (packages, file, di_packages_parser_info);
}

References di_packages_parser_info(), and di_packages_special_write_file().

## Variable Documentation

## di_packages_minimal_parser_fieldinfo [1/2]

const di_parser_fieldinfo* di_packages_minimal_parser_fieldinfo[]

extern

Minimal Packages file

## di_packages_minimal_parser_fieldinfo [2/2]

const di_parser_fieldinfo* di_packages_minimal_parser_fieldinfo[]

Initial value:
=
{
&internal_di_packages_parser_field_package,
&internal_di_package_parser_field_essential,
&internal_di_package_parser_field_priority,
&internal_di_package_parser_field_installed_size,
&internal_di_package_parser_field_version,
&internal_di_package_parser_field_provides,
&internal_di_package_parser_field_depends,
&internal_di_package_parser_field_pre_depends,
&internal_di_package_parser_field_filename,
&internal_di_package_parser_field_sha256,
&internal_di_package_parser_field_size,
NULL
}
internal_di_packages_parser_field_package
const di_parser_fieldinfo internal_di_packages_parser_field_package
Definition: packages_parser.c:36

Minimal Packages file

## di_packages_parser_fieldinfo [1/2]

const di_parser_fieldinfo* di_packages_parser_fieldinfo[]

extern

Standard Packages file

## di_packages_parser_fieldinfo [2/2]

const di_parser_fieldinfo* di_packages_parser_fieldinfo[]

Initial value:
=
{
&internal_di_packages_parser_field_package,
&internal_di_package_parser_field_essential,
&internal_di_package_parser_field_priority,
&internal_di_package_parser_field_section,
&internal_di_package_parser_field_installed_size,
&internal_di_package_parser_field_maintainer,
&internal_di_package_parser_field_architecture,
&internal_di_package_parser_field_version,
&internal_di_package_parser_field_replaces,
&internal_di_package_parser_field_provides,
&internal_di_package_parser_field_depends,
&internal_di_package_parser_field_pre_depends,
&internal_di_package_parser_field_recommends,
&internal_di_package_parser_field_suggests,
&internal_di_package_parser_field_conflicts,
&internal_di_package_parser_field_enhances,
&internal_di_package_parser_field_filename,
&internal_di_package_parser_field_size,
&internal_di_package_parser_field_sha256,
&internal_di_package_parser_field_description,
NULL
}

Standard Packages file

## di_packages_status_parser_fieldinfo [1/2]

const di_parser_fieldinfo* di_packages_status_parser_fieldinfo[]

extern

Standard status file

## di_packages_status_parser_fieldinfo [2/2]

const di_parser_fieldinfo* di_packages_status_parser_fieldinfo[]

Initial value:
=
{
&internal_di_packages_parser_field_package,
&internal_di_package_parser_field_status,
&internal_di_package_parser_field_essential,
&internal_di_package_parser_field_priority,
&internal_di_package_parser_field_section,
&internal_di_package_parser_field_installed_size,
&internal_di_package_parser_field_maintainer,
&internal_di_package_parser_field_version,
&internal_di_package_parser_field_replaces,
&internal_di_package_parser_field_provides,
&internal_di_package_parser_field_depends,
&internal_di_package_parser_field_pre_depends,
&internal_di_package_parser_field_recommends,
&internal_di_package_parser_field_suggests,
&internal_di_package_parser_field_conflicts,
&internal_di_package_parser_field_enhances,
&internal_di_package_parser_field_description,
NULL
}
internal_di_package_parser_field_status
const di_parser_fieldinfo internal_di_package_parser_field_status
Definition: package_parser.c:39

Standard status file

## internal_di_packages_parser_field_package [1/2]

const di_parser_fieldinfo internal_di_packages_parser_field_package

extern

parser info

## internal_di_packages_parser_field_package [2/2]

const di_parser_fieldinfo internal_di_packages_parser_field_package

Initial value:
=
DI_PARSER_FIELDINFO
(
"Package",
di_packages_parser_read_name,
di_parser_write_string,
offsetof (di_package, package)
)
DI_PARSER_FIELDINFO
#define DI_PARSER_FIELDINFO(name, read, write, integer)
Definition: parser.h:116
di_parser_write_string
di_parser_fields_function_write di_parser_write_string
Definition: parser.h:153
di_package
Package.
Definition: package.h:96

parser info