1 /**
2  * libdmtx - Data Matrix Encoding/Decoding Library
3  * Copyright 2008, 2009 Mike Laughton. All rights reserved.
4  * Copyright 2012-2016 Vadim A. Misbakh-Soloviov. All rights reserved.
5  *
6  * See LICENSE file in the main project directory for full
7  * terms of use and distribution.
8  *
9  * Contact:
10  * Vadim A. Misbakh-Soloviov <dmtx@mva.name>
11  * Mike Laughton <mike@dragonflylogic.com>
12  *
13  * \file dmtx.c
14  * \brief Main libdmtx source file
15  */
16 
17 #include <stdlib.h>
18 #include <stdio.h>
19 #include <sys/types.h>
20 #include <ctype.h>
21 #include <limits.h>
22 #include <float.h>
23 #include <string.h>
24 #include <errno.h>
25 #include <assert.h>
26 #include <math.h>
27 #include "dmtx.h"
28 #include "dmtxstatic.h"
29 
30 #ifdef HAVE_CONFIG_H
31 #include "config.h"
32 #endif
33 
34 #ifndef CALLBACK_POINT_PLOT
35 #define CALLBACK_POINT_PLOT(a,b,c,d)
36 #endif
37 
38 #ifndef CALLBACK_POINT_XFRM
39 #define CALLBACK_POINT_XFRM(a,b,c,d)
40 #endif
41 
42 #ifndef CALLBACK_MODULE
43 #define CALLBACK_MODULE(a,b,c,d,e)
44 #endif
45 
46 #ifndef CALLBACK_MATRIX
47 #define CALLBACK_MATRIX(a)
48 #endif
49 
50 #ifndef CALLBACK_FINAL
51 #define CALLBACK_FINAL(a,b)
52 #endif
53 
54 /**
55  * Use #include to merge the individual .c source files into a single combined
56  * file during preprocessing. This allows the project to be organized in files
57  * of like-functionality while still keeping a clean namespace. Specifically,
58  * internal functions can be static without losing the ability to access them
59  * "externally" from the other source files in this list.
60  */
61 
62 #include "dmtxencode.c"
63 #include "dmtxencodestream.c"
64 #include "dmtxencodescheme.c"
65 #include "dmtxencodeoptimize.c"
66 #include "dmtxencodeascii.c"
67 #include "dmtxencodec40textx12.c"
68 #include "dmtxencodeedifact.c"
69 #include "dmtxencodebase256.c"
70 
71 #include "dmtxdecode.c"
72 #include "dmtxdecodescheme.c"
73 
74 #include "dmtxmessage.c"
75 #include "dmtxregion.c"
76 #include "dmtxsymbol.c"
77 #include "dmtxplacemod.c"
78 #include "dmtxreedsol.c"
79 #include "dmtxscangrid.c"
80 
81 #include "dmtximage.c"
82 #include "dmtxbytelist.c"
83 #include "dmtxtime.c"
84 #include "dmtxvector2.c"
85 #include "dmtxmatrix3.c"
86 
87 extern char *
dmtxVersion(void)88 dmtxVersion(void)
89 {
90    return DmtxVersion;
91 }
92