man barcode (Fonctions bibliothèques) - a library to create and print bar codes
NAME
barcode - a library to create and print bar codes
SYNOPSIS
#include <barcode.h>
struct Barcode_Item *Barcode_Create(char *text);
int Barcode_Delete(struct Barcode_Item *bc);
int Barcode_Encode(struct Barcode_Item *bc, int flags);
int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags);
int Barcode_Position(struct Barcode_Item *bc, int wid, int hei, int xoff, int yoff , double scalef);
int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei, int xoff, int yoff, int flags);
int Barcode_Version(char *versionname);
DESCRIPTION
The barcode family of library functions is meant to ease creation of bar-code printouts. The information below is extracted from the texinfo file, which is the preferred source of information.
The functions included in the barcode library are declared in the header file barcode.h. They perform the following tasks:
- struct Barcode_Item *Barcode_Create(char *text);
- Thefunctioncreatesanewbarcodeobjecttodealwitha specifiedtextstring.ItreturnsNULLincaseoffailureand apointertoabarcodedatastructureincaseofsuccess.
- int Barcode_Delete(struct Barcode_Item *bc);
- Destroyabarcodeobject.Alwaysreturns0(success)
- int Barcode_Encode(struct Barcode_Item *bc, int flags);
- Encodethetextincludedinthebcobject.Validflagsare theencodingtype(otherflagsareignored)and BARCODE_NO_CHECKSUM(otherflagsaresilentlyignored);ifthe flagargumentiszero,bc->flagswillapply.Thefunction returns0onsuccessand-1incaseoferror.After successfulterminationthedatastructurewillhostthe descriptionofthebarcodeanditstextualrepresentation, afterafailuretheerrorfieldwillincludethereasonof thefailure.
- int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags);
- Printthebarcodedescribedbybctothespecifiedfile. Validflagsaretheoutputtype,BARCODE_NO_ASCIIand BARCODE_OUT_NOHEADERS,otherflagsareignored.Ifanyof theseflagsiszero,itwillbeinheritedfrombc->flags whichthereforetakesprecedence.Thefunctionreturns0on successand-1incaseoferror(withbc->errorset accordingly).Incaseofsuccess,thebarcodeisprintedto thespecifiedfile,whichwon'tbeclosedafteruse.
- int Barcode_Position(struct Barcode_Item *bc, int wid, int hei, int xoff, int yoff, double scalef);
- Thefunctionisashortcuttoassignvaluestothedata structure.
- int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei, int xoff, int yoff, int flags);
- Thefunctiondealswiththewholelifeofthebarcode objectbycallingtheotherfunctions;itusesallthespecified flags.
- int Barcode_Version(char *versionname);
- Returnsthecurrentversionasanintegernumberoftheform major*10000+minor*100+release.Therefore,version 1.03.5willbereturnedas10305andversion0.53as5300.If theargumentisnon-null,itwillbeusedtoreturntheversion numberasastring.Notethatthesameinformationisavailablefrom twopreprocessormacros:BARCODE_VERSION(thestring)and BARCODE_VERSION_INT(theintegernumber).