UPCE/UPCE_CC: allow check digit (same as UPCA/UPCA_CC) so selecting composite doesn't give error

composite.c: warning wasn't been passed back
zint.h/library.c: add const to char pointer args; move func defs around a bit
This commit is contained in:
gitlost 2021-07-12 22:27:16 +01:00
parent 58420f3dde
commit 7cc2095d3c
8 changed files with 2075 additions and 1710 deletions

View file

@ -328,44 +328,63 @@ extern "C" {
/* Create and initialize a symbol structure */
ZINT_EXTERN struct zint_symbol *ZBarcode_Create(void);
/* Free any output buffers that may have been created and initialize output fields */
ZINT_EXTERN void ZBarcode_Clear(struct zint_symbol *symbol);
/* Free a symbol structure, including any output buffers */
ZINT_EXTERN void ZBarcode_Delete(struct zint_symbol *symbol);
/* Encode a barcode. If `length` is 0, `source` must be NUL-terminated. */
ZINT_EXTERN int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int length);
/* Encode a barcode using input data from file `filename` */
ZINT_EXTERN int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename);
ZINT_EXTERN int ZBarcode_Encode_File(struct zint_symbol *symbol, const char *filename);
/* Output a previously encoded symbol to file `symbol->outfile` */
ZINT_EXTERN int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle);
/* Encode and output a symbol to file `symbol->outfile` */
ZINT_EXTERN int ZBarcode_Encode_and_Print(struct zint_symbol *symbol, unsigned char *source, int length,
ZINT_EXTERN int ZBarcode_Encode_and_Print(struct zint_symbol *symbol, const unsigned char *source, int length,
int rotate_angle);
/* Encode a symbol using input data from file `filename` and output to file `symbol->outfile` */
ZINT_EXTERN int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol, char *filename, int rotate_angle);
ZINT_EXTERN int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol, const char *filename,
int rotate_angle);
/* Output a previously encoded symbol to memory as raster (`symbol->bitmap`) */
ZINT_EXTERN int ZBarcode_Buffer(struct zint_symbol *symbol, int rotate_angle);
/* Encode and output a symbol to memory as raster (`symbol->bitmap`) */
ZINT_EXTERN int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol, const unsigned char *source, int length,
int rotate_angle);
/* Encode a symbol using input data from file `filename` and output to memory as raster (`symbol->bitmap`) */
ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, const char *filename,
int rotate_angle);
/* Output a previously encoded symbol to memory as vector (`symbol->vector`) */
ZINT_EXTERN int ZBarcode_Buffer_Vector(struct zint_symbol *symbol, int rotate_angle);
/* Encode and output a symbol to memory as raster (`symbol->bitmap`) */
ZINT_EXTERN int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol, unsigned char *source, int length,
int rotate_angle);
/* Encode and output a symbol to memory as vector (`symbol->vector`) */
ZINT_EXTERN int ZBarcode_Encode_and_Buffer_Vector(struct zint_symbol *symbol, unsigned char *source, int length,
int rotate_angle);
/* Encode a symbol using input data from file `filename` and output to memory as raster (`symbol->bitmap`) */
ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, char *filename, int rotate_angle);
ZINT_EXTERN int ZBarcode_Encode_and_Buffer_Vector(struct zint_symbol *symbol, const unsigned char *source,
int length, int rotate_angle);
/* Encode a symbol using input data from file `filename` and output to memory as vector (`symbol->vector`) */
ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer_Vector(struct zint_symbol *symbol, char *filename,
ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer_Vector(struct zint_symbol *symbol, const char *filename,
int rotate_angle);
/* Is `symbol_id` a recognized symbology? */
ZINT_EXTERN int ZBarcode_ValidID(int symbol_id);
/* Return the capability flags for symbology `symbol_id` that match `cap_flag` */
ZINT_EXTERN unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag);
/* Return the version of Zint linked to */
ZINT_EXTERN int ZBarcode_Version();