home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume29 / jpeg / part18 < prev    next >
Text File  |  1992-03-28  |  19KB  |  586 lines

  1. Newsgroups: comp.sources.misc
  2. From: jpeg-info@uunet.uu.net (Independent JPEG Group)
  3. Subject:  v29i018:  jpeg - JPEG image compression, Part18/18
  4. Message-ID: <1992Mar25.145519.979@sparky.imd.sterling.com>
  5. X-Md4-Signature: 2094afb0b53294cbac3c8b123bf6bfcf
  6. Date: Wed, 25 Mar 1992 14:55:19 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: jpeg-info@uunet.uu.net (Independent JPEG Group)
  10. Posting-number: Volume 29, Issue 18
  11. Archive-name: jpeg/part18
  12. Environment: UNIX, VMS, MS-DOS, Mac, Amiga, Cray
  13.  
  14. #! /bin/sh
  15. # into a shell via "sh file" or similar.  To overwrite existing files,
  16. # type "sh file -c".
  17. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  18. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  19. # Contents:  CHANGELOG codingrules jcexpand.c jcsample.c jutils.c
  20. # Wrapped by kent@sparky on Mon Mar 23 16:02:58 1992
  21. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  22. echo If this archive is complete, you will see the following message:
  23. echo '          "shar: End of archive 18 (of 18)."'
  24. if test -f 'CHANGELOG' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'CHANGELOG'\"
  26. else
  27.   echo shar: Extracting \"'CHANGELOG'\" \(2869 characters\)
  28.   sed "s/^X//" >'CHANGELOG' <<'END_OF_FILE'
  29. XCHANGELOG for Independent JPEG Group's JPEG software
  30. X
  31. XVersion 3  17-Mar-92
  32. X--------------------
  33. X
  34. XMemory manager is finally capable of swapping to temp files.  There are
  35. Xseparate versions of jmemsys.c for no temp files (same behavior as older
  36. Xversions), simple temp files with or without tmpfile(), and a DOS-specific
  37. Xversion (including special code for EMS and XMS).  This is probably much more
  38. Xsystem-dependent than any of the older code; some bugs may surface here.
  39. X
  40. XHooks added for user interface to install progress monitoring routine
  41. X(percent-done bar, etc).  See comments with dummy progress_monitor
  42. Xroutines in jcdeflts.c, jddeflts.c.
  43. X
  44. XTwo-pass color quantization (finally!).  This is now the default method when
  45. Xquantizing; say '-1' to djpeg for quick-and-ugly 1-pass method.  There is
  46. Xa test file for checking 2-pass quantization and GIF output.
  47. X
  48. XFixed bug in jcopy_block_row that broke cjpeg -o option and djpeg -b option
  49. Xon MSDOS machines.
  50. X
  51. XMiscellaneous small speedups; notably, DCT computation rearranged so that
  52. XGCC "inline" feature is no longer needed for good code quality.
  53. X
  54. XFile config.c renamed ckconfig.c to avoid name conflict with /etc/config
  55. Xon Unix systems.
  56. X
  57. XAdded example.c to document usage of JPEG subroutines better.
  58. X
  59. XMemory manager now knows how to release all storage during error exit ---
  60. Xavoids memory leak when using JPEG as subroutines.  This implies a couple
  61. Xsmall changes to the subroutine interface: the old free_defaults subroutines
  62. Xare no longer needed, but if you have a replacement error_exit method then it
  63. Xmust call the new free_all method.  Also, jselvirtmem renamed to jselmemmgr.
  64. X
  65. XCode for reading Targa files with 32-bit pixels was incorrect.
  66. X
  67. XColorspace conversion slightly faster and more accurate; because of
  68. Xthis, old "test" files will no longer match bit-for-bit.
  69. X
  70. X
  71. XVersion 2  13-Dec-91
  72. X--------------------
  73. X
  74. XDocumentation improved a little --- there are man pages now.
  75. XInstallation instructions moved from README to a separate file SETUP.
  76. X
  77. XNew program config.c is provided to help you get the configuration options
  78. Xright.  This should make installation a lot more foolproof.
  79. X
  80. XSense of djpeg -D switch reversed: dithering is now ON by default.
  81. X
  82. XRLE image file support added (thanks to Mike Lijewski).
  83. X
  84. XTarga image file support added (thanks to Lee Crocker).
  85. X
  86. XPPM input now accepts all PPM and PGM files.
  87. X
  88. XBug fix: on machines where 'int' is 16 bits, high-Q-setting JPEG files
  89. Xwere not decoded correctly.
  90. X
  91. XNumerous changes to improve portability.  There should be few or no compiler
  92. Xwarnings now.
  93. X
  94. XMakefiles cleaned up; defaults now appropriate for production use rather than
  95. Xdebugging.
  96. X
  97. XSubroutine interface cleaned up.  If you wrote code based on version 1's
  98. Xjcmain/jdmain, you'll need to change it, but it should get a little shorter
  99. Xand simpler.
  100. X
  101. X
  102. XVersion 1   7-Oct-91
  103. X--------------------
  104. X
  105. XInitial public release.
  106. END_OF_FILE
  107.   if test 2869 -ne `wc -c <'CHANGELOG'`; then
  108.     echo shar: \"'CHANGELOG'\" unpacked with wrong size!
  109.   fi
  110.   # end of 'CHANGELOG'
  111. fi
  112. if test -f 'codingrules' -a "${1}" != "-c" ; then 
  113.   echo shar: Will not clobber existing file \"'codingrules'\"
  114. else
  115.   echo shar: Extracting \"'codingrules'\" \(3948 characters\)
  116.   sed "s/^X//" >'codingrules' <<'END_OF_FILE'
  117. X
  118. X    JPEG SYSTEM CODING RULES        27-SEP-91
  119. X
  120. XSince numerous people will be contributing code and bug fixes, it's important
  121. Xto establish a common coding style.  The goal of using similar coding styles
  122. Xis much more important than the details of just what that style is.
  123. X
  124. XI suggest we follow the recommendations of "Recommended C Style and Coding
  125. XStandards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
  126. XBrader).  I have placed a copy of this document in the jpeg FTP archive (see
  127. Xjpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
  128. X
  129. XUnless someone has a real strong objection, let's do block comments thusly:
  130. X
  131. X/*
  132. X *  Block comments in this style.
  133. X */
  134. X
  135. Xand indent statements in K&R style, e.g.,
  136. X
  137. X    if (test) {
  138. X        then-part;
  139. X    } else {
  140. X        else-part;
  141. X    }
  142. X
  143. XI suggest that multi-word names be written in the style multi_word_name
  144. Xrather than multiWordName, but I am open to argument on this.
  145. X
  146. X
  147. XI would like to use function prototypes everywhere, and rely on automatic
  148. Xsource code transformation to feed non-ANSI C compilers.  The best tool
  149. XI have so far found for this is 'ansi2knr.c', which is part of Ghostscript.
  150. Xansi2knr is not very bright, so it imposes a format requirement on function
  151. Xdeclarations: the function name MUST BEGIN IN COLUMN 1.  Thus all functions
  152. Xshould be written in the following style:
  153. X
  154. Xstatic int *
  155. Xfunction_name (int a, char *b)
  156. X{
  157. X    code...
  158. X}
  159. X
  160. Xansi2knr won't help with method declarations (function pointers in structs).
  161. XI suggest we use a macro to declare method pointers, something like this:
  162. X
  163. X#ifdef PROTO
  164. X#define METHOD(type,methodname,arglist)  type (*methodname) arglist
  165. X#else
  166. X#define METHOD(type,methodname,arglist)  type (*methodname) ()
  167. X#endif
  168. X
  169. Xwhich is used like this:
  170. X
  171. Xstruct function_pointers {
  172. X    METHOD(void, init_entropy_encoder, (functptrs fptrs, jparms *jp));
  173. X    METHOD(void, term_entropy_encoder, (void));
  174. X};
  175. X
  176. XNote the set of parentheses surrounding the parameter list.
  177. X
  178. XA similar solution is used for external function declarations (see the PP
  179. Xmacro in jpegdata.h).
  180. X
  181. XIf the code is to work on non-ANSI compilers, you cannot rely on a prototype
  182. Xdeclaration to coerce actual parameters into the right types.  Therefore, use
  183. Xexplicit casts on actual parameters whenever the actual parameter type is not
  184. Xidentical to the formal parameter.  Beware of implicit conversions to "int".
  185. X
  186. XIt seems there are some non-ANSI compilers in which the sizeof() operator
  187. Xis defined to return int, while size_t is defined as long.  Needless to say,
  188. Xthis is brain-damaged.  Always use the SIZEOF() macro in place of sizeof(),
  189. Xso that the result is guaranteed to be of type size_t.
  190. X
  191. X
  192. XWe can expect that the JPEG compressor and decompressor will be incorporated
  193. Xinto larger programs.  Therefore, the following rules are important:
  194. X
  195. X1. Avoid direct use of any file I/O, "malloc", error report printouts, etc;
  196. Xpass these through the common routines provided.
  197. X
  198. X2. Assume that the JPEG code may be invoked more than once per program run;
  199. Xtherefore, do not rely on static initialization of variables, and be careful
  200. Xto release all allocated storage at the end of processing.
  201. X
  202. X3. Minimize global namespace pollution.  Functions should be declared static
  203. Xwherever possible.  (Note that our method-based calling conventions help this
  204. Xa lot: in many modules only the method-selector function will ever need to be
  205. Xcalled directly, so only that function need be externally visible.)  All
  206. Xglobal function names should begin with "j", and should be unique in the first
  207. Xsix characters for portability reasons.
  208. XDon't use global variables at all; anything that must be used in another
  209. Xmodule should be put into parameters (there'll be some large structs passed
  210. Xaround for this purpose).
  211. X
  212. X4. Source file names should also begin with "j"; remember to keep them to
  213. Xeight characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers.
  214. XDo not put code for both compression and decompression into the same source
  215. Xfile.
  216. END_OF_FILE
  217.   if test 3948 -ne `wc -c <'codingrules'`; then
  218.     echo shar: \"'codingrules'\" unpacked with wrong size!
  219.   fi
  220.   # end of 'codingrules'
  221. fi
  222. if test -f 'jcexpand.c' -a "${1}" != "-c" ; then 
  223.   echo shar: Will not clobber existing file \"'jcexpand.c'\"
  224. else
  225.   echo shar: Extracting \"'jcexpand.c'\" \(1947 characters\)
  226.   sed "s/^X//" >'jcexpand.c' <<'END_OF_FILE'
  227. X/*
  228. X * jcexpand.c
  229. X *
  230. X * Copyright (C) 1991, 1992, Thomas G. Lane.
  231. X * This file is part of the Independent JPEG Group's software.
  232. X * For conditions of distribution and use, see the accompanying README file.
  233. X *
  234. X * This file contains image edge-expansion routines.
  235. X * These routines are invoked via the edge_expand method.
  236. X */
  237. X
  238. X#include "jinclude.h"
  239. X
  240. X
  241. X/*
  242. X * Expand an image so that it is a multiple of the MCU dimensions.
  243. X * This is to be accomplished by duplicating the rightmost column
  244. X * and/or bottommost row of pixels.  The image has not yet been
  245. X * subsampled, so all components have the same dimensions.
  246. X */
  247. X
  248. XMETHODDEF void
  249. Xedge_expand (compress_info_ptr cinfo,
  250. X         long input_cols, int input_rows,
  251. X         long output_cols, int output_rows,
  252. X         JSAMPIMAGE image_data)
  253. X{
  254. X  /* Expand horizontally */
  255. X  if (input_cols < output_cols) {
  256. X    register JSAMPROW ptr;
  257. X    register JSAMPLE pixval;
  258. X    register long count;
  259. X    register int row;
  260. X    short ci;
  261. X    long numcols = output_cols - input_cols;
  262. X
  263. X    for (ci = 0; ci < cinfo->num_components; ci++) {
  264. X      for (row = 0; row < input_rows; row++) {
  265. X    ptr = image_data[ci][row] + (input_cols-1);
  266. X    pixval = GETJSAMPLE(*ptr++);
  267. X    for (count = numcols; count > 0; count--)
  268. X      *ptr++ = pixval;
  269. X      }
  270. X    }
  271. X  }
  272. X
  273. X  /* Expand vertically */
  274. X  /* This happens only once at the bottom of the image, */
  275. X  /* so it needn't be super-efficient */
  276. X  if (input_rows < output_rows) {
  277. X    register int row;
  278. X    short ci;
  279. X    JSAMPARRAY this_component;
  280. X
  281. X    for (ci = 0; ci < cinfo->num_components; ci++) {
  282. X      this_component = image_data[ci];
  283. X      for (row = input_rows; row < output_rows; row++) {
  284. X    jcopy_sample_rows(this_component, input_rows-1, this_component, row,
  285. X              1, output_cols);
  286. X      }
  287. X    }
  288. X  }
  289. X}
  290. X
  291. X
  292. X/*
  293. X * The method selection routine for edge expansion.
  294. X */
  295. X
  296. XGLOBAL void
  297. Xjselexpand (compress_info_ptr cinfo)
  298. X{
  299. X  /* just one implementation for now */
  300. X  cinfo->methods->edge_expand = edge_expand;
  301. X}
  302. END_OF_FILE
  303.   if test 1947 -ne `wc -c <'jcexpand.c'`; then
  304.     echo shar: \"'jcexpand.c'\" unpacked with wrong size!
  305.   fi
  306.   # end of 'jcexpand.c'
  307. fi
  308. if test -f 'jcsample.c' -a "${1}" != "-c" ; then 
  309.   echo shar: Will not clobber existing file \"'jcsample.c'\"
  310. else
  311.   echo shar: Extracting \"'jcsample.c'\" \(3761 characters\)
  312.   sed "s/^X//" >'jcsample.c' <<'END_OF_FILE'
  313. X/*
  314. X * jcsample.c
  315. X *
  316. X * Copyright (C) 1991, 1992, Thomas G. Lane.
  317. X * This file is part of the Independent JPEG Group's software.
  318. X * For conditions of distribution and use, see the accompanying README file.
  319. X *
  320. X * This file contains subsampling routines.
  321. X * These routines are invoked via the subsample and
  322. X * subsample_init/term methods.
  323. X */
  324. X
  325. X#include "jinclude.h"
  326. X
  327. X
  328. X/*
  329. X * Initialize for subsampling a scan.
  330. X */
  331. X
  332. XMETHODDEF void
  333. Xsubsample_init (compress_info_ptr cinfo)
  334. X{
  335. X  /* no work for now */
  336. X}
  337. X
  338. X
  339. X/*
  340. X * Subsample pixel values of a single component.
  341. X * This version only handles integral sampling ratios.
  342. X */
  343. X
  344. XMETHODDEF void
  345. Xsubsample (compress_info_ptr cinfo, int which_component,
  346. X       long input_cols, int input_rows,
  347. X       long output_cols, int output_rows,
  348. X       JSAMPARRAY above, JSAMPARRAY input_data, JSAMPARRAY below,
  349. X       JSAMPARRAY output_data)
  350. X{
  351. X  jpeg_component_info * compptr = cinfo->cur_comp_info[which_component];
  352. X  int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v;
  353. X  long outcol;
  354. X  JSAMPROW inptr, outptr;
  355. X  INT32 outvalue;
  356. X
  357. X  /* TEMP FOR DEBUGGING PIPELINE CONTROLLER */
  358. X  if (output_rows != compptr->v_samp_factor ||
  359. X      input_rows != cinfo->max_v_samp_factor ||
  360. X      (output_cols % compptr->h_samp_factor) != 0 ||
  361. X      (input_cols % cinfo->max_h_samp_factor) != 0 ||
  362. X      input_cols*compptr->h_samp_factor != output_cols*cinfo->max_h_samp_factor)
  363. X    ERREXIT(cinfo->emethods, "Bogus subsample parameters");
  364. X
  365. X  h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor;
  366. X  v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor;
  367. X  numpix = h_expand * v_expand;
  368. X  numpix2 = numpix/2;
  369. X
  370. X  inrow = 0;
  371. X  for (outrow = 0; outrow < output_rows; outrow++) {
  372. X    outptr = output_data[outrow];
  373. X    for (outcol = 0; outcol < output_cols; outcol++) {
  374. X      outvalue = 0;
  375. X      for (v = 0; v < v_expand; v++) {
  376. X    inptr = input_data[inrow+v] + (outcol*h_expand);
  377. X    for (h = 0; h < h_expand; h++) {
  378. X      outvalue += (INT32) GETJSAMPLE(*inptr++);
  379. X    }
  380. X      }
  381. X      *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix);
  382. X    }
  383. X    inrow += v_expand;
  384. X  }
  385. X}
  386. X
  387. X
  388. X/*
  389. X * Subsample pixel values of a single component.
  390. X * This version handles the special case of a full-size component.
  391. X */
  392. X
  393. XMETHODDEF void
  394. Xfullsize_subsample (compress_info_ptr cinfo, int which_component,
  395. X            long input_cols, int input_rows,
  396. X            long output_cols, int output_rows,
  397. X            JSAMPARRAY above, JSAMPARRAY input_data, JSAMPARRAY below,
  398. X            JSAMPARRAY output_data)
  399. X{
  400. X  if (input_cols != output_cols || input_rows != output_rows) /* DEBUG */
  401. X    ERREXIT(cinfo->emethods, "Pipeline controller messed up");
  402. X
  403. X  jcopy_sample_rows(input_data, 0, output_data, 0, output_rows, output_cols);
  404. X}
  405. X
  406. X
  407. X/*
  408. X * Clean up after a scan.
  409. X */
  410. X
  411. XMETHODDEF void
  412. Xsubsample_term (compress_info_ptr cinfo)
  413. X{
  414. X  /* no work for now */
  415. X}
  416. X
  417. X
  418. X
  419. X/*
  420. X * The method selection routine for subsampling.
  421. X * Note that we must select a routine for each component.
  422. X */
  423. X
  424. XGLOBAL void
  425. Xjselsubsample (compress_info_ptr cinfo)
  426. X{
  427. X  short ci;
  428. X  jpeg_component_info * compptr;
  429. X
  430. X  if (cinfo->CCIR601_sampling)
  431. X    ERREXIT(cinfo->emethods, "CCIR601 subsampling not implemented yet");
  432. X
  433. X  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
  434. X    compptr = cinfo->cur_comp_info[ci];
  435. X    if (compptr->h_samp_factor == cinfo->max_h_samp_factor &&
  436. X    compptr->v_samp_factor == cinfo->max_v_samp_factor)
  437. X      cinfo->methods->subsample[ci] = fullsize_subsample;
  438. X    else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 &&
  439. X         (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0)
  440. X      cinfo->methods->subsample[ci] = subsample;
  441. X    else
  442. X      ERREXIT(cinfo->emethods, "Fractional subsampling not implemented yet");
  443. X  }
  444. X
  445. X  cinfo->methods->subsample_init = subsample_init;
  446. X  cinfo->methods->subsample_term = subsample_term;
  447. X}
  448. END_OF_FILE
  449.   if test 3761 -ne `wc -c <'jcsample.c'`; then
  450.     echo shar: \"'jcsample.c'\" unpacked with wrong size!
  451.   fi
  452.   # end of 'jcsample.c'
  453. fi
  454. if test -f 'jutils.c' -a "${1}" != "-c" ; then 
  455.   echo shar: Will not clobber existing file \"'jutils.c'\"
  456. else
  457.   echo shar: Extracting \"'jutils.c'\" \(2942 characters\)
  458.   sed "s/^X//" >'jutils.c' <<'END_OF_FILE'
  459. X/*
  460. X * jutils.c
  461. X *
  462. X * Copyright (C) 1991, 1992, Thomas G. Lane.
  463. X * This file is part of the Independent JPEG Group's software.
  464. X * For conditions of distribution and use, see the accompanying README file.
  465. X *
  466. X * This file contains miscellaneous utility routines needed for both
  467. X * compression and decompression.
  468. X * Note we prefix all global names with "j" to minimize conflicts with
  469. X * a surrounding application.
  470. X */
  471. X
  472. X#include "jinclude.h"
  473. X
  474. X
  475. XGLOBAL long
  476. Xjround_up (long a, long b)
  477. X/* Compute a rounded up to next multiple of b; a >= 0, b > 0 */
  478. X{
  479. X  a += b-1;
  480. X  return a - (a % b);
  481. X}
  482. X
  483. X
  484. XGLOBAL void
  485. Xjcopy_sample_rows (JSAMPARRAY input_array, int source_row,
  486. X           JSAMPARRAY output_array, int dest_row,
  487. X           int num_rows, long num_cols)
  488. X/* Copy some rows of samples from one place to another.
  489. X * num_rows rows are copied from input_array[source_row++]
  490. X * to output_array[dest_row++]; these areas should not overlap.
  491. X * The source and destination arrays must be at least as wide as num_cols.
  492. X */
  493. X{
  494. X  /* On normal machines we can use memcpy().  This won't work on 80x86 because
  495. X   * the sample arrays are FAR and we're assuming a small-pointer memory model.
  496. X   */
  497. X  register JSAMPROW inptr, outptr;
  498. X#ifdef NEED_FAR_POINTERS
  499. X  register long count;
  500. X#else
  501. X  register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));
  502. X#endif
  503. X  register int row;
  504. X
  505. X  input_array += source_row;
  506. X  output_array += dest_row;
  507. X
  508. X  for (row = num_rows; row > 0; row--) {
  509. X    inptr = *input_array++;
  510. X    outptr = *output_array++;
  511. X#ifdef NEED_FAR_POINTERS
  512. X    for (count = num_cols; count > 0; count--)
  513. X      *outptr++ = *inptr++;    /* needn't bother with GETJSAMPLE() here */
  514. X#else
  515. X    memcpy((void *) outptr, (void *) inptr, count);
  516. X#endif
  517. X  }
  518. X}
  519. X
  520. X
  521. XGLOBAL void
  522. Xjcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, long num_blocks)
  523. X/* Copy a row of coefficient blocks from one place to another. */
  524. X{
  525. X  /* On normal machines we can use memcpy().  This won't work on 80x86 because
  526. X   * the block arrays are FAR and we're assuming a small-pointer memory model.
  527. X   */
  528. X#ifdef NEED_FAR_POINTERS
  529. X  register JCOEFPTR inptr, outptr;
  530. X  register long count;
  531. X
  532. X  inptr = (JCOEFPTR) input_row;
  533. X  outptr = (JCOEFPTR) output_row;
  534. X  for (count = num_blocks * DCTSIZE2; count > 0; count--) {
  535. X    *outptr++ = *inptr++;
  536. X  }
  537. X#else
  538. X    memcpy((void *) output_row, (void *) input_row,
  539. X       (size_t) (num_blocks * (DCTSIZE2 * SIZEOF(JCOEF))));
  540. X#endif
  541. X}
  542. X
  543. X
  544. XGLOBAL void
  545. Xjzero_far (void FAR * target, size_t bytestozero)
  546. X/* Zero out a chunk of FAR memory. */
  547. X/* This might be sample-array data, block-array data, or alloc_medium data. */
  548. X{
  549. X  /* On normal machines we can use MEMZERO().  This won't work on 80x86
  550. X   * because we're assuming a small-pointer memory model.
  551. X   */
  552. X#ifdef NEED_FAR_POINTERS
  553. X  register char FAR * ptr = (char FAR *) target;
  554. X  register size_t count;
  555. X
  556. X  for (count = bytestozero; count > 0; count--) {
  557. X    *ptr++ = 0;
  558. X  }
  559. X#else
  560. X  MEMZERO((void *) target, bytestozero);
  561. X#endif
  562. X}
  563. END_OF_FILE
  564.   if test 2942 -ne `wc -c <'jutils.c'`; then
  565.     echo shar: \"'jutils.c'\" unpacked with wrong size!
  566.   fi
  567.   # end of 'jutils.c'
  568. fi
  569. echo shar: End of archive 18 \(of 18\).
  570. cp /dev/null ark18isdone
  571. MISSING=""
  572. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do
  573.     if test ! -f ark${I}isdone ; then
  574.     MISSING="${MISSING} ${I}"
  575.     fi
  576. done
  577. if test "${MISSING}" = "" ; then
  578.     echo You have unpacked all 18 archives.
  579.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  580. else
  581.     echo You still must unpack the following archives:
  582.     echo "        " ${MISSING}
  583. fi
  584. exit 0
  585. exit 0 # Just in case...
  586.