Lines Matching refs:FILE
5 * This file is part of the Independent JPEG Group's software.
6 * For conditions of distribution and use, see the accompanying README file.
8 * This file contains a very simple stand-alone application that inserts
9 * user-supplied text as a COM (comment) marker in a JFIF file.
71 * These macros are used to read the input file and write the output file.
75 static FILE * infile; /* input JPEG file */
80 static FILE * outfile; /* output JPEG file */
98 ERREXIT("Premature EOF in JPEG file");
111 ERREXIT("Premature EOF in JPEG file");
114 ERREXIT("Premature EOF in JPEG file");
119 /* Routines to write data to output file */
179 * to pad the file. (Padding FFs will NOT be replicated in the output file.)
206 fprintf(stderr, "Warning: garbage data found in JPEG file\n");
215 * For a JFIF file, the first two bytes of the file should be literally
217 * input file weren't actually JPEG at all, next_marker might read the whole
218 * file and then return a misleading error message...
229 ERREXIT("Not a JPEG file");
293 /* Expect SOI at start of file */
354 fprintf(stderr, "wrjpgcom inserts a textual comment in a JPEG file.\n");
367 fprintf(stderr, " -cfile name Read comment from named file\n");
375 fprintf(stderr, "You must specify an input JPEG file name when supplying\n");
419 FILE * comment_file = NULL;
436 break; /* not switch, must be file name */
478 * from stdin; in this case there MUST be an input JPEG file name.
483 /* Open the input file. */
490 /* default input file is stdin */
491 #ifdef USE_SETMODE /* need to hack file mode? */
504 /* Open the output file. */
506 /* Must have explicit output file name */
508 fprintf(stderr, "%s: must name one input and one output file\n",
517 /* Unix style: expect zero or one file name */
519 fprintf(stderr, "%s: only one input file\n", progname);
522 /* default output file is stdout */
523 #ifdef USE_SETMODE /* need to hack file mode? */
538 FILE * src_file;
574 /* Duplicate the remainder of the source file.