home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume44 / jpeg / part26 < prev    next >
SHell self-extracting ARchive  |  1994-09-27  |  62.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail text default
99% file JavaScript source, ASCII text default (weak)
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 6a 70 | 65 67 2d 69 6e 66 6f 40 |From: jp|eg-info@|
|00000010| 75 75 6e 65 74 2e 75 75 | 2e 6e 65 74 20 28 49 6e |uunet.uu|.net (In|
|00000020| 64 65 70 65 6e 64 65 6e | 74 20 4a 50 45 47 20 47 |dependen|t JPEG G|
|00000030| 72 6f 75 70 29 0a 4e 65 | 77 73 67 72 6f 75 70 73 |roup).Ne|wsgroups|
|00000040| 3a 20 63 6f 6d 70 2e 73 | 6f 75 72 63 65 73 2e 6d |: comp.s|ources.m|
|00000050| 69 73 63 0a 53 75 62 6a | 65 63 74 3a 20 76 34 34 |isc.Subj|ect: v44|
|00000060| 69 31 32 33 3a 20 20 6a | 70 65 67 20 2d 20 4a 50 |i123: j|peg - JP|
|00000070| 45 47 20 69 6d 61 67 65 | 20 63 6f 6d 70 72 65 73 |EG image| compres|
|00000080| 73 69 6f 6e 2c 20 50 61 | 72 74 32 36 2f 32 37 0a |sion, Pa|rt26/27.|
|00000090| 44 61 74 65 3a 20 32 37 | 20 53 65 70 20 31 39 39 |Date: 27| Sep 199|
|000000a0| 34 20 30 38 3a 34 35 3a | 32 36 20 2d 30 35 30 30 |4 08:45:|26 -0500|
|000000b0| 0a 4f 72 67 61 6e 69 7a | 61 74 69 6f 6e 3a 20 53 |.Organiz|ation: S|
|000000c0| 74 65 72 6c 69 6e 67 20 | 53 6f 66 74 77 61 72 65 |terling |Software|
|000000d0| 0a 53 65 6e 64 65 72 3a | 20 6b 65 6e 74 40 73 70 |.Sender:| kent@sp|
|000000e0| 61 72 6b 79 2e 73 74 65 | 72 6c 69 6e 67 2e 63 6f |arky.ste|rling.co|
|000000f0| 6d 0a 41 70 70 72 6f 76 | 65 64 3a 20 6b 65 6e 74 |m.Approv|ed: kent|
|00000100| 40 73 70 61 72 6b 79 2e | 73 74 65 72 6c 69 6e 67 |@sparky.|sterling|
|00000110| 2e 63 6f 6d 0a 4d 65 73 | 73 61 67 65 2d 49 44 3a |.com.Mes|sage-ID:|
|00000120| 20 3c 33 36 39 37 6c 6d | 24 38 6d 37 40 73 70 61 | <3697lm|$8m7@spa|
|00000130| 72 6b 79 2e 73 74 65 72 | 6c 69 6e 67 2e 63 6f 6d |rky.ster|ling.com|
|00000140| 3e 0a 58 2d 4d 64 34 2d | 53 69 67 6e 61 74 75 72 |>.X-Md4-|Signatur|
|00000150| 65 3a 20 32 32 37 30 61 | 32 37 62 30 39 66 35 33 |e: 2270a|27b09f53|
|00000160| 33 39 62 35 35 64 39 62 | 63 31 66 36 31 65 64 64 |39b55d9b|c1f61edd|
|00000170| 32 62 30 0a 0a 53 75 62 | 6d 69 74 74 65 64 2d 62 |2b0..Sub|mitted-b|
|00000180| 79 3a 20 6a 70 65 67 2d | 69 6e 66 6f 40 75 75 6e |y: jpeg-|info@uun|
|00000190| 65 74 2e 75 75 2e 6e 65 | 74 20 28 49 6e 64 65 70 |et.uu.ne|t (Indep|
|000001a0| 65 6e 64 65 6e 74 20 4a | 50 45 47 20 47 72 6f 75 |endent J|PEG Grou|
|000001b0| 70 29 0a 50 6f 73 74 69 | 6e 67 2d 6e 75 6d 62 65 |p).Posti|ng-numbe|
|000001c0| 72 3a 20 56 6f 6c 75 6d | 65 20 34 34 2c 20 49 73 |r: Volum|e 44, Is|
|000001d0| 73 75 65 20 31 32 33 0a | 41 72 63 68 69 76 65 2d |sue 123.|Archive-|
|000001e0| 6e 61 6d 65 3a 20 6a 70 | 65 67 2f 70 61 72 74 32 |name: jp|eg/part2|
|000001f0| 36 0a 45 6e 76 69 72 6f | 6e 6d 65 6e 74 3a 20 55 |6.Enviro|nment: U|
|00000200| 4e 49 58 2c 20 56 4d 53 | 2c 20 4d 53 2d 44 4f 53 |NIX, VMS|, MS-DOS|
|00000210| 2c 20 4d 61 63 2c 20 41 | 6d 69 67 61 2c 20 41 74 |, Mac, A|miga, At|
|00000220| 61 72 69 2c 20 43 72 61 | 79 0a 53 75 70 65 72 73 |ari, Cra|y.Supers|
|00000230| 65 64 65 73 3a 20 6a 70 | 65 67 3a 20 56 6f 6c 75 |edes: jp|eg: Volu|
|00000240| 6d 65 20 33 34 2c 20 49 | 73 73 75 65 20 35 35 2d |me 34, I|ssue 55-|
|00000250| 37 32 0a 0a 23 21 20 2f | 62 69 6e 2f 73 68 0a 23 |72..#! /|bin/sh.#|
|00000260| 20 54 68 69 73 20 69 73 | 20 61 20 73 68 65 6c 6c | This is| a shell|
|00000270| 20 61 72 63 68 69 76 65 | 2e 20 20 52 65 6d 6f 76 | archive|. Remov|
|00000280| 65 20 61 6e 79 74 68 69 | 6e 67 20 62 65 66 6f 72 |e anythi|ng befor|
|00000290| 65 20 74 68 69 73 20 6c | 69 6e 65 2c 20 74 68 65 |e this l|ine, the|
|000002a0| 6e 20 66 65 65 64 20 69 | 74 0a 23 20 69 6e 74 6f |n feed i|t.# into|
|000002b0| 20 61 20 73 68 65 6c 6c | 20 76 69 61 20 22 73 68 | a shell| via "sh|
|000002c0| 20 66 69 6c 65 22 20 6f | 72 20 73 69 6d 69 6c 61 | file" o|r simila|
|000002d0| 72 2e 20 20 54 6f 20 6f | 76 65 72 77 72 69 74 65 |r. To o|verwrite|
|000002e0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 73 2c | existin|g files,|
|000002f0| 0a 23 20 74 79 70 65 20 | 22 73 68 20 66 69 6c 65 |.# type |"sh file|
|00000300| 20 2d 63 22 2e 0a 23 20 | 43 6f 6e 74 65 6e 74 73 | -c"..# |Contents|
|00000310| 3a 20 20 63 6f 64 65 72 | 75 6c 65 73 2e 64 6f 63 |: coder|ules.doc|
|00000320| 20 64 6a 70 65 67 2e 31 | 20 6a 63 6f 6e 66 69 67 | djpeg.1| jconfig|
|00000330| 2e 64 6f 63 20 6a 64 61 | 74 61 64 73 74 2e 63 20 |.doc jda|tadst.c |
|00000340| 6a 64 61 74 61 73 72 63 | 2e 63 0a 23 20 20 20 6a |jdatasrc|.c.# j|
|00000350| 64 63 74 2e 68 20 6a 66 | 64 63 74 66 6c 74 2e 63 |dct.h jf|dctflt.c|
|00000360| 20 6a 6d 65 6d 6e 61 6d | 65 2e 63 20 72 64 63 6f | jmemnam|e.c rdco|
|00000370| 6c 6d 61 70 2e 63 0a 23 | 20 57 72 61 70 70 65 64 |lmap.c.#| Wrapped|
|00000380| 20 62 79 20 6b 65 6e 74 | 40 73 70 61 72 6b 79 20 | by kent|@sparky |
|00000390| 6f 6e 20 4d 6f 6e 20 53 | 65 70 20 32 36 20 31 35 |on Mon S|ep 26 15|
|000003a0| 3a 30 30 3a 33 37 20 31 | 39 39 34 0a 50 41 54 48 |:00:37 1|994.PATH|
|000003b0| 3d 2f 62 69 6e 3a 2f 75 | 73 72 2f 62 69 6e 3a 2f |=/bin:/u|sr/bin:/|
|000003c0| 75 73 72 2f 75 63 62 3a | 2f 75 73 72 2f 6c 6f 63 |usr/ucb:|/usr/loc|
|000003d0| 61 6c 2f 62 69 6e 3a 2f | 75 73 72 2f 6c 62 69 6e |al/bin:/|usr/lbin|
|000003e0| 3a 24 50 41 54 48 20 3b | 20 65 78 70 6f 72 74 20 |:$PATH ;| export |
|000003f0| 50 41 54 48 0a 65 63 68 | 6f 20 49 66 20 74 68 69 |PATH.ech|o If thi|
|00000400| 73 20 61 72 63 68 69 76 | 65 20 69 73 20 63 6f 6d |s archiv|e is com|
|00000410| 70 6c 65 74 65 2c 20 79 | 6f 75 20 77 69 6c 6c 20 |plete, y|ou will |
|00000420| 73 65 65 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |see the |followin|
|00000430| 67 20 6d 65 73 73 61 67 | 65 3a 0a 65 63 68 6f 20 |g messag|e:.echo |
|00000440| 27 20 20 20 20 20 20 20 | 20 20 20 22 73 68 61 72 |' | "shar|
|00000450| 3a 20 45 6e 64 20 6f 66 | 20 61 72 63 68 69 76 65 |: End of| archive|
|00000460| 20 32 36 20 28 6f 66 20 | 32 37 29 2e 22 27 0a 69 | 26 (of |27)."'.i|
|00000470| 66 20 74 65 73 74 20 2d | 66 20 27 63 6f 64 65 72 |f test -|f 'coder|
|00000480| 75 6c 65 73 2e 64 6f 63 | 27 20 2d 61 20 22 24 7b |ules.doc|' -a "${|
|00000490| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|000004a0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|000004b0| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|000004c0| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|000004d0| 5c 22 27 63 6f 64 65 72 | 75 6c 65 73 2e 64 6f 63 |\"'coder|ules.doc|
|000004e0| 27 5c 22 0a 65 6c 73 65 | 0a 20 20 65 63 68 6f 20 |'\".else|. echo |
|000004f0| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00000500| 20 5c 22 27 63 6f 64 65 | 72 75 6c 65 73 2e 64 6f | \"'code|rules.do|
|00000510| 63 27 5c 22 20 5c 28 35 | 33 33 36 20 63 68 61 72 |c'\" \(5|336 char|
|00000520| 61 63 74 65 72 73 5c 29 | 0a 20 20 73 65 64 20 22 |acters\)|. sed "|
|00000530| 73 2f 5e 58 2f 2f 22 20 | 3e 27 63 6f 64 65 72 75 |s/^X//" |>'coderu|
|00000540| 6c 65 73 2e 64 6f 63 27 | 20 3c 3c 27 45 4e 44 5f |les.doc'| <<'END_|
|00000550| 4f 46 5f 46 49 4c 45 27 | 0a 58 49 4a 47 20 4a 50 |OF_FILE'|.XIJG JP|
|00000560| 45 47 20 4c 49 42 52 41 | 52 59 3a 20 20 43 4f 44 |EG LIBRA|RY: COD|
|00000570| 49 4e 47 20 52 55 4c 45 | 53 0a 58 0a 58 43 6f 70 |ING RULE|S.X.XCop|
|00000580| 79 72 69 67 68 74 20 28 | 43 29 20 31 39 39 31 2d |yright (|C) 1991-|
|00000590| 31 39 39 34 2c 20 54 68 | 6f 6d 61 73 20 47 2e 20 |1994, Th|omas G. |
|000005a0| 4c 61 6e 65 2e 0a 58 54 | 68 69 73 20 66 69 6c 65 |Lane..XT|his file|
|000005b0| 20 69 73 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 | is part| of the |
|000005c0| 49 6e 64 65 70 65 6e 64 | 65 6e 74 20 4a 50 45 47 |Independ|ent JPEG|
|000005d0| 20 47 72 6f 75 70 27 73 | 20 73 6f 66 74 77 61 72 | Group's| softwar|
|000005e0| 65 2e 0a 58 46 6f 72 20 | 63 6f 6e 64 69 74 69 6f |e..XFor |conditio|
|000005f0| 6e 73 20 6f 66 20 64 69 | 73 74 72 69 62 75 74 69 |ns of di|stributi|
|00000600| 6f 6e 20 61 6e 64 20 75 | 73 65 2c 20 73 65 65 20 |on and u|se, see |
|00000610| 74 68 65 20 61 63 63 6f | 6d 70 61 6e 79 69 6e 67 |the acco|mpanying|
|00000620| 20 52 45 41 44 4d 45 20 | 66 69 6c 65 2e 0a 58 0a | README |file..X.|
|00000630| 58 0a 58 53 69 6e 63 65 | 20 6e 75 6d 65 72 6f 75 |X.XSince| numerou|
|00000640| 73 20 70 65 6f 70 6c 65 | 20 77 69 6c 6c 20 62 65 |s people| will be|
|00000650| 20 63 6f 6e 74 72 69 62 | 75 74 69 6e 67 20 63 6f | contrib|uting co|
|00000660| 64 65 20 61 6e 64 20 62 | 75 67 20 66 69 78 65 73 |de and b|ug fixes|
|00000670| 2c 20 69 74 27 73 20 69 | 6d 70 6f 72 74 61 6e 74 |, it's i|mportant|
|00000680| 0a 58 74 6f 20 65 73 74 | 61 62 6c 69 73 68 20 61 |.Xto est|ablish a|
|00000690| 20 63 6f 6d 6d 6f 6e 20 | 63 6f 64 69 6e 67 20 73 | common |coding s|
|000006a0| 74 79 6c 65 2e 20 20 54 | 68 65 20 67 6f 61 6c 20 |tyle. T|he goal |
|000006b0| 6f 66 20 75 73 69 6e 67 | 20 73 69 6d 69 6c 61 72 |of using| similar|
|000006c0| 20 63 6f 64 69 6e 67 20 | 73 74 79 6c 65 73 0a 58 | coding |styles.X|
|000006d0| 69 73 20 6d 75 63 68 20 | 6d 6f 72 65 20 69 6d 70 |is much |more imp|
|000006e0| 6f 72 74 61 6e 74 20 74 | 68 61 6e 20 74 68 65 20 |ortant t|han the |
|000006f0| 64 65 74 61 69 6c 73 20 | 6f 66 20 6a 75 73 74 20 |details |of just |
|00000700| 77 68 61 74 20 74 68 61 | 74 20 73 74 79 6c 65 20 |what tha|t style |
|00000710| 69 73 2e 0a 58 0a 58 49 | 6e 20 67 65 6e 65 72 61 |is..X.XI|n genera|
|00000720| 6c 20 77 65 20 66 6f 6c | 6c 6f 77 20 74 68 65 20 |l we fol|low the |
|00000730| 72 65 63 6f 6d 6d 65 6e | 64 61 74 69 6f 6e 73 20 |recommen|dations |
|00000740| 6f 66 20 22 52 65 63 6f | 6d 6d 65 6e 64 65 64 20 |of "Reco|mmended |
|00000750| 43 20 53 74 79 6c 65 20 | 61 6e 64 20 43 6f 64 69 |C Style |and Codi|
|00000760| 6e 67 0a 58 53 74 61 6e | 64 61 72 64 73 22 20 72 |ng.XStan|dards" r|
|00000770| 65 76 69 73 69 6f 6e 20 | 36 2e 31 20 28 43 61 6e |evision |6.1 (Can|
|00000780| 6e 6f 6e 20 65 74 20 61 | 6c 2e 20 61 73 20 6d 6f |non et a|l. as mo|
|00000790| 64 69 66 69 65 64 20 62 | 79 20 53 70 65 6e 63 65 |dified b|y Spence|
|000007a0| 72 2c 20 4b 65 70 70 65 | 6c 20 61 6e 64 0a 58 42 |r, Keppe|l and.XB|
|000007b0| 72 61 64 65 72 29 2e 20 | 20 54 68 69 73 20 64 6f |rader). | This do|
|000007c0| 63 75 6d 65 6e 74 20 69 | 73 20 61 76 61 69 6c 61 |cument i|s availa|
|000007d0| 62 6c 65 20 69 6e 20 74 | 68 65 20 49 4a 47 20 46 |ble in t|he IJG F|
|000007e0| 54 50 20 61 72 63 68 69 | 76 65 20 28 73 65 65 0a |TP archi|ve (see.|
|000007f0| 58 6a 70 65 67 2f 64 6f | 63 2f 63 73 74 79 6c 65 |Xjpeg/do|c/cstyle|
|00000800| 2e 6d 73 2e 74 62 6c 2e | 5a 2c 20 6f 72 20 63 73 |.ms.tbl.|Z, or cs|
|00000810| 74 79 6c 65 2e 74 78 74 | 2e 5a 20 66 6f 72 20 74 |tyle.txt|.Z for t|
|00000820| 68 6f 73 65 20 77 69 74 | 68 6f 75 74 20 6e 72 6f |hose wit|hout nro|
|00000830| 66 66 2f 74 62 6c 29 2e | 0a 58 0a 58 42 6c 6f 63 |ff/tbl).|.X.XBloc|
|00000840| 6b 20 63 6f 6d 6d 65 6e | 74 73 20 73 68 6f 75 6c |k commen|ts shoul|
|00000850| 64 20 62 65 20 6c 61 69 | 64 20 6f 75 74 20 74 68 |d be lai|d out th|
|00000860| 75 73 6c 79 3a 0a 58 0a | 58 2f 2a 0a 58 20 2a 20 |usly:.X.|X/*.X * |
|00000870| 20 42 6c 6f 63 6b 20 63 | 6f 6d 6d 65 6e 74 73 20 | Block c|omments |
|00000880| 69 6e 20 74 68 69 73 20 | 73 74 79 6c 65 2e 0a 58 |in this |style..X|
|00000890| 20 2a 2f 0a 58 0a 58 57 | 65 20 69 6e 64 65 6e 74 | */.X.XW|e indent|
|000008a0| 20 73 74 61 74 65 6d 65 | 6e 74 73 20 69 6e 20 4b | stateme|nts in K|
|000008b0| 26 52 20 73 74 79 6c 65 | 2c 20 65 2e 67 2e 2c 0a |&R style|, e.g.,.|
|000008c0| 58 09 69 66 20 28 74 65 | 73 74 29 20 7b 0a 58 09 |X.if (te|st) {.X.|
|000008d0| 20 20 74 68 65 6e 2d 70 | 61 72 74 3b 0a 58 09 7d | then-p|art;.X.}|
|000008e0| 20 65 6c 73 65 20 7b 0a | 58 09 20 20 65 6c 73 65 | else {.|X. else|
|000008f0| 2d 70 61 72 74 3b 0a 58 | 09 7d 0a 58 77 69 74 68 |-part;.X|.}.Xwith|
|00000900| 20 74 77 6f 20 73 70 61 | 63 65 73 20 70 65 72 20 | two spa|ces per |
|00000910| 69 6e 64 65 6e 74 61 74 | 69 6f 6e 20 6c 65 76 65 |indentat|ion leve|
|00000920| 6c 2e 20 20 28 54 68 69 | 73 20 69 6e 64 65 6e 74 |l. (Thi|s indent|
|00000930| 61 74 69 6f 6e 20 63 6f | 6e 76 65 6e 74 69 6f 6e |ation co|nvention|
|00000940| 20 69 73 0a 58 68 61 6e | 64 6c 65 64 20 61 75 74 | is.Xhan|dled aut|
|00000950| 6f 6d 61 74 69 63 61 6c | 6c 79 20 62 79 20 47 4e |omatical|ly by GN|
|00000960| 55 20 45 6d 61 63 73 20 | 61 6e 64 20 6d 61 6e 79 |U Emacs |and many|
|00000970| 20 6f 74 68 65 72 20 74 | 65 78 74 20 65 64 69 74 | other t|ext edit|
|00000980| 6f 72 73 2e 29 0a 58 0a | 58 4d 75 6c 74 69 2d 77 |ors.).X.|XMulti-w|
|00000990| 6f 72 64 20 6e 61 6d 65 | 73 20 73 68 6f 75 6c 64 |ord name|s should|
|000009a0| 20 62 65 20 77 72 69 74 | 74 65 6e 20 69 6e 20 6c | be writ|ten in l|
|000009b0| 6f 77 65 72 20 63 61 73 | 65 20 77 69 74 68 20 75 |ower cas|e with u|
|000009c0| 6e 64 65 72 73 63 6f 72 | 65 73 2c 20 65 2e 67 2e |nderscor|es, e.g.|
|000009d0| 2c 0a 58 6d 75 6c 74 69 | 5f 77 6f 72 64 5f 6e 61 |,.Xmulti|_word_na|
|000009e0| 6d 65 20 28 6e 6f 74 20 | 6d 75 6c 74 69 57 6f 72 |me (not |multiWor|
|000009f0| 64 4e 61 6d 65 29 2e 20 | 20 50 72 65 70 72 6f 63 |dName). | Preproc|
|00000a00| 65 73 73 6f 72 20 73 79 | 6d 62 6f 6c 73 20 61 6e |essor sy|mbols an|
|00000a10| 64 20 65 6e 75 6d 20 63 | 6f 6e 73 74 61 6e 74 73 |d enum c|onstants|
|00000a20| 0a 58 61 72 65 20 73 69 | 6d 69 6c 61 72 20 62 75 |.Xare si|milar bu|
|00000a30| 74 20 75 70 70 65 72 20 | 63 61 73 65 20 28 4d 55 |t upper |case (MU|
|00000a40| 4c 54 49 5f 57 4f 52 44 | 5f 4e 41 4d 45 29 2e 20 |LTI_WORD|_NAME). |
|00000a50| 20 4e 61 6d 65 73 20 73 | 68 6f 75 6c 64 20 62 65 | Names s|hould be|
|00000a60| 20 75 6e 69 71 75 65 20 | 77 69 74 68 69 6e 0a 58 | unique |within.X|
|00000a70| 74 68 65 20 66 69 72 73 | 74 20 66 69 66 74 65 65 |the firs|t fiftee|
|00000a80| 6e 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 20 28 |n charac|ters. (|
|00000a90| 4f 6e 20 73 6f 6d 65 20 | 6f 6c 64 65 72 20 73 79 |On some |older sy|
|00000aa0| 73 74 65 6d 73 2c 20 67 | 6c 6f 62 61 6c 20 6e 61 |stems, g|lobal na|
|00000ab0| 6d 65 73 20 6d 75 73 74 | 20 62 65 0a 58 75 6e 69 |mes must| be.Xuni|
|00000ac0| 71 75 65 20 77 69 74 68 | 69 6e 20 73 69 78 20 63 |que with|in six c|
|00000ad0| 68 61 72 61 63 74 65 72 | 73 2e 20 20 57 65 20 61 |haracter|s. We a|
|00000ae0| 63 63 6f 6d 6d 6f 64 61 | 74 65 20 74 68 69 73 20 |ccommoda|te this |
|00000af0| 77 69 74 68 6f 75 74 20 | 63 6c 75 74 74 65 72 69 |without |clutteri|
|00000b00| 6e 67 20 74 68 65 0a 58 | 73 6f 75 72 63 65 20 63 |ng the.X|source c|
|00000b10| 6f 64 65 20 62 79 20 75 | 73 69 6e 67 20 6d 61 63 |ode by u|sing mac|
|00000b20| 72 6f 73 20 74 6f 20 73 | 75 62 73 74 69 74 75 74 |ros to s|ubstitut|
|00000b30| 65 20 73 68 6f 72 74 65 | 72 20 6e 61 6d 65 73 2e |e shorte|r names.|
|00000b40| 29 0a 58 0a 58 57 65 20 | 75 73 65 20 66 75 6e 63 |).X.XWe |use func|
|00000b50| 74 69 6f 6e 20 70 72 6f | 74 6f 74 79 70 65 73 20 |tion pro|totypes |
|00000b60| 65 76 65 72 79 77 68 65 | 72 65 3b 20 77 65 20 72 |everywhe|re; we r|
|00000b70| 65 6c 79 20 6f 6e 20 61 | 75 74 6f 6d 61 74 69 63 |ely on a|utomatic|
|00000b80| 20 73 6f 75 72 63 65 20 | 63 6f 64 65 0a 58 74 72 | source |code.Xtr|
|00000b90| 61 6e 73 66 6f 72 6d 61 | 74 69 6f 6e 20 74 6f 20 |ansforma|tion to |
|00000ba0| 66 65 65 64 20 70 72 6f | 74 6f 74 79 70 65 2d 6c |feed pro|totype-l|
|00000bb0| 65 73 73 20 43 20 63 6f | 6d 70 69 6c 65 72 73 2e |ess C co|mpilers.|
|00000bc0| 20 20 54 72 61 6e 73 66 | 6f 72 6d 61 74 69 6f 6e | Transf|ormation|
|00000bd0| 20 69 73 20 64 6f 6e 65 | 0a 58 62 79 20 74 68 65 | is done|.Xby the|
|00000be0| 20 73 69 6d 70 6c 65 20 | 61 6e 64 20 70 6f 72 74 | simple |and port|
|00000bf0| 61 62 6c 65 20 74 6f 6f | 6c 20 27 61 6e 73 69 32 |able too|l 'ansi2|
|00000c00| 6b 6e 72 2e 63 27 20 28 | 63 6f 75 72 74 65 73 79 |knr.c' (|courtesy|
|00000c10| 20 6f 66 20 47 68 6f 73 | 74 73 63 72 69 70 74 29 | of Ghos|tscript)|
|00000c20| 2e 0a 58 61 6e 73 69 32 | 6b 6e 72 20 69 73 20 6e |..Xansi2|knr is n|
|00000c30| 6f 74 20 76 65 72 79 20 | 62 72 69 67 68 74 2c 20 |ot very |bright, |
|00000c40| 73 6f 20 69 74 20 69 6d | 70 6f 73 65 73 20 61 20 |so it im|poses a |
|00000c50| 66 6f 72 6d 61 74 20 72 | 65 71 75 69 72 65 6d 65 |format r|equireme|
|00000c60| 6e 74 20 6f 6e 20 66 75 | 6e 63 74 69 6f 6e 0a 58 |nt on fu|nction.X|
|00000c70| 64 65 63 6c 61 72 61 74 | 69 6f 6e 73 3a 20 74 68 |declarat|ions: th|
|00000c80| 65 20 66 75 6e 63 74 69 | 6f 6e 20 6e 61 6d 65 20 |e functi|on name |
|00000c90| 4d 55 53 54 20 42 45 47 | 49 4e 20 49 4e 20 43 4f |MUST BEG|IN IN CO|
|00000ca0| 4c 55 4d 4e 20 31 2e 20 | 20 54 68 75 73 20 61 6c |LUMN 1. | Thus al|
|00000cb0| 6c 20 66 75 6e 63 74 69 | 6f 6e 73 0a 58 73 68 6f |l functi|ons.Xsho|
|00000cc0| 75 6c 64 20 62 65 20 77 | 72 69 74 74 65 6e 20 69 |uld be w|ritten i|
|00000cd0| 6e 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |n the fo|llowing |
|00000ce0| 73 74 79 6c 65 3a 0a 58 | 0a 58 4c 4f 43 41 4c 20 |style:.X|.XLOCAL |
|00000cf0| 69 6e 74 20 2a 0a 58 66 | 75 6e 63 74 69 6f 6e 5f |int *.Xf|unction_|
|00000d00| 6e 61 6d 65 20 28 69 6e | 74 20 61 2c 20 63 68 61 |name (in|t a, cha|
|00000d10| 72 20 2a 62 29 0a 58 7b | 0a 58 20 20 20 20 63 6f |r *b).X{|.X co|
|00000d20| 64 65 2e 2e 2e 0a 58 7d | 0a 58 0a 58 4e 6f 74 65 |de....X}|.X.XNote|
|00000d30| 20 74 68 61 74 20 65 61 | 63 68 20 66 75 6e 63 74 | that ea|ch funct|
|00000d40| 69 6f 6e 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 69 |ion defi|nition i|
|00000d50| 73 20 70 72 65 66 69 78 | 65 64 20 77 69 74 68 20 |s prefix|ed with |
|00000d60| 47 4c 4f 42 41 4c 2c 20 | 4c 4f 43 41 4c 2c 20 6f |GLOBAL, |LOCAL, o|
|00000d70| 72 0a 58 4d 45 54 48 4f | 44 44 45 46 2e 20 20 54 |r.XMETHO|DDEF. T|
|00000d80| 68 65 73 65 20 6d 61 63 | 72 6f 73 20 65 78 70 61 |hese mac|ros expa|
|00000d90| 6e 64 20 74 6f 20 22 73 | 74 61 74 69 63 22 20 6f |nd to "s|tatic" o|
|00000da0| 72 20 6e 6f 74 68 69 6e | 67 20 61 73 20 61 70 70 |r nothin|g as app|
|00000db0| 72 6f 70 72 69 61 74 65 | 2e 0a 58 54 68 65 79 20 |ropriate|..XThey |
|00000dc0| 70 72 6f 76 69 64 65 20 | 61 20 72 65 61 64 61 62 |provide |a readab|
|00000dd0| 6c 65 20 69 6e 64 69 63 | 61 74 69 6f 6e 20 6f 66 |le indic|ation of|
|00000de0| 20 74 68 65 20 72 6f 75 | 74 69 6e 65 27 73 20 75 | the rou|tine's u|
|00000df0| 73 61 67 65 20 61 6e 64 | 20 63 61 6e 20 72 65 61 |sage and| can rea|
|00000e00| 64 69 6c 79 20 62 65 0a | 58 63 68 61 6e 67 65 64 |dily be.|Xchanged|
|00000e10| 20 66 6f 72 20 73 70 65 | 63 69 61 6c 20 6e 65 65 | for spe|cial nee|
|00000e20| 64 73 2e 20 20 28 46 6f | 72 20 69 6e 73 74 61 6e |ds. (Fo|r instan|
|00000e30| 63 65 2c 20 61 6c 6c 20 | 72 6f 75 74 69 6e 65 73 |ce, all |routines|
|00000e40| 20 63 61 6e 20 62 65 20 | 6d 61 64 65 20 67 6c 6f | can be |made glo|
|00000e50| 62 61 6c 20 66 6f 72 0a | 58 75 73 65 20 77 69 74 |bal for.|Xuse wit|
|00000e60| 68 20 64 65 62 75 67 67 | 65 72 73 20 6f 72 20 63 |h debugg|ers or c|
|00000e70| 6f 64 65 20 70 72 6f 66 | 69 6c 65 72 73 20 74 68 |ode prof|ilers th|
|00000e80| 61 74 20 72 65 71 75 69 | 72 65 20 69 74 2e 29 0a |at requi|re it.).|
|00000e90| 58 0a 58 61 6e 73 69 32 | 6b 6e 72 20 64 6f 65 73 |X.Xansi2|knr does|
|00000ea0| 20 6e 6f 74 20 74 72 61 | 6e 73 66 6f 72 6d 20 6d | not tra|nsform m|
|00000eb0| 65 74 68 6f 64 20 64 65 | 63 6c 61 72 61 74 69 6f |ethod de|claratio|
|00000ec0| 6e 73 20 28 66 75 6e 63 | 74 69 6f 6e 20 70 6f 69 |ns (func|tion poi|
|00000ed0| 6e 74 65 72 73 20 69 6e | 0a 58 73 74 72 75 63 74 |nters in|.Xstruct|
|00000ee0| 73 29 2e 20 20 57 65 20 | 68 61 6e 64 6c 65 20 74 |s). We |handle t|
|00000ef0| 68 65 73 65 20 77 69 74 | 68 20 61 20 6d 61 63 72 |hese wit|h a macr|
|00000f00| 6f 20 4a 4d 45 54 48 4f | 44 2c 20 64 65 66 69 6e |o JMETHO|D, defin|
|00000f10| 65 64 20 61 73 0a 58 09 | 23 69 66 64 65 66 20 48 |ed as.X.|#ifdef H|
|00000f20| 41 56 45 5f 50 52 4f 54 | 4f 54 59 50 45 53 0a 58 |AVE_PROT|OTYPES.X|
|00000f30| 09 23 64 65 66 69 6e 65 | 20 4a 4d 45 54 48 4f 44 |.#define| JMETHOD|
|00000f40| 28 74 79 70 65 2c 6d 65 | 74 68 6f 64 6e 61 6d 65 |(type,me|thodname|
|00000f50| 2c 61 72 67 6c 69 73 74 | 29 20 20 74 79 70 65 20 |,arglist|) type |
|00000f60| 28 2a 6d 65 74 68 6f 64 | 6e 61 6d 65 29 20 61 72 |(*method|name) ar|
|00000f70| 67 6c 69 73 74 0a 58 09 | 23 65 6c 73 65 0a 58 09 |glist.X.|#else.X.|
|00000f80| 23 64 65 66 69 6e 65 20 | 4a 4d 45 54 48 4f 44 28 |#define |JMETHOD(|
|00000f90| 74 79 70 65 2c 6d 65 74 | 68 6f 64 6e 61 6d 65 2c |type,met|hodname,|
|00000fa0| 61 72 67 6c 69 73 74 29 | 20 20 74 79 70 65 20 28 |arglist)| type (|
|00000fb0| 2a 6d 65 74 68 6f 64 6e | 61 6d 65 29 20 28 29 0a |*methodn|ame) ().|
|00000fc0| 58 09 23 65 6e 64 69 66 | 0a 58 77 68 69 63 68 20 |X.#endif|.Xwhich |
|00000fd0| 69 73 20 75 73 65 64 20 | 6c 69 6b 65 20 74 68 69 |is used |like thi|
|00000fe0| 73 3a 0a 58 09 73 74 72 | 75 63 74 20 66 75 6e 63 |s:.X.str|uct func|
|00000ff0| 74 69 6f 6e 5f 70 6f 69 | 6e 74 65 72 73 20 7b 0a |tion_poi|nters {.|
|00001000| 58 09 20 20 4a 4d 45 54 | 48 4f 44 28 76 6f 69 64 |X. JMET|HOD(void|
|00001010| 2c 20 69 6e 69 74 5f 65 | 6e 74 72 6f 70 79 5f 65 |, init_e|ntropy_e|
|00001020| 6e 63 6f 64 65 72 2c 20 | 28 69 6e 74 20 73 6f 6d |ncoder, |(int som|
|00001030| 65 61 72 67 2c 20 6a 70 | 61 72 6d 73 20 2a 6a 70 |earg, jp|arms *jp|
|00001040| 29 29 3b 0a 58 09 20 20 | 4a 4d 45 54 48 4f 44 28 |));.X. |JMETHOD(|
|00001050| 76 6f 69 64 2c 20 74 65 | 72 6d 5f 65 6e 74 72 6f |void, te|rm_entro|
|00001060| 70 79 5f 65 6e 63 6f 64 | 65 72 2c 20 28 76 6f 69 |py_encod|er, (voi|
|00001070| 64 29 29 3b 0a 58 09 7d | 3b 0a 58 4e 6f 74 65 20 |d));.X.}|;.XNote |
|00001080| 74 68 65 20 73 65 74 20 | 6f 66 20 70 61 72 65 6e |the set |of paren|
|00001090| 74 68 65 73 65 73 20 73 | 75 72 72 6f 75 6e 64 69 |theses s|urroundi|
|000010a0| 6e 67 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |ng the p|arameter|
|000010b0| 20 6c 69 73 74 2e 0a 58 | 0a 58 41 20 73 69 6d 69 | list..X|.XA simi|
|000010c0| 6c 61 72 20 73 6f 6c 75 | 74 69 6f 6e 20 69 73 20 |lar solu|tion is |
|000010d0| 75 73 65 64 20 66 6f 72 | 20 65 78 74 65 72 6e 61 |used for| externa|
|000010e0| 6c 20 66 75 6e 63 74 69 | 6f 6e 20 64 65 63 6c 61 |l functi|on decla|
|000010f0| 72 61 74 69 6f 6e 73 20 | 28 73 65 65 20 74 68 65 |rations |(see the|
|00001100| 20 4a 50 50 0a 58 6d 61 | 63 72 6f 29 2e 0a 58 0a | JPP.Xma|cro)..X.|
|00001110| 58 49 66 20 74 68 65 20 | 63 6f 64 65 20 69 73 20 |XIf the |code is |
|00001120| 74 6f 20 77 6f 72 6b 20 | 6f 6e 20 6e 6f 6e 2d 41 |to work |on non-A|
|00001130| 4e 53 49 20 63 6f 6d 70 | 69 6c 65 72 73 2c 20 77 |NSI comp|ilers, w|
|00001140| 65 20 63 61 6e 6e 6f 74 | 20 72 65 6c 79 20 6f 6e |e cannot| rely on|
|00001150| 20 61 20 70 72 6f 74 6f | 74 79 70 65 0a 58 64 65 | a proto|type.Xde|
|00001160| 63 6c 61 72 61 74 69 6f | 6e 20 74 6f 20 63 6f 65 |claratio|n to coe|
|00001170| 72 63 65 20 61 63 74 75 | 61 6c 20 70 61 72 61 6d |rce actu|al param|
|00001180| 65 74 65 72 73 20 69 6e | 74 6f 20 74 68 65 20 72 |eters in|to the r|
|00001190| 69 67 68 74 20 74 79 70 | 65 73 2e 20 20 54 68 65 |ight typ|es. The|
|000011a0| 72 65 66 6f 72 65 2c 20 | 75 73 65 0a 58 65 78 70 |refore, |use.Xexp|
|000011b0| 6c 69 63 69 74 20 63 61 | 73 74 73 20 6f 6e 20 61 |licit ca|sts on a|
|000011c0| 63 74 75 61 6c 20 70 61 | 72 61 6d 65 74 65 72 73 |ctual pa|rameters|
|000011d0| 20 77 68 65 6e 65 76 65 | 72 20 74 68 65 20 61 63 | wheneve|r the ac|
|000011e0| 74 75 61 6c 20 70 61 72 | 61 6d 65 74 65 72 20 74 |tual par|ameter t|
|000011f0| 79 70 65 20 69 73 20 6e | 6f 74 0a 58 69 64 65 6e |ype is n|ot.Xiden|
|00001200| 74 69 63 61 6c 20 74 6f | 20 74 68 65 20 66 6f 72 |tical to| the for|
|00001210| 6d 61 6c 20 70 61 72 61 | 6d 65 74 65 72 2e 20 20 |mal para|meter. |
|00001220| 42 65 77 61 72 65 20 6f | 66 20 69 6d 70 6c 69 63 |Beware o|f implic|
|00001230| 69 74 20 63 6f 6e 76 65 | 72 73 69 6f 6e 73 20 74 |it conve|rsions t|
|00001240| 6f 20 22 69 6e 74 22 2e | 0a 58 0a 58 49 74 20 73 |o "int".|.X.XIt s|
|00001250| 65 65 6d 73 20 74 68 65 | 72 65 20 61 72 65 20 73 |eems the|re are s|
|00001260| 6f 6d 65 20 6e 6f 6e 2d | 41 4e 53 49 20 63 6f 6d |ome non-|ANSI com|
|00001270| 70 69 6c 65 72 73 20 69 | 6e 20 77 68 69 63 68 20 |pilers i|n which |
|00001280| 74 68 65 20 73 69 7a 65 | 6f 66 28 29 20 6f 70 65 |the size|of() ope|
|00001290| 72 61 74 6f 72 0a 58 69 | 73 20 64 65 66 69 6e 65 |rator.Xi|s define|
|000012a0| 64 20 74 6f 20 72 65 74 | 75 72 6e 20 69 6e 74 2c |d to ret|urn int,|
|000012b0| 20 79 65 74 20 73 69 7a | 65 5f 74 20 69 73 20 64 | yet siz|e_t is d|
|000012c0| 65 66 69 6e 65 64 20 61 | 73 20 6c 6f 6e 67 2e 20 |efined a|s long. |
|000012d0| 20 4e 65 65 64 6c 65 73 | 73 20 74 6f 20 73 61 79 | Needles|s to say|
|000012e0| 2c 0a 58 74 68 69 73 20 | 69 73 20 62 72 61 69 6e |,.Xthis |is brain|
|000012f0| 2d 64 61 6d 61 67 65 64 | 2e 20 20 41 6c 77 61 79 |-damaged|. Alway|
|00001300| 73 20 75 73 65 20 74 68 | 65 20 53 49 5a 45 4f 46 |s use th|e SIZEOF|
|00001310| 28 29 20 6d 61 63 72 6f | 20 69 6e 20 70 6c 61 63 |() macro| in plac|
|00001320| 65 20 6f 66 20 73 69 7a | 65 6f 66 28 29 2c 0a 58 |e of siz|eof(),.X|
|00001330| 73 6f 20 74 68 61 74 20 | 74 68 65 20 72 65 73 75 |so that |the resu|
|00001340| 6c 74 20 69 73 20 67 75 | 61 72 61 6e 74 65 65 64 |lt is gu|aranteed|
|00001350| 20 74 6f 20 62 65 20 6f | 66 20 74 79 70 65 20 73 | to be o|f type s|
|00001360| 69 7a 65 5f 74 2e 0a 58 | 0a 58 0a 58 54 68 65 20 |ize_t..X|.X.XThe |
|00001370| 4a 50 45 47 20 6c 69 62 | 72 61 72 79 20 69 73 20 |JPEG lib|rary is |
|00001380| 69 6e 74 65 6e 64 65 64 | 20 74 6f 20 62 65 20 75 |intended| to be u|
|00001390| 73 65 64 20 77 69 74 68 | 69 6e 20 6c 61 72 67 65 |sed with|in large|
|000013a0| 72 20 70 72 6f 67 72 61 | 6d 73 2e 20 20 46 75 72 |r progra|ms. Fur|
|000013b0| 74 68 65 72 6d 6f 72 65 | 2c 0a 58 77 65 20 77 61 |thermore|,.Xwe wa|
|000013c0| 6e 74 20 69 74 20 74 6f | 20 62 65 20 72 65 65 6e |nt it to| be reen|
|000013d0| 74 72 61 6e 74 20 73 6f | 20 74 68 61 74 20 69 74 |trant so| that it|
|000013e0| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 62 79 20 | can be |used by |
|000013f0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 74 68 61 |applicat|ions tha|
|00001400| 74 20 70 72 6f 63 65 73 | 73 0a 58 6d 75 6c 74 69 |t proces|s.Xmulti|
|00001410| 70 6c 65 20 69 6d 61 67 | 65 73 20 63 6f 6e 63 75 |ple imag|es concu|
|00001420| 72 72 65 6e 74 6c 79 2e | 20 20 54 68 65 20 66 6f |rrently.| The fo|
|00001430| 6c 6c 6f 77 69 6e 67 20 | 72 75 6c 65 73 20 73 75 |llowing |rules su|
|00001440| 70 70 6f 72 74 20 74 68 | 65 73 65 20 72 65 71 75 |pport th|ese requ|
|00001450| 69 72 65 6d 65 6e 74 73 | 3a 0a 58 0a 58 31 2e 20 |irements|:.X.X1. |
|00001460| 41 76 6f 69 64 20 64 69 | 72 65 63 74 20 75 73 65 |Avoid di|rect use|
|00001470| 20 6f 66 20 66 69 6c 65 | 20 49 2f 4f 2c 20 22 6d | of file| I/O, "m|
|00001480| 61 6c 6c 6f 63 22 2c 20 | 65 72 72 6f 72 20 72 65 |alloc", |error re|
|00001490| 70 6f 72 74 20 70 72 69 | 6e 74 6f 75 74 73 2c 20 |port pri|ntouts, |
|000014a0| 65 74 63 3b 0a 58 70 61 | 73 73 20 74 68 65 73 65 |etc;.Xpa|ss these|
|000014b0| 20 74 68 72 6f 75 67 68 | 20 74 68 65 20 63 6f 6d | through| the com|
|000014c0| 6d 6f 6e 20 72 6f 75 74 | 69 6e 65 73 20 70 72 6f |mon rout|ines pro|
|000014d0| 76 69 64 65 64 2e 0a 58 | 0a 58 32 2e 20 4d 69 6e |vided..X|.X2. Min|
|000014e0| 69 6d 69 7a 65 20 67 6c | 6f 62 61 6c 20 6e 61 6d |imize gl|obal nam|
|000014f0| 65 73 70 61 63 65 20 70 | 6f 6c 6c 75 74 69 6f 6e |espace p|ollution|
|00001500| 2e 20 20 46 75 6e 63 74 | 69 6f 6e 73 20 73 68 6f |. Funct|ions sho|
|00001510| 75 6c 64 20 62 65 20 64 | 65 63 6c 61 72 65 64 20 |uld be d|eclared |
|00001520| 73 74 61 74 69 63 0a 58 | 77 68 65 72 65 76 65 72 |static.X|wherever|
|00001530| 20 70 6f 73 73 69 62 6c | 65 2e 20 20 28 4e 6f 74 | possibl|e. (Not|
|00001540| 65 20 74 68 61 74 20 6f | 75 72 20 6d 65 74 68 6f |e that o|ur metho|
|00001550| 64 2d 62 61 73 65 64 20 | 63 61 6c 6c 69 6e 67 20 |d-based |calling |
|00001560| 63 6f 6e 76 65 6e 74 69 | 6f 6e 73 20 68 65 6c 70 |conventi|ons help|
|00001570| 20 74 68 69 73 0a 58 61 | 20 6c 6f 74 3a 20 69 6e | this.Xa| lot: in|
|00001580| 20 6d 61 6e 79 20 6d 6f | 64 75 6c 65 73 20 6f 6e | many mo|dules on|
|00001590| 6c 79 20 74 68 65 20 69 | 6e 69 74 69 61 6c 69 7a |ly the i|nitializ|
|000015a0| 61 74 69 6f 6e 20 66 75 | 6e 63 74 69 6f 6e 20 77 |ation fu|nction w|
|000015b0| 69 6c 6c 20 65 76 65 72 | 20 6e 65 65 64 20 74 6f |ill ever| need to|
|000015c0| 20 62 65 0a 58 63 61 6c | 6c 65 64 20 64 69 72 65 | be.Xcal|led dire|
|000015d0| 63 74 6c 79 2c 20 73 6f | 20 6f 6e 6c 79 20 74 68 |ctly, so| only th|
|000015e0| 61 74 20 66 75 6e 63 74 | 69 6f 6e 20 6e 65 65 64 |at funct|ion need|
|000015f0| 20 62 65 20 65 78 74 65 | 72 6e 61 6c 6c 79 20 76 | be exte|rnally v|
|00001600| 69 73 69 62 6c 65 2e 29 | 20 20 41 6c 6c 0a 58 67 |isible.)| All.Xg|
|00001610| 6c 6f 62 61 6c 20 66 75 | 6e 63 74 69 6f 6e 20 6e |lobal fu|nction n|
|00001620| 61 6d 65 73 20 73 68 6f | 75 6c 64 20 62 65 67 69 |ames sho|uld begi|
|00001630| 6e 20 77 69 74 68 20 22 | 6a 70 65 67 5f 22 2c 20 |n with "|jpeg_", |
|00001640| 61 6e 64 20 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |and shou|ld have |
|00001650| 61 6e 0a 58 61 62 62 72 | 65 76 69 61 74 65 64 20 |an.Xabbr|eviated |
|00001660| 6e 61 6d 65 20 28 75 6e | 69 71 75 65 20 69 6e 20 |name (un|ique in |
|00001670| 74 68 65 20 66 69 72 73 | 74 20 73 69 78 20 63 68 |the firs|t six ch|
|00001680| 61 72 61 63 74 65 72 73 | 29 20 73 75 62 73 74 69 |aracters|) substi|
|00001690| 74 75 74 65 64 20 62 79 | 20 6d 61 63 72 6f 0a 58 |tuted by| macro.X|
|000016a0| 77 68 65 6e 20 4e 45 45 | 44 5f 53 48 4f 52 54 5f |when NEE|D_SHORT_|
|000016b0| 45 58 54 45 52 4e 41 4c | 5f 4e 41 4d 45 53 20 69 |EXTERNAL|_NAMES i|
|000016c0| 73 20 73 65 74 2e 0a 58 | 0a 58 33 2e 20 44 6f 6e |s set..X|.X3. Don|
|000016d0| 27 74 20 75 73 65 20 67 | 6c 6f 62 61 6c 20 76 61 |'t use g|lobal va|
|000016e0| 72 69 61 62 6c 65 73 3b | 20 61 6e 79 74 68 69 6e |riables;| anythin|
|000016f0| 67 20 74 68 61 74 20 6d | 75 73 74 20 62 65 20 75 |g that m|ust be u|
|00001700| 73 65 64 20 69 6e 20 61 | 6e 6f 74 68 65 72 20 6d |sed in a|nother m|
|00001710| 6f 64 75 6c 65 0a 58 73 | 68 6f 75 6c 64 20 62 65 |odule.Xs|hould be|
|00001720| 20 69 6e 20 74 68 65 20 | 63 6f 6d 6d 6f 6e 20 64 | in the |common d|
|00001730| 61 74 61 20 73 74 72 75 | 63 74 75 72 65 73 2e 0a |ata stru|ctures..|
|00001740| 58 0a 58 34 2e 20 44 6f | 6e 27 74 20 75 73 65 20 |X.X4. Do|n't use |
|00001750| 73 74 61 74 69 63 20 76 | 61 72 69 61 62 6c 65 73 |static v|ariables|
|00001760| 20 65 78 63 65 70 74 20 | 66 6f 72 20 72 65 61 64 | except |for read|
|00001770| 2d 6f 6e 6c 79 20 63 6f | 6e 73 74 61 6e 74 20 74 |-only co|nstant t|
|00001780| 61 62 6c 65 73 2e 20 20 | 56 61 72 69 61 62 6c 65 |ables. |Variable|
|00001790| 73 0a 58 74 68 61 74 20 | 73 68 6f 75 6c 64 20 62 |s.Xthat |should b|
|000017a0| 65 20 70 72 69 76 61 74 | 65 20 74 6f 20 61 20 6d |e privat|e to a m|
|000017b0| 6f 64 75 6c 65 20 63 61 | 6e 20 62 65 20 70 6c 61 |odule ca|n be pla|
|000017c0| 63 65 64 20 69 6e 74 6f | 20 70 72 69 76 61 74 65 |ced into| private|
|000017d0| 20 73 74 72 75 63 74 75 | 72 65 73 20 28 73 65 65 | structu|res (see|
|000017e0| 0a 58 74 68 65 20 73 79 | 73 74 65 6d 20 61 72 63 |.Xthe sy|stem arc|
|000017f0| 68 69 74 65 63 74 75 72 | 65 20 64 6f 63 75 6d 65 |hitectur|e docume|
|00001800| 6e 74 2c 20 73 74 72 75 | 63 74 75 72 65 2e 64 6f |nt, stru|cture.do|
|00001810| 63 29 2e 0a 58 0a 58 35 | 2e 20 53 6f 75 72 63 65 |c)..X.X5|. Source|
|00001820| 20 66 69 6c 65 20 6e 61 | 6d 65 73 20 73 68 6f 75 | file na|mes shou|
|00001830| 6c 64 20 62 65 67 69 6e | 20 77 69 74 68 20 22 6a |ld begin| with "j|
|00001840| 22 20 66 6f 72 20 66 69 | 6c 65 73 20 74 68 61 74 |" for fi|les that|
|00001850| 20 61 72 65 20 70 61 72 | 74 20 6f 66 20 74 68 65 | are par|t of the|
|00001860| 0a 58 6c 69 62 72 61 72 | 79 20 70 72 6f 70 65 72 |.Xlibrar|y proper|
|00001870| 3b 20 73 6f 75 72 63 65 | 20 66 69 6c 65 73 20 74 |; source| files t|
|00001880| 68 61 74 20 61 72 65 20 | 6e 6f 74 20 70 61 72 74 |hat are |not part|
|00001890| 20 6f 66 20 74 68 65 20 | 6c 69 62 72 61 72 79 2c | of the |library,|
|000018a0| 20 73 75 63 68 20 61 73 | 20 63 6a 70 65 67 2e 63 | such as| cjpeg.c|
|000018b0| 0a 58 61 6e 64 20 64 6a | 70 65 67 2e 63 2c 20 64 |.Xand dj|peg.c, d|
|000018c0| 6f 20 6e 6f 74 20 62 65 | 67 69 6e 20 77 69 74 68 |o not be|gin with|
|000018d0| 20 22 6a 22 2e 20 20 4b | 65 65 70 20 73 6f 75 72 | "j". K|eep sour|
|000018e0| 63 65 20 66 69 6c 65 20 | 6e 61 6d 65 73 20 74 6f |ce file |names to|
|000018f0| 20 65 69 67 68 74 0a 58 | 63 68 61 72 61 63 74 65 | eight.X|characte|
|00001900| 72 73 20 28 70 6c 75 73 | 20 22 2e 63 22 20 6f 72 |rs (plus| ".c" or|
|00001910| 20 22 2e 68 22 2c 20 65 | 74 63 29 20 74 6f 20 6d | ".h", e|tc) to m|
|00001920| 61 6b 65 20 6c 69 66 65 | 20 65 61 73 79 20 66 6f |ake life| easy fo|
|00001930| 72 20 4d 53 2d 44 4f 53 | 65 72 73 2e 20 20 4b 65 |r MS-DOS|ers. Ke|
|00001940| 65 70 0a 58 63 6f 6d 70 | 72 65 73 73 69 6f 6e 20 |ep.Xcomp|ression |
|00001950| 61 6e 64 20 64 65 63 6f | 6d 70 72 65 73 73 69 6f |and deco|mpressio|
|00001960| 6e 20 63 6f 64 65 20 69 | 6e 20 73 65 70 61 72 61 |n code i|n separa|
|00001970| 74 65 20 73 6f 75 72 63 | 65 20 66 69 6c 65 73 20 |te sourc|e files |
|00001980| 2d 2d 2d 20 73 6f 6d 65 | 0a 58 61 70 70 6c 69 63 |--- some|.Xapplic|
|00001990| 61 74 69 6f 6e 73 20 6d | 61 79 20 77 61 6e 74 20 |ations m|ay want |
|000019a0| 6f 6e 6c 79 20 6f 6e 65 | 20 68 61 6c 66 20 6f 66 |only one| half of|
|000019b0| 20 74 68 65 20 6c 69 62 | 72 61 72 79 2e 0a 58 0a | the lib|rary..X.|
|000019c0| 58 4e 6f 74 65 3a 20 74 | 68 65 73 65 20 72 75 6c |XNote: t|hese rul|
|000019d0| 65 73 20 28 70 61 72 74 | 69 63 75 6c 61 72 6c 79 |es (part|icularly|
|000019e0| 20 23 34 29 20 61 72 65 | 20 6e 6f 74 20 66 6f 6c | #4) are| not fol|
|000019f0| 6c 6f 77 65 64 20 72 65 | 6c 69 67 69 6f 75 73 6c |lowed re|ligiousl|
|00001a00| 79 20 69 6e 20 74 68 65 | 0a 58 6d 6f 64 75 6c 65 |y in the|.Xmodule|
|00001a10| 73 20 74 68 61 74 20 61 | 72 65 20 75 73 65 64 20 |s that a|re used |
|00001a20| 69 6e 20 63 6a 70 65 67 | 2f 64 6a 70 65 67 20 62 |in cjpeg|/djpeg b|
|00001a30| 75 74 20 61 72 65 20 6e | 6f 74 20 70 61 72 74 20 |ut are n|ot part |
|00001a40| 6f 66 20 74 68 65 20 4a | 50 45 47 20 6c 69 62 72 |of the J|PEG libr|
|00001a50| 61 72 79 0a 58 70 72 6f | 70 65 72 2e 20 20 54 68 |ary.Xpro|per. Th|
|00001a60| 6f 73 65 20 6d 6f 64 75 | 6c 65 73 20 61 72 65 20 |ose modu|les are |
|00001a70| 6e 6f 74 20 72 65 61 6c | 6c 79 20 69 6e 74 65 6e |not real|ly inten|
|00001a80| 64 65 64 20 74 6f 20 62 | 65 20 75 73 65 64 20 69 |ded to b|e used i|
|00001a90| 6e 20 6f 74 68 65 72 0a | 58 61 70 70 6c 69 63 61 |n other.|Xapplica|
|00001aa0| 74 69 6f 6e 73 2e 0a 45 | 4e 44 5f 4f 46 5f 46 49 |tions..E|ND_OF_FI|
|00001ab0| 4c 45 0a 20 20 69 66 20 | 74 65 73 74 20 35 33 33 |LE. if |test 533|
|00001ac0| 36 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 27 63 |6 -ne `w|c -c <'c|
|00001ad0| 6f 64 65 72 75 6c 65 73 | 2e 64 6f 63 27 60 3b 20 |oderules|.doc'`; |
|00001ae0| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00001af0| 61 72 3a 20 5c 22 27 63 | 6f 64 65 72 75 6c 65 73 |ar: \"'c|oderules|
|00001b00| 2e 64 6f 63 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |.doc'\" |unpacked|
|00001b10| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00001b20| 21 0a 20 20 66 69 0a 20 | 20 23 20 65 6e 64 20 6f |!. fi. | # end o|
|00001b30| 66 20 27 63 6f 64 65 72 | 75 6c 65 73 2e 64 6f 63 |f 'coder|ules.doc|
|00001b40| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00001b50| 27 64 6a 70 65 67 2e 31 | 27 20 2d 61 20 22 24 7b |'djpeg.1|' -a "${|
|00001b60| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00001b70| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00001b80| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00001b90| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00001ba0| 5c 22 27 64 6a 70 65 67 | 2e 31 27 5c 22 0a 65 6c |\"'djpeg|.1'\".el|
|00001bb0| 73 65 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |se. ech|o shar: |
|00001bc0| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 64 6a |Extracti|ng \"'dj|
|00001bd0| 70 65 67 2e 31 27 5c 22 | 20 5c 28 37 30 31 37 20 |peg.1'\"| \(7017 |
|00001be0| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 20 20 73 |characte|rs\). s|
|00001bf0| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 64 6a |ed "s/^X|//" >'dj|
|00001c00| 70 65 67 2e 31 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |peg.1' <|<'END_OF|
|00001c10| 5f 46 49 4c 45 27 0a 58 | 2e 54 48 20 44 4a 50 45 |_FILE'.X|.TH DJPE|
|00001c20| 47 20 31 20 22 32 38 20 | 41 75 67 75 73 74 20 31 |G 1 "28 |August 1|
|00001c30| 39 39 34 22 0a 58 2e 53 | 48 20 4e 41 4d 45 0a 58 |994".X.S|H NAME.X|
|00001c40| 64 6a 70 65 67 20 5c 2d | 20 64 65 63 6f 6d 70 72 |djpeg \-| decompr|
|00001c50| 65 73 73 20 61 20 4a 50 | 45 47 20 66 69 6c 65 20 |ess a JP|EG file |
|00001c60| 74 6f 20 61 6e 20 69 6d | 61 67 65 20 66 69 6c 65 |to an im|age file|
|00001c70| 0a 58 2e 53 48 20 53 59 | 4e 4f 50 53 49 53 0a 58 |.X.SH SY|NOPSIS.X|
|00001c80| 2e 42 20 64 6a 70 65 67 | 0a 58 5b 0a 58 2e 49 20 |.B djpeg|.X[.X.I |
|00001c90| 6f 70 74 69 6f 6e 73 0a | 58 5d 0a 58 5b 0a 58 2e |options.|X].X[.X.|
|00001ca0| 49 20 66 69 6c 65 6e 61 | 6d 65 0a 58 5d 0a 58 2e |I filena|me.X].X.|
|00001cb0| 4c 50 0a 58 2e 53 48 20 | 44 45 53 43 52 49 50 54 |LP.X.SH |DESCRIPT|
|00001cc0| 49 4f 4e 0a 58 2e 4c 50 | 0a 58 2e 42 20 64 6a 70 |ION.X.LP|.X.B djp|
|00001cd0| 65 67 0a 58 64 65 63 6f | 6d 70 72 65 73 73 65 73 |eg.Xdeco|mpresses|
|00001ce0| 20 74 68 65 20 6e 61 6d | 65 64 20 4a 50 45 47 20 | the nam|ed JPEG |
|00001cf0| 66 69 6c 65 2c 20 6f 72 | 20 74 68 65 20 73 74 61 |file, or| the sta|
|00001d00| 6e 64 61 72 64 20 69 6e | 70 75 74 20 69 66 20 6e |ndard in|put if n|
|00001d10| 6f 20 66 69 6c 65 20 69 | 73 20 6e 61 6d 65 64 2c |o file i|s named,|
|00001d20| 0a 58 61 6e 64 20 70 72 | 6f 64 75 63 65 73 20 61 |.Xand pr|oduces a|
|00001d30| 6e 20 69 6d 61 67 65 20 | 66 69 6c 65 20 6f 6e 20 |n image |file on |
|00001d40| 74 68 65 20 73 74 61 6e | 64 61 72 64 20 6f 75 74 |the stan|dard out|
|00001d50| 70 75 74 2e 20 20 50 42 | 4d 50 4c 55 53 20 28 50 |put. PB|MPLUS (P|
|00001d60| 50 4d 2f 50 47 4d 29 2c | 20 42 4d 50 2c 0a 58 47 |PM/PGM),| BMP,.XG|
|00001d70| 49 46 2c 20 54 61 72 67 | 61 2c 20 6f 72 20 52 4c |IF, Targ|a, or RL|
|00001d80| 45 20 28 55 74 61 68 20 | 52 61 73 74 65 72 20 54 |E (Utah |Raster T|
|00001d90| 6f 6f 6c 6b 69 74 29 20 | 6f 75 74 70 75 74 20 66 |oolkit) |output f|
|00001da0| 6f 72 6d 61 74 20 63 61 | 6e 20 62 65 20 73 65 6c |ormat ca|n be sel|
|00001db0| 65 63 74 65 64 2e 0a 58 | 28 52 4c 45 20 69 73 20 |ected..X|(RLE is |
|00001dc0| 73 75 70 70 6f 72 74 65 | 64 20 6f 6e 6c 79 20 69 |supporte|d only i|
|00001dd0| 66 20 74 68 65 20 55 52 | 54 20 6c 69 62 72 61 72 |f the UR|T librar|
|00001de0| 79 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 2e 29 |y is ava|ilable.)|
|00001df0| 0a 58 2e 53 48 20 4f 50 | 54 49 4f 4e 53 0a 58 41 |.X.SH OP|TIONS.XA|
|00001e00| 6c 6c 20 73 77 69 74 63 | 68 20 6e 61 6d 65 73 20 |ll switc|h names |
|00001e10| 6d 61 79 20 62 65 20 61 | 62 62 72 65 76 69 61 74 |may be a|bbreviat|
|00001e20| 65 64 3b 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 2c |ed; for |example,|
|00001e30| 0a 58 2e 42 20 5c 2d 67 | 72 61 79 73 63 61 6c 65 |.X.B \-g|rayscale|
|00001e40| 0a 58 6d 61 79 20 62 65 | 20 77 72 69 74 74 65 6e |.Xmay be| written|
|00001e50| 0a 58 2e 42 20 5c 2d 67 | 72 61 79 0a 58 6f 72 0a |.X.B \-g|ray.Xor.|
|00001e60| 58 2e 42 52 20 5c 2d 67 | 72 20 2e 0a 58 4d 6f 73 |X.BR \-g|r ..XMos|
|00001e70| 74 20 6f 66 20 74 68 65 | 20 22 62 61 73 69 63 22 |t of the| "basic"|
|00001e80| 20 73 77 69 74 63 68 65 | 73 20 63 61 6e 20 62 65 | switche|s can be|
|00001e90| 20 61 62 62 72 65 76 69 | 61 74 65 64 20 74 6f 20 | abbrevi|ated to |
|00001ea0| 61 73 20 6c 69 74 74 6c | 65 20 61 73 20 6f 6e 65 |as littl|e as one|
|00001eb0| 20 6c 65 74 74 65 72 2e | 0a 58 55 70 70 65 72 20 | letter.|.XUpper |
|00001ec0| 61 6e 64 20 6c 6f 77 65 | 72 20 63 61 73 65 20 61 |and lowe|r case a|
|00001ed0| 72 65 20 65 71 75 69 76 | 61 6c 65 6e 74 20 28 74 |re equiv|alent (t|
|00001ee0| 68 75 73 0a 58 2e 42 20 | 5c 2d 47 49 46 0a 58 69 |hus.X.B |\-GIF.Xi|
|00001ef0| 73 20 74 68 65 20 73 61 | 6d 65 20 61 73 0a 58 2e |s the sa|me as.X.|
|00001f00| 42 52 20 5c 2d 67 69 66 | 20 29 2e 0a 58 42 72 69 |BR \-gif| )..XBri|
|00001f10| 74 69 73 68 20 73 70 65 | 6c 6c 69 6e 67 73 20 61 |tish spe|llings a|
|00001f20| 72 65 20 61 6c 73 6f 20 | 61 63 63 65 70 74 65 64 |re also |accepted|
|00001f30| 20 28 65 2e 67 2e 2c 0a | 58 2e 42 52 20 5c 2d 67 | (e.g.,.|X.BR \-g|
|00001f40| 72 65 79 73 63 61 6c 65 | 20 29 2c 0a 58 74 68 6f |reyscale| ),.Xtho|
|00001f50| 75 67 68 20 66 6f 72 20 | 62 72 65 76 69 74 79 20 |ugh for |brevity |
|00001f60| 74 68 65 73 65 20 61 72 | 65 20 6e 6f 74 20 6d 65 |these ar|e not me|
|00001f70| 6e 74 69 6f 6e 65 64 20 | 62 65 6c 6f 77 2e 0a 58 |ntioned |below..X|
|00001f80| 2e 50 50 0a 58 54 68 65 | 20 62 61 73 69 63 20 73 |.PP.XThe| basic s|
|00001f90| 77 69 74 63 68 65 73 20 | 61 72 65 3a 0a 58 2e 54 |witches |are:.X.T|
|00001fa0| 50 0a 58 2e 42 49 20 5c | 2d 63 6f 6c 6f 72 73 20 |P.X.BI \|-colors |
|00001fb0| 22 20 4e 22 0a 58 52 65 | 64 75 63 65 20 69 6d 61 |" N".XRe|duce ima|
|00001fc0| 67 65 20 74 6f 20 61 74 | 20 6d 6f 73 74 20 4e 20 |ge to at| most N |
|00001fd0| 63 6f 6c 6f 72 73 2e 20 | 20 54 68 69 73 20 72 65 |colors. | This re|
|00001fe0| 64 75 63 65 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |duces th|e number|
|00001ff0| 20 6f 66 20 63 6f 6c 6f | 72 73 20 75 73 65 64 20 | of colo|rs used |
|00002000| 69 6e 0a 58 74 68 65 20 | 6f 75 74 70 75 74 20 69 |in.Xthe |output i|
|00002010| 6d 61 67 65 2c 20 73 6f | 20 74 68 61 74 20 69 74 |mage, so| that it|
|00002020| 20 63 61 6e 20 62 65 20 | 64 69 73 70 6c 61 79 65 | can be |displaye|
|00002030| 64 20 6f 6e 20 61 20 63 | 6f 6c 6f 72 6d 61 70 70 |d on a c|olormapp|
|00002040| 65 64 20 64 69 73 70 6c | 61 79 20 6f 72 0a 58 73 |ed displ|ay or.Xs|
|00002050| 74 6f 72 65 64 20 69 6e | 20 61 20 63 6f 6c 6f 72 |tored in| a color|
|00002060| 6d 61 70 70 65 64 20 66 | 69 6c 65 20 66 6f 72 6d |mapped f|ile form|
|00002070| 61 74 2e 20 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |at. For| example|
|00002080| 2c 20 69 66 20 79 6f 75 | 20 68 61 76 65 20 61 6e |, if you| have an|
|00002090| 20 38 2d 62 69 74 0a 58 | 64 69 73 70 6c 61 79 2c | 8-bit.X|display,|
|000020a0| 20 79 6f 75 27 64 20 6e | 65 65 64 20 74 6f 20 72 | you'd n|eed to r|
|000020b0| 65 64 75 63 65 20 74 6f | 20 32 35 36 20 6f 72 20 |educe to| 256 or |
|000020c0| 66 65 77 65 72 20 63 6f | 6c 6f 72 73 2e 0a 58 2e |fewer co|lors..X.|
|000020d0| 54 50 0a 58 2e 42 49 20 | 5c 2d 71 75 61 6e 74 69 |TP.X.BI |\-quanti|
|000020e0| 7a 65 20 22 20 4e 22 0a | 58 53 61 6d 65 20 61 73 |ze " N".|XSame as|
|000020f0| 0a 58 2e 42 52 20 5c 2d | 63 6f 6c 6f 72 73 20 2e |.X.BR \-|colors .|
|00002100| 0a 58 2e 42 20 5c 2d 63 | 6f 6c 6f 72 73 0a 58 69 |.X.B \-c|olors.Xi|
|00002110| 73 20 74 68 65 20 72 65 | 63 6f 6d 6d 65 6e 64 65 |s the re|commende|
|00002120| 64 20 6e 61 6d 65 2c 0a | 58 2e 42 20 5c 2d 71 75 |d name,.|X.B \-qu|
|00002130| 61 6e 74 69 7a 65 0a 58 | 69 73 20 70 72 6f 76 69 |antize.X|is provi|
|00002140| 64 65 64 20 6f 6e 6c 79 | 20 66 6f 72 20 62 61 63 |ded only| for bac|
|00002150| 6b 77 61 72 64 73 20 63 | 6f 6d 70 61 74 69 62 69 |kwards c|ompatibi|
|00002160| 6c 69 74 79 2e 0a 58 2e | 54 50 0a 58 2e 42 20 5c |lity..X.|TP.X.B \|
|00002170| 2d 66 61 73 74 0a 58 53 | 65 6c 65 63 74 20 72 65 |-fast.XS|elect re|
|00002180| 63 6f 6d 6d 65 6e 64 65 | 64 20 70 72 6f 63 65 73 |commende|d proces|
|00002190| 73 69 6e 67 20 6f 70 74 | 69 6f 6e 73 20 66 6f 72 |sing opt|ions for|
|000021a0| 20 66 61 73 74 2c 20 6c | 6f 77 20 71 75 61 6c 69 | fast, l|ow quali|
|000021b0| 74 79 20 6f 75 74 70 75 | 74 2e 20 20 28 54 68 65 |ty outpu|t. (The|
|000021c0| 0a 58 64 65 66 61 75 6c | 74 20 6f 70 74 69 6f 6e |.Xdefaul|t option|
|000021d0| 73 20 61 72 65 20 63 68 | 6f 73 65 6e 20 66 6f 72 |s are ch|osen for|
|000021e0| 20 68 69 67 68 65 73 74 | 20 71 75 61 6c 69 74 79 | highest| quality|
|000021f0| 20 6f 75 74 70 75 74 2e | 29 20 20 43 75 72 72 65 | output.|) Curre|
|00002200| 6e 74 6c 79 2c 20 74 68 | 69 73 20 69 73 0a 58 65 |ntly, th|is is.Xe|
|00002210| 71 75 69 76 61 6c 65 6e | 74 20 74 6f 20 5c 66 42 |quivalen|t to \fB|
|00002220| 5c 2d 64 63 74 20 66 61 | 73 74 20 5c 2d 6e 6f 73 |\-dct fa|st \-nos|
|00002230| 6d 6f 6f 74 68 20 5c 2d | 6f 6e 65 70 61 73 73 20 |mooth \-|onepass |
|00002240| 5c 2d 64 69 74 68 65 72 | 20 6f 72 64 65 72 65 64 |\-dither| ordered|
|00002250| 5c 66 52 2e 0a 58 2e 54 | 50 0a 58 2e 42 20 5c 2d |\fR..X.T|P.X.B \-|
|00002260| 67 72 61 79 73 63 61 6c | 65 0a 58 46 6f 72 63 65 |grayscal|e.XForce|
|00002270| 20 67 72 61 79 2d 73 63 | 61 6c 65 20 6f 75 74 70 | gray-sc|ale outp|
|00002280| 75 74 20 65 76 65 6e 20 | 69 66 20 4a 50 45 47 20 |ut even |if JPEG |
|00002290| 66 69 6c 65 20 69 73 20 | 63 6f 6c 6f 72 2e 20 20 |file is |color. |
|000022a0| 55 73 65 66 75 6c 20 66 | 6f 72 20 76 69 65 77 69 |Useful f|or viewi|
|000022b0| 6e 67 20 6f 6e 0a 58 6d | 6f 6e 6f 63 68 72 6f 6d |ng on.Xm|onochrom|
|000022c0| 65 20 64 69 73 70 6c 61 | 79 73 3b 20 61 6c 73 6f |e displa|ys; also|
|000022d0| 2c 0a 58 2e 42 20 64 6a | 70 65 67 0a 58 72 75 6e |,.X.B dj|peg.Xrun|
|000022e0| 73 20 6e 6f 74 69 63 65 | 61 62 6c 79 20 66 61 73 |s notice|ably fas|
|000022f0| 74 65 72 20 69 6e 20 74 | 68 69 73 20 6d 6f 64 65 |ter in t|his mode|
|00002300| 2e 0a 58 2e 54 50 0a 58 | 2e 42 49 20 5c 2d 73 63 |..X.TP.X|.BI \-sc|
|00002310| 61 6c 65 20 22 20 4d 2f | 4e 22 0a 58 53 63 61 6c |ale " M/|N".XScal|
|00002320| 65 20 74 68 65 20 6f 75 | 74 70 75 74 20 69 6d 61 |e the ou|tput ima|
|00002330| 67 65 20 62 79 20 61 20 | 66 61 63 74 6f 72 20 4d |ge by a |factor M|
|00002340| 2f 4e 2e 20 20 43 75 72 | 72 65 6e 74 6c 79 20 74 |/N. Cur|rently t|
|00002350| 68 65 20 73 63 61 6c 65 | 20 66 61 63 74 6f 72 20 |he scale| factor |
|00002360| 6d 75 73 74 20 62 65 0a | 58 31 2f 31 2c 20 31 2f |must be.|X1/1, 1/|
|00002370| 32 2c 20 31 2f 34 2c 20 | 6f 72 20 31 2f 38 2e 20 |2, 1/4, |or 1/8. |
|00002380| 20 53 63 61 6c 69 6e 67 | 20 69 73 20 68 61 6e 64 | Scaling| is hand|
|00002390| 79 20 69 66 20 74 68 65 | 20 69 6d 61 67 65 20 69 |y if the| image i|
|000023a0| 73 20 6c 61 72 67 65 72 | 20 74 68 61 6e 20 79 6f |s larger| than yo|
|000023b0| 75 72 0a 58 73 63 72 65 | 65 6e 3b 20 61 6c 73 6f |ur.Xscre|en; also|
|000023c0| 2c 0a 58 2e 42 20 64 6a | 70 65 67 0a 58 72 75 6e |,.X.B dj|peg.Xrun|
|000023d0| 73 20 6d 75 63 68 20 66 | 61 73 74 65 72 20 77 68 |s much f|aster wh|
|000023e0| 65 6e 20 73 63 61 6c 69 | 6e 67 20 64 6f 77 6e 20 |en scali|ng down |
|000023f0| 74 68 65 20 6f 75 74 70 | 75 74 2e 0a 58 2e 54 50 |the outp|ut..X.TP|
|00002400| 0a 58 2e 42 20 5c 2d 62 | 6d 70 0a 58 53 65 6c 65 |.X.B \-b|mp.XSele|
|00002410| 63 74 20 42 4d 50 20 6f | 75 74 70 75 74 20 66 6f |ct BMP o|utput fo|
|00002420| 72 6d 61 74 20 28 57 69 | 6e 64 6f 77 73 20 66 6c |rmat (Wi|ndows fl|
|00002430| 61 76 6f 72 29 2e 20 20 | 38 2d 62 69 74 20 63 6f |avor). |8-bit co|
|00002440| 6c 6f 72 6d 61 70 70 65 | 64 20 66 6f 72 6d 61 74 |lormappe|d format|
|00002450| 20 69 73 0a 58 65 6d 69 | 74 74 65 64 20 69 66 0a | is.Xemi|tted if.|
|00002460| 58 2e 42 20 5c 2d 63 6f | 6c 6f 72 73 0a 58 6f 72 |X.B \-co|lors.Xor|
|00002470| 0a 58 2e 42 20 5c 2d 67 | 72 61 79 73 63 61 6c 65 |.X.B \-g|rayscale|
|00002480| 0a 58 69 73 20 73 70 65 | 63 69 66 69 65 64 2c 20 |.Xis spe|cified, |
|00002490| 6f 72 20 69 66 20 74 68 | 65 20 4a 50 45 47 20 66 |or if th|e JPEG f|
|000024a0| 69 6c 65 20 69 73 20 67 | 72 61 79 2d 73 63 61 6c |ile is g|ray-scal|
|000024b0| 65 3b 20 6f 74 68 65 72 | 77 69 73 65 2c 20 32 34 |e; other|wise, 24|
|000024c0| 2d 62 69 74 20 66 75 6c | 6c 2d 63 6f 6c 6f 72 0a |-bit ful|l-color.|
|000024d0| 58 66 6f 72 6d 61 74 20 | 69 73 20 65 6d 69 74 74 |Xformat |is emitt|
|000024e0| 65 64 2e 0a 58 2e 54 50 | 0a 58 2e 42 20 5c 2d 67 |ed..X.TP|.X.B \-g|
|000024f0| 69 66 0a 58 53 65 6c 65 | 63 74 20 47 49 46 20 6f |if.XSele|ct GIF o|
|00002500| 75 74 70 75 74 20 66 6f | 72 6d 61 74 2e 20 20 53 |utput fo|rmat. S|
|00002510| 69 6e 63 65 20 47 49 46 | 20 64 6f 65 73 20 6e 6f |ince GIF| does no|
|00002520| 74 20 73 75 70 70 6f 72 | 74 20 6d 6f 72 65 20 74 |t suppor|t more t|
|00002530| 68 61 6e 20 32 35 36 20 | 63 6f 6c 6f 72 73 2c 0a |han 256 |colors,.|
|00002540| 58 2e 42 20 5c 2d 63 6f | 6c 6f 72 73 20 32 35 36 |X.B \-co|lors 256|
|00002550| 0a 58 69 73 20 61 73 73 | 75 6d 65 64 20 28 75 6e |.Xis ass|umed (un|
|00002560| 6c 65 73 73 20 79 6f 75 | 20 73 70 65 63 69 66 79 |less you| specify|
|00002570| 20 61 20 73 6d 61 6c 6c | 65 72 20 6e 75 6d 62 65 | a small|er numbe|
|00002580| 72 20 6f 66 20 63 6f 6c | 6f 72 73 29 2e 0a 58 2e |r of col|ors)..X.|
|00002590| 54 50 0a 58 2e 42 20 5c | 2d 6f 73 32 0a 58 53 65 |TP.X.B \|-os2.XSe|
|000025a0| 6c 65 63 74 20 42 4d 50 | 20 6f 75 74 70 75 74 20 |lect BMP| output |
|000025b0| 66 6f 72 6d 61 74 20 28 | 4f 53 2f 32 20 31 2e 78 |format (|OS/2 1.x|
|000025c0| 20 66 6c 61 76 6f 72 29 | 2e 20 20 38 2d 62 69 74 | flavor)|. 8-bit|
|000025d0| 20 63 6f 6c 6f 72 6d 61 | 70 70 65 64 20 66 6f 72 | colorma|pped for|
|000025e0| 6d 61 74 20 69 73 0a 58 | 65 6d 69 74 74 65 64 20 |mat is.X|emitted |
|000025f0| 69 66 0a 58 2e 42 20 5c | 2d 63 6f 6c 6f 72 73 0a |if.X.B \|-colors.|
|00002600| 58 6f 72 0a 58 2e 42 20 | 5c 2d 67 72 61 79 73 63 |Xor.X.B |\-graysc|
|00002610| 61 6c 65 0a 58 69 73 20 | 73 70 65 63 69 66 69 65 |ale.Xis |specifie|
|00002620| 64 2c 20 6f 72 20 69 66 | 20 74 68 65 20 4a 50 45 |d, or if| the JPE|
|00002630| 47 20 66 69 6c 65 20 69 | 73 20 67 72 61 79 2d 73 |G file i|s gray-s|
|00002640| 63 61 6c 65 3b 20 6f 74 | 68 65 72 77 69 73 65 2c |cale; ot|herwise,|
|00002650| 20 32 34 2d 62 69 74 20 | 66 75 6c 6c 2d 63 6f 6c | 24-bit |full-col|
|00002660| 6f 72 0a 58 66 6f 72 6d | 61 74 20 69 73 20 65 6d |or.Xform|at is em|
|00002670| 69 74 74 65 64 2e 0a 58 | 2e 54 50 0a 58 2e 42 20 |itted..X|.TP.X.B |
|00002680| 5c 2d 70 6e 6d 0a 58 53 | 65 6c 65 63 74 20 50 42 |\-pnm.XS|elect PB|
|00002690| 4d 50 4c 55 53 20 28 50 | 50 4d 2f 50 47 4d 29 20 |MPLUS (P|PM/PGM) |
|000026a0| 6f 75 74 70 75 74 20 66 | 6f 72 6d 61 74 20 28 74 |output f|ormat (t|
|000026b0| 68 69 73 20 69 73 20 74 | 68 65 20 64 65 66 61 75 |his is t|he defau|
|000026c0| 6c 74 20 66 6f 72 6d 61 | 74 29 2e 0a 58 50 47 4d |lt forma|t)..XPGM|
|000026d0| 20 69 73 20 65 6d 69 74 | 74 65 64 20 69 66 20 74 | is emit|ted if t|
|000026e0| 68 65 20 4a 50 45 47 20 | 66 69 6c 65 20 69 73 20 |he JPEG |file is |
|000026f0| 67 72 61 79 2d 73 63 61 | 6c 65 20 6f 72 20 69 66 |gray-sca|le or if|
|00002700| 0a 58 2e 42 20 5c 2d 67 | 72 61 79 73 63 61 6c 65 |.X.B \-g|rayscale|
|00002710| 0a 58 69 73 20 73 70 65 | 63 69 66 69 65 64 3b 20 |.Xis spe|cified; |
|00002720| 6f 74 68 65 72 77 69 73 | 65 20 50 50 4d 20 69 73 |otherwis|e PPM is|
|00002730| 20 65 6d 69 74 74 65 64 | 2e 0a 58 2e 54 50 0a 58 | emitted|..X.TP.X|
|00002740| 2e 42 20 5c 2d 72 6c 65 | 0a 58 53 65 6c 65 63 74 |.B \-rle|.XSelect|
|00002750| 20 52 4c 45 20 6f 75 74 | 70 75 74 20 66 6f 72 6d | RLE out|put form|
|00002760| 61 74 2e 20 20 28 52 65 | 71 75 69 72 65 73 20 55 |at. (Re|quires U|
|00002770| 52 54 20 6c 69 62 72 61 | 72 79 2e 29 0a 58 2e 54 |RT libra|ry.).X.T|
|00002780| 50 0a 58 2e 42 20 5c 2d | 74 61 72 67 61 0a 58 53 |P.X.B \-|targa.XS|
|00002790| 65 6c 65 63 74 20 54 61 | 72 67 61 20 6f 75 74 70 |elect Ta|rga outp|
|000027a0| 75 74 20 66 6f 72 6d 61 | 74 2e 20 20 47 72 61 79 |ut forma|t. Gray|
|000027b0| 2d 73 63 61 6c 65 20 66 | 6f 72 6d 61 74 20 69 73 |-scale f|ormat is|
|000027c0| 20 65 6d 69 74 74 65 64 | 20 69 66 20 74 68 65 20 | emitted| if the |
|000027d0| 4a 50 45 47 20 66 69 6c | 65 20 69 73 0a 58 67 72 |JPEG fil|e is.Xgr|
|000027e0| 61 79 2d 73 63 61 6c 65 | 20 6f 72 20 69 66 0a 58 |ay-scale| or if.X|
|000027f0| 2e 42 20 5c 2d 67 72 61 | 79 73 63 61 6c 65 0a 58 |.B \-gra|yscale.X|
|00002800| 69 73 20 73 70 65 63 69 | 66 69 65 64 3b 20 6f 74 |is speci|fied; ot|
|00002810| 68 65 72 77 69 73 65 2c | 20 63 6f 6c 6f 72 6d 61 |herwise,| colorma|
|00002820| 70 70 65 64 20 66 6f 72 | 6d 61 74 20 69 73 20 65 |pped for|mat is e|
|00002830| 6d 69 74 74 65 64 20 69 | 66 0a 58 2e 42 20 5c 2d |mitted i|f.X.B \-|
|00002840| 63 6f 6c 6f 72 73 0a 58 | 69 73 20 73 70 65 63 69 |colors.X|is speci|
|00002850| 66 69 65 64 3b 20 6f 74 | 68 65 72 77 69 73 65 2c |fied; ot|herwise,|
|00002860| 20 32 34 2d 62 69 74 20 | 66 75 6c 6c 2d 63 6f 6c | 24-bit |full-col|
|00002870| 6f 72 20 66 6f 72 6d 61 | 74 20 69 73 20 65 6d 69 |or forma|t is emi|
|00002880| 74 74 65 64 2e 0a 58 2e | 50 50 0a 58 53 77 69 74 |tted..X.|PP.XSwit|
|00002890| 63 68 65 73 20 66 6f 72 | 20 61 64 76 61 6e 63 65 |ches for| advance|
|000028a0| 64 20 75 73 65 72 73 3a | 0a 58 2e 54 50 0a 58 2e |d users:|.X.TP.X.|
|000028b0| 42 20 5c 2d 64 63 74 20 | 69 6e 74 0a 58 55 73 65 |B \-dct |int.XUse|
|000028c0| 20 69 6e 74 65 67 65 72 | 20 44 43 54 20 6d 65 74 | integer| DCT met|
|000028d0| 68 6f 64 20 28 64 65 66 | 61 75 6c 74 29 2e 0a 58 |hod (def|ault)..X|
|000028e0| 2e 54 50 0a 58 2e 42 20 | 5c 2d 64 63 74 20 66 61 |.TP.X.B |\-dct fa|
|000028f0| 73 74 0a 58 55 73 65 20 | 66 61 73 74 20 69 6e 74 |st.XUse |fast int|
|00002900| 65 67 65 72 20 44 43 54 | 20 28 6c 65 73 73 20 61 |eger DCT| (less a|
|00002910| 63 63 75 72 61 74 65 29 | 2e 0a 58 2e 54 50 0a 58 |ccurate)|..X.TP.X|
|00002920| 2e 42 20 5c 2d 64 63 74 | 20 66 6c 6f 61 74 0a 58 |.B \-dct| float.X|
|00002930| 55 73 65 20 66 6c 6f 61 | 74 69 6e 67 2d 70 6f 69 |Use floa|ting-poi|
|00002940| 6e 74 20 44 43 54 20 6d | 65 74 68 6f 64 2e 0a 58 |nt DCT m|ethod..X|
|00002950| 54 68 65 20 66 6c 6f 61 | 74 69 6e 67 2d 70 6f 69 |The floa|ting-poi|
|00002960| 6e 74 20 6d 65 74 68 6f | 64 20 69 73 20 74 68 65 |nt metho|d is the|
|00002970| 20 6d 6f 73 74 20 61 63 | 63 75 72 61 74 65 2c 20 | most ac|curate, |
|00002980| 62 75 74 20 77 69 6c 6c | 20 62 65 20 74 68 65 20 |but will| be the |
|00002990| 73 6c 6f 77 65 73 74 20 | 75 6e 6c 65 73 73 0a 58 |slowest |unless.X|
|000029a0| 79 6f 75 72 20 6d 61 63 | 68 69 6e 65 20 68 61 73 |your mac|hine has|
|000029b0| 20 76 65 72 79 20 66 61 | 73 74 20 66 6c 6f 61 74 | very fa|st float|
|000029c0| 69 6e 67 2d 70 6f 69 6e | 74 20 68 61 72 64 77 61 |ing-poin|t hardwa|
|000029d0| 72 65 2e 20 20 41 6c 73 | 6f 20 6e 6f 74 65 20 74 |re. Als|o note t|
|000029e0| 68 61 74 20 72 65 73 75 | 6c 74 73 20 6f 66 0a 58 |hat resu|lts of.X|
|000029f0| 74 68 65 20 66 6c 6f 61 | 74 69 6e 67 2d 70 6f 69 |the floa|ting-poi|
|00002a00| 6e 74 20 6d 65 74 68 6f | 64 20 6d 61 79 20 76 61 |nt metho|d may va|
|00002a10| 72 79 20 73 6c 69 67 68 | 74 6c 79 20 61 63 72 6f |ry sligh|tly acro|
|00002a20| 73 73 20 6d 61 63 68 69 | 6e 65 73 2c 20 77 68 69 |ss machi|nes, whi|
|00002a30| 6c 65 20 74 68 65 20 69 | 6e 74 65 67 65 72 0a 58 |le the i|nteger.X|
|00002a40| 6d 65 74 68 6f 64 73 20 | 73 68 6f 75 6c 64 20 67 |methods |should g|
|00002a50| 69 76 65 20 74 68 65 20 | 73 61 6d 65 20 72 65 73 |ive the |same res|
|00002a60| 75 6c 74 73 20 65 76 65 | 72 79 77 68 65 72 65 2e |ults eve|rywhere.|
|00002a70| 20 20 54 68 65 20 66 61 | 73 74 20 69 6e 74 65 67 | The fa|st integ|
|00002a80| 65 72 20 6d 65 74 68 6f | 64 20 69 73 0a 58 6d 75 |er metho|d is.Xmu|
|00002a90| 63 68 20 6c 65 73 73 20 | 61 63 63 75 72 61 74 65 |ch less |accurate|
|00002aa0| 20 74 68 61 6e 20 74 68 | 65 20 6f 74 68 65 72 20 | than th|e other |
|00002ab0| 74 77 6f 2e 0a 58 2e 54 | 50 0a 58 2e 42 20 5c 2d |two..X.T|P.X.B \-|
|00002ac0| 64 69 74 68 65 72 20 66 | 73 0a 58 55 73 65 20 46 |dither f|s.XUse F|
|00002ad0| 6c 6f 79 64 2d 53 74 65 | 69 6e 62 65 72 67 20 64 |loyd-Ste|inberg d|
|00002ae0| 69 74 68 65 72 69 6e 67 | 20 69 6e 20 63 6f 6c 6f |ithering| in colo|
|00002af0| 72 20 71 75 61 6e 74 69 | 7a 61 74 69 6f 6e 2e 0a |r quanti|zation..|
|00002b00| 58 2e 54 50 0a 58 2e 42 | 20 5c 2d 64 69 74 68 65 |X.TP.X.B| \-dithe|
|00002b10| 72 20 6f 72 64 65 72 65 | 64 0a 58 55 73 65 20 6f |r ordere|d.XUse o|
|00002b20| 72 64 65 72 65 64 20 64 | 69 74 68 65 72 69 6e 67 |rdered d|ithering|
|00002b30| 20 69 6e 20 63 6f 6c 6f | 72 20 71 75 61 6e 74 69 | in colo|r quanti|
|00002b40| 7a 61 74 69 6f 6e 2e 0a | 58 2e 54 50 0a 58 2e 42 |zation..|X.TP.X.B|
|00002b50| 20 5c 2d 64 69 74 68 65 | 72 20 6e 6f 6e 65 0a 58 | \-dithe|r none.X|
|00002b60| 44 6f 20 6e 6f 74 20 75 | 73 65 20 64 69 74 68 65 |Do not u|se dithe|
|00002b70| 72 69 6e 67 20 69 6e 20 | 63 6f 6c 6f 72 20 71 75 |ring in |color qu|
|00002b80| 61 6e 74 69 7a 61 74 69 | 6f 6e 2e 0a 58 42 79 20 |antizati|on..XBy |
|00002b90| 64 65 66 61 75 6c 74 2c | 20 46 6c 6f 79 64 2d 53 |default,| Floyd-S|
|00002ba0| 74 65 69 6e 62 65 72 67 | 20 64 69 74 68 65 72 69 |teinberg| ditheri|
|00002bb0| 6e 67 20 69 73 20 61 70 | 70 6c 69 65 64 20 77 68 |ng is ap|plied wh|
|00002bc0| 65 6e 20 71 75 61 6e 74 | 69 7a 69 6e 67 20 63 6f |en quant|izing co|
|00002bd0| 6c 6f 72 73 3b 20 74 68 | 69 73 0a 58 69 73 20 73 |lors; th|is.Xis s|
|00002be0| 6c 6f 77 20 62 75 74 20 | 75 73 75 61 6c 6c 79 20 |low but |usually |
|00002bf0| 70 72 6f 64 75 63 65 73 | 20 74 68 65 20 62 65 73 |produces| the bes|
|00002c00| 74 20 72 65 73 75 6c 74 | 73 2e 20 20 4f 72 64 65 |t result|s. Orde|
|00002c10| 72 65 64 20 64 69 74 68 | 65 72 20 69 73 20 61 20 |red dith|er is a |
|00002c20| 63 6f 6d 70 72 6f 6d 69 | 73 65 0a 58 62 65 74 77 |compromi|se.Xbetw|
|00002c30| 65 65 6e 20 73 70 65 65 | 64 20 61 6e 64 20 71 75 |een spee|d and qu|
|00002c40| 61 6c 69 74 79 3b 20 6e | 6f 20 64 69 74 68 65 72 |ality; n|o dither|
|00002c50| 69 6e 67 20 69 73 20 66 | 61 73 74 20 62 75 74 20 |ing is f|ast but |
|00002c60| 75 73 75 61 6c 6c 79 20 | 6c 6f 6f 6b 73 20 61 77 |usually |looks aw|
|00002c70| 66 75 6c 2e 20 20 4e 6f | 74 65 0a 58 74 68 61 74 |ful. No|te.Xthat|
|00002c80| 20 74 68 65 73 65 20 73 | 77 69 74 63 68 65 73 20 | these s|witches |
|00002c90| 68 61 76 65 20 6e 6f 20 | 65 66 66 65 63 74 20 75 |have no |effect u|
|00002ca0| 6e 6c 65 73 73 20 63 6f | 6c 6f 72 20 71 75 61 6e |nless co|lor quan|
|00002cb0| 74 69 7a 61 74 69 6f 6e | 20 69 73 20 62 65 69 6e |tization| is bein|
|00002cc0| 67 20 64 6f 6e 65 2e 0a | 58 4f 72 64 65 72 65 64 |g done..|XOrdered|
|00002cd0| 20 64 69 74 68 65 72 20 | 69 73 20 6f 6e 6c 79 20 | dither |is only |
|00002ce0| 61 76 61 69 6c 61 62 6c | 65 20 69 6e 0a 58 2e 42 |availabl|e in.X.B|
|00002cf0| 20 5c 2d 6f 6e 65 70 61 | 73 73 0a 58 6d 6f 64 65 | \-onepa|ss.Xmode|
|00002d00| 2e 0a 58 2e 54 50 0a 58 | 2e 42 49 20 5c 2d 6d 61 |..X.TP.X|.BI \-ma|
|00002d10| 70 20 22 20 66 69 6c 65 | 22 0a 58 51 75 61 6e 74 |p " file|".XQuant|
|00002d20| 69 7a 65 20 74 6f 20 74 | 68 65 20 63 6f 6c 6f 72 |ize to t|he color|
|00002d30| 73 20 75 73 65 64 20 69 | 6e 20 74 68 65 20 73 70 |s used i|n the sp|
|00002d40| 65 63 69 66 69 65 64 20 | 69 6d 61 67 65 20 66 69 |ecified |image fi|
|00002d50| 6c 65 2e 20 20 54 68 69 | 73 20 69 73 20 75 73 65 |le. Thi|s is use|
|00002d60| 66 75 6c 20 66 6f 72 0a | 58 70 72 6f 64 75 63 69 |ful for.|Xproduci|
|00002d70| 6e 67 20 6d 75 6c 74 69 | 70 6c 65 20 66 69 6c 65 |ng multi|ple file|
|00002d80| 73 20 77 69 74 68 20 69 | 64 65 6e 74 69 63 61 6c |s with i|dentical|
|00002d90| 20 63 6f 6c 6f 72 20 6d | 61 70 73 2c 20 6f 72 20 | color m|aps, or |
|00002da0| 66 6f 72 20 66 6f 72 63 | 69 6e 67 20 61 0a 58 70 |for forc|ing a.Xp|
|00002db0| 72 65 64 65 66 69 6e 65 | 64 20 73 65 74 20 6f 66 |redefine|d set of|
|00002dc0| 20 63 6f 6c 6f 72 73 20 | 74 6f 20 62 65 20 75 73 | colors |to be us|
|00002dd0| 65 64 2e 20 20 54 68 65 | 0a 58 2e 49 20 66 69 6c |ed. The|.X.I fil|
|00002de0| 65 0a 58 6d 75 73 74 20 | 62 65 20 61 20 47 49 46 |e.Xmust |be a GIF|
|00002df0| 20 6f 72 20 50 50 4d 20 | 66 69 6c 65 2e 20 54 68 | or PPM |file. Th|
|00002e00| 69 73 20 6f 70 74 69 6f | 6e 20 6f 76 65 72 72 69 |is optio|n overri|
|00002e10| 64 65 73 0a 58 2e 42 20 | 5c 2d 63 6f 6c 6f 72 73 |des.X.B |\-colors|
|00002e20| 0a 58 61 6e 64 0a 58 2e | 42 52 20 5c 2d 6f 6e 65 |.Xand.X.|BR \-one|
|00002e30| 70 61 73 73 20 2e 0a 58 | 2e 54 50 0a 58 2e 42 20 |pass ..X|.TP.X.B |
|00002e40| 5c 2d 6e 6f 73 6d 6f 6f | 74 68 0a 58 55 73 65 20 |\-nosmoo|th.XUse |
|00002e50| 61 20 66 61 73 74 65 72 | 2c 20 6c 6f 77 65 72 2d |a faster|, lower-|
|00002e60| 71 75 61 6c 69 74 79 20 | 75 70 73 61 6d 70 6c 69 |quality |upsampli|
|00002e70| 6e 67 20 72 6f 75 74 69 | 6e 65 2e 0a 58 2e 54 50 |ng routi|ne..X.TP|
|00002e80| 0a 58 2e 42 20 5c 2d 6f | 6e 65 70 61 73 73 0a 58 |.X.B \-o|nepass.X|
|00002e90| 55 73 65 20 6f 6e 65 2d | 70 61 73 73 20 69 6e 73 |Use one-|pass ins|
|00002ea0| 74 65 61 64 20 6f 66 20 | 74 77 6f 2d 70 61 73 73 |tead of |two-pass|
|00002eb0| 20 63 6f 6c 6f 72 20 71 | 75 61 6e 74 69 7a 61 74 | color q|uantizat|
|00002ec0| 69 6f 6e 2e 20 20 54 68 | 65 20 6f 6e 65 2d 70 61 |ion. Th|e one-pa|
|00002ed0| 73 73 20 6d 65 74 68 6f | 64 20 69 73 0a 58 66 61 |ss metho|d is.Xfa|
|00002ee0| 73 74 65 72 20 61 6e 64 | 20 6e 65 65 64 73 20 6c |ster and| needs l|
|00002ef0| 65 73 73 20 6d 65 6d 6f | 72 79 2c 20 62 75 74 20 |ess memo|ry, but |
|00002f00| 69 74 20 70 72 6f 64 75 | 63 65 73 20 61 20 6c 6f |it produ|ces a lo|
|00002f10| 77 65 72 2d 71 75 61 6c | 69 74 79 20 69 6d 61 67 |wer-qual|ity imag|
|00002f20| 65 2e 0a 58 2e 42 20 5c | 2d 6f 6e 65 70 61 73 73 |e..X.B \|-onepass|
|00002f30| 0a 58 69 73 20 69 67 6e | 6f 72 65 64 20 75 6e 6c |.Xis ign|ored unl|
|00002f40| 65 73 73 20 79 6f 75 20 | 61 6c 73 6f 20 73 61 79 |ess you |also say|
|00002f50| 0a 58 2e 42 20 5c 2d 63 | 6f 6c 6f 72 73 0a 58 2e |.X.B \-c|olors.X.|
|00002f60| 49 52 20 4e 20 2e 0a 58 | 41 6c 73 6f 2c 20 74 68 |IR N ..X|Also, th|
|00002f70| 65 20 6f 6e 65 2d 70 61 | 73 73 20 6d 65 74 68 6f |e one-pa|ss metho|
|00002f80| 64 20 69 73 20 61 6c 77 | 61 79 73 20 75 73 65 64 |d is alw|ays used|
|00002f90| 20 66 6f 72 20 67 72 61 | 79 2d 73 63 61 6c 65 20 | for gra|y-scale |
|00002fa0| 6f 75 74 70 75 74 20 28 | 74 68 65 20 74 77 6f 2d |output (|the two-|
|00002fb0| 70 61 73 73 0a 58 6d 65 | 74 68 6f 64 20 69 73 20 |pass.Xme|thod is |
|00002fc0| 6e 6f 20 69 6d 70 72 6f | 76 65 6d 65 6e 74 20 74 |no impro|vement t|
|00002fd0| 68 65 6e 29 2e 0a 58 2e | 54 50 0a 58 2e 42 49 20 |hen)..X.|TP.X.BI |
|00002fe0| 5c 2d 6d 61 78 6d 65 6d | 6f 72 79 20 22 20 4e 22 |\-maxmem|ory " N"|
|00002ff0| 0a 58 53 65 74 20 6c 69 | 6d 69 74 20 66 6f 72 20 |.XSet li|mit for |
|00003000| 61 6d 6f 75 6e 74 20 6f | 66 20 6d 65 6d 6f 72 79 |amount o|f memory|
|00003010| 20 74 6f 20 75 73 65 20 | 69 6e 20 70 72 6f 63 65 | to use |in proce|
|00003020| 73 73 69 6e 67 20 6c 61 | 72 67 65 20 69 6d 61 67 |ssing la|rge imag|
|00003030| 65 73 2e 20 20 56 61 6c | 75 65 20 69 73 0a 58 69 |es. Val|ue is.Xi|
|00003040| 6e 20 74 68 6f 75 73 61 | 6e 64 73 20 6f 66 20 62 |n thousa|nds of b|
|00003050| 79 74 65 73 2c 20 6f 72 | 20 6d 69 6c 6c 69 6f 6e |ytes, or| million|
|00003060| 73 20 6f 66 20 62 79 74 | 65 73 20 69 66 20 22 4d |s of byt|es if "M|
|00003070| 22 20 69 73 20 61 74 74 | 61 63 68 65 64 20 74 6f |" is att|ached to|
|00003080| 20 74 68 65 0a 58 6e 75 | 6d 62 65 72 2e 20 20 46 | the.Xnu|mber. F|
|00003090| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 0a 58 2e 42 20 |or examp|le,.X.B |
|000030a0| 5c 2d 6d 61 78 20 34 6d | 0a 58 73 65 6c 65 63 74 |\-max 4m|.Xselect|
|000030b0| 73 20 34 30 30 30 30 30 | 30 20 62 79 74 65 73 2e |s 400000|0 bytes.|
|000030c0| 20 20 49 66 20 6d 6f 72 | 65 20 73 70 61 63 65 20 | If mor|e space |
|000030d0| 69 73 20 6e 65 65 64 65 | 64 2c 20 74 65 6d 70 6f |is neede|d, tempo|
|000030e0| 72 61 72 79 20 66 69 6c | 65 73 20 77 69 6c 6c 20 |rary fil|es will |
|000030f0| 62 65 20 75 73 65 64 2e | 0a 58 2e 54 50 0a 58 2e |be used.|.X.TP.X.|
|00003100| 42 49 20 5c 2d 6f 75 74 | 66 69 6c 65 20 22 20 6e |BI \-out|file " n|
|00003110| 61 6d 65 22 0a 58 53 65 | 6e 64 20 6f 75 74 70 75 |ame".XSe|nd outpu|
|00003120| 74 20 69 6d 61 67 65 20 | 74 6f 20 74 68 65 20 6e |t image |to the n|
|00003130| 61 6d 65 64 20 66 69 6c | 65 2c 20 6e 6f 74 20 74 |amed fil|e, not t|
|00003140| 6f 20 73 74 61 6e 64 61 | 72 64 20 6f 75 74 70 75 |o standa|rd outpu|
|00003150| 74 2e 0a 58 2e 54 50 0a | 58 2e 42 20 5c 2d 76 65 |t..X.TP.|X.B \-ve|
|00003160| 72 62 6f 73 65 0a 58 45 | 6e 61 62 6c 65 20 64 65 |rbose.XE|nable de|
|00003170| 62 75 67 20 70 72 69 6e | 74 6f 75 74 2e 20 20 4d |bug prin|tout. M|
|00003180| 6f 72 65 0a 58 2e 42 52 | 20 5c 2d 76 20 27 73 0a |ore.X.BR| \-v 's.|
|00003190| 58 67 69 76 65 20 6d 6f | 72 65 20 6f 75 74 70 75 |Xgive mo|re outpu|
|000031a0| 74 2e 20 20 41 6c 73 6f | 2c 20 76 65 72 73 69 6f |t. Also|, versio|
|000031b0| 6e 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 69 73 |n inform|ation is|
|000031c0| 20 70 72 69 6e 74 65 64 | 20 61 74 20 73 74 61 72 | printed| at star|
|000031d0| 74 75 70 2e 0a 58 2e 54 | 50 0a 58 2e 42 20 5c 2d |tup..X.T|P.X.B \-|
|000031e0| 64 65 62 75 67 0a 58 53 | 61 6d 65 20 61 73 0a 58 |debug.XS|ame as.X|
|000031f0| 2e 42 52 20 5c 2d 76 65 | 72 62 6f 73 65 20 2e 0a |.BR \-ve|rbose ..|
|00003200| 58 2e 53 48 20 45 58 41 | 4d 50 4c 45 53 0a 58 2e |X.SH EXA|MPLES.X.|
|00003210| 4c 50 0a 58 54 68 69 73 | 20 65 78 61 6d 70 6c 65 |LP.XThis| example|
|00003220| 20 64 65 63 6f 6d 70 72 | 65 73 73 65 73 20 74 68 | decompr|esses th|
|00003230| 65 20 4a 50 45 47 20 66 | 69 6c 65 20 66 6f 6f 2e |e JPEG f|ile foo.|
|00003240| 6a 70 67 2c 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |jpg, aut|omatical|
|00003250| 6c 79 20 71 75 61 6e 74 | 69 7a 65 73 20 74 6f 0a |ly quant|izes to.|
|00003260| 58 32 35 36 20 63 6f 6c | 6f 72 73 2c 20 61 6e 64 |X256 col|ors, and|
|00003270| 20 73 61 76 65 73 20 74 | 68 65 20 6f 75 74 70 75 | saves t|he outpu|
|00003280| 74 20 69 6e 20 47 49 46 | 20 66 6f 72 6d 61 74 20 |t in GIF| format |
|00003290| 69 6e 20 66 6f 6f 2e 67 | 69 66 3a 0a 58 2e 49 50 |in foo.g|if:.X.IP|
|000032a0| 0a 58 2e 42 20 64 6a 70 | 65 67 20 5c 2d 67 69 66 |.X.B djp|eg \-gif|
|000032b0| 0a 58 2e 49 20 66 6f 6f | 2e 6a 70 67 0a 58 2e 42 |.X.I foo|.jpg.X.B|
|000032c0| 20 3e 0a 58 2e 49 20 66 | 6f 6f 2e 67 69 66 0a 58 | >.X.I f|oo.gif.X|
|000032d0| 2e 53 48 20 48 49 4e 54 | 53 0a 58 54 6f 20 67 65 |.SH HINT|S.XTo ge|
|000032e0| 74 20 61 20 71 75 69 63 | 6b 20 70 72 65 76 69 65 |t a quic|k previe|
|000032f0| 77 20 6f 66 20 61 6e 20 | 69 6d 61 67 65 2c 20 75 |w of an |image, u|
|00003300| 73 65 20 74 68 65 0a 58 | 2e 42 20 5c 2d 67 72 61 |se the.X|.B \-gra|
|00003310| 79 73 63 61 6c 65 0a 58 | 61 6e 64 2f 6f 72 0a 58 |yscale.X|and/or.X|
|00003320| 2e 42 20 5c 2d 73 63 61 | 6c 65 0a 58 73 77 69 74 |.B \-sca|le.Xswit|
|00003330| 63 68 65 73 2e 0a 58 2e | 42 20 5c 2d 67 72 61 79 |ches..X.|B \-gray|
|00003340| 73 63 61 6c 65 20 5c 2d | 73 63 61 6c 65 20 31 2f |scale \-|scale 1/|
|00003350| 38 0a 58 69 73 20 74 68 | 65 20 66 61 73 74 65 73 |8.Xis th|e fastes|
|00003360| 74 20 63 61 73 65 2e 0a | 58 2e 50 50 0a 58 53 65 |t case..|X.PP.XSe|
|00003370| 76 65 72 61 6c 20 6f 70 | 74 69 6f 6e 73 20 61 72 |veral op|tions ar|
|00003380| 65 20 61 76 61 69 6c 61 | 62 6c 65 20 74 68 61 74 |e availa|ble that|
|00003390| 20 74 72 61 64 65 20 6f | 66 66 20 69 6d 61 67 65 | trade o|ff image|
|000033a0| 20 71 75 61 6c 69 74 79 | 20 74 6f 20 67 61 69 6e | quality| to gain|
|000033b0| 20 73 70 65 65 64 2e 0a | 58 2e 42 20 5c 2d 66 61 | speed..|X.B \-fa|
|000033c0| 73 74 0a 58 74 75 72 6e | 73 20 6f 6e 20 74 68 65 |st.Xturn|s on the|
|000033d0| 20 72 65 63 6f 6d 6d 65 | 6e 64 65 64 20 73 65 74 | recomme|nded set|
|000033e0| 74 69 6e 67 73 2e 0a 58 | 2e 50 50 0a 58 2e 42 20 |tings..X|.PP.X.B |
|000033f0| 5c 2d 64 63 74 20 66 61 | 73 74 0a 58 61 6e 64 2f |\-dct fa|st.Xand/|
|00003400| 6f 72 0a 58 2e 42 20 5c | 2d 6e 6f 73 6d 6f 6f 74 |or.X.B \|-nosmoot|
|00003410| 68 0a 58 67 61 69 6e 20 | 73 70 65 65 64 20 61 74 |h.Xgain |speed at|
|00003420| 20 61 20 73 6d 61 6c 6c | 20 73 61 63 72 69 66 69 | a small| sacrifi|
|00003430| 63 65 20 69 6e 20 71 75 | 61 6c 69 74 79 2e 0a 58 |ce in qu|ality..X|
|00003440| 57 68 65 6e 20 70 72 6f | 64 75 63 69 6e 67 20 61 |When pro|ducing a|
|00003450| 20 63 6f 6c 6f 72 2d 71 | 75 61 6e 74 69 7a 65 64 | color-q|uantized|
|00003460| 20 69 6d 61 67 65 2c 0a | 58 2e 42 20 5c 2d 6f 6e | image,.|X.B \-on|
|00003470| 65 70 61 73 73 20 5c 2d | 64 69 74 68 65 72 20 6f |epass \-|dither o|
|00003480| 72 64 65 72 65 64 0a 58 | 69 73 20 66 61 73 74 20 |rdered.X|is fast |
|00003490| 62 75 74 20 6d 75 63 68 | 20 6c 6f 77 65 72 20 71 |but much| lower q|
|000034a0| 75 61 6c 69 74 79 20 74 | 68 61 6e 20 74 68 65 20 |uality t|han the |
|000034b0| 64 65 66 61 75 6c 74 20 | 62 65 68 61 76 69 6f 72 |default |behavior|
|000034c0| 2e 0a 58 2e 42 20 5c 2d | 64 69 74 68 65 72 20 6e |..X.B \-|dither n|
|000034d0| 6f 6e 65 0a 58 6d 61 79 | 20 67 69 76 65 20 61 63 |one.Xmay| give ac|
|000034e0| 63 65 70 74 61 62 6c 65 | 20 72 65 73 75 6c 74 73 |ceptable| results|
|000034f0| 20 69 6e 20 74 77 6f 2d | 70 61 73 73 20 6d 6f 64 | in two-|pass mod|
|00003500| 65 2c 20 62 75 74 20 69 | 73 20 73 65 6c 64 6f 6d |e, but i|s seldom|
|00003510| 20 74 6f 6c 65 72 61 62 | 6c 65 20 69 6e 0a 58 6f | tolerab|le in.Xo|
|00003520| 6e 65 2d 70 61 73 73 20 | 6d 6f 64 65 2e 0a 58 2e |ne-pass |mode..X.|
|00003530| 50 50 0a 58 49 66 20 79 | 6f 75 20 61 72 65 20 66 |PP.XIf y|ou are f|
|00003540| 6f 72 74 75 6e 61 74 65 | 20 65 6e 6f 75 67 68 20 |ortunate| enough |
|00003550| 74 6f 20 68 61 76 65 20 | 76 65 72 79 20 66 61 73 |to have |very fas|
|00003560| 74 20 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |t floati|ng point|
|00003570| 20 68 61 72 64 77 61 72 | 65 2c 0a 58 2e 42 20 5c | hardwar|e,.X.B \|
|00003580| 2d 64 63 74 20 66 6c 6f | 61 74 0a 58 6d 61 79 20 |-dct flo|at.Xmay |
|00003590| 62 65 20 65 76 65 6e 20 | 66 61 73 74 65 72 20 74 |be even |faster t|
|000035a0| 68 61 6e 20 5c 66 42 5c | 2d 64 63 74 20 66 61 73 |han \fB\|-dct fas|
|000035b0| 74 5c 66 52 2e 0a 58 2e | 53 48 20 45 4e 56 49 52 |t\fR..X.|SH ENVIR|
|000035c0| 4f 4e 4d 45 4e 54 0a 58 | 2e 54 50 0a 58 2e 42 20 |ONMENT.X|.TP.X.B |
|000035d0| 4a 50 45 47 4d 45 4d 0a | 58 49 66 20 74 68 69 73 |JPEGMEM.|XIf this|
|000035e0| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|000035f0| 69 61 62 6c 65 20 69 73 | 20 73 65 74 2c 20 69 74 |iable is| set, it|
|00003600| 73 20 76 61 6c 75 65 20 | 69 73 20 74 68 65 20 64 |s value |is the d|
|00003610| 65 66 61 75 6c 74 20 6d | 65 6d 6f 72 79 20 6c 69 |efault m|emory li|
|00003620| 6d 69 74 2e 0a 58 54 68 | 65 20 76 61 6c 75 65 20 |mit..XTh|e value |
|00003630| 69 73 20 73 70 65 63 69 | 66 69 65 64 20 61 73 20 |is speci|fied as |
|00003640| 64 65 73 63 72 69 62 65 | 64 20 66 6f 72 20 74 68 |describe|d for th|
|00003650| 65 0a 58 2e 42 20 5c 2d | 6d 61 78 6d 65 6d 6f 72 |e.X.B \-|maxmemor|
|00003660| 79 0a 58 73 77 69 74 63 | 68 2e 0a 58 2e 42 20 4a |y.Xswitc|h..X.B J|
|00003670| 50 45 47 4d 45 4d 0a 58 | 6f 76 65 72 72 69 64 65 |PEGMEM.X|override|
|00003680| 73 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 76 61 |s the de|fault va|
|00003690| 6c 75 65 20 73 70 65 63 | 69 66 69 65 64 20 77 68 |lue spec|ified wh|
|000036a0| 65 6e 20 74 68 65 20 70 | 72 6f 67 72 61 6d 20 77 |en the p|rogram w|
|000036b0| 61 73 20 63 6f 6d 70 69 | 6c 65 64 2c 20 61 6e 64 |as compi|led, and|
|000036c0| 0a 58 69 74 73 65 6c 66 | 20 69 73 20 6f 76 65 72 |.Xitself| is over|
|000036d0| 72 69 64 64 65 6e 20 62 | 79 20 61 6e 20 65 78 70 |ridden b|y an exp|
|000036e0| 6c 69 63 69 74 0a 58 2e | 42 52 20 5c 2d 6d 61 78 |licit.X.|BR \-max|
|000036f0| 6d 65 6d 6f 72 79 20 2e | 0a 58 2e 53 48 20 53 45 |memory .|.X.SH SE|
|00003700| 45 20 41 4c 53 4f 0a 58 | 2e 42 52 20 63 6a 70 65 |E ALSO.X|.BR cjpe|
|00003710| 67 20 28 31 29 2c 0a 58 | 2e 42 52 20 72 64 6a 70 |g (1),.X|.BR rdjp|
|00003720| 67 63 6f 6d 20 28 31 29 | 2c 0a 58 2e 42 52 20 77 |gcom (1)|,.X.BR w|
|00003730| 72 6a 70 67 63 6f 6d 20 | 28 31 29 0a 58 2e 62 72 |rjpgcom |(1).X.br|
|00003740| 0a 58 2e 42 52 20 70 70 | 6d 20 28 35 29 2c 0a 58 |.X.BR pp|m (5),.X|
|00003750| 2e 42 52 20 70 67 6d 20 | 28 35 29 0a 58 2e 62 72 |.BR pgm |(5).X.br|
|00003760| 0a 58 57 61 6c 6c 61 63 | 65 2c 20 47 72 65 67 6f |.XWallac|e, Grego|
|00003770| 72 79 20 4b 2e 20 20 22 | 54 68 65 20 4a 50 45 47 |ry K. "|The JPEG|
|00003780| 20 53 74 69 6c 6c 20 50 | 69 63 74 75 72 65 20 43 | Still P|icture C|
|00003790| 6f 6d 70 72 65 73 73 69 | 6f 6e 20 53 74 61 6e 64 |ompressi|on Stand|
|000037a0| 61 72 64 22 2c 0a 58 43 | 6f 6d 6d 75 6e 69 63 61 |ard",.XC|ommunica|
|000037b0| 74 69 6f 6e 73 20 6f 66 | 20 74 68 65 20 41 43 4d |tions of| the ACM|
|000037c0| 2c 20 41 70 72 69 6c 20 | 31 39 39 31 20 28 76 6f |, April |1991 (vo|
|000037d0| 6c 2e 20 33 34 2c 20 6e | 6f 2e 20 34 29 2c 20 70 |l. 34, n|o. 4), p|
|000037e0| 70 2e 20 33 30 2d 34 34 | 2e 0a 58 2e 53 48 20 41 |p. 30-44|..X.SH A|
|000037f0| 55 54 48 4f 52 0a 58 49 | 6e 64 65 70 65 6e 64 65 |UTHOR.XI|ndepende|
|00003800| 6e 74 20 4a 50 45 47 20 | 47 72 6f 75 70 0a 58 2e |nt JPEG |Group.X.|
|00003810| 53 48 20 42 55 47 53 0a | 58 41 72 69 74 68 6d 65 |SH BUGS.|XArithme|
|00003820| 74 69 63 20 63 6f 64 69 | 6e 67 20 69 73 20 6e 6f |tic codi|ng is no|
|00003830| 74 20 73 75 70 70 6f 72 | 74 65 64 20 66 6f 72 20 |t suppor|ted for |
|00003840| 6c 65 67 61 6c 20 72 65 | 61 73 6f 6e 73 2e 0a 58 |legal re|asons..X|
|00003850| 2e 50 50 0a 58 53 74 69 | 6c 6c 20 6e 6f 74 20 61 |.PP.XSti|ll not a|
|00003860| 73 20 66 61 73 74 20 61 | 73 20 77 65 27 64 20 6c |s fast a|s we'd l|
|00003870| 69 6b 65 2e 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |ike..END|_OF_FILE|
|00003880| 0a 20 20 69 66 20 74 65 | 73 74 20 37 30 31 37 20 |. if te|st 7017 |
|00003890| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 64 6a 70 |-ne `wc |-c <'djp|
|000038a0| 65 67 2e 31 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |eg.1'`; |then. |
|000038b0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 64 | echo sh|ar: \"'d|
|000038c0| 6a 70 65 67 2e 31 27 5c | 22 20 75 6e 70 61 63 6b |jpeg.1'\|" unpack|
|000038d0| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|000038e0| 7a 65 21 0a 20 20 66 69 | 0a 20 20 23 20 65 6e 64 |ze!. fi|. # end|
|000038f0| 20 6f 66 20 27 64 6a 70 | 65 67 2e 31 27 0a 66 69 | of 'djp|eg.1'.fi|
|00003900| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 6a 63 6f |.if test| -f 'jco|
|00003910| 6e 66 69 67 2e 64 6f 63 | 27 20 2d 61 20 22 24 7b |nfig.doc|' -a "${|
|00003920| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00003930| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00003940| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00003950| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00003960| 5c 22 27 6a 63 6f 6e 66 | 69 67 2e 64 6f 63 27 5c |\"'jconf|ig.doc'\|
|00003970| 22 0a 65 6c 73 65 0a 20 | 20 65 63 68 6f 20 73 68 |".else. | echo sh|
|00003980| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00003990| 22 27 6a 63 6f 6e 66 69 | 67 2e 64 6f 63 27 5c 22 |"'jconfi|g.doc'\"|
|000039a0| 20 5c 28 35 33 37 32 20 | 63 68 61 72 61 63 74 65 | \(5372 |characte|
|000039b0| 72 73 5c 29 0a 20 20 73 | 65 64 20 22 73 2f 5e 58 |rs\). s|ed "s/^X|
|000039c0| 2f 2f 22 20 3e 27 6a 63 | 6f 6e 66 69 67 2e 64 6f |//" >'jc|onfig.do|
|000039d0| 63 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |c' <<'EN|D_OF_FIL|
|000039e0| 45 27 0a 58 2f 2a 0a 58 | 20 2a 20 6a 63 6f 6e 66 |E'.X/*.X| * jconf|
|000039f0| 69 67 2e 64 6f 63 0a 58 | 20 2a 0a 58 20 2a 20 43 |ig.doc.X| *.X * C|
|00003a00| 6f 70 79 72 69 67 68 74 | 20 28 43 29 20 31 39 39 |opyright| (C) 199|
|00003a10| 31 2d 31 39 39 34 2c 20 | 54 68 6f 6d 61 73 20 47 |1-1994, |Thomas G|
|00003a20| 2e 20 4c 61 6e 65 2e 0a | 58 20 2a 20 54 68 69 73 |. Lane..|X * This|
|00003a30| 20 66 69 6c 65 20 69 73 | 20 70 61 72 74 20 6f 66 | file is| part of|
|00003a40| 20 74 68 65 20 49 6e 64 | 65 70 65 6e 64 65 6e 74 | the Ind|ependent|
|00003a50| 20 4a 50 45 47 20 47 72 | 6f 75 70 27 73 20 73 6f | JPEG Gr|oup's so|
|00003a60| 66 74 77 61 72 65 2e 0a | 58 20 2a 20 46 6f 72 20 |ftware..|X * For |
|00003a70| 63 6f 6e 64 69 74 69 6f | 6e 73 20 6f 66 20 64 69 |conditio|ns of di|
|00003a80| 73 74 72 69 62 75 74 69 | 6f 6e 20 61 6e 64 20 75 |stributi|on and u|
|00003a90| 73 65 2c 20 73 65 65 20 | 74 68 65 20 61 63 63 6f |se, see |the acco|
|00003aa0| 6d 70 61 6e 79 69 6e 67 | 20 52 45 41 44 4d 45 20 |mpanying| README |
|00003ab0| 66 69 6c 65 2e 0a 58 20 | 2a 0a 58 20 2a 20 54 68 |file..X |*.X * Th|
|00003ac0| 69 73 20 66 69 6c 65 20 | 64 6f 63 75 6d 65 6e 74 |is file |document|
|00003ad0| 73 20 74 68 65 20 63 6f | 6e 66 69 67 75 72 61 74 |s the co|nfigurat|
|00003ae0| 69 6f 6e 20 6f 70 74 69 | 6f 6e 73 20 74 68 61 74 |ion opti|ons that|
|00003af0| 20 61 72 65 20 72 65 71 | 75 69 72 65 64 20 74 6f | are req|uired to|
|00003b00| 0a 58 20 2a 20 63 75 73 | 74 6f 6d 69 7a 65 20 74 |.X * cus|tomize t|
|00003b10| 68 65 20 4a 50 45 47 20 | 73 6f 66 74 77 61 72 65 |he JPEG |software|
|00003b20| 20 66 6f 72 20 61 20 70 | 61 72 74 69 63 75 6c 61 | for a p|articula|
|00003b30| 72 20 73 79 73 74 65 6d | 2e 0a 58 20 2a 0a 58 20 |r system|..X *.X |
|00003b40| 2a 20 54 68 65 20 61 63 | 74 75 61 6c 20 63 6f 6e |* The ac|tual con|
|00003b50| 66 69 67 75 72 61 74 69 | 6f 6e 20 6f 70 74 69 6f |figurati|on optio|
|00003b60| 6e 73 20 66 6f 72 20 61 | 20 70 61 72 74 69 63 75 |ns for a| particu|
|00003b70| 6c 61 72 20 69 6e 73 74 | 61 6c 6c 61 74 69 6f 6e |lar inst|allation|
|00003b80| 20 61 72 65 20 73 74 6f | 72 65 64 0a 58 20 2a 20 | are sto|red.X * |
|00003b90| 69 6e 20 6a 63 6f 6e 66 | 69 67 2e 68 2e 20 20 4f |in jconf|ig.h. O|
|00003ba0| 6e 20 6d 61 6e 79 20 6d | 61 63 68 69 6e 65 73 2c |n many m|achines,|
|00003bb0| 20 6a 63 6f 6e 66 69 67 | 2e 68 20 63 61 6e 20 62 | jconfig|.h can b|
|00003bc0| 65 20 67 65 6e 65 72 61 | 74 65 64 20 61 75 74 6f |e genera|ted auto|
|00003bd0| 6d 61 74 69 63 61 6c 6c | 79 0a 58 20 2a 20 6f 72 |maticall|y.X * or|
|00003be0| 20 63 6f 70 69 65 64 20 | 66 72 6f 6d 20 6f 6e 65 | copied |from one|
|00003bf0| 20 6f 66 20 74 68 65 20 | 22 63 61 6e 6e 65 64 22 | of the |"canned"|
|00003c00| 20 6a 63 6f 6e 66 69 67 | 20 66 69 6c 65 73 20 74 | jconfig| files t|
|00003c10| 68 61 74 20 77 65 20 73 | 75 70 70 6c 79 2e 20 20 |hat we s|upply. |
|00003c20| 42 75 74 20 69 66 0a 58 | 20 2a 20 79 6f 75 20 6e |But if.X| * you n|
|00003c30| 65 65 64 20 74 6f 20 67 | 65 6e 65 72 61 74 65 20 |eed to g|enerate |
|00003c40| 61 20 6a 63 6f 6e 66 69 | 67 2e 68 20 66 69 6c 65 |a jconfi|g.h file|
|00003c50| 20 62 79 20 68 61 6e 64 | 2c 20 74 68 69 73 20 66 | by hand|, this f|
|00003c60| 69 6c 65 20 74 65 6c 6c | 73 20 79 6f 75 20 68 6f |ile tell|s you ho|
|00003c70| 77 2e 0a 58 20 2a 0a 58 | 20 2a 20 44 4f 20 4e 4f |w..X *.X| * DO NO|
|00003c80| 54 20 45 44 49 54 20 54 | 48 49 53 20 46 49 4c 45 |T EDIT T|HIS FILE|
|00003c90| 20 2d 2d 2d 20 49 54 20 | 57 4f 4e 27 54 20 41 43 | --- IT |WON'T AC|
|00003ca0| 43 4f 4d 50 4c 49 53 48 | 20 41 4e 59 54 48 49 4e |COMPLISH| ANYTHIN|
|00003cb0| 47 2e 0a 58 20 2a 20 45 | 44 49 54 20 41 20 43 4f |G..X * E|DIT A CO|
|00003cc0| 50 59 20 4e 41 4d 45 44 | 20 4a 43 4f 4e 46 49 47 |PY NAMED| JCONFIG|
|00003cd0| 2e 48 2e 0a 58 20 2a 2f | 0a 58 0a 58 0a 58 2f 2a |.H..X */|.X.X.X/*|
|00003ce0| 0a 58 20 2a 20 54 68 65 | 73 65 20 73 79 6d 62 6f |.X * The|se symbo|
|00003cf0| 6c 73 20 69 6e 64 69 63 | 61 74 65 20 74 68 65 20 |ls indic|ate the |
|00003d00| 70 72 6f 70 65 72 74 69 | 65 73 20 6f 66 20 79 6f |properti|es of yo|
|00003d10| 75 72 20 6d 61 63 68 69 | 6e 65 20 6f 72 20 63 6f |ur machi|ne or co|
|00003d20| 6d 70 69 6c 65 72 2e 0a | 58 20 2a 20 23 64 65 66 |mpiler..|X * #def|
|00003d30| 69 6e 65 20 74 68 65 20 | 73 79 6d 62 6f 6c 20 69 |ine the |symbol i|
|00003d40| 66 20 79 65 73 2c 20 23 | 75 6e 64 65 66 20 69 74 |f yes, #|undef it|
|00003d50| 20 69 66 20 6e 6f 2e 0a | 58 20 2a 2f 0a 58 0a 58 | if no..|X */.X.X|
|00003d60| 2f 2a 20 44 6f 65 73 20 | 79 6f 75 72 20 63 6f 6d |/* Does |your com|
|00003d70| 70 69 6c 65 72 20 73 75 | 70 70 6f 72 74 20 66 75 |piler su|pport fu|
|00003d80| 6e 63 74 69 6f 6e 20 70 | 72 6f 74 6f 74 79 70 65 |nction p|rototype|
|00003d90| 73 3f 0a 58 20 2a 20 28 | 49 66 20 6e 6f 74 2c 20 |s?.X * (|If not, |
|00003da0| 79 6f 75 20 61 6c 73 6f | 20 6e 65 65 64 20 74 6f |you also| need to|
|00003db0| 20 75 73 65 20 61 6e 73 | 69 32 6b 6e 72 2c 20 73 | use ans|i2knr, s|
|00003dc0| 65 65 20 69 6e 73 74 61 | 6c 6c 2e 64 6f 63 29 0a |ee insta|ll.doc).|
|00003dd0| 58 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 48 41 |X */.X#d|efine HA|
|00003de0| 56 45 5f 50 52 4f 54 4f | 54 59 50 45 53 0a 58 0a |VE_PROTO|TYPES.X.|
|00003df0| 58 2f 2a 20 44 6f 65 73 | 20 79 6f 75 72 20 63 6f |X/* Does| your co|
|00003e00| 6d 70 69 6c 65 72 20 73 | 75 70 70 6f 72 74 20 74 |mpiler s|upport t|
|00003e10| 68 65 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 20 22 |he decla|ration "|
|00003e20| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 22 20 3f |unsigned| char" ?|
|00003e30| 0a 58 20 2a 20 48 6f 77 | 20 61 62 6f 75 74 20 22 |.X * How| about "|
|00003e40| 75 6e 73 69 67 6e 65 64 | 20 73 68 6f 72 74 22 20 |unsigned| short" |
|00003e50| 3f 0a 58 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |?.X */.X|#define |
|00003e60| 48 41 56 45 5f 55 4e 53 | 49 47 4e 45 44 5f 43 48 |HAVE_UNS|IGNED_CH|
|00003e70| 41 52 0a 58 23 64 65 66 | 69 6e 65 20 48 41 56 45 |AR.X#def|ine HAVE|
|00003e80| 5f 55 4e 53 49 47 4e 45 | 44 5f 53 48 4f 52 54 0a |_UNSIGNE|D_SHORT.|
|00003e90| 58 0a 58 2f 2a 20 44 65 | 66 69 6e 65 20 22 76 6f |X.X/* De|fine "vo|
|00003ea0| 69 64 22 20 61 73 20 22 | 63 68 61 72 22 20 69 66 |id" as "|char" if|
|00003eb0| 20 79 6f 75 72 20 63 6f | 6d 70 69 6c 65 72 20 64 | your co|mpiler d|
|00003ec0| 6f 65 73 6e 27 74 20 6b | 6e 6f 77 20 61 62 6f 75 |oesn't k|now abou|
|00003ed0| 74 20 74 79 70 65 20 76 | 6f 69 64 2e 0a 58 20 2a |t type v|oid..X *|
|00003ee0| 20 4e 4f 54 45 3a 20 62 | 65 20 73 75 72 65 20 74 | NOTE: b|e sure t|
|00003ef0| 6f 20 64 65 66 69 6e 65 | 20 76 6f 69 64 20 73 75 |o define| void su|
|00003f00| 63 68 20 74 68 61 74 20 | 22 76 6f 69 64 20 2a 22 |ch that |"void *"|
|00003f10| 20 72 65 70 72 65 73 65 | 6e 74 73 20 74 68 65 20 | represe|nts the |
|00003f20| 6d 6f 73 74 20 67 65 6e | 65 72 61 6c 0a 58 20 2a |most gen|eral.X *|
|00003f30| 20 70 6f 69 6e 74 65 72 | 20 74 79 70 65 2c 20 65 | pointer| type, e|
|00003f40| 2e 67 2e 2c 20 74 68 61 | 74 20 72 65 74 75 72 6e |.g., tha|t return|
|00003f50| 65 64 20 62 79 20 6d 61 | 6c 6c 6f 63 28 29 2e 0a |ed by ma|lloc()..|
|00003f60| 58 20 2a 2f 0a 58 2f 2a | 20 23 64 65 66 69 6e 65 |X */.X/*| #define|
|00003f70| 20 76 6f 69 64 20 63 68 | 61 72 20 2a 2f 0a 58 0a | void ch|ar */.X.|
|00003f80| 58 2f 2a 20 44 65 66 69 | 6e 65 20 22 63 6f 6e 73 |X/* Defi|ne "cons|
|00003f90| 74 22 20 61 73 20 65 6d | 70 74 79 20 69 66 20 79 |t" as em|pty if y|
|00003fa0| 6f 75 72 20 63 6f 6d 70 | 69 6c 65 72 20 64 6f 65 |our comp|iler doe|
|00003fb0| 73 6e 27 74 20 6b 6e 6f | 77 20 74 68 65 20 22 63 |sn't kno|w the "c|
|00003fc0| 6f 6e 73 74 22 20 6b 65 | 79 77 6f 72 64 2e 0a 58 |onst" ke|yword..X|
|00003fd0| 20 2a 2f 0a 58 2f 2a 20 | 23 64 65 66 69 6e 65 20 | */.X/* |#define |
|00003fe0| 63 6f 6e 73 74 20 2a 2f | 0a 58 0a 58 2f 2a 20 44 |const */|.X.X/* D|
|00003ff0| 65 66 69 6e 65 20 74 68 | 69 73 20 69 66 20 61 6e |efine th|is if an|
|00004000| 20 6f 72 64 69 6e 61 72 | 79 20 22 63 68 61 72 22 | ordinar|y "char"|
|00004010| 20 74 79 70 65 20 69 73 | 20 75 6e 73 69 67 6e 65 | type is| unsigne|
|00004020| 64 2e 0a 58 20 2a 20 49 | 66 20 79 6f 75 27 72 65 |d..X * I|f you're|
|00004030| 20 6e 6f 74 20 73 75 72 | 65 2c 20 6c 65 61 76 69 | not sur|e, leavi|
|00004040| 6e 67 20 69 74 20 75 6e | 64 65 66 69 6e 65 64 20 |ng it un|defined |
|00004050| 77 69 6c 6c 20 77 6f 72 | 6b 20 61 74 20 73 6f 6d |will wor|k at som|
|00004060| 65 20 63 6f 73 74 20 69 | 6e 20 73 70 65 65 64 2e |e cost i|n speed.|
|00004070| 0a 58 20 2a 20 49 66 20 | 79 6f 75 20 64 65 66 69 |.X * If |you defi|
|00004080| 6e 65 64 20 48 41 56 45 | 5f 55 4e 53 49 47 4e 45 |ned HAVE|_UNSIGNE|
|00004090| 44 5f 43 48 41 52 20 74 | 68 65 6e 20 74 68 65 20 |D_CHAR t|hen the |
|000040a0| 73 70 65 65 64 20 64 69 | 66 66 65 72 65 6e 63 65 |speed di|fference|
|000040b0| 20 69 73 20 6d 69 6e 69 | 6d 61 6c 2e 0a 58 20 2a | is mini|mal..X *|
|000040c0| 2f 0a 58 23 75 6e 64 65 | 66 20 43 48 41 52 5f 49 |/.X#unde|f CHAR_I|
|000040d0| 53 5f 55 4e 53 49 47 4e | 45 44 0a 58 0a 58 2f 2a |S_UNSIGN|ED.X.X/*|
|000040e0| 20 44 65 66 69 6e 65 20 | 74 68 69 73 20 69 66 20 | Define |this if |
|000040f0| 79 6f 75 72 20 73 79 73 | 74 65 6d 20 68 61 73 20 |your sys|tem has |
|00004100| 61 6e 20 41 4e 53 49 2d | 63 6f 6e 66 6f 72 6d 69 |an ANSI-|conformi|
|00004110| 6e 67 20 3c 73 74 64 64 | 65 66 2e 68 3e 20 66 69 |ng <stdd|ef.h> fi|
|00004120| 6c 65 2e 0a 58 20 2a 2f | 0a 58 23 64 65 66 69 6e |le..X */|.X#defin|
|00004130| 65 20 48 41 56 45 5f 53 | 54 44 44 45 46 5f 48 0a |e HAVE_S|TDDEF_H.|
|00004140| 58 0a 58 2f 2a 20 44 65 | 66 69 6e 65 20 74 68 69 |X.X/* De|fine thi|
|00004150| 73 20 69 66 20 79 6f 75 | 72 20 73 79 73 74 65 6d |s if you|r system|
|00004160| 20 68 61 73 20 61 6e 20 | 41 4e 53 49 2d 63 6f 6e | has an |ANSI-con|
|00004170| 66 6f 72 6d 69 6e 67 20 | 3c 73 74 64 6c 69 62 2e |forming |<stdlib.|
|00004180| 68 3e 20 66 69 6c 65 2e | 0a 58 20 2a 2f 0a 58 23 |h> file.|.X */.X#|
|00004190| 64 65 66 69 6e 65 20 48 | 41 56 45 5f 53 54 44 4c |define H|AVE_STDL|
|000041a0| 49 42 5f 48 0a 58 0a 58 | 2f 2a 20 44 65 66 69 6e |IB_H.X.X|/* Defin|
|000041b0| 65 20 74 68 69 73 20 69 | 66 20 79 6f 75 72 20 73 |e this i|f your s|
|000041c0| 79 73 74 65 6d 20 64 6f | 65 73 20 6e 6f 74 20 68 |ystem do|es not h|
|000041d0| 61 76 65 20 61 6e 20 41 | 4e 53 49 2f 53 79 73 56 |ave an A|NSI/SysV|
|000041e0| 20 3c 73 74 72 69 6e 67 | 2e 68 3e 2c 0a 58 20 2a | <string|.h>,.X *|
|000041f0| 20 62 75 74 20 64 6f 65 | 73 20 68 61 76 65 20 61 | but doe|s have a|
|00004200| 20 42 53 44 2d 73 74 79 | 6c 65 20 3c 73 74 72 69 | BSD-sty|le <stri|
|00004210| 6e 67 73 2e 68 3e 2e 0a | 58 20 2a 2f 0a 58 23 75 |ngs.h>..|X */.X#u|
|00004220| 6e 64 65 66 20 4e 45 45 | 44 5f 42 53 44 5f 53 54 |ndef NEE|D_BSD_ST|
|00004230| 52 49 4e 47 53 0a 58 0a | 58 2f 2a 20 44 65 66 69 |RINGS.X.|X/* Defi|
|00004240| 6e 65 20 74 68 69 73 20 | 69 66 20 79 6f 75 72 20 |ne this |if your |
|00004250| 73 79 73 74 65 6d 20 64 | 6f 65 73 20 6e 6f 74 20 |system d|oes not |
|00004260| 70 72 6f 76 69 64 65 20 | 74 79 70 65 64 65 66 20 |provide |typedef |
|00004270| 73 69 7a 65 5f 74 20 69 | 6e 20 61 6e 79 20 6f 66 |size_t i|n any of|
|00004280| 20 74 68 65 0a 58 20 2a | 20 41 4e 53 49 2d 73 74 | the.X *| ANSI-st|
|00004290| 61 6e 64 61 72 64 20 70 | 6c 61 63 65 73 20 28 73 |andard p|laces (s|
|000042a0| 74 64 64 65 66 2e 68 2c | 20 73 74 64 6c 69 62 2e |tddef.h,| stdlib.|
|000042b0| 68 2c 20 6f 72 20 73 74 | 64 69 6f 2e 68 29 2c 20 |h, or st|dio.h), |
|000042c0| 62 75 74 20 70 6c 61 63 | 65 73 20 69 74 20 69 6e |but plac|es it in|
|000042d0| 0a 58 20 2a 20 3c 73 79 | 73 2f 74 79 70 65 73 2e |.X * <sy|s/types.|
|000042e0| 68 3e 20 69 6e 73 74 65 | 61 64 2e 0a 58 20 2a 2f |h> inste|ad..X */|
|000042f0| 0a 58 23 75 6e 64 65 66 | 20 4e 45 45 44 5f 53 59 |.X#undef| NEED_SY|
|00004300| 53 5f 54 59 50 45 53 5f | 48 0a 58 0a 58 2f 2a 20 |S_TYPES_|H.X.X/* |
|00004310| 46 6f 72 20 38 30 78 38 | 36 20 6d 61 63 68 69 6e |For 80x8|6 machin|
|00004320| 65 73 2c 20 79 6f 75 20 | 6e 65 65 64 20 74 6f 20 |es, you |need to |
|00004330| 64 65 66 69 6e 65 20 4e | 45 45 44 5f 46 41 52 5f |define N|EED_FAR_|
|00004340| 50 4f 49 4e 54 45 52 53 | 2c 0a 58 20 2a 20 75 6e |POINTERS|,.X * un|
|00004350| 6c 65 73 73 20 79 6f 75 | 20 61 72 65 20 75 73 69 |less you| are usi|
|00004360| 6e 67 20 61 20 6c 61 72 | 67 65 2d 64 61 74 61 20 |ng a lar|ge-data |
|00004370| 6d 65 6d 6f 72 79 20 6d | 6f 64 65 6c 20 6f 72 20 |memory m|odel or |
|00004380| 38 30 33 38 36 20 66 6c | 61 74 2d 6d 65 6d 6f 72 |80386 fl|at-memor|
|00004390| 79 20 6d 6f 64 65 2e 0a | 58 20 2a 20 4f 6e 20 6c |y mode..|X * On l|
|000043a0| 65 73 73 20 62 72 61 69 | 6e 2d 64 61 6d 61 67 65 |ess brai|n-damage|
|000043b0| 64 20 43 50 55 73 20 74 | 68 69 73 20 73 79 6d 62 |d CPUs t|his symb|
|000043c0| 6f 6c 20 6d 75 73 74 20 | 6e 6f 74 20 62 65 20 64 |ol must |not be d|
|000043d0| 65 66 69 6e 65 64 2e 0a | 58 20 2a 20 28 44 65 66 |efined..|X * (Def|
|000043e0| 69 6e 69 6e 67 20 74 68 | 69 73 20 73 79 6d 62 6f |ining th|is symbo|
|000043f0| 6c 20 63 61 75 73 65 73 | 20 6c 61 72 67 65 20 64 |l causes| large d|
|00004400| 61 74 61 20 73 74 72 75 | 63 74 75 72 65 73 20 74 |ata stru|ctures t|
|00004410| 6f 20 62 65 20 72 65 66 | 65 72 65 6e 63 65 64 20 |o be ref|erenced |
|00004420| 74 68 72 6f 75 67 68 0a | 58 20 2a 20 22 66 61 72 |through.|X * "far|
|00004430| 22 20 70 6f 69 6e 74 65 | 72 73 20 61 6e 64 20 74 |" pointe|rs and t|
|00004440| 6f 20 62 65 20 61 6c 6c | 6f 63 61 74 65 64 20 77 |o be all|ocated w|
|00004450| 69 74 68 20 61 20 73 70 | 65 63 69 61 6c 20 76 65 |ith a sp|ecial ve|
|00004460| 72 73 69 6f 6e 20 6f 66 | 20 6d 61 6c 6c 6f 63 2e |rsion of| malloc.|
|00004470| 29 0a 58 20 2a 2f 0a 58 | 23 75 6e 64 65 66 20 4e |).X */.X|#undef N|
|00004480| 45 45 44 5f 46 41 52 5f | 50 4f 49 4e 54 45 52 53 |EED_FAR_|POINTERS|
|00004490| 0a 58 0a 58 2f 2a 20 44 | 65 66 69 6e 65 20 74 68 |.X.X/* D|efine th|
|000044a0| 69 73 20 69 66 20 79 6f | 75 72 20 6c 69 6e 6b 65 |is if yo|ur linke|
|000044b0| 72 20 6e 65 65 64 73 20 | 67 6c 6f 62 61 6c 20 6e |r needs |global n|
|000044c0| 61 6d 65 73 20 74 6f 20 | 62 65 20 75 6e 69 71 75 |ames to |be uniqu|
|000044d0| 65 20 69 6e 20 6c 65 73 | 73 0a 58 20 2a 20 74 68 |e in les|s.X * th|
|000044e0| 61 6e 20 74 68 65 20 66 | 69 72 73 74 20 31 35 20 |an the f|irst 15 |
|000044f0| 63 68 61 72 61 63 74 65 | 72 73 2e 0a 58 20 2a 2f |characte|rs..X */|
|00004500| 0a 58 23 75 6e 64 65 66 | 20 4e 45 45 44 5f 53 48 |.X#undef| NEED_SH|
|00004510| 4f 52 54 5f 45 58 54 45 | 52 4e 41 4c 5f 4e 41 4d |ORT_EXTE|RNAL_NAM|
|00004520| 45 53 0a 58 0a 58 2f 2a | 20 41 6c 74 68 6f 75 67 |ES.X.X/*| Althoug|
|00004530| 68 20 61 20 72 65 61 6c | 20 41 4e 53 49 20 43 20 |h a real| ANSI C |
|00004540| 63 6f 6d 70 69 6c 65 72 | 20 63 61 6e 20 64 65 61 |compiler| can dea|
|00004550| 6c 20 70 65 72 66 65 63 | 74 6c 79 20 77 65 6c 6c |l perfec|tly well|
|00004560| 20 77 69 74 68 20 70 6f | 69 6e 74 65 72 73 20 74 | with po|inters t|
|00004570| 6f 0a 58 20 2a 20 75 6e | 73 70 65 63 69 66 69 65 |o.X * un|specifie|
|00004580| 64 20 73 74 72 75 63 74 | 75 72 65 73 20 28 73 65 |d struct|ures (se|
|00004590| 65 20 22 69 6e 63 6f 6d | 70 6c 65 74 65 20 74 79 |e "incom|plete ty|
|000045a0| 70 65 73 22 20 69 6e 20 | 74 68 65 20 73 70 65 63 |pes" in |the spec|
|000045b0| 29 2c 20 61 20 66 65 77 | 20 70 72 65 2d 41 4e 53 |), a few| pre-ANS|
|000045c0| 49 0a 58 20 2a 20 61 6e | 64 20 70 73 65 75 64 6f |I.X * an|d pseudo|
|000045d0| 2d 41 4e 53 49 20 63 6f | 6d 70 69 6c 65 72 73 20 |-ANSI co|mpilers |
|000045e0| 67 65 74 20 63 6f 6e 66 | 75 73 65 64 2e 20 20 54 |get conf|used. T|
|000045f0| 6f 20 6b 65 65 70 20 6f | 6e 65 20 6f 66 20 74 68 |o keep o|ne of th|
|00004600| 65 73 65 20 62 6f 7a 6f | 73 20 68 61 70 70 79 2c |ese bozo|s happy,|
|00004610| 0a 58 20 2a 20 64 65 66 | 69 6e 65 20 49 4e 43 4f |.X * def|ine INCO|
|00004620| 4d 50 4c 45 54 45 5f 54 | 59 50 45 53 5f 42 52 4f |MPLETE_T|YPES_BRO|
|00004630| 4b 45 4e 2e 20 20 54 68 | 69 73 20 69 73 20 6e 6f |KEN. Th|is is no|
|00004640| 74 20 72 65 63 6f 6d 6d | 65 6e 64 65 64 20 75 6e |t recomm|ended un|
|00004650| 6c 65 73 73 20 79 6f 75 | 0a 58 20 2a 20 61 63 74 |less you|.X * act|
|00004660| 75 61 6c 6c 79 20 67 65 | 74 20 22 6d 69 73 73 69 |ually ge|t "missi|
|00004670| 6e 67 20 73 74 72 75 63 | 74 75 72 65 20 64 65 66 |ng struc|ture def|
|00004680| 69 6e 69 74 69 6f 6e 22 | 20 77 61 72 6e 69 6e 67 |inition"| warning|
|00004690| 73 20 6f 72 20 65 72 72 | 6f 72 73 20 77 68 69 6c |s or err|ors whil|
|000046a0| 65 0a 58 20 2a 20 63 6f | 6d 70 69 6c 69 6e 67 20 |e.X * co|mpiling |
|000046b0| 74 68 65 20 4a 50 45 47 | 20 63 6f 64 65 2e 0a 58 |the JPEG| code..X|
|000046c0| 20 2a 2f 0a 58 23 75 6e | 64 65 66 20 49 4e 43 4f | */.X#un|def INCO|
|000046d0| 4d 50 4c 45 54 45 5f 54 | 59 50 45 53 5f 42 52 4f |MPLETE_T|YPES_BRO|
|000046e0| 4b 45 4e 0a 58 0a 58 0a | 58 2f 2a 0a 58 20 2a 20 |KEN.X.X.|X/*.X * |
|000046f0| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 6f 70 |The foll|owing op|
|00004700| 74 69 6f 6e 73 20 61 66 | 66 65 63 74 20 63 6f 64 |tions af|fect cod|
|00004710| 65 20 73 65 6c 65 63 74 | 69 6f 6e 20 77 69 74 68 |e select|ion with|
|00004720| 69 6e 20 74 68 65 20 4a | 50 45 47 20 6c 69 62 72 |in the J|PEG libr|
|00004730| 61 72 79 2c 0a 58 20 2a | 20 62 75 74 20 74 68 65 |ary,.X *| but the|
|00004740| 79 20 64 6f 6e 27 74 20 | 6e 65 65 64 20 74 6f 20 |y don't |need to |
|00004750| 62 65 20 76 69 73 69 62 | 6c 65 20 74 6f 20 61 70 |be visib|le to ap|
|00004760| 70 6c 69 63 61 74 69 6f | 6e 73 20 75 73 69 6e 67 |plicatio|ns using|
|00004770| 20 74 68 65 20 6c 69 62 | 72 61 72 79 2e 0a 58 20 | the lib|rary..X |
|00004780| 2a 20 54 6f 20 6d 69 6e | 69 6d 69 7a 65 20 61 70 |* To min|imize ap|
|00004790| 70 6c 69 63 61 74 69 6f | 6e 20 6e 61 6d 65 73 70 |plicatio|n namesp|
|000047a0| 61 63 65 20 70 6f 6c 6c | 75 74 69 6f 6e 2c 20 74 |ace poll|ution, t|
|000047b0| 68 65 20 73 79 6d 62 6f | 6c 73 20 77 6f 6e 27 74 |he symbo|ls won't|
|000047c0| 20 62 65 0a 58 20 2a 20 | 64 65 66 69 6e 65 64 20 | be.X * |defined |
|000047d0| 75 6e 6c 65 73 73 20 4a | 50 45 47 5f 49 4e 54 45 |unless J|PEG_INTE|
|000047e0| 52 4e 41 4c 53 20 68 61 | 73 20 62 65 65 6e 20 64 |RNALS ha|s been d|
|000047f0| 65 66 69 6e 65 64 2e 0a | 58 20 2a 2f 0a 58 0a 58 |efined..|X */.X.X|
|00004800| 23 69 66 64 65 66 20 4a | 50 45 47 5f 49 4e 54 45 |#ifdef J|PEG_INTE|
|00004810| 52 4e 41 4c 53 0a 58 0a | 58 2f 2a 20 44 65 66 69 |RNALS.X.|X/* Defi|
|00004820| 6e 65 20 74 68 69 73 20 | 69 66 20 79 6f 75 72 20 |ne this |if your |
|00004830| 63 6f 6d 70 69 6c 65 72 | 20 69 6d 70 6c 65 6d 65 |compiler| impleme|
|00004840| 6e 74 73 20 22 3e 3e 22 | 20 6f 6e 20 73 69 67 6e |nts ">>"| on sign|
|00004850| 65 64 20 76 61 6c 75 65 | 73 20 61 73 20 61 20 6c |ed value|s as a l|
|00004860| 6f 67 69 63 61 6c 0a 58 | 20 2a 20 28 75 6e 73 69 |ogical.X| * (unsi|
|00004870| 67 6e 65 64 29 20 73 68 | 69 66 74 3b 20 6c 65 61 |gned) sh|ift; lea|
|00004880| 76 65 20 69 74 20 75 6e | 64 65 66 69 6e 65 64 20 |ve it un|defined |
|00004890| 69 66 20 22 3e 3e 22 20 | 69 73 20 61 20 73 69 67 |if ">>" |is a sig|
|000048a0| 6e 65 64 20 28 61 72 69 | 74 68 6d 65 74 69 63 29 |ned (ari|thmetic)|
|000048b0| 20 73 68 69 66 74 2c 0a | 58 20 2a 20 77 68 69 63 | shift,.|X * whic|
|000048c0| 68 20 69 73 20 74 68 65 | 20 6e 6f 72 6d 61 6c 20 |h is the| normal |
|000048d0| 61 6e 64 20 72 61 74 69 | 6f 6e 61 6c 20 64 65 66 |and rati|onal def|
|000048e0| 69 6e 69 74 69 6f 6e 2e | 0a 58 20 2a 2f 0a 58 23 |inition.|.X */.X#|
|000048f0| 75 6e 64 65 66 20 52 49 | 47 48 54 5f 53 48 49 46 |undef RI|GHT_SHIF|
|00004900| 54 5f 49 53 5f 55 4e 53 | 49 47 4e 45 44 0a 58 0a |T_IS_UNS|IGNED.X.|
|00004910| 58 0a 58 23 65 6e 64 69 | 66 20 2f 2a 20 4a 50 45 |X.X#endi|f /* JPE|
|00004920| 47 5f 49 4e 54 45 52 4e | 41 4c 53 20 2a 2f 0a 58 |G_INTERN|ALS */.X|
|00004930| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 54 68 65 20 72 |.X.X/*.X| * The r|
|00004940| 65 6d 61 69 6e 69 6e 67 | 20 6f 70 74 69 6f 6e 73 |emaining| options|
|00004950| 20 64 6f 20 6e 6f 74 20 | 61 66 66 65 63 74 20 74 | do not |affect t|
|00004960| 68 65 20 4a 50 45 47 20 | 6c 69 62 72 61 72 79 20 |he JPEG |library |
|00004970| 70 72 6f 70 65 72 2c 0a | 58 20 2a 20 62 75 74 20 |proper,.|X * but |
|00004980| 6f 6e 6c 79 20 74 68 65 | 20 73 61 6d 70 6c 65 20 |only the| sample |
|00004990| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 63 6a 70 |applicat|ions cjp|
|000049a0| 65 67 2f 64 6a 70 65 67 | 20 28 73 65 65 20 63 6a |eg/djpeg| (see cj|
|000049b0| 70 65 67 2e 63 2c 20 64 | 6a 70 65 67 2e 63 29 2e |peg.c, d|jpeg.c).|
|000049c0| 0a 58 20 2a 20 4f 74 68 | 65 72 20 61 70 70 6c 69 |.X * Oth|er appli|
|000049d0| 63 61 74 69 6f 6e 73 20 | 63 61 6e 20 69 67 6e 6f |cations |can igno|
|000049e0| 72 65 20 74 68 65 73 65 | 2e 0a 58 20 2a 2f 0a 58 |re these|..X */.X|
|000049f0| 0a 58 23 69 66 64 65 66 | 20 4a 50 45 47 5f 43 4a |.X#ifdef| JPEG_CJ|
|00004a00| 50 45 47 5f 44 4a 50 45 | 47 0a 58 0a 58 2f 2a 20 |PEG_DJPE|G.X.X/* |
|00004a10| 54 68 65 73 65 20 64 65 | 66 69 6e 65 73 20 69 6e |These de|fines in|
|00004a20| 64 69 63 61 74 65 20 77 | 68 69 63 68 20 69 6d 61 |dicate w|hich ima|
|00004a30| 67 65 20 28 6e 6f 6e 2d | 4a 50 45 47 29 20 66 69 |ge (non-|JPEG) fi|
|00004a40| 6c 65 20 66 6f 72 6d 61 | 74 73 20 61 72 65 20 61 |le forma|ts are a|
|00004a50| 6c 6c 6f 77 65 64 2e 20 | 2a 2f 0a 58 0a 58 23 64 |llowed. |*/.X.X#d|
|00004a60| 65 66 69 6e 65 20 42 4d | 50 5f 53 55 50 50 4f 52 |efine BM|P_SUPPOR|
|00004a70| 54 45 44 09 09 2f 2a 20 | 42 4d 50 20 69 6d 61 67 |TED../* |BMP imag|
|00004a80| 65 20 66 69 6c 65 20 66 | 6f 72 6d 61 74 20 2a 2f |e file f|ormat */|
|00004a90| 0a 58 23 64 65 66 69 6e | 65 20 47 49 46 5f 53 55 |.X#defin|e GIF_SU|
|00004aa0| 50 50 4f 52 54 45 44 09 | 09 2f 2a 20 47 49 46 20 |PPORTED.|./* GIF |
|00004ab0| 69 6d 61 67 65 20 66 69 | 6c 65 20 66 6f 72 6d 61 |image fi|le forma|
|00004ac0| 74 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 50 50 |t */.X#d|efine PP|
|00004ad0| 4d 5f 53 55 50 50 4f 52 | 54 45 44 09 09 2f 2a 20 |M_SUPPOR|TED../* |
|00004ae0| 50 42 4d 50 4c 55 53 20 | 50 50 4d 2f 50 47 4d 20 |PBMPLUS |PPM/PGM |
|00004af0| 69 6d 61 67 65 20 66 69 | 6c 65 20 66 6f 72 6d 61 |image fi|le forma|
|00004b00| 74 20 2a 2f 0a 58 23 75 | 6e 64 65 66 20 52 4c 45 |t */.X#u|ndef RLE|
|00004b10| 5f 53 55 50 50 4f 52 54 | 45 44 09 09 2f 2a 20 55 |_SUPPORT|ED../* U|
|00004b20| 74 61 68 20 52 4c 45 20 | 69 6d 61 67 65 20 66 69 |tah RLE |image fi|
|00004b30| 6c 65 20 66 6f 72 6d 61 | 74 20 2a 2f 0a 58 23 64 |le forma|t */.X#d|
|00004b40| 65 66 69 6e 65 20 54 41 | 52 47 41 5f 53 55 50 50 |efine TA|RGA_SUPP|
|00004b50| 4f 52 54 45 44 09 09 2f | 2a 20 54 61 72 67 61 20 |ORTED../|* Targa |
|00004b60| 69 6d 61 67 65 20 66 69 | 6c 65 20 66 6f 72 6d 61 |image fi|le forma|
|00004b70| 74 20 2a 2f 0a 58 0a 58 | 2f 2a 20 44 65 66 69 6e |t */.X.X|/* Defin|
|00004b80| 65 20 74 68 69 73 20 69 | 66 20 79 6f 75 20 77 61 |e this i|f you wa|
|00004b90| 6e 74 20 74 6f 20 6e 61 | 6d 65 20 62 6f 74 68 20 |nt to na|me both |
|00004ba0| 69 6e 70 75 74 20 61 6e | 64 20 6f 75 74 70 75 74 |input an|d output|
|00004bb0| 20 66 69 6c 65 73 20 6f | 6e 20 74 68 65 20 63 6f | files o|n the co|
|00004bc0| 6d 6d 61 6e 64 0a 58 20 | 2a 20 6c 69 6e 65 2c 20 |mmand.X |* line, |
|00004bd0| 72 61 74 68 65 72 20 74 | 68 61 6e 20 75 73 69 6e |rather t|han usin|
|00004be0| 67 20 73 74 64 6f 75 74 | 20 61 6e 64 20 6f 70 74 |g stdout| and opt|
|00004bf0| 69 6f 6e 61 6c 6c 79 20 | 73 74 64 69 6e 2e 20 20 |ionally |stdin. |
|00004c00| 59 6f 75 20 4d 55 53 54 | 20 64 6f 20 74 68 69 73 |You MUST| do this|
|00004c10| 20 69 66 0a 58 20 2a 20 | 79 6f 75 72 20 73 79 73 | if.X * |your sys|
|00004c20| 74 65 6d 20 63 61 6e 27 | 74 20 63 6f 70 65 20 77 |tem can'|t cope w|
|00004c30| 69 74 68 20 62 69 6e 61 | 72 79 20 49 2f 4f 20 74 |ith bina|ry I/O t|
|00004c40| 6f 20 73 74 64 69 6e 2f | 73 74 64 6f 75 74 2e 20 |o stdin/|stdout. |
|00004c50| 20 53 65 65 20 63 6f 6d | 6d 65 6e 74 73 20 61 74 | See com|ments at|
|00004c60| 0a 58 20 2a 20 68 65 61 | 64 20 6f 66 20 63 6a 70 |.X * hea|d of cjp|
|00004c70| 65 67 2e 63 20 6f 72 20 | 64 6a 70 65 67 2e 63 2e |eg.c or |djpeg.c.|
|00004c80| 0a 58 20 2a 2f 0a 58 23 | 75 6e 64 65 66 20 54 57 |.X */.X#|undef TW|
|00004c90| 4f 5f 46 49 4c 45 5f 43 | 4f 4d 4d 41 4e 44 4c 49 |O_FILE_C|OMMANDLI|
|00004ca0| 4e 45 0a 58 0a 58 2f 2a | 20 44 65 66 69 6e 65 20 |NE.X.X/*| Define |
|00004cb0| 74 68 69 73 20 69 66 20 | 79 6f 75 72 20 73 79 73 |this if |your sys|
|00004cc0| 74 65 6d 20 6e 65 65 64 | 73 20 65 78 70 6c 69 63 |tem need|s explic|
|00004cd0| 69 74 20 63 6c 65 61 6e | 75 70 20 6f 66 20 74 65 |it clean|up of te|
|00004ce0| 6d 70 6f 72 61 72 79 20 | 66 69 6c 65 73 2e 0a 58 |mporary |files..X|
|00004cf0| 20 2a 20 54 68 69 73 20 | 69 73 20 63 72 75 63 69 | * This |is cruci|
|00004d00| 61 6c 20 75 6e 64 65 72 | 20 4d 53 2d 44 4f 53 2c |al under| MS-DOS,|
|00004d10| 20 77 68 65 72 65 20 74 | 68 65 20 74 65 6d 70 6f | where t|he tempo|
|00004d20| 72 61 72 79 20 22 66 69 | 6c 65 73 22 20 6d 61 79 |rary "fi|les" may|
|00004d30| 20 62 65 20 61 72 65 61 | 73 0a 58 20 2a 20 6f 66 | be area|s.X * of|
|00004d40| 20 65 78 74 65 6e 64 65 | 64 20 6d 65 6d 6f 72 79 | extende|d memory|
|00004d50| 3b 20 6f 6e 20 6d 6f 73 | 74 20 6f 74 68 65 72 20 |; on mos|t other |
|00004d60| 73 79 73 74 65 6d 73 20 | 69 74 27 73 20 6e 6f 74 |systems |it's not|
|00004d70| 20 61 73 20 69 6d 70 6f | 72 74 61 6e 74 2e 0a 58 | as impo|rtant..X|
|00004d80| 20 2a 2f 0a 58 23 75 6e | 64 65 66 20 4e 45 45 44 | */.X#un|def NEED|
|00004d90| 5f 53 49 47 4e 41 4c 5f | 43 41 54 43 48 45 52 0a |_SIGNAL_|CATCHER.|
|00004da0| 58 0a 58 2f 2a 20 42 79 | 20 64 65 66 61 75 6c 74 |X.X/* By| default|
|00004db0| 2c 20 77 65 20 6f 70 65 | 6e 20 69 6d 61 67 65 20 |, we ope|n image |
|00004dc0| 66 69 6c 65 73 20 77 69 | 74 68 20 66 6f 70 65 6e |files wi|th fopen|
|00004dd0| 28 2e 2e 2e 2c 22 72 62 | 22 29 20 6f 72 20 66 6f |(...,"rb|") or fo|
|00004de0| 70 65 6e 28 2e 2e 2e 2c | 22 77 62 22 29 2e 0a 58 |pen(...,|"wb")..X|
|00004df0| 20 2a 20 54 68 69 73 20 | 69 73 20 6e 65 63 65 73 | * This |is neces|
|00004e00| 73 61 72 79 20 6f 6e 20 | 73 79 73 74 65 6d 73 20 |sary on |systems |
|00004e10| 74 68 61 74 20 64 69 73 | 74 69 6e 67 75 69 73 68 |that dis|tinguish|
|00004e20| 20 74 65 78 74 20 66 69 | 6c 65 73 20 66 72 6f 6d | text fi|les from|
|00004e30| 20 62 69 6e 61 72 79 20 | 66 69 6c 65 73 2c 0a 58 | binary |files,.X|
|00004e40| 20 2a 20 61 6e 64 20 69 | 73 20 68 61 72 6d 6c 65 | * and i|s harmle|
|00004e50| 73 73 20 6f 6e 20 6d 6f | 73 74 20 73 79 73 74 65 |ss on mo|st syste|
|00004e60| 6d 73 20 74 68 61 74 20 | 64 6f 6e 27 74 2e 20 20 |ms that |don't. |
|00004e70| 49 66 20 79 6f 75 20 68 | 61 76 65 20 6f 6e 65 20 |If you h|ave one |
|00004e80| 6f 66 20 74 68 65 20 72 | 61 72 65 0a 58 20 2a 20 |of the r|are.X * |
|00004e90| 73 79 73 74 65 6d 73 20 | 74 68 61 74 20 63 6f 6d |systems |that com|
|00004ea0| 70 6c 61 69 6e 73 20 61 | 62 6f 75 74 20 74 68 65 |plains a|bout the|
|00004eb0| 20 22 62 22 20 73 70 65 | 63 2c 20 64 65 66 69 6e | "b" spe|c, defin|
|00004ec0| 65 20 74 68 69 73 20 73 | 79 6d 62 6f 6c 2e 0a 58 |e this s|ymbol..X|
|00004ed0| 20 2a 2f 0a 58 23 75 6e | 64 65 66 20 44 4f 4e 54 | */.X#un|def DONT|
|00004ee0| 5f 55 53 45 5f 42 5f 4d | 4f 44 45 0a 58 0a 58 2f |_USE_B_M|ODE.X.X/|
|00004ef0| 2a 20 44 65 66 69 6e 65 | 20 74 68 69 73 20 69 66 |* Define| this if|
|00004f00| 20 79 6f 75 20 77 61 6e | 74 20 70 65 72 63 65 6e | you wan|t percen|
|00004f10| 74 2d 64 6f 6e 65 20 70 | 72 6f 67 72 65 73 73 20 |t-done p|rogress |
|00004f20| 72 65 70 6f 72 74 73 20 | 66 72 6f 6d 20 63 6a 70 |reports |from cjp|
|00004f30| 65 67 2f 64 6a 70 65 67 | 2e 0a 58 20 2a 2f 0a 58 |eg/djpeg|..X */.X|
|00004f40| 23 75 6e 64 65 66 20 50 | 52 4f 47 52 45 53 53 5f |#undef P|ROGRESS_|
|00004f50| 52 45 50 4f 52 54 0a 58 | 0a 58 0a 58 23 65 6e 64 |REPORT.X|.X.X#end|
|00004f60| 69 66 20 2f 2a 20 4a 50 | 45 47 5f 43 4a 50 45 47 |if /* JP|EG_CJPEG|
|00004f70| 5f 44 4a 50 45 47 20 2a | 2f 0a 45 4e 44 5f 4f 46 |_DJPEG *|/.END_OF|
|00004f80| 5f 46 49 4c 45 0a 20 20 | 69 66 20 74 65 73 74 20 |_FILE. |if test |
|00004f90| 35 33 37 32 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 |5372 -ne| `wc -c |
|00004fa0| 3c 27 6a 63 6f 6e 66 69 | 67 2e 64 6f 63 27 60 3b |<'jconfi|g.doc'`;|
|00004fb0| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|00004fc0| 68 61 72 3a 20 5c 22 27 | 6a 63 6f 6e 66 69 67 2e |har: \"'|jconfig.|
|00004fd0| 64 6f 63 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |doc'\" u|npacked |
|00004fe0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00004ff0| 0a 20 20 66 69 0a 20 20 | 23 20 65 6e 64 20 6f 66 |. fi. |# end of|
|00005000| 20 27 6a 63 6f 6e 66 69 | 67 2e 64 6f 63 27 0a 66 | 'jconfi|g.doc'.f|
|00005010| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 6a 64 |i.if tes|t -f 'jd|
|00005020| 61 74 61 64 73 74 2e 63 | 27 20 2d 61 20 22 24 7b |atadst.c|' -a "${|
|00005030| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00005040| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00005050| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00005060| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00005070| 5c 22 27 6a 64 61 74 61 | 64 73 74 2e 63 27 5c 22 |\"'jdata|dst.c'\"|
|00005080| 0a 65 6c 73 65 0a 20 20 | 65 63 68 6f 20 73 68 61 |.else. |echo sha|
|00005090| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|000050a0| 27 6a 64 61 74 61 64 73 | 74 2e 63 27 5c 22 20 5c |'jdatads|t.c'\" \|
|000050b0| 28 35 31 31 30 20 63 68 | 61 72 61 63 74 65 72 73 |(5110 ch|aracters|
|000050c0| 5c 29 0a 20 20 73 65 64 | 20 22 73 2f 5e 58 2f 2f |\). sed| "s/^X//|
|000050d0| 22 20 3e 27 6a 64 61 74 | 61 64 73 74 2e 63 27 20 |" >'jdat|adst.c' |
|000050e0| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|000050f0| 58 2f 2a 0a 58 20 2a 20 | 6a 64 61 74 61 64 73 74 |X/*.X * |jdatadst|
|00005100| 2e 63 0a 58 20 2a 0a 58 | 20 2a 20 43 6f 70 79 72 |.c.X *.X| * Copyr|
|00005110| 69 67 68 74 20 28 43 29 | 20 31 39 39 34 2c 20 54 |ight (C)| 1994, T|
|00005120| 68 6f 6d 61 73 20 47 2e | 20 4c 61 6e 65 2e 0a 58 |homas G.| Lane..X|
|00005130| 20 2a 20 54 68 69 73 20 | 66 69 6c 65 20 69 73 20 | * This |file is |
|00005140| 70 61 72 74 20 6f 66 20 | 74 68 65 20 49 6e 64 65 |part of |the Inde|
|00005150| 70 65 6e 64 65 6e 74 20 | 4a 50 45 47 20 47 72 6f |pendent |JPEG Gro|
|00005160| 75 70 27 73 20 73 6f 66 | 74 77 61 72 65 2e 0a 58 |up's sof|tware..X|
|00005170| 20 2a 20 46 6f 72 20 63 | 6f 6e 64 69 74 69 6f 6e | * For c|ondition|
|00005180| 73 20 6f 66 20 64 69 73 | 74 72 69 62 75 74 69 6f |s of dis|tributio|
|00005190| 6e 20 61 6e 64 20 75 73 | 65 2c 20 73 65 65 20 74 |n and us|e, see t|
|000051a0| 68 65 20 61 63 63 6f 6d | 70 61 6e 79 69 6e 67 20 |he accom|panying |
|000051b0| 52 45 41 44 4d 45 20 66 | 69 6c 65 2e 0a 58 20 2a |README f|ile..X *|
|000051c0| 0a 58 20 2a 20 54 68 69 | 73 20 66 69 6c 65 20 63 |.X * Thi|s file c|
|000051d0| 6f 6e 74 61 69 6e 73 20 | 63 6f 6d 70 72 65 73 73 |ontains |compress|
|000051e0| 69 6f 6e 20 64 61 74 61 | 20 64 65 73 74 69 6e 61 |ion data| destina|
|000051f0| 74 69 6f 6e 20 72 6f 75 | 74 69 6e 65 73 20 66 6f |tion rou|tines fo|
|00005200| 72 20 74 68 65 20 63 61 | 73 65 20 6f 66 0a 58 20 |r the ca|se of.X |
|00005210| 2a 20 65 6d 69 74 74 69 | 6e 67 20 4a 50 45 47 20 |* emitti|ng JPEG |
|00005220| 64 61 74 61 20 74 6f 20 | 61 20 66 69 6c 65 20 28 |data to |a file (|
|00005230| 6f 72 20 61 6e 79 20 73 | 74 64 69 6f 20 73 74 72 |or any s|tdio str|
|00005240| 65 61 6d 29 2e 20 20 57 | 68 69 6c 65 20 74 68 65 |eam). W|hile the|
|00005250| 73 65 20 72 6f 75 74 69 | 6e 65 73 0a 58 20 2a 20 |se routi|nes.X * |
|00005260| 61 72 65 20 73 75 66 66 | 69 63 69 65 6e 74 20 66 |are suff|icient f|
|00005270| 6f 72 20 6d 6f 73 74 20 | 61 70 70 6c 69 63 61 74 |or most |applicat|
|00005280| 69 6f 6e 73 2c 20 73 6f | 6d 65 20 77 69 6c 6c 20 |ions, so|me will |
|00005290| 77 61 6e 74 20 74 6f 20 | 75 73 65 20 61 20 64 69 |want to |use a di|
|000052a0| 66 66 65 72 65 6e 74 0a | 58 20 2a 20 64 65 73 74 |fferent.|X * dest|
|000052b0| 69 6e 61 74 69 6f 6e 20 | 6d 61 6e 61 67 65 72 2e |ination |manager.|
|000052c0| 0a 58 20 2a 20 49 4d 50 | 4f 52 54 41 4e 54 3a 20 |.X * IMP|ORTANT: |
|000052d0| 77 65 20 61 73 73 75 6d | 65 20 74 68 61 74 20 66 |we assum|e that f|
|000052e0| 77 72 69 74 65 28 29 20 | 77 69 6c 6c 20 63 6f 72 |write() |will cor|
|000052f0| 72 65 63 74 6c 79 20 74 | 72 61 6e 73 63 72 69 62 |rectly t|ranscrib|
|00005300| 65 20 61 6e 20 61 72 72 | 61 79 20 6f 66 0a 58 20 |e an arr|ay of.X |
|00005310| 2a 20 4a 4f 43 54 45 54 | 73 20 69 6e 74 6f 20 38 |* JOCTET|s into 8|
|00005320| 2d 62 69 74 2d 77 69 64 | 65 20 65 6c 65 6d 65 6e |-bit-wid|e elemen|
|00005330| 74 73 20 6f 6e 20 65 78 | 74 65 72 6e 61 6c 20 73 |ts on ex|ternal s|
|00005340| 74 6f 72 61 67 65 2e 20 | 20 49 66 20 63 68 61 72 |torage. | If char|
|00005350| 20 69 73 20 77 69 64 65 | 72 0a 58 20 2a 20 74 68 | is wide|r.X * th|
|00005360| 61 6e 20 38 20 62 69 74 | 73 20 6f 6e 20 79 6f 75 |an 8 bit|s on you|
|00005370| 72 20 6d 61 63 68 69 6e | 65 2c 20 79 6f 75 20 6d |r machin|e, you m|
|00005380| 61 79 20 6e 65 65 64 20 | 74 6f 20 64 6f 20 73 6f |ay need |to do so|
|00005390| 6d 65 20 74 77 65 61 6b | 69 6e 67 2e 0a 58 20 2a |me tweak|ing..X *|
|000053a0| 2f 0a 58 0a 58 2f 2a 20 | 74 68 69 73 20 69 73 20 |/.X.X/* |this is |
|000053b0| 6e 6f 74 20 61 20 63 6f | 72 65 20 6c 69 62 72 61 |not a co|re libra|
|000053c0| 72 79 20 6d 6f 64 75 6c | 65 2c 20 73 6f 20 69 74 |ry modul|e, so it|
|000053d0| 20 64 6f 65 73 6e 27 74 | 20 64 65 66 69 6e 65 20 | doesn't| define |
|000053e0| 4a 50 45 47 5f 49 4e 54 | 45 52 4e 41 4c 53 20 2a |JPEG_INT|ERNALS *|
|000053f0| 2f 0a 58 23 69 6e 63 6c | 75 64 65 20 22 6a 69 6e |/.X#incl|ude "jin|
|00005400| 63 6c 75 64 65 2e 68 22 | 0a 58 23 69 6e 63 6c 75 |clude.h"|.X#inclu|
|00005410| 64 65 20 22 6a 70 65 67 | 6c 69 62 2e 68 22 0a 58 |de "jpeg|lib.h".X|
|00005420| 23 69 6e 63 6c 75 64 65 | 20 22 6a 65 72 72 6f 72 |#include| "jerror|
|00005430| 2e 68 22 0a 58 0a 58 0a | 58 2f 2a 20 45 78 70 61 |.h".X.X.|X/* Expa|
|00005440| 6e 64 65 64 20 64 61 74 | 61 20 64 65 73 74 69 6e |nded dat|a destin|
|00005450| 61 74 69 6f 6e 20 6f 62 | 6a 65 63 74 20 66 6f 72 |ation ob|ject for|
|00005460| 20 73 74 64 69 6f 20 6f | 75 74 70 75 74 20 2a 2f | stdio o|utput */|
|00005470| 0a 58 0a 58 74 79 70 65 | 64 65 66 20 73 74 72 75 |.X.Xtype|def stru|
|00005480| 63 74 20 7b 0a 58 20 20 | 73 74 72 75 63 74 20 6a |ct {.X |struct j|
|00005490| 70 65 67 5f 64 65 73 74 | 69 6e 61 74 69 6f 6e 5f |peg_dest|ination_|
|000054a0| 6d 67 72 20 70 75 62 3b | 20 2f 2a 20 70 75 62 6c |mgr pub;| /* publ|
|000054b0| 69 63 20 66 69 65 6c 64 | 73 20 2a 2f 0a 58 0a 58 |ic field|s */.X.X|
|000054c0| 20 20 46 49 4c 45 20 2a | 20 6f 75 74 66 69 6c 65 | FILE *| outfile|
|000054d0| 3b 09 09 2f 2a 20 74 61 | 72 67 65 74 20 73 74 72 |;../* ta|rget str|
|000054e0| 65 61 6d 20 2a 2f 0a 58 | 20 20 4a 4f 43 54 45 54 |eam */.X| JOCTET|
|000054f0| 20 2a 20 62 75 66 66 65 | 72 3b 09 09 2f 2a 20 73 | * buffe|r;../* s|
|00005500| 74 61 72 74 20 6f 66 20 | 62 75 66 66 65 72 20 2a |tart of |buffer *|
|00005510| 2f 0a 58 7d 20 6d 79 5f | 64 65 73 74 69 6e 61 74 |/.X} my_|destinat|
|00005520| 69 6f 6e 5f 6d 67 72 3b | 0a 58 0a 58 74 79 70 65 |ion_mgr;|.X.Xtype|
|00005530| 64 65 66 20 6d 79 5f 64 | 65 73 74 69 6e 61 74 69 |def my_d|estinati|
|00005540| 6f 6e 5f 6d 67 72 20 2a | 20 6d 79 5f 64 65 73 74 |on_mgr *| my_dest|
|00005550| 5f 70 74 72 3b 0a 58 0a | 58 23 64 65 66 69 6e 65 |_ptr;.X.|X#define|
|00005560| 20 4f 55 54 50 55 54 5f | 42 55 46 5f 53 49 5a 45 | OUTPUT_|BUF_SIZE|
|00005570| 20 20 34 30 39 36 09 2f | 2a 20 63 68 6f 6f 73 65 | 4096./|* choose|
|00005580| 20 61 6e 20 65 66 66 69 | 63 69 65 6e 74 6c 79 20 | an effi|ciently |
|00005590| 66 77 72 69 74 65 27 61 | 62 6c 65 20 73 69 7a 65 |fwrite'a|ble size|
|000055a0| 20 2a 2f 0a 58 0a 58 0a | 58 2f 2a 0a 58 20 2a 20 | */.X.X.|X/*.X * |
|000055b0| 49 6e 69 74 69 61 6c 69 | 7a 65 20 64 65 73 74 69 |Initiali|ze desti|
|000055c0| 6e 61 74 69 6f 6e 20 2d | 2d 2d 20 63 61 6c 6c 65 |nation -|-- calle|
|000055d0| 64 20 62 79 20 6a 70 65 | 67 5f 73 74 61 72 74 5f |d by jpe|g_start_|
|000055e0| 63 6f 6d 70 72 65 73 73 | 0a 58 20 2a 20 62 65 66 |compress|.X * bef|
|000055f0| 6f 72 65 20 61 6e 79 20 | 64 61 74 61 20 69 73 20 |ore any |data is |
|00005600| 61 63 74 75 61 6c 6c 79 | 20 77 72 69 74 74 65 6e |actually| written|
|00005610| 2e 0a 58 20 2a 2f 0a 58 | 0a 58 4d 45 54 48 4f 44 |..X */.X|.XMETHOD|
|00005620| 44 45 46 20 76 6f 69 64 | 0a 58 69 6e 69 74 5f 64 |DEF void|.Xinit_d|
|00005630| 65 73 74 69 6e 61 74 69 | 6f 6e 20 28 6a 5f 63 6f |estinati|on (j_co|
|00005640| 6d 70 72 65 73 73 5f 70 | 74 72 20 63 69 6e 66 6f |mpress_p|tr cinfo|
|00005650| 29 0a 58 7b 0a 58 20 20 | 6d 79 5f 64 65 73 74 5f |).X{.X |my_dest_|
|00005660| 70 74 72 20 64 65 73 74 | 20 3d 20 28 6d 79 5f 64 |ptr dest| = (my_d|
|00005670| 65 73 74 5f 70 74 72 29 | 20 63 69 6e 66 6f 2d 3e |est_ptr)| cinfo->|
|00005680| 64 65 73 74 3b 0a 58 0a | 58 20 20 2f 2a 20 41 6c |dest;.X.|X /* Al|
|00005690| 6c 6f 63 61 74 65 20 74 | 68 65 20 6f 75 74 70 75 |locate t|he outpu|
|000056a0| 74 20 62 75 66 66 65 72 | 20 2d 2d 2d 20 69 74 20 |t buffer| --- it |
|000056b0| 77 69 6c 6c 20 62 65 20 | 72 65 6c 65 61 73 65 64 |will be |released|
|000056c0| 20 77 68 65 6e 20 64 6f | 6e 65 20 77 69 74 68 20 | when do|ne with |
|000056d0| 69 6d 61 67 65 20 2a 2f | 0a 58 20 20 64 65 73 74 |image */|.X dest|
|000056e0| 2d 3e 62 75 66 66 65 72 | 20 3d 20 28 4a 4f 43 54 |->buffer| = (JOCT|
|000056f0| 45 54 20 2a 29 0a 58 20 | 20 20 20 20 20 28 2a 63 |ET *).X | (*c|
|00005700| 69 6e 66 6f 2d 3e 6d 65 | 6d 2d 3e 61 6c 6c 6f 63 |info->me|m->alloc|
|00005710| 5f 73 6d 61 6c 6c 29 20 | 28 28 6a 5f 63 6f 6d 6d |_small) |((j_comm|
|00005720| 6f 6e 5f 70 74 72 29 20 | 63 69 6e 66 6f 2c 20 4a |on_ptr) |cinfo, J|
|00005730| 50 4f 4f 4c 5f 49 4d 41 | 47 45 2c 0a 58 09 09 09 |POOL_IMA|GE,.X...|
|00005740| 09 20 20 4f 55 54 50 55 | 54 5f 42 55 46 5f 53 49 |. OUTPU|T_BUF_SI|
|00005750| 5a 45 20 2a 20 53 49 5a | 45 4f 46 28 4a 4f 43 54 |ZE * SIZ|EOF(JOCT|
|00005760| 45 54 29 29 3b 0a 58 0a | 58 20 20 64 65 73 74 2d |ET));.X.|X dest-|
|00005770| 3e 70 75 62 2e 6e 65 78 | 74 5f 6f 75 74 70 75 74 |>pub.nex|t_output|
|00005780| 5f 62 79 74 65 20 3d 20 | 64 65 73 74 2d 3e 62 75 |_byte = |dest->bu|
|00005790| 66 66 65 72 3b 0a 58 20 | 20 64 65 73 74 2d 3e 70 |ffer;.X | dest->p|
|000057a0| 75 62 2e 66 72 65 65 5f | 69 6e 5f 62 75 66 66 65 |ub.free_|in_buffe|
|000057b0| 72 20 3d 20 4f 55 54 50 | 55 54 5f 42 55 46 5f 53 |r = OUTP|UT_BUF_S|
|000057c0| 49 5a 45 3b 0a 58 7d 0a | 58 0a 58 0a 58 2f 2a 0a |IZE;.X}.|X.X.X/*.|
|000057d0| 58 20 2a 20 45 6d 70 74 | 79 20 74 68 65 20 6f 75 |X * Empt|y the ou|
|000057e0| 74 70 75 74 20 62 75 66 | 66 65 72 20 2d 2d 2d 20 |tput buf|fer --- |
|000057f0| 63 61 6c 6c 65 64 20 77 | 68 65 6e 65 76 65 72 20 |called w|henever |
|00005800| 62 75 66 66 65 72 20 66 | 69 6c 6c 73 20 75 70 2e |buffer f|ills up.|
|00005810| 0a 58 20 2a 0a 58 20 2a | 20 49 6e 20 74 79 70 69 |.X *.X *| In typi|
|00005820| 63 61 6c 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |cal appl|ications|
|00005830| 2c 20 74 68 69 73 20 73 | 68 6f 75 6c 64 20 77 72 |, this s|hould wr|
|00005840| 69 74 65 20 74 68 65 20 | 65 6e 74 69 72 65 20 6f |ite the |entire o|
|00005850| 75 74 70 75 74 20 62 75 | 66 66 65 72 0a 58 20 2a |utput bu|ffer.X *|
|00005860| 20 28 69 67 6e 6f 72 69 | 6e 67 20 74 68 65 20 63 | (ignori|ng the c|
|00005870| 75 72 72 65 6e 74 20 73 | 74 61 74 65 20 6f 66 20 |urrent s|tate of |
|00005880| 6e 65 78 74 5f 6f 75 74 | 70 75 74 5f 62 79 74 65 |next_out|put_byte|
|00005890| 20 26 20 66 72 65 65 5f | 69 6e 5f 62 75 66 66 65 | & free_|in_buffe|
|000058a0| 72 29 2c 0a 58 20 2a 20 | 72 65 73 65 74 20 74 68 |r),.X * |reset th|
|000058b0| 65 20 70 6f 69 6e 74 65 | 72 20 26 20 63 6f 75 6e |e pointe|r & coun|
|000058c0| 74 20 74 6f 20 74 68 65 | 20 73 74 61 72 74 20 6f |t to the| start o|
|000058d0| 66 20 74 68 65 20 62 75 | 66 66 65 72 2c 20 61 6e |f the bu|ffer, an|
|000058e0| 64 20 72 65 74 75 72 6e | 20 54 52 55 45 0a 58 20 |d return| TRUE.X |
|000058f0| 2a 20 69 6e 64 69 63 61 | 74 69 6e 67 20 74 68 61 |* indica|ting tha|
|00005900| 74 20 74 68 65 20 62 75 | 66 66 65 72 20 68 61 73 |t the bu|ffer has|
|00005910| 20 62 65 65 6e 20 64 75 | 6d 70 65 64 2e 0a 58 20 | been du|mped..X |
|00005920| 2a 0a 58 20 2a 20 49 6e | 20 61 70 70 6c 69 63 61 |*.X * In| applica|
|00005930| 74 69 6f 6e 73 20 74 68 | 61 74 20 6e 65 65 64 20 |tions th|at need |
|00005940| 74 6f 20 62 65 20 61 62 | 6c 65 20 74 6f 20 73 75 |to be ab|le to su|
|00005950| 73 70 65 6e 64 20 63 6f | 6d 70 72 65 73 73 69 6f |spend co|mpressio|
|00005960| 6e 20 64 75 65 20 74 6f | 20 6f 75 74 70 75 74 0a |n due to| output.|
|00005970| 58 20 2a 20 6f 76 65 72 | 72 75 6e 2c 20 61 20 46 |X * over|run, a F|
|00005980| 41 4c 53 45 20 72 65 74 | 75 72 6e 20 69 6e 64 69 |ALSE ret|urn indi|
|00005990| 63 61 74 65 73 20 74 68 | 61 74 20 74 68 65 20 62 |cates th|at the b|
|000059a0| 75 66 66 65 72 20 63 61 | 6e 6e 6f 74 20 62 65 20 |uffer ca|nnot be |
|000059b0| 65 6d 70 74 69 65 64 20 | 6e 6f 77 2e 0a 58 20 2a |emptied |now..X *|
|000059c0| 20 49 6e 20 74 68 69 73 | 20 73 69 74 75 61 74 69 | In this| situati|
|000059d0| 6f 6e 2c 20 74 68 65 20 | 63 6f 6d 70 72 65 73 73 |on, the |compress|
|000059e0| 6f 72 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 74 |or will |return t|
|000059f0| 6f 20 69 74 73 20 63 61 | 6c 6c 65 72 20 28 70 6f |o its ca|ller (po|
|00005a00| 73 73 69 62 6c 79 20 77 | 69 74 68 0a 58 20 2a 20 |ssibly w|ith.X * |
|00005a10| 61 6e 20 69 6e 64 69 63 | 61 74 69 6f 6e 20 74 68 |an indic|ation th|
|00005a20| 61 74 20 69 74 20 68 61 | 73 20 6e 6f 74 20 61 63 |at it ha|s not ac|
|00005a30| 63 65 70 74 65 64 20 61 | 6c 6c 20 74 68 65 20 73 |cepted a|ll the s|
|00005a40| 75 70 70 6c 69 65 64 20 | 73 63 61 6e 6c 69 6e 65 |upplied |scanline|
|00005a50| 73 29 2e 20 20 54 68 65 | 0a 58 20 2a 20 61 70 70 |s). The|.X * app|
|00005a60| 6c 69 63 61 74 69 6f 6e | 20 73 68 6f 75 6c 64 20 |lication| should |
|00005a70| 72 65 73 75 6d 65 20 63 | 6f 6d 70 72 65 73 73 69 |resume c|ompressi|
|00005a80| 6f 6e 20 61 66 74 65 72 | 20 69 74 20 68 61 73 20 |on after| it has |
|00005a90| 6d 61 64 65 20 6d 6f 72 | 65 20 72 6f 6f 6d 20 69 |made mor|e room i|
|00005aa0| 6e 20 74 68 65 0a 58 20 | 2a 20 6f 75 74 70 75 74 |n the.X |* output|
|00005ab0| 20 62 75 66 66 65 72 2e | 20 20 4e 6f 74 65 20 74 | buffer.| Note t|
|00005ac0| 68 61 74 20 74 68 65 72 | 65 20 61 72 65 20 73 75 |hat ther|e are su|
|00005ad0| 62 73 74 61 6e 74 69 61 | 6c 20 72 65 73 74 72 69 |bstantia|l restri|
|00005ae0| 63 74 69 6f 6e 73 20 6f | 6e 20 74 68 65 20 75 73 |ctions o|n the us|
|00005af0| 65 20 6f 66 0a 58 20 2a | 20 73 75 73 70 65 6e 73 |e of.X *| suspens|
|00005b00| 69 6f 6e 20 2d 2d 2d 20 | 73 65 65 20 74 68 65 20 |ion --- |see the |
|00005b10| 64 6f 63 75 6d 65 6e 74 | 61 74 69 6f 6e 2e 0a 58 |document|ation..X|
|00005b20| 20 2a 0a 58 20 2a 20 57 | 68 65 6e 20 73 75 73 70 | *.X * W|hen susp|
|00005b30| 65 6e 64 69 6e 67 2c 20 | 74 68 65 20 63 6f 6d 70 |ending, |the comp|
|00005b40| 72 65 73 73 6f 72 20 77 | 69 6c 6c 20 62 61 63 6b |ressor w|ill back|
|00005b50| 20 75 70 20 74 6f 20 61 | 20 63 6f 6e 76 65 6e 69 | up to a| conveni|
|00005b60| 65 6e 74 20 72 65 73 74 | 61 72 74 20 70 6f 69 6e |ent rest|art poin|
|00005b70| 74 0a 58 20 2a 20 28 74 | 79 70 69 63 61 6c 6c 79 |t.X * (t|ypically|
|00005b80| 20 74 68 65 20 73 74 61 | 72 74 20 6f 66 20 74 68 | the sta|rt of th|
|00005b90| 65 20 63 75 72 72 65 6e | 74 20 4d 43 55 29 2e 20 |e curren|t MCU). |
|00005ba0| 6e 65 78 74 5f 6f 75 74 | 70 75 74 5f 62 79 74 65 |next_out|put_byte|
|00005bb0| 20 26 20 66 72 65 65 5f | 69 6e 5f 62 75 66 66 65 | & free_|in_buffe|
|00005bc0| 72 0a 58 20 2a 20 69 6e | 64 69 63 61 74 65 20 77 |r.X * in|dicate w|
|00005bd0| 68 65 72 65 20 74 68 65 | 20 72 65 73 74 61 72 74 |here the| restart|
|00005be0| 20 70 6f 69 6e 74 20 77 | 69 6c 6c 20 62 65 20 69 | point w|ill be i|
|00005bf0| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 63 61 |f the cu|rrent ca|
|00005c00| 6c 6c 20 72 65 74 75 72 | 6e 73 20 46 41 4c 53 45 |ll retur|ns FALSE|
|00005c10| 2e 0a 58 20 2a 20 44 61 | 74 61 20 62 65 79 6f 6e |..X * Da|ta beyon|
|00005c20| 64 20 74 68 69 73 20 70 | 6f 69 6e 74 20 77 69 6c |d this p|oint wil|
|00005c30| 6c 20 62 65 20 72 65 67 | 65 6e 65 72 61 74 65 64 |l be reg|enerated|
|00005c40| 20 61 66 74 65 72 20 72 | 65 73 75 6d 70 74 69 6f | after r|esumptio|
|00005c50| 6e 2c 20 73 6f 20 64 6f | 20 6e 6f 74 0a 58 20 2a |n, so do| not.X *|
|00005c60| 20 77 72 69 74 65 20 69 | 74 20 6f 75 74 20 77 68 | write i|t out wh|
|00005c70| 65 6e 20 65 6d 70 74 79 | 69 6e 67 20 74 68 65 20 |en empty|ing the |
|00005c80| 62 75 66 66 65 72 20 65 | 78 74 65 72 6e 61 6c 6c |buffer e|xternall|
|00005c90| 79 2e 0a 58 20 2a 2f 0a | 58 0a 58 4d 45 54 48 4f |y..X */.|X.XMETHO|
|00005ca0| 44 44 45 46 20 62 6f 6f | 6c 65 61 6e 0a 58 65 6d |DDEF boo|lean.Xem|
|00005cb0| 70 74 79 5f 6f 75 74 70 | 75 74 5f 62 75 66 66 65 |pty_outp|ut_buffe|
|00005cc0| 72 20 28 6a 5f 63 6f 6d | 70 72 65 73 73 5f 70 74 |r (j_com|press_pt|
|00005cd0| 72 20 63 69 6e 66 6f 29 | 0a 58 7b 0a 58 20 20 6d |r cinfo)|.X{.X m|
|00005ce0| 79 5f 64 65 73 74 5f 70 | 74 72 20 64 65 73 74 20 |y_dest_p|tr dest |
|00005cf0| 3d 20 28 6d 79 5f 64 65 | 73 74 5f 70 74 72 29 20 |= (my_de|st_ptr) |
|00005d00| 63 69 6e 66 6f 2d 3e 64 | 65 73 74 3b 0a 58 0a 58 |cinfo->d|est;.X.X|
|00005d10| 20 20 69 66 20 28 4a 46 | 57 52 49 54 45 28 64 65 | if (JF|WRITE(de|
|00005d20| 73 74 2d 3e 6f 75 74 66 | 69 6c 65 2c 20 64 65 73 |st->outf|ile, des|
|00005d30| 74 2d 3e 62 75 66 66 65 | 72 2c 20 4f 55 54 50 55 |t->buffe|r, OUTPU|
|00005d40| 54 5f 42 55 46 5f 53 49 | 5a 45 29 20 21 3d 0a 58 |T_BUF_SI|ZE) !=.X|
|00005d50| 20 20 20 20 20 20 28 73 | 69 7a 65 5f 74 29 20 4f | (s|ize_t) O|
|00005d60| 55 54 50 55 54 5f 42 55 | 46 5f 53 49 5a 45 29 0a |UTPUT_BU|F_SIZE).|
|00005d70| 58 20 20 20 20 45 52 52 | 45 58 49 54 28 63 69 6e |X ERR|EXIT(cin|
|00005d80| 66 6f 2c 20 4a 45 52 52 | 5f 46 49 4c 45 5f 57 52 |fo, JERR|_FILE_WR|
|00005d90| 49 54 45 29 3b 0a 58 0a | 58 20 20 64 65 73 74 2d |ITE);.X.|X dest-|
|00005da0| 3e 70 75 62 2e 6e 65 78 | 74 5f 6f 75 74 70 75 74 |>pub.nex|t_output|
|00005db0| 5f 62 79 74 65 20 3d 20 | 64 65 73 74 2d 3e 62 75 |_byte = |dest->bu|
|00005dc0| 66 66 65 72 3b 0a 58 20 | 20 64 65 73 74 2d 3e 70 |ffer;.X | dest->p|
|00005dd0| 75 62 2e 66 72 65 65 5f | 69 6e 5f 62 75 66 66 65 |ub.free_|in_buffe|
|00005de0| 72 20 3d 20 4f 55 54 50 | 55 54 5f 42 55 46 5f 53 |r = OUTP|UT_BUF_S|
|00005df0| 49 5a 45 3b 0a 58 0a 58 | 20 20 72 65 74 75 72 6e |IZE;.X.X| return|
|00005e00| 20 54 52 55 45 3b 0a 58 | 7d 0a 58 0a 58 0a 58 2f | TRUE;.X|}.X.X.X/|
|00005e10| 2a 0a 58 20 2a 20 54 65 | 72 6d 69 6e 61 74 65 20 |*.X * Te|rminate |
|00005e20| 64 65 73 74 69 6e 61 74 | 69 6f 6e 20 2d 2d 2d 20 |destinat|ion --- |
|00005e30| 63 61 6c 6c 65 64 20 62 | 79 20 6a 70 65 67 5f 66 |called b|y jpeg_f|
|00005e40| 69 6e 69 73 68 5f 63 6f | 6d 70 72 65 73 73 0a 58 |inish_co|mpress.X|
|00005e50| 20 2a 20 61 66 74 65 72 | 20 61 6c 6c 20 64 61 74 | * after| all dat|
|00005e60| 61 20 68 61 73 20 62 65 | 65 6e 20 77 72 69 74 74 |a has be|en writt|
|00005e70| 65 6e 2e 20 20 55 73 75 | 61 6c 6c 79 20 6e 65 65 |en. Usu|ally nee|
|00005e80| 64 73 20 74 6f 20 66 6c | 75 73 68 20 62 75 66 66 |ds to fl|ush buff|
|00005e90| 65 72 2e 0a 58 20 2a 0a | 58 20 2a 20 4e 42 3a 20 |er..X *.|X * NB: |
|00005ea0| 2a 6e 6f 74 2a 20 63 61 | 6c 6c 65 64 20 62 79 20 |*not* ca|lled by |
|00005eb0| 6a 70 65 67 5f 61 62 6f | 72 74 20 6f 72 20 6a 70 |jpeg_abo|rt or jp|
|00005ec0| 65 67 5f 64 65 73 74 72 | 6f 79 3b 20 73 75 72 72 |eg_destr|oy; surr|
|00005ed0| 6f 75 6e 64 69 6e 67 0a | 58 20 2a 20 61 70 70 6c |ounding.|X * appl|
|00005ee0| 69 63 61 74 69 6f 6e 20 | 6d 75 73 74 20 64 65 61 |ication |must dea|
|00005ef0| 6c 20 77 69 74 68 20 61 | 6e 79 20 63 6c 65 61 6e |l with a|ny clean|
|00005f00| 75 70 20 74 68 61 74 20 | 73 68 6f 75 6c 64 20 68 |up that |should h|
|00005f10| 61 70 70 65 6e 20 65 76 | 65 6e 0a 58 20 2a 20 66 |appen ev|en.X * f|
|00005f20| 6f 72 20 65 72 72 6f 72 | 20 65 78 69 74 2e 0a 58 |or error| exit..X|
|00005f30| 20 2a 2f 0a 58 0a 58 4d | 45 54 48 4f 44 44 45 46 | */.X.XM|ETHODDEF|
|00005f40| 20 76 6f 69 64 0a 58 74 | 65 72 6d 5f 64 65 73 74 | void.Xt|erm_dest|
|00005f50| 69 6e 61 74 69 6f 6e 20 | 28 6a 5f 63 6f 6d 70 72 |ination |(j_compr|
|00005f60| 65 73 73 5f 70 74 72 20 | 63 69 6e 66 6f 29 0a 58 |ess_ptr |cinfo).X|
|00005f70| 7b 0a 58 20 20 6d 79 5f | 64 65 73 74 5f 70 74 72 |{.X my_|dest_ptr|
|00005f80| 20 64 65 73 74 20 3d 20 | 28 6d 79 5f 64 65 73 74 | dest = |(my_dest|
|00005f90| 5f 70 74 72 29 20 63 69 | 6e 66 6f 2d 3e 64 65 73 |_ptr) ci|nfo->des|
|00005fa0| 74 3b 0a 58 20 20 73 69 | 7a 65 5f 74 20 64 61 74 |t;.X si|ze_t dat|
|00005fb0| 61 63 6f 75 6e 74 20 3d | 20 4f 55 54 50 55 54 5f |acount =| OUTPUT_|
|00005fc0| 42 55 46 5f 53 49 5a 45 | 20 2d 20 64 65 73 74 2d |BUF_SIZE| - dest-|
|00005fd0| 3e 70 75 62 2e 66 72 65 | 65 5f 69 6e 5f 62 75 66 |>pub.fre|e_in_buf|
|00005fe0| 66 65 72 3b 0a 58 0a 58 | 20 20 2f 2a 20 57 72 69 |fer;.X.X| /* Wri|
|00005ff0| 74 65 20 61 6e 79 20 64 | 61 74 61 20 72 65 6d 61 |te any d|ata rema|
|00006000| 69 6e 69 6e 67 20 69 6e | 20 74 68 65 20 62 75 66 |ining in| the buf|
|00006010| 66 65 72 20 2a 2f 0a 58 | 20 20 69 66 20 28 64 61 |fer */.X| if (da|
|00006020| 74 61 63 6f 75 6e 74 20 | 3e 20 30 29 20 7b 0a 58 |tacount |> 0) {.X|
|00006030| 20 20 20 20 69 66 20 28 | 4a 46 57 52 49 54 45 28 | if (|JFWRITE(|
|00006040| 64 65 73 74 2d 3e 6f 75 | 74 66 69 6c 65 2c 20 64 |dest->ou|tfile, d|
|00006050| 65 73 74 2d 3e 62 75 66 | 66 65 72 2c 20 64 61 74 |est->buf|fer, dat|
|00006060| 61 63 6f 75 6e 74 29 20 | 21 3d 20 64 61 74 61 63 |acount) |!= datac|
|00006070| 6f 75 6e 74 29 0a 58 20 | 20 20 20 20 20 45 52 52 |ount).X | ERR|
|00006080| 45 58 49 54 28 63 69 6e | 66 6f 2c 20 4a 45 52 52 |EXIT(cin|fo, JERR|
|00006090| 5f 46 49 4c 45 5f 57 52 | 49 54 45 29 3b 0a 58 20 |_FILE_WR|ITE);.X |
|000060a0| 20 7d 0a 58 20 20 66 66 | 6c 75 73 68 28 64 65 73 | }.X ff|lush(des|
|000060b0| 74 2d 3e 6f 75 74 66 69 | 6c 65 29 3b 0a 58 20 20 |t->outfi|le);.X |
|000060c0| 2f 2a 20 4d 61 6b 65 20 | 73 75 72 65 20 77 65 20 |/* Make |sure we |
|000060d0| 77 72 6f 74 65 20 74 68 | 65 20 6f 75 74 70 75 74 |wrote th|e output|
|000060e0| 20 66 69 6c 65 20 4f 4b | 20 2a 2f 0a 58 20 20 69 | file OK| */.X i|
|000060f0| 66 20 28 66 65 72 72 6f | 72 28 64 65 73 74 2d 3e |f (ferro|r(dest->|
|00006100| 6f 75 74 66 69 6c 65 29 | 29 0a 58 20 20 20 20 45 |outfile)|).X E|
|00006110| 52 52 45 58 49 54 28 63 | 69 6e 66 6f 2c 20 4a 45 |RREXIT(c|info, JE|
|00006120| 52 52 5f 46 49 4c 45 5f | 57 52 49 54 45 29 3b 0a |RR_FILE_|WRITE);.|
|00006130| 58 7d 0a 58 0a 58 0a 58 | 2f 2a 0a 58 20 2a 20 50 |X}.X.X.X|/*.X * P|
|00006140| 72 65 70 61 72 65 20 66 | 6f 72 20 6f 75 74 70 75 |repare f|or outpu|
|00006150| 74 20 74 6f 20 61 20 73 | 74 64 69 6f 20 73 74 72 |t to a s|tdio str|
|00006160| 65 61 6d 2e 0a 58 20 2a | 20 54 68 65 20 63 61 6c |eam..X *| The cal|
|00006170| 6c 65 72 20 6d 75 73 74 | 20 68 61 76 65 20 61 6c |ler must| have al|
|00006180| 72 65 61 64 79 20 6f 70 | 65 6e 65 64 20 74 68 65 |ready op|ened the|
|00006190| 20 73 74 72 65 61 6d 2c | 20 61 6e 64 20 69 73 20 | stream,| and is |
|000061a0| 72 65 73 70 6f 6e 73 69 | 62 6c 65 0a 58 20 2a 20 |responsi|ble.X * |
|000061b0| 66 6f 72 20 63 6c 6f 73 | 69 6e 67 20 69 74 20 61 |for clos|ing it a|
|000061c0| 66 74 65 72 20 66 69 6e | 69 73 68 69 6e 67 20 63 |fter fin|ishing c|
|000061d0| 6f 6d 70 72 65 73 73 69 | 6f 6e 2e 0a 58 20 2a 2f |ompressi|on..X */|
|000061e0| 0a 58 0a 58 47 4c 4f 42 | 41 4c 20 76 6f 69 64 0a |.X.XGLOB|AL void.|
|000061f0| 58 6a 70 65 67 5f 73 74 | 64 69 6f 5f 64 65 73 74 |Xjpeg_st|dio_dest|
|00006200| 20 28 6a 5f 63 6f 6d 70 | 72 65 73 73 5f 70 74 72 | (j_comp|ress_ptr|
|00006210| 20 63 69 6e 66 6f 2c 20 | 46 49 4c 45 20 2a 20 6f | cinfo, |FILE * o|
|00006220| 75 74 66 69 6c 65 29 0a | 58 7b 0a 58 20 20 6d 79 |utfile).|X{.X my|
|00006230| 5f 64 65 73 74 5f 70 74 | 72 20 64 65 73 74 3b 0a |_dest_pt|r dest;.|
|00006240| 58 0a 58 20 20 2f 2a 20 | 54 68 65 20 64 65 73 74 |X.X /* |The dest|
|00006250| 69 6e 61 74 69 6f 6e 20 | 6f 62 6a 65 63 74 20 69 |ination |object i|
|00006260| 73 20 6d 61 64 65 20 70 | 65 72 6d 61 6e 65 6e 74 |s made p|ermanent|
|00006270| 20 73 6f 20 74 68 61 74 | 20 6d 75 6c 74 69 70 6c | so that| multipl|
|00006280| 65 20 4a 50 45 47 20 69 | 6d 61 67 65 73 0a 58 20 |e JPEG i|mages.X |
|00006290| 20 20 2a 20 63 61 6e 20 | 62 65 20 77 72 69 74 74 | * can |be writt|
|000062a0| 65 6e 20 74 6f 20 74 68 | 65 20 73 61 6d 65 20 66 |en to th|e same f|
|000062b0| 69 6c 65 20 77 69 74 68 | 6f 75 74 20 72 65 2d 65 |ile with|out re-e|
|000062c0| 78 65 63 75 74 69 6e 67 | 20 6a 70 65 67 5f 73 74 |xecuting| jpeg_st|
|000062d0| 64 69 6f 5f 64 65 73 74 | 2e 0a 58 20 20 20 2a 20 |dio_dest|..X * |
|000062e0| 54 68 69 73 20 6d 61 6b | 65 73 20 69 74 20 64 61 |This mak|es it da|
|000062f0| 6e 67 65 72 6f 75 73 20 | 74 6f 20 75 73 65 20 74 |ngerous |to use t|
|00006300| 68 69 73 20 6d 61 6e 61 | 67 65 72 20 61 6e 64 20 |his mana|ger and |
|00006310| 61 20 64 69 66 66 65 72 | 65 6e 74 20 64 65 73 74 |a differ|ent dest|
|00006320| 69 6e 61 74 69 6f 6e 0a | 58 20 20 20 2a 20 6d 61 |ination.|X * ma|
|00006330| 6e 61 67 65 72 20 73 65 | 72 69 61 6c 6c 79 20 77 |nager se|rially w|
|00006340| 69 74 68 20 74 68 65 20 | 73 61 6d 65 20 4a 50 45 |ith the |same JPE|
|00006350| 47 20 6f 62 6a 65 63 74 | 2c 20 62 65 63 61 75 73 |G object|, becaus|
|00006360| 65 20 74 68 65 69 72 20 | 70 72 69 76 61 74 65 20 |e their |private |
|00006370| 6f 62 6a 65 63 74 0a 58 | 20 20 20 2a 20 73 69 7a |object.X| * siz|
|00006380| 65 73 20 6d 61 79 20 62 | 65 20 64 69 66 66 65 72 |es may b|e differ|
|00006390| 65 6e 74 2e 20 20 43 61 | 76 65 61 74 20 70 72 6f |ent. Ca|veat pro|
|000063a0| 67 72 61 6d 6d 65 72 2e | 0a 58 20 20 20 2a 2f 0a |grammer.|.X */.|
|000063b0| 58 20 20 69 66 20 28 63 | 69 6e 66 6f 2d 3e 64 65 |X if (c|info->de|
|000063c0| 73 74 20 3d 3d 20 4e 55 | 4c 4c 29 20 7b 09 2f 2a |st == NU|LL) {./*|
|000063d0| 20 66 69 72 73 74 20 74 | 69 6d 65 20 66 6f 72 20 | first t|ime for |
|000063e0| 74 68 69 73 20 4a 50 45 | 47 20 6f 62 6a 65 63 74 |this JPE|G object|
|000063f0| 3f 20 2a 2f 0a 58 20 20 | 20 20 63 69 6e 66 6f 2d |? */.X | cinfo-|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.