]> git.sur5r.net Git - iec16022/blob - iec16022ecc200.h
Import Debian changes 0.2.4-1.2
[iec16022] / iec16022ecc200.h
1 /**
2  *
3  * IEC16022 bar code generation
4  * Adrian Kennard, Andrews & Arnold Ltd
5  * with help from Cliff Hones on the RS coding
6  *
7  * (c) 2004 Adrian Kennard, Andrews & Arnold Ltd
8  * (c) 2006-2007 Stefan Schmidt <stefan@datenfreihafen.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
23  *
24  *
25  * Main encoding function
26  * Returns the grid (malloced) containing the matrix. L corner at 0,0.
27  * Takes suggested size in *Wptr, *Hptr, or 0,0. Fills in actual size.
28  * Takes barcodelen and barcode to be encoded
29  * Note, if *encodingptr is null, then fills with auto picked (malloced)
30  * encoding.
31  * If lenp not null, then the length of encoded data before any final unlatch
32  * or pad is stored.
33  * If maxp not null, then the max storage of this size code is stored
34  * If eccp not null, then the number of ecc bytes used in this size is stored
35  * Returns 0 on error (writes to stderr with details).
36  *
37  */
38
39 #ifndef __IEC16022ECC200_H
40 #define __IEC16022ECC200_H
41
42 unsigned char *iec16022ecc200(int *Wptr, int *Hptr, char **encodingptr,
43                               int barcodelen, unsigned char *barcode,
44                               int *lenp, int *maxp, int *eccp);
45 #define MAXBARCODE 3116
46
47 #endif                          /* __IEC16022ECC200_H */