isbn 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (288) hide show
  1. data/{README → README.md} +5 -11
  2. data/Rakefile +20 -14
  3. data/isbn.gemspec +23 -0
  4. data/lib/isbn.rb +2 -0
  5. data/test/isbn_spec.rb +1 -1
  6. metadata +29 -316
  7. data/VERSION +0 -1
  8. data/src/gocr-0.48/.cvsignore +0 -6
  9. data/src/gocr-0.48/AUTHORS +0 -7
  10. data/src/gocr-0.48/BUGS +0 -55
  11. data/src/gocr-0.48/CREDITS +0 -17
  12. data/src/gocr-0.48/HISTORY +0 -243
  13. data/src/gocr-0.48/INSTALL +0 -83
  14. data/src/gocr-0.48/Makefile +0 -193
  15. data/src/gocr-0.48/Makefile.in +0 -193
  16. data/src/gocr-0.48/README +0 -165
  17. data/src/gocr-0.48/READMEde.txt +0 -80
  18. data/src/gocr-0.48/REMARK.txt +0 -18
  19. data/src/gocr-0.48/REVIEW +0 -538
  20. data/src/gocr-0.48/TODO +0 -65
  21. data/src/gocr-0.48/bin/.cvsignore +0 -2
  22. data/src/gocr-0.48/bin/create_db +0 -38
  23. data/src/gocr-0.48/bin/gocr.tcl +0 -527
  24. data/src/gocr-0.48/bin/gocr_chk.sh +0 -44
  25. data/src/gocr-0.48/configure +0 -4689
  26. data/src/gocr-0.48/configure.in +0 -71
  27. data/src/gocr-0.48/doc/.#Makefile.1.6 +0 -39
  28. data/src/gocr-0.48/doc/.cvsignore +0 -2
  29. data/src/gocr-0.48/doc/Makefile +0 -39
  30. data/src/gocr-0.48/doc/Makefile.in +0 -39
  31. data/src/gocr-0.48/doc/example.dtd +0 -53
  32. data/src/gocr-0.48/doc/example.xml +0 -21
  33. data/src/gocr-0.48/doc/examples.txt +0 -67
  34. data/src/gocr-0.48/doc/gocr.html +0 -578
  35. data/src/gocr-0.48/doc/unicode.txt +0 -57
  36. data/src/gocr-0.48/examples/.#Makefile.1.22 +0 -166
  37. data/src/gocr-0.48/examples/4x6.png +0 -0
  38. data/src/gocr-0.48/examples/4x6.txt +0 -2
  39. data/src/gocr-0.48/examples/5x7.png +0 -0
  40. data/src/gocr-0.48/examples/5x7.png.txt +0 -2
  41. data/src/gocr-0.48/examples/5x8.png +0 -0
  42. data/src/gocr-0.48/examples/5x8.png.txt +0 -2
  43. data/src/gocr-0.48/examples/Makefile +0 -166
  44. data/src/gocr-0.48/examples/color.fig +0 -20
  45. data/src/gocr-0.48/examples/ex.fig +0 -16
  46. data/src/gocr-0.48/examples/font.tex +0 -22
  47. data/src/gocr-0.48/examples/font1.tex +0 -46
  48. data/src/gocr-0.48/examples/font2.fig +0 -27
  49. data/src/gocr-0.48/examples/font_nw.tex +0 -24
  50. data/src/gocr-0.48/examples/handwrt1.jpg +0 -0
  51. data/src/gocr-0.48/examples/handwrt1.txt +0 -10
  52. data/src/gocr-0.48/examples/inverse.fig +0 -20
  53. data/src/gocr-0.48/examples/matrix.jpg +0 -0
  54. data/src/gocr-0.48/examples/ocr-a-subset.png +0 -0
  55. data/src/gocr-0.48/examples/ocr-a-subset.png.txt +0 -4
  56. data/src/gocr-0.48/examples/ocr-a.png +0 -0
  57. data/src/gocr-0.48/examples/ocr-a.txt +0 -6
  58. data/src/gocr-0.48/examples/ocr-b.png +0 -0
  59. data/src/gocr-0.48/examples/ocr-b.png.txt +0 -4
  60. data/src/gocr-0.48/examples/polish.tex +0 -28
  61. data/src/gocr-0.48/examples/rotate45.fig +0 -14
  62. data/src/gocr-0.48/examples/score +0 -36
  63. data/src/gocr-0.48/examples/text.tex +0 -28
  64. data/src/gocr-0.48/gpl.html +0 -537
  65. data/src/gocr-0.48/include/.cvsignore +0 -2
  66. data/src/gocr-0.48/include/config.h +0 -36
  67. data/src/gocr-0.48/include/config.h.in +0 -36
  68. data/src/gocr-0.48/include/version.h +0 -2
  69. data/src/gocr-0.48/install-sh +0 -3
  70. data/src/gocr-0.48/make.bat +0 -57
  71. data/src/gocr-0.48/man/.cvsignore +0 -2
  72. data/src/gocr-0.48/man/Makefile +0 -29
  73. data/src/gocr-0.48/man/Makefile.in +0 -29
  74. data/src/gocr-0.48/man/man1/gocr.1 +0 -166
  75. data/src/gocr-0.48/src/.cvsignore +0 -4
  76. data/src/gocr-0.48/src/Makefile +0 -132
  77. data/src/gocr-0.48/src/Makefile.in +0 -132
  78. data/src/gocr-0.48/src/amiga.h +0 -31
  79. data/src/gocr-0.48/src/barcode.c +0 -846
  80. data/src/gocr-0.48/src/barcode.c.orig +0 -593
  81. data/src/gocr-0.48/src/barcode.h +0 -11
  82. data/src/gocr-0.48/src/box.c +0 -372
  83. data/src/gocr-0.48/src/database.c +0 -462
  84. data/src/gocr-0.48/src/detect.c +0 -943
  85. data/src/gocr-0.48/src/gocr.c +0 -373
  86. data/src/gocr-0.48/src/gocr.h +0 -288
  87. data/src/gocr-0.48/src/jconv.c +0 -168
  88. data/src/gocr-0.48/src/job.c +0 -84
  89. data/src/gocr-0.48/src/lines.c +0 -350
  90. data/src/gocr-0.48/src/list.c +0 -334
  91. data/src/gocr-0.48/src/list.h +0 -90
  92. data/src/gocr-0.48/src/ocr0.c +0 -6756
  93. data/src/gocr-0.48/src/ocr0.h +0 -63
  94. data/src/gocr-0.48/src/ocr0n.c +0 -1475
  95. data/src/gocr-0.48/src/ocr1.c +0 -85
  96. data/src/gocr-0.48/src/ocr1.h +0 -3
  97. data/src/gocr-0.48/src/otsu.c +0 -289
  98. data/src/gocr-0.48/src/otsu.h +0 -23
  99. data/src/gocr-0.48/src/output.c +0 -289
  100. data/src/gocr-0.48/src/output.h +0 -37
  101. data/src/gocr-0.48/src/pcx.c +0 -153
  102. data/src/gocr-0.48/src/pcx.h +0 -9
  103. data/src/gocr-0.48/src/pgm2asc.c +0 -2893
  104. data/src/gocr-0.48/src/pgm2asc.h +0 -105
  105. data/src/gocr-0.48/src/pixel.c +0 -537
  106. data/src/gocr-0.48/src/pnm.c +0 -533
  107. data/src/gocr-0.48/src/pnm.h +0 -35
  108. data/src/gocr-0.48/src/progress.c +0 -87
  109. data/src/gocr-0.48/src/progress.h +0 -42
  110. data/src/gocr-0.48/src/remove.c +0 -703
  111. data/src/gocr-0.48/src/tga.c +0 -87
  112. data/src/gocr-0.48/src/tga.h +0 -6
  113. data/src/gocr-0.48/src/unicode.c +0 -1314
  114. data/src/gocr-0.48/src/unicode.h +0 -1257
  115. data/src/jpeg-7/Makefile.am +0 -133
  116. data/src/jpeg-7/Makefile.in +0 -1089
  117. data/src/jpeg-7/README +0 -322
  118. data/src/jpeg-7/aclocal.m4 +0 -8990
  119. data/src/jpeg-7/ansi2knr.1 +0 -36
  120. data/src/jpeg-7/ansi2knr.c +0 -739
  121. data/src/jpeg-7/cderror.h +0 -132
  122. data/src/jpeg-7/cdjpeg.c +0 -181
  123. data/src/jpeg-7/cdjpeg.h +0 -187
  124. data/src/jpeg-7/change.log +0 -270
  125. data/src/jpeg-7/cjpeg.1 +0 -325
  126. data/src/jpeg-7/cjpeg.c +0 -616
  127. data/src/jpeg-7/ckconfig.c +0 -402
  128. data/src/jpeg-7/coderules.txt +0 -118
  129. data/src/jpeg-7/config.guess +0 -1561
  130. data/src/jpeg-7/config.sub +0 -1686
  131. data/src/jpeg-7/configure +0 -17139
  132. data/src/jpeg-7/configure.ac +0 -317
  133. data/src/jpeg-7/depcomp +0 -630
  134. data/src/jpeg-7/djpeg.1 +0 -251
  135. data/src/jpeg-7/djpeg.c +0 -617
  136. data/src/jpeg-7/example.c +0 -433
  137. data/src/jpeg-7/filelist.txt +0 -215
  138. data/src/jpeg-7/install-sh +0 -520
  139. data/src/jpeg-7/install.txt +0 -1097
  140. data/src/jpeg-7/jaricom.c +0 -148
  141. data/src/jpeg-7/jcapimin.c +0 -282
  142. data/src/jpeg-7/jcapistd.c +0 -161
  143. data/src/jpeg-7/jcarith.c +0 -921
  144. data/src/jpeg-7/jccoefct.c +0 -453
  145. data/src/jpeg-7/jccolor.c +0 -459
  146. data/src/jpeg-7/jcdctmgr.c +0 -482
  147. data/src/jpeg-7/jchuff.c +0 -1612
  148. data/src/jpeg-7/jcinit.c +0 -65
  149. data/src/jpeg-7/jcmainct.c +0 -293
  150. data/src/jpeg-7/jcmarker.c +0 -667
  151. data/src/jpeg-7/jcmaster.c +0 -770
  152. data/src/jpeg-7/jcomapi.c +0 -106
  153. data/src/jpeg-7/jconfig.bcc +0 -48
  154. data/src/jpeg-7/jconfig.cfg +0 -45
  155. data/src/jpeg-7/jconfig.dj +0 -38
  156. data/src/jpeg-7/jconfig.mac +0 -43
  157. data/src/jpeg-7/jconfig.manx +0 -43
  158. data/src/jpeg-7/jconfig.mc6 +0 -52
  159. data/src/jpeg-7/jconfig.sas +0 -43
  160. data/src/jpeg-7/jconfig.st +0 -42
  161. data/src/jpeg-7/jconfig.txt +0 -155
  162. data/src/jpeg-7/jconfig.vc +0 -45
  163. data/src/jpeg-7/jconfig.vms +0 -37
  164. data/src/jpeg-7/jconfig.wat +0 -38
  165. data/src/jpeg-7/jcparam.c +0 -632
  166. data/src/jpeg-7/jcprepct.c +0 -358
  167. data/src/jpeg-7/jcsample.c +0 -545
  168. data/src/jpeg-7/jctrans.c +0 -381
  169. data/src/jpeg-7/jdapimin.c +0 -396
  170. data/src/jpeg-7/jdapistd.c +0 -275
  171. data/src/jpeg-7/jdarith.c +0 -762
  172. data/src/jpeg-7/jdatadst.c +0 -151
  173. data/src/jpeg-7/jdatasrc.c +0 -212
  174. data/src/jpeg-7/jdcoefct.c +0 -736
  175. data/src/jpeg-7/jdcolor.c +0 -396
  176. data/src/jpeg-7/jdct.h +0 -393
  177. data/src/jpeg-7/jddctmgr.c +0 -382
  178. data/src/jpeg-7/jdhuff.c +0 -1309
  179. data/src/jpeg-7/jdinput.c +0 -384
  180. data/src/jpeg-7/jdmainct.c +0 -512
  181. data/src/jpeg-7/jdmarker.c +0 -1360
  182. data/src/jpeg-7/jdmaster.c +0 -663
  183. data/src/jpeg-7/jdmerge.c +0 -400
  184. data/src/jpeg-7/jdpostct.c +0 -290
  185. data/src/jpeg-7/jdsample.c +0 -361
  186. data/src/jpeg-7/jdtrans.c +0 -136
  187. data/src/jpeg-7/jerror.c +0 -252
  188. data/src/jpeg-7/jerror.h +0 -304
  189. data/src/jpeg-7/jfdctflt.c +0 -174
  190. data/src/jpeg-7/jfdctfst.c +0 -230
  191. data/src/jpeg-7/jfdctint.c +0 -4348
  192. data/src/jpeg-7/jidctflt.c +0 -242
  193. data/src/jpeg-7/jidctfst.c +0 -368
  194. data/src/jpeg-7/jidctint.c +0 -5137
  195. data/src/jpeg-7/jinclude.h +0 -91
  196. data/src/jpeg-7/jmemansi.c +0 -167
  197. data/src/jpeg-7/jmemdos.c +0 -638
  198. data/src/jpeg-7/jmemdosa.asm +0 -379
  199. data/src/jpeg-7/jmemmac.c +0 -289
  200. data/src/jpeg-7/jmemmgr.c +0 -1118
  201. data/src/jpeg-7/jmemname.c +0 -276
  202. data/src/jpeg-7/jmemnobs.c +0 -109
  203. data/src/jpeg-7/jmemsys.h +0 -198
  204. data/src/jpeg-7/jmorecfg.h +0 -369
  205. data/src/jpeg-7/jpegint.h +0 -395
  206. data/src/jpeg-7/jpeglib.h +0 -1135
  207. data/src/jpeg-7/jpegtran.1 +0 -272
  208. data/src/jpeg-7/jpegtran.c +0 -546
  209. data/src/jpeg-7/jquant1.c +0 -856
  210. data/src/jpeg-7/jquant2.c +0 -1310
  211. data/src/jpeg-7/jutils.c +0 -179
  212. data/src/jpeg-7/jversion.h +0 -14
  213. data/src/jpeg-7/libjpeg.map +0 -4
  214. data/src/jpeg-7/libjpeg.txt +0 -3067
  215. data/src/jpeg-7/ltmain.sh +0 -8406
  216. data/src/jpeg-7/makcjpeg.st +0 -36
  217. data/src/jpeg-7/makdjpeg.st +0 -36
  218. data/src/jpeg-7/makeadsw.vc6 +0 -77
  219. data/src/jpeg-7/makeasln.vc9 +0 -33
  220. data/src/jpeg-7/makecdep.vc6 +0 -82
  221. data/src/jpeg-7/makecdsp.vc6 +0 -130
  222. data/src/jpeg-7/makecmak.vc6 +0 -159
  223. data/src/jpeg-7/makecvcp.vc9 +0 -186
  224. data/src/jpeg-7/makeddep.vc6 +0 -82
  225. data/src/jpeg-7/makeddsp.vc6 +0 -130
  226. data/src/jpeg-7/makedmak.vc6 +0 -159
  227. data/src/jpeg-7/makedvcp.vc9 +0 -186
  228. data/src/jpeg-7/makefile.ansi +0 -220
  229. data/src/jpeg-7/makefile.bcc +0 -291
  230. data/src/jpeg-7/makefile.dj +0 -226
  231. data/src/jpeg-7/makefile.manx +0 -220
  232. data/src/jpeg-7/makefile.mc6 +0 -255
  233. data/src/jpeg-7/makefile.mms +0 -224
  234. data/src/jpeg-7/makefile.sas +0 -258
  235. data/src/jpeg-7/makefile.unix +0 -234
  236. data/src/jpeg-7/makefile.vc +0 -217
  237. data/src/jpeg-7/makefile.vms +0 -142
  238. data/src/jpeg-7/makefile.wat +0 -239
  239. data/src/jpeg-7/makejdep.vc6 +0 -423
  240. data/src/jpeg-7/makejdsp.vc6 +0 -285
  241. data/src/jpeg-7/makejdsw.vc6 +0 -29
  242. data/src/jpeg-7/makejmak.vc6 +0 -425
  243. data/src/jpeg-7/makejsln.vc9 +0 -17
  244. data/src/jpeg-7/makejvcp.vc9 +0 -328
  245. data/src/jpeg-7/makeproj.mac +0 -213
  246. data/src/jpeg-7/makerdep.vc6 +0 -6
  247. data/src/jpeg-7/makerdsp.vc6 +0 -78
  248. data/src/jpeg-7/makermak.vc6 +0 -110
  249. data/src/jpeg-7/makervcp.vc9 +0 -133
  250. data/src/jpeg-7/maketdep.vc6 +0 -43
  251. data/src/jpeg-7/maketdsp.vc6 +0 -122
  252. data/src/jpeg-7/maketmak.vc6 +0 -131
  253. data/src/jpeg-7/maketvcp.vc9 +0 -178
  254. data/src/jpeg-7/makewdep.vc6 +0 -6
  255. data/src/jpeg-7/makewdsp.vc6 +0 -78
  256. data/src/jpeg-7/makewmak.vc6 +0 -110
  257. data/src/jpeg-7/makewvcp.vc9 +0 -133
  258. data/src/jpeg-7/makljpeg.st +0 -68
  259. data/src/jpeg-7/maktjpeg.st +0 -30
  260. data/src/jpeg-7/makvms.opt +0 -4
  261. data/src/jpeg-7/missing +0 -376
  262. data/src/jpeg-7/rdbmp.c +0 -439
  263. data/src/jpeg-7/rdcolmap.c +0 -253
  264. data/src/jpeg-7/rdgif.c +0 -38
  265. data/src/jpeg-7/rdjpgcom.1 +0 -63
  266. data/src/jpeg-7/rdjpgcom.c +0 -515
  267. data/src/jpeg-7/rdppm.c +0 -459
  268. data/src/jpeg-7/rdrle.c +0 -387
  269. data/src/jpeg-7/rdswitch.c +0 -365
  270. data/src/jpeg-7/rdtarga.c +0 -500
  271. data/src/jpeg-7/structure.txt +0 -945
  272. data/src/jpeg-7/testimg.bmp +0 -0
  273. data/src/jpeg-7/testimg.jpg +0 -0
  274. data/src/jpeg-7/testimg.ppm +0 -4
  275. data/src/jpeg-7/testimgp.jpg +0 -0
  276. data/src/jpeg-7/testorig.jpg +0 -0
  277. data/src/jpeg-7/testprog.jpg +0 -0
  278. data/src/jpeg-7/transupp.c +0 -1533
  279. data/src/jpeg-7/transupp.h +0 -205
  280. data/src/jpeg-7/usage.txt +0 -605
  281. data/src/jpeg-7/wizard.txt +0 -211
  282. data/src/jpeg-7/wrbmp.c +0 -442
  283. data/src/jpeg-7/wrgif.c +0 -399
  284. data/src/jpeg-7/wrjpgcom.1 +0 -103
  285. data/src/jpeg-7/wrjpgcom.c +0 -583
  286. data/src/jpeg-7/wrppm.c +0 -269
  287. data/src/jpeg-7/wrrle.c +0 -305
  288. data/src/jpeg-7/wrtarga.c +0 -253
@@ -1,402 +0,0 @@
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
- }
@@ -1,118 +0,0 @@
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.