entangledstate-isbn 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. data/README +1 -1
  2. data/Rakefile +0 -18
  3. data/VERSION +1 -0
  4. data/isbn.gemspec +290 -7
  5. data/lib/isbn.rb +6 -6
  6. data/src/gocr-0.48/.cvsignore +6 -0
  7. data/src/gocr-0.48/AUTHORS +7 -0
  8. data/src/gocr-0.48/BUGS +55 -0
  9. data/src/gocr-0.48/CREDITS +17 -0
  10. data/src/gocr-0.48/HISTORY +243 -0
  11. data/src/gocr-0.48/INSTALL +83 -0
  12. data/src/gocr-0.48/Makefile +193 -0
  13. data/src/gocr-0.48/Makefile.in +193 -0
  14. data/src/gocr-0.48/README +165 -0
  15. data/src/gocr-0.48/READMEde.txt +80 -0
  16. data/src/gocr-0.48/REMARK.txt +18 -0
  17. data/src/gocr-0.48/REVIEW +538 -0
  18. data/src/gocr-0.48/TODO +65 -0
  19. data/src/gocr-0.48/bin/.cvsignore +2 -0
  20. data/src/gocr-0.48/bin/create_db +38 -0
  21. data/src/gocr-0.48/bin/gocr.tcl +527 -0
  22. data/src/gocr-0.48/bin/gocr_chk.sh +44 -0
  23. data/src/gocr-0.48/configure +4689 -0
  24. data/src/gocr-0.48/configure.in +71 -0
  25. data/src/gocr-0.48/doc/.#Makefile.1.6 +39 -0
  26. data/src/gocr-0.48/doc/.cvsignore +2 -0
  27. data/src/gocr-0.48/doc/Makefile +39 -0
  28. data/src/gocr-0.48/doc/Makefile.in +39 -0
  29. data/src/gocr-0.48/doc/example.dtd +53 -0
  30. data/src/gocr-0.48/doc/example.xml +21 -0
  31. data/src/gocr-0.48/doc/examples.txt +67 -0
  32. data/src/gocr-0.48/doc/gocr.html +578 -0
  33. data/src/gocr-0.48/doc/unicode.txt +57 -0
  34. data/src/gocr-0.48/examples/.#Makefile.1.22 +166 -0
  35. data/src/gocr-0.48/examples/4x6.png +0 -0
  36. data/src/gocr-0.48/examples/4x6.txt +2 -0
  37. data/src/gocr-0.48/examples/5x7.png +0 -0
  38. data/src/gocr-0.48/examples/5x7.png.txt +2 -0
  39. data/src/gocr-0.48/examples/5x8.png +0 -0
  40. data/src/gocr-0.48/examples/5x8.png.txt +2 -0
  41. data/src/gocr-0.48/examples/Makefile +166 -0
  42. data/src/gocr-0.48/examples/color.fig +20 -0
  43. data/src/gocr-0.48/examples/ex.fig +16 -0
  44. data/src/gocr-0.48/examples/font.tex +22 -0
  45. data/src/gocr-0.48/examples/font1.tex +46 -0
  46. data/src/gocr-0.48/examples/font2.fig +27 -0
  47. data/src/gocr-0.48/examples/font_nw.tex +24 -0
  48. data/src/gocr-0.48/examples/handwrt1.jpg +0 -0
  49. data/src/gocr-0.48/examples/handwrt1.txt +10 -0
  50. data/src/gocr-0.48/examples/inverse.fig +20 -0
  51. data/src/gocr-0.48/examples/matrix.jpg +0 -0
  52. data/src/gocr-0.48/examples/ocr-a-subset.png +0 -0
  53. data/src/gocr-0.48/examples/ocr-a-subset.png.txt +4 -0
  54. data/src/gocr-0.48/examples/ocr-a.png +0 -0
  55. data/src/gocr-0.48/examples/ocr-a.txt +6 -0
  56. data/src/gocr-0.48/examples/ocr-b.png +0 -0
  57. data/src/gocr-0.48/examples/ocr-b.png.txt +4 -0
  58. data/src/gocr-0.48/examples/polish.tex +28 -0
  59. data/src/gocr-0.48/examples/rotate45.fig +14 -0
  60. data/src/gocr-0.48/examples/score +36 -0
  61. data/src/gocr-0.48/examples/text.tex +28 -0
  62. data/src/gocr-0.48/gocr.spec +143 -0
  63. data/src/gocr-0.48/gpl.html +537 -0
  64. data/src/gocr-0.48/include/.cvsignore +2 -0
  65. data/src/gocr-0.48/include/config.h +36 -0
  66. data/src/gocr-0.48/include/config.h.in +36 -0
  67. data/src/gocr-0.48/include/version.h +2 -0
  68. data/src/gocr-0.48/install-sh +3 -0
  69. data/src/gocr-0.48/make.bat +57 -0
  70. data/src/gocr-0.48/man/.cvsignore +2 -0
  71. data/src/gocr-0.48/man/Makefile +29 -0
  72. data/src/gocr-0.48/man/Makefile.in +29 -0
  73. data/src/gocr-0.48/man/man1/gocr.1 +166 -0
  74. data/src/gocr-0.48/src/.cvsignore +4 -0
  75. data/src/gocr-0.48/src/Makefile +132 -0
  76. data/src/gocr-0.48/src/Makefile.in +132 -0
  77. data/src/gocr-0.48/src/amiga.h +31 -0
  78. data/src/gocr-0.48/src/barcode.c +846 -0
  79. data/src/gocr-0.48/src/barcode.c.orig +593 -0
  80. data/src/gocr-0.48/src/barcode.h +11 -0
  81. data/src/gocr-0.48/src/box.c +372 -0
  82. data/src/gocr-0.48/src/database.c +462 -0
  83. data/src/gocr-0.48/src/detect.c +943 -0
  84. data/src/gocr-0.48/src/gocr.c +373 -0
  85. data/src/gocr-0.48/src/gocr.h +288 -0
  86. data/src/gocr-0.48/src/jconv.c +168 -0
  87. data/src/gocr-0.48/src/job.c +84 -0
  88. data/src/gocr-0.48/src/lines.c +350 -0
  89. data/src/gocr-0.48/src/list.c +334 -0
  90. data/src/gocr-0.48/src/list.h +90 -0
  91. data/src/gocr-0.48/src/ocr0.c +6756 -0
  92. data/src/gocr-0.48/src/ocr0.h +63 -0
  93. data/src/gocr-0.48/src/ocr0n.c +1475 -0
  94. data/src/gocr-0.48/src/ocr1.c +85 -0
  95. data/src/gocr-0.48/src/ocr1.h +3 -0
  96. data/src/gocr-0.48/src/otsu.c +289 -0
  97. data/src/gocr-0.48/src/otsu.h +23 -0
  98. data/src/gocr-0.48/src/output.c +289 -0
  99. data/src/gocr-0.48/src/output.h +37 -0
  100. data/src/gocr-0.48/src/pcx.c +153 -0
  101. data/src/gocr-0.48/src/pcx.h +9 -0
  102. data/src/gocr-0.48/src/pgm2asc.c +2893 -0
  103. data/src/gocr-0.48/src/pgm2asc.h +105 -0
  104. data/src/gocr-0.48/src/pixel.c +537 -0
  105. data/src/gocr-0.48/src/pnm.c +533 -0
  106. data/src/gocr-0.48/src/pnm.h +35 -0
  107. data/src/gocr-0.48/src/progress.c +87 -0
  108. data/src/gocr-0.48/src/progress.h +42 -0
  109. data/src/gocr-0.48/src/remove.c +703 -0
  110. data/src/gocr-0.48/src/tga.c +87 -0
  111. data/src/gocr-0.48/src/tga.h +6 -0
  112. data/src/gocr-0.48/src/unicode.c +1314 -0
  113. data/src/gocr-0.48/src/unicode.h +1257 -0
  114. data/src/jpeg-7/Makefile.am +133 -0
  115. data/src/jpeg-7/Makefile.in +1089 -0
  116. data/src/jpeg-7/README +322 -0
  117. data/src/jpeg-7/aclocal.m4 +8990 -0
  118. data/src/jpeg-7/ansi2knr.1 +36 -0
  119. data/src/jpeg-7/ansi2knr.c +739 -0
  120. data/src/jpeg-7/cderror.h +132 -0
  121. data/src/jpeg-7/cdjpeg.c +181 -0
  122. data/src/jpeg-7/cdjpeg.h +187 -0
  123. data/src/jpeg-7/change.log +270 -0
  124. data/src/jpeg-7/cjpeg.1 +325 -0
  125. data/src/jpeg-7/cjpeg.c +616 -0
  126. data/src/jpeg-7/ckconfig.c +402 -0
  127. data/src/jpeg-7/coderules.txt +118 -0
  128. data/src/jpeg-7/config.guess +1561 -0
  129. data/src/jpeg-7/config.sub +1686 -0
  130. data/src/jpeg-7/configure +17139 -0
  131. data/src/jpeg-7/configure.ac +317 -0
  132. data/src/jpeg-7/depcomp +630 -0
  133. data/src/jpeg-7/djpeg.1 +251 -0
  134. data/src/jpeg-7/djpeg.c +617 -0
  135. data/src/jpeg-7/example.c +433 -0
  136. data/src/jpeg-7/filelist.txt +215 -0
  137. data/src/jpeg-7/install-sh +520 -0
  138. data/src/jpeg-7/install.txt +1097 -0
  139. data/src/jpeg-7/jaricom.c +148 -0
  140. data/src/jpeg-7/jcapimin.c +282 -0
  141. data/src/jpeg-7/jcapistd.c +161 -0
  142. data/src/jpeg-7/jcarith.c +921 -0
  143. data/src/jpeg-7/jccoefct.c +453 -0
  144. data/src/jpeg-7/jccolor.c +459 -0
  145. data/src/jpeg-7/jcdctmgr.c +482 -0
  146. data/src/jpeg-7/jchuff.c +1612 -0
  147. data/src/jpeg-7/jcinit.c +65 -0
  148. data/src/jpeg-7/jcmainct.c +293 -0
  149. data/src/jpeg-7/jcmarker.c +667 -0
  150. data/src/jpeg-7/jcmaster.c +770 -0
  151. data/src/jpeg-7/jcomapi.c +106 -0
  152. data/src/jpeg-7/jconfig.bcc +48 -0
  153. data/src/jpeg-7/jconfig.cfg +45 -0
  154. data/src/jpeg-7/jconfig.dj +38 -0
  155. data/src/jpeg-7/jconfig.mac +43 -0
  156. data/src/jpeg-7/jconfig.manx +43 -0
  157. data/src/jpeg-7/jconfig.mc6 +52 -0
  158. data/src/jpeg-7/jconfig.sas +43 -0
  159. data/src/jpeg-7/jconfig.st +42 -0
  160. data/src/jpeg-7/jconfig.txt +155 -0
  161. data/src/jpeg-7/jconfig.vc +45 -0
  162. data/src/jpeg-7/jconfig.vms +37 -0
  163. data/src/jpeg-7/jconfig.wat +38 -0
  164. data/src/jpeg-7/jcparam.c +632 -0
  165. data/src/jpeg-7/jcprepct.c +358 -0
  166. data/src/jpeg-7/jcsample.c +545 -0
  167. data/src/jpeg-7/jctrans.c +381 -0
  168. data/src/jpeg-7/jdapimin.c +396 -0
  169. data/src/jpeg-7/jdapistd.c +275 -0
  170. data/src/jpeg-7/jdarith.c +762 -0
  171. data/src/jpeg-7/jdatadst.c +151 -0
  172. data/src/jpeg-7/jdatasrc.c +212 -0
  173. data/src/jpeg-7/jdcoefct.c +736 -0
  174. data/src/jpeg-7/jdcolor.c +396 -0
  175. data/src/jpeg-7/jdct.h +393 -0
  176. data/src/jpeg-7/jddctmgr.c +382 -0
  177. data/src/jpeg-7/jdhuff.c +1309 -0
  178. data/src/jpeg-7/jdinput.c +384 -0
  179. data/src/jpeg-7/jdmainct.c +512 -0
  180. data/src/jpeg-7/jdmarker.c +1360 -0
  181. data/src/jpeg-7/jdmaster.c +663 -0
  182. data/src/jpeg-7/jdmerge.c +400 -0
  183. data/src/jpeg-7/jdpostct.c +290 -0
  184. data/src/jpeg-7/jdsample.c +361 -0
  185. data/src/jpeg-7/jdtrans.c +136 -0
  186. data/src/jpeg-7/jerror.c +252 -0
  187. data/src/jpeg-7/jerror.h +304 -0
  188. data/src/jpeg-7/jfdctflt.c +174 -0
  189. data/src/jpeg-7/jfdctfst.c +230 -0
  190. data/src/jpeg-7/jfdctint.c +4348 -0
  191. data/src/jpeg-7/jidctflt.c +242 -0
  192. data/src/jpeg-7/jidctfst.c +368 -0
  193. data/src/jpeg-7/jidctint.c +5137 -0
  194. data/src/jpeg-7/jinclude.h +91 -0
  195. data/src/jpeg-7/jmemansi.c +167 -0
  196. data/src/jpeg-7/jmemdos.c +638 -0
  197. data/src/jpeg-7/jmemdosa.asm +379 -0
  198. data/src/jpeg-7/jmemmac.c +289 -0
  199. data/src/jpeg-7/jmemmgr.c +1118 -0
  200. data/src/jpeg-7/jmemname.c +276 -0
  201. data/src/jpeg-7/jmemnobs.c +109 -0
  202. data/src/jpeg-7/jmemsys.h +198 -0
  203. data/src/jpeg-7/jmorecfg.h +369 -0
  204. data/src/jpeg-7/jpegint.h +395 -0
  205. data/src/jpeg-7/jpeglib.h +1135 -0
  206. data/src/jpeg-7/jpegtran.1 +272 -0
  207. data/src/jpeg-7/jpegtran.c +546 -0
  208. data/src/jpeg-7/jquant1.c +856 -0
  209. data/src/jpeg-7/jquant2.c +1310 -0
  210. data/src/jpeg-7/jutils.c +179 -0
  211. data/src/jpeg-7/jversion.h +14 -0
  212. data/src/jpeg-7/libjpeg.map +4 -0
  213. data/src/jpeg-7/libjpeg.txt +3067 -0
  214. data/src/jpeg-7/ltmain.sh +8406 -0
  215. data/src/jpeg-7/makcjpeg.st +36 -0
  216. data/src/jpeg-7/makdjpeg.st +36 -0
  217. data/src/jpeg-7/makeadsw.vc6 +77 -0
  218. data/src/jpeg-7/makeasln.vc9 +33 -0
  219. data/src/jpeg-7/makecdep.vc6 +82 -0
  220. data/src/jpeg-7/makecdsp.vc6 +130 -0
  221. data/src/jpeg-7/makecmak.vc6 +159 -0
  222. data/src/jpeg-7/makecvcp.vc9 +186 -0
  223. data/src/jpeg-7/makeddep.vc6 +82 -0
  224. data/src/jpeg-7/makeddsp.vc6 +130 -0
  225. data/src/jpeg-7/makedmak.vc6 +159 -0
  226. data/src/jpeg-7/makedvcp.vc9 +186 -0
  227. data/src/jpeg-7/makefile.ansi +220 -0
  228. data/src/jpeg-7/makefile.bcc +291 -0
  229. data/src/jpeg-7/makefile.dj +226 -0
  230. data/src/jpeg-7/makefile.manx +220 -0
  231. data/src/jpeg-7/makefile.mc6 +255 -0
  232. data/src/jpeg-7/makefile.mms +224 -0
  233. data/src/jpeg-7/makefile.sas +258 -0
  234. data/src/jpeg-7/makefile.unix +234 -0
  235. data/src/jpeg-7/makefile.vc +217 -0
  236. data/src/jpeg-7/makefile.vms +142 -0
  237. data/src/jpeg-7/makefile.wat +239 -0
  238. data/src/jpeg-7/makejdep.vc6 +423 -0
  239. data/src/jpeg-7/makejdsp.vc6 +285 -0
  240. data/src/jpeg-7/makejdsw.vc6 +29 -0
  241. data/src/jpeg-7/makejmak.vc6 +425 -0
  242. data/src/jpeg-7/makejsln.vc9 +17 -0
  243. data/src/jpeg-7/makejvcp.vc9 +328 -0
  244. data/src/jpeg-7/makeproj.mac +213 -0
  245. data/src/jpeg-7/makerdep.vc6 +6 -0
  246. data/src/jpeg-7/makerdsp.vc6 +78 -0
  247. data/src/jpeg-7/makermak.vc6 +110 -0
  248. data/src/jpeg-7/makervcp.vc9 +133 -0
  249. data/src/jpeg-7/maketdep.vc6 +43 -0
  250. data/src/jpeg-7/maketdsp.vc6 +122 -0
  251. data/src/jpeg-7/maketmak.vc6 +131 -0
  252. data/src/jpeg-7/maketvcp.vc9 +178 -0
  253. data/src/jpeg-7/makewdep.vc6 +6 -0
  254. data/src/jpeg-7/makewdsp.vc6 +78 -0
  255. data/src/jpeg-7/makewmak.vc6 +110 -0
  256. data/src/jpeg-7/makewvcp.vc9 +133 -0
  257. data/src/jpeg-7/makljpeg.st +68 -0
  258. data/src/jpeg-7/maktjpeg.st +30 -0
  259. data/src/jpeg-7/makvms.opt +4 -0
  260. data/src/jpeg-7/missing +376 -0
  261. data/src/jpeg-7/rdbmp.c +439 -0
  262. data/src/jpeg-7/rdcolmap.c +253 -0
  263. data/src/jpeg-7/rdgif.c +38 -0
  264. data/src/jpeg-7/rdjpgcom.1 +63 -0
  265. data/src/jpeg-7/rdjpgcom.c +515 -0
  266. data/src/jpeg-7/rdppm.c +459 -0
  267. data/src/jpeg-7/rdrle.c +387 -0
  268. data/src/jpeg-7/rdswitch.c +365 -0
  269. data/src/jpeg-7/rdtarga.c +500 -0
  270. data/src/jpeg-7/structure.txt +945 -0
  271. data/src/jpeg-7/testimg.bmp +0 -0
  272. data/src/jpeg-7/testimg.jpg +0 -0
  273. data/src/jpeg-7/testimg.ppm +4 -0
  274. data/src/jpeg-7/testimgp.jpg +0 -0
  275. data/src/jpeg-7/testorig.jpg +0 -0
  276. data/src/jpeg-7/testprog.jpg +0 -0
  277. data/src/jpeg-7/transupp.c +1533 -0
  278. data/src/jpeg-7/transupp.h +205 -0
  279. data/src/jpeg-7/usage.txt +605 -0
  280. data/src/jpeg-7/wizard.txt +211 -0
  281. data/src/jpeg-7/wrbmp.c +442 -0
  282. data/src/jpeg-7/wrgif.c +399 -0
  283. data/src/jpeg-7/wrjpgcom.1 +103 -0
  284. data/src/jpeg-7/wrjpgcom.c +583 -0
  285. data/src/jpeg-7/wrppm.c +269 -0
  286. data/src/jpeg-7/wrrle.c +305 -0
  287. data/src/jpeg-7/wrtarga.c +253 -0
  288. metadata +287 -6
  289. data/LICENSE +0 -20
  290. data/VERSION.yml +0 -4
@@ -0,0 +1,402 @@
1
+ /*
2
+ * ckconfig.c
3
+ *
4
+ * Copyright (C) 1991-1994, Thomas G. Lane.
5
+ * This file is part of the Independent JPEG Group's software.
6
+ * For conditions of distribution and use, see the accompanying README file.
7
+ */
8
+
9
+ /*
10
+ * This program is intended to help you determine how to configure the JPEG
11
+ * software for installation on a particular system. The idea is to try to
12
+ * compile and execute this program. If your compiler fails to compile the
13
+ * program, make changes as indicated in the comments below. Once you can
14
+ * compile the program, run it, and it will produce a "jconfig.h" file for
15
+ * your system.
16
+ *
17
+ * As a general rule, each time you try to compile this program,
18
+ * pay attention only to the *first* error message you get from the compiler.
19
+ * Many C compilers will issue lots of spurious error messages once they
20
+ * have gotten confused. Go to the line indicated in the first error message,
21
+ * and read the comments preceding that line to see what to change.
22
+ *
23
+ * Almost all of the edits you may need to make to this program consist of
24
+ * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL",
25
+ * or vice versa. This is called defining or undefining that symbol.
26
+ */
27
+
28
+
29
+ /* First we must see if your system has the include files we need.
30
+ * We start out with the assumption that your system has all the ANSI-standard
31
+ * include files. If you get any error trying to include one of these files,
32
+ * undefine the corresponding HAVE_xxx symbol.
33
+ */
34
+
35
+ #define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */
36
+ #ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */
37
+ #include <stddef.h>
38
+ #endif
39
+
40
+ #define HAVE_STDLIB_H /* same thing for stdlib.h */
41
+ #ifdef HAVE_STDLIB_H
42
+ #include <stdlib.h>
43
+ #endif
44
+
45
+ #include <stdio.h> /* If you ain't got this, you ain't got C. */
46
+
47
+ /* We have to see if your string functions are defined by
48
+ * strings.h (old BSD convention) or string.h (everybody else).
49
+ * We try the non-BSD convention first; define NEED_BSD_STRINGS
50
+ * if the compiler says it can't find string.h.
51
+ */
52
+
53
+ #undef NEED_BSD_STRINGS
54
+
55
+ #ifdef NEED_BSD_STRINGS
56
+ #include <strings.h>
57
+ #else
58
+ #include <string.h>
59
+ #endif
60
+
61
+ /* On some systems (especially older Unix machines), type size_t is
62
+ * defined only in the include file <sys/types.h>. If you get a failure
63
+ * on the size_t test below, try defining NEED_SYS_TYPES_H.
64
+ */
65
+
66
+ #undef NEED_SYS_TYPES_H /* start by assuming we don't need it */
67
+ #ifdef NEED_SYS_TYPES_H
68
+ #include <sys/types.h>
69
+ #endif
70
+
71
+
72
+ /* Usually type size_t is defined in one of the include files we've included
73
+ * above. If not, you'll get an error on the "typedef size_t my_size_t;" line.
74
+ * In that case, first try defining NEED_SYS_TYPES_H just above.
75
+ * If that doesn't work, you'll have to search through your system library
76
+ * to figure out which include file defines "size_t". Look for a line that
77
+ * says "typedef something-or-other size_t;". Then, change the line below
78
+ * that says "#include <someincludefile.h>" to instead include the file
79
+ * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find
80
+ * type size_t anywhere, try replacing "#include <someincludefile.h>" with
81
+ * "typedef unsigned int size_t;".
82
+ */
83
+
84
+ #undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */
85
+
86
+ #ifdef NEED_SPECIAL_INCLUDE
87
+ #include <someincludefile.h>
88
+ #endif
89
+
90
+ typedef size_t my_size_t; /* The payoff: do we have size_t now? */
91
+
92
+
93
+ /* The next question is whether your compiler supports ANSI-style function
94
+ * prototypes. You need to know this in order to choose between using
95
+ * makefile.ansi and using makefile.unix.
96
+ * The #define line below is set to assume you have ANSI function prototypes.
97
+ * If you get an error in this group of lines, undefine HAVE_PROTOTYPES.
98
+ */
99
+
100
+ #define HAVE_PROTOTYPES
101
+
102
+ #ifdef HAVE_PROTOTYPES
103
+ int testfunction (int arg1, int * arg2); /* check prototypes */
104
+
105
+ struct methods_struct { /* check method-pointer declarations */
106
+ int (*error_exit) (char *msgtext);
107
+ int (*trace_message) (char *msgtext);
108
+ int (*another_method) (void);
109
+ };
110
+
111
+ int testfunction (int arg1, int * arg2) /* check definitions */
112
+ {
113
+ return arg2[arg1];
114
+ }
115
+
116
+ int test2function (void) /* check void arg list */
117
+ {
118
+ return 0;
119
+ }
120
+ #endif
121
+
122
+
123
+ /* Now we want to find out if your compiler knows what "unsigned char" means.
124
+ * If you get an error on the "unsigned char un_char;" line,
125
+ * then undefine HAVE_UNSIGNED_CHAR.
126
+ */
127
+
128
+ #define HAVE_UNSIGNED_CHAR
129
+
130
+ #ifdef HAVE_UNSIGNED_CHAR
131
+ unsigned char un_char;
132
+ #endif
133
+
134
+
135
+ /* Now we want to find out if your compiler knows what "unsigned short" means.
136
+ * If you get an error on the "unsigned short un_short;" line,
137
+ * then undefine HAVE_UNSIGNED_SHORT.
138
+ */
139
+
140
+ #define HAVE_UNSIGNED_SHORT
141
+
142
+ #ifdef HAVE_UNSIGNED_SHORT
143
+ unsigned short un_short;
144
+ #endif
145
+
146
+
147
+ /* Now we want to find out if your compiler understands type "void".
148
+ * If you get an error anywhere in here, undefine HAVE_VOID.
149
+ */
150
+
151
+ #define HAVE_VOID
152
+
153
+ #ifdef HAVE_VOID
154
+ /* Caution: a C++ compiler will insist on complete prototypes */
155
+ typedef void * void_ptr; /* check void * */
156
+ #ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
157
+ typedef void (*void_func) (int a, int b);
158
+ #else
159
+ typedef void (*void_func) ();
160
+ #endif
161
+
162
+ #ifdef HAVE_PROTOTYPES /* check void function result */
163
+ void test3function (void_ptr arg1, void_func arg2)
164
+ #else
165
+ void test3function (arg1, arg2)
166
+ void_ptr arg1;
167
+ void_func arg2;
168
+ #endif
169
+ {
170
+ char * locptr = (char *) arg1; /* check casting to and from void * */
171
+ arg1 = (void *) locptr;
172
+ (*arg2) (1, 2); /* check call of fcn returning void */
173
+ }
174
+ #endif
175
+
176
+
177
+ /* Now we want to find out if your compiler knows what "const" means.
178
+ * If you get an error here, undefine HAVE_CONST.
179
+ */
180
+
181
+ #define HAVE_CONST
182
+
183
+ #ifdef HAVE_CONST
184
+ static const int carray[3] = {1, 2, 3};
185
+
186
+ #ifdef HAVE_PROTOTYPES
187
+ int test4function (const int arg1)
188
+ #else
189
+ int test4function (arg1)
190
+ const int arg1;
191
+ #endif
192
+ {
193
+ return carray[arg1];
194
+ }
195
+ #endif
196
+
197
+
198
+ /* If you get an error or warning about this structure definition,
199
+ * define INCOMPLETE_TYPES_BROKEN.
200
+ */
201
+
202
+ #undef INCOMPLETE_TYPES_BROKEN
203
+
204
+ #ifndef INCOMPLETE_TYPES_BROKEN
205
+ typedef struct undefined_structure * undef_struct_ptr;
206
+ #endif
207
+
208
+
209
+ /* If you get an error about duplicate names,
210
+ * define NEED_SHORT_EXTERNAL_NAMES.
211
+ */
212
+
213
+ #undef NEED_SHORT_EXTERNAL_NAMES
214
+
215
+ #ifndef NEED_SHORT_EXTERNAL_NAMES
216
+
217
+ int possibly_duplicate_function ()
218
+ {
219
+ return 0;
220
+ }
221
+
222
+ int possibly_dupli_function ()
223
+ {
224
+ return 1;
225
+ }
226
+
227
+ #endif
228
+
229
+
230
+
231
+ /************************************************************************
232
+ * OK, that's it. You should not have to change anything beyond this
233
+ * point in order to compile and execute this program. (You might get
234
+ * some warnings, but you can ignore them.)
235
+ * When you run the program, it will make a couple more tests that it
236
+ * can do automatically, and then it will create jconfig.h and print out
237
+ * any additional suggestions it has.
238
+ ************************************************************************
239
+ */
240
+
241
+
242
+ #ifdef HAVE_PROTOTYPES
243
+ int is_char_signed (int arg)
244
+ #else
245
+ int is_char_signed (arg)
246
+ int arg;
247
+ #endif
248
+ {
249
+ if (arg == 189) { /* expected result for unsigned char */
250
+ return 0; /* type char is unsigned */
251
+ }
252
+ else if (arg != -67) { /* expected result for signed char */
253
+ printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
254
+ printf("I fear the JPEG software will not work at all.\n\n");
255
+ }
256
+ return 1; /* assume char is signed otherwise */
257
+ }
258
+
259
+
260
+ #ifdef HAVE_PROTOTYPES
261
+ int is_shifting_signed (long arg)
262
+ #else
263
+ int is_shifting_signed (arg)
264
+ long arg;
265
+ #endif
266
+ /* See whether right-shift on a long is signed or not. */
267
+ {
268
+ long res = arg >> 4;
269
+
270
+ if (res == -0x7F7E80CL) { /* expected result for signed shift */
271
+ return 1; /* right shift is signed */
272
+ }
273
+ /* see if unsigned-shift hack will fix it. */
274
+ /* we can't just test exact value since it depends on width of long... */
275
+ res |= (~0L) << (32-4);
276
+ if (res == -0x7F7E80CL) { /* expected result now? */
277
+ return 0; /* right shift is unsigned */
278
+ }
279
+ printf("Right shift isn't acting as I expect it to.\n");
280
+ printf("I fear the JPEG software will not work at all.\n\n");
281
+ return 0; /* try it with unsigned anyway */
282
+ }
283
+
284
+
285
+ #ifdef HAVE_PROTOTYPES
286
+ int main (int argc, char ** argv)
287
+ #else
288
+ int main (argc, argv)
289
+ int argc;
290
+ char ** argv;
291
+ #endif
292
+ {
293
+ char signed_char_check = (char) (-67);
294
+ FILE *outfile;
295
+
296
+ /* Attempt to write jconfig.h */
297
+ if ((outfile = fopen("jconfig.h", "w")) == NULL) {
298
+ printf("Failed to write jconfig.h\n");
299
+ return 1;
300
+ }
301
+
302
+ /* Write out all the info */
303
+ fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n");
304
+ fprintf(outfile, "/* see jconfig.txt for explanations */\n\n");
305
+ #ifdef HAVE_PROTOTYPES
306
+ fprintf(outfile, "#define HAVE_PROTOTYPES\n");
307
+ #else
308
+ fprintf(outfile, "#undef HAVE_PROTOTYPES\n");
309
+ #endif
310
+ #ifdef HAVE_UNSIGNED_CHAR
311
+ fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n");
312
+ #else
313
+ fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n");
314
+ #endif
315
+ #ifdef HAVE_UNSIGNED_SHORT
316
+ fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n");
317
+ #else
318
+ fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n");
319
+ #endif
320
+ #ifdef HAVE_VOID
321
+ fprintf(outfile, "/* #define void char */\n");
322
+ #else
323
+ fprintf(outfile, "#define void char\n");
324
+ #endif
325
+ #ifdef HAVE_CONST
326
+ fprintf(outfile, "/* #define const */\n");
327
+ #else
328
+ fprintf(outfile, "#define const\n");
329
+ #endif
330
+ if (is_char_signed((int) signed_char_check))
331
+ fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n");
332
+ else
333
+ fprintf(outfile, "#define CHAR_IS_UNSIGNED\n");
334
+ #ifdef HAVE_STDDEF_H
335
+ fprintf(outfile, "#define HAVE_STDDEF_H\n");
336
+ #else
337
+ fprintf(outfile, "#undef HAVE_STDDEF_H\n");
338
+ #endif
339
+ #ifdef HAVE_STDLIB_H
340
+ fprintf(outfile, "#define HAVE_STDLIB_H\n");
341
+ #else
342
+ fprintf(outfile, "#undef HAVE_STDLIB_H\n");
343
+ #endif
344
+ #ifdef NEED_BSD_STRINGS
345
+ fprintf(outfile, "#define NEED_BSD_STRINGS\n");
346
+ #else
347
+ fprintf(outfile, "#undef NEED_BSD_STRINGS\n");
348
+ #endif
349
+ #ifdef NEED_SYS_TYPES_H
350
+ fprintf(outfile, "#define NEED_SYS_TYPES_H\n");
351
+ #else
352
+ fprintf(outfile, "#undef NEED_SYS_TYPES_H\n");
353
+ #endif
354
+ fprintf(outfile, "#undef NEED_FAR_POINTERS\n");
355
+ #ifdef NEED_SHORT_EXTERNAL_NAMES
356
+ fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n");
357
+ #else
358
+ fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n");
359
+ #endif
360
+ #ifdef INCOMPLETE_TYPES_BROKEN
361
+ fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n");
362
+ #else
363
+ fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n");
364
+ #endif
365
+ fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n");
366
+ if (is_shifting_signed(-0x7F7E80B1L))
367
+ fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n");
368
+ else
369
+ fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n");
370
+ fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n");
371
+ fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n");
372
+ fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n");
373
+ fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n");
374
+ fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n");
375
+ fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n");
376
+ fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n");
377
+ fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n");
378
+ fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n");
379
+ fprintf(outfile, "#undef DONT_USE_B_MODE\n");
380
+ fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n");
381
+ fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n");
382
+
383
+ /* Close the jconfig.h file */
384
+ fclose(outfile);
385
+
386
+ /* User report */
387
+ printf("Configuration check for Independent JPEG Group's software done.\n");
388
+ printf("\nI have written the jconfig.h file for you.\n\n");
389
+ #ifdef HAVE_PROTOTYPES
390
+ printf("You should use makefile.ansi as the starting point for your Makefile.\n");
391
+ #else
392
+ printf("You should use makefile.unix as the starting point for your Makefile.\n");
393
+ #endif
394
+
395
+ #ifdef NEED_SPECIAL_INCLUDE
396
+ printf("\nYou'll need to change jconfig.h to include the system include file\n");
397
+ printf("that you found type size_t in, or add a direct definition of type\n");
398
+ printf("size_t if that's what you used. Just add it to the end.\n");
399
+ #endif
400
+
401
+ return 0;
402
+ }
@@ -0,0 +1,118 @@
1
+ IJG JPEG LIBRARY: CODING RULES
2
+
3
+ Copyright (C) 1991-1996, Thomas G. Lane.
4
+ This file is part of the Independent JPEG Group's software.
5
+ For conditions of distribution and use, see the accompanying README file.
6
+
7
+
8
+ Since numerous people will be contributing code and bug fixes, it's important
9
+ to establish a common coding style. The goal of using similar coding styles
10
+ is much more important than the details of just what that style is.
11
+
12
+ In general we follow the recommendations of "Recommended C Style and Coding
13
+ Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
14
+ Brader). This document is available in the IJG FTP archive (see
15
+ jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
16
+
17
+ Block comments should be laid out thusly:
18
+
19
+ /*
20
+ * Block comments in this style.
21
+ */
22
+
23
+ We indent statements in K&R style, e.g.,
24
+ if (test) {
25
+ then-part;
26
+ } else {
27
+ else-part;
28
+ }
29
+ with two spaces per indentation level. (This indentation convention is
30
+ handled automatically by GNU Emacs and many other text editors.)
31
+
32
+ Multi-word names should be written in lower case with underscores, e.g.,
33
+ multi_word_name (not multiWordName). Preprocessor symbols and enum constants
34
+ are similar but upper case (MULTI_WORD_NAME). Names should be unique within
35
+ the first fifteen characters. (On some older systems, global names must be
36
+ unique within six characters. We accommodate this without cluttering the
37
+ source code by using macros to substitute shorter names.)
38
+
39
+ We use function prototypes everywhere; we rely on automatic source code
40
+ transformation to feed prototype-less C compilers. Transformation is done
41
+ by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
42
+ ansi2knr is not very bright, so it imposes a format requirement on function
43
+ declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
44
+ should be written in the following style:
45
+
46
+ LOCAL(int *)
47
+ function_name (int a, char *b)
48
+ {
49
+ code...
50
+ }
51
+
52
+ Note that each function definition must begin with GLOBAL(type), LOCAL(type),
53
+ or METHODDEF(type). These macros expand to "static type" or just "type" as
54
+ appropriate. They provide a readable indication of the routine's usage and
55
+ can readily be changed for special needs. (For instance, special linkage
56
+ keywords can be inserted for use in Windows DLLs.)
57
+
58
+ ansi2knr does not transform method declarations (function pointers in
59
+ structs). We handle these with a macro JMETHOD, defined as
60
+ #ifdef HAVE_PROTOTYPES
61
+ #define JMETHOD(type,methodname,arglist) type (*methodname) arglist
62
+ #else
63
+ #define JMETHOD(type,methodname,arglist) type (*methodname) ()
64
+ #endif
65
+ which is used like this:
66
+ struct function_pointers {
67
+ JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
68
+ JMETHOD(void, term_entropy_encoder, (void));
69
+ };
70
+ Note the set of parentheses surrounding the parameter list.
71
+
72
+ A similar solution is used for forward and external function declarations
73
+ (see the EXTERN and JPP macros).
74
+
75
+ If the code is to work on non-ANSI compilers, we cannot rely on a prototype
76
+ declaration to coerce actual parameters into the right types. Therefore, use
77
+ explicit casts on actual parameters whenever the actual parameter type is not
78
+ identical to the formal parameter. Beware of implicit conversions to "int".
79
+
80
+ It seems there are some non-ANSI compilers in which the sizeof() operator
81
+ is defined to return int, yet size_t is defined as long. Needless to say,
82
+ this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(),
83
+ so that the result is guaranteed to be of type size_t.
84
+
85
+
86
+ The JPEG library is intended to be used within larger programs. Furthermore,
87
+ we want it to be reentrant so that it can be used by applications that process
88
+ multiple images concurrently. The following rules support these requirements:
89
+
90
+ 1. Avoid direct use of file I/O, "malloc", error report printouts, etc;
91
+ pass these through the common routines provided.
92
+
93
+ 2. Minimize global namespace pollution. Functions should be declared static
94
+ wherever possible. (Note that our method-based calling conventions help this
95
+ a lot: in many modules only the initialization function will ever need to be
96
+ called directly, so only that function need be externally visible.) All
97
+ global function names should begin with "jpeg_", and should have an
98
+ abbreviated name (unique in the first six characters) substituted by macro
99
+ when NEED_SHORT_EXTERNAL_NAMES is set.
100
+
101
+ 3. Don't use global variables; anything that must be used in another module
102
+ should be in the common data structures.
103
+
104
+ 4. Don't use static variables except for read-only constant tables. Variables
105
+ that should be private to a module can be placed into private structures (see
106
+ the system architecture document, structure.txt).
107
+
108
+ 5. Source file names should begin with "j" for files that are part of the
109
+ library proper; source files that are not part of the library, such as cjpeg.c
110
+ and djpeg.c, do not begin with "j". Keep source file names to eight
111
+ characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
112
+ compression and decompression code in separate source files --- some
113
+ applications may want only one half of the library.
114
+
115
+ Note: these rules (particularly #4) are not followed religiously in the
116
+ modules that are used in cjpeg/djpeg but are not part of the JPEG library
117
+ proper. Those modules are not really intended to be used in other
118
+ applications.