File: dmtx.c

package info (click to toggle)
libdmtx 0.7.8-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,108 kB
  • sloc: ansic: 10,638; sh: 253; makefile: 154; perl: 28
file content (102 lines) | stat: -rw-r--r-- 2,217 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/**
 * libdmtx - Data Matrix Encoding/Decoding Library
 * Copyright 2008, 2009 Mike Laughton. All rights reserved.
 * Copyright 2012-2016 Vadim A. Misbakh-Soloviov. All rights reserved.
 *
 * See LICENSE file in the main project directory for full
 * terms of use and distribution.
 *
 * Contact:
 * Vadim A. Misbakh-Soloviov <dmtx@mva.name>
 * Mike Laughton <mike@dragonflylogic.com>
 *
 * \file dmtx.c
 * \brief Main libdmtx source file
 */

#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
#include <limits.h>
#include <float.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <math.h>

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "dmtx.h"
#include "dmtxstatic.h"

#ifndef CALLBACK_POINT_PLOT
#define CALLBACK_POINT_PLOT(a,b,c,d)
#endif

#ifndef CALLBACK_POINT_XFRM
#define CALLBACK_POINT_XFRM(a,b,c,d)
#endif

#ifndef CALLBACK_MODULE
#define CALLBACK_MODULE(a,b,c,d,e)
#endif

#ifndef CALLBACK_MATRIX
#define CALLBACK_MATRIX(a)
#endif

#ifndef CALLBACK_FINAL
#define CALLBACK_FINAL(a,b)
#endif

/**
 * Use #include to merge the individual .c source files into a single combined
 * file during preprocessing. This allows the project to be organized in files
 * of like-functionality while still keeping a clean namespace. Specifically,
 * internal functions can be static without losing the ability to access them
 * "externally" from the other source files in this list.
 */

#include "dmtxencode.c"
#include "dmtxencodestream.c"
#include "dmtxencodescheme.c"
#include "dmtxencodeoptimize.c"
#include "dmtxencodeascii.c"
#include "dmtxencodec40textx12.c"
#include "dmtxencodeedifact.c"
#include "dmtxencodebase256.c"

#include "dmtxdecode.c"
#include "dmtxdecodescheme.c"

#include "dmtxmessage.c"
#include "dmtxregion.c"
#include "dmtxsymbol.c"
#include "dmtxplacemod.c"
#include "dmtxreedsol.c"
#include "dmtxscangrid.c"

#include "dmtximage.c"
#include "dmtxbytelist.c"
#include "dmtxtime.c"
#include "dmtxvector2.c"
#include "dmtxmatrix3.c"

extern char *
dmtxVersion(void)
{
   return DmtxVersion;
}

extern DmtxBoolean
dmtxHasReaderProgramming(void)
{
#ifdef HAVE_READER_PROGRAMMING
    return DmtxTrue;
#else
    return DmtxFalse;
#endif
}