diff -rcB jpegdir/SETUP jpegdir_patched/SETUP *** jpegdir/SETUP 2012-02-10 12:32:23.000000000 -0500 --- jpegdir_patched/SETUP 2012-02-10 12:30:35.000000000 -0500 *************** *** 30,35 **** --- 30,39 ---- and then remade, in which case, the lexer.c file will be older because is lexically of lesser value than lexer.l. This is a potential bug. + For recent MacOS versions, need to changer lexer.l to specify + "%option noyywrap" outside the "%{ ...}%" section and remove the + "#define yywrap() 1" definition. + 3) Testing the program. Two small test files are nonint.jpg and blkint.jpg. If you wish to Only in jpegdir: lexer.c diff -rcB jpegdir/lexer.l jpegdir_patched/lexer.l *** jpegdir/lexer.l 1995-03-01 20:57:15.000000000 -0500 --- jpegdir_patched/lexer.l 2012-02-10 12:28:37.000000000 -0500 *************** *** 15,28 **** Video Research Group (PVRG) code, and not by any author(s) (or Stanford University) name. *************************************************************/ - %{ - /*LABEL lexer.c */ ! /* Redefine the yywrap so that we don't have ! to worry about lex library */ ! # define yywrap() (1) static char *ReservedWords[] = { /* Token names */ "COMPONENT", --- 15,27 ---- Video Research Group (PVRG) code, and not by any author(s) (or Stanford University) name. *************************************************************/ ! %option noyywrap ! %{ ! ! /*LABEL lexer.c */ static char *ReservedWords[] = { /* Token names */ "COMPONENT", diff -rcB jpegdir/makefile jpegdir_patched/makefile *** jpegdir/makefile 2012-02-10 12:32:23.000000000 -0500 --- jpegdir_patched/makefile 2012-02-10 12:24:20.000000000 -0500 *************** *** 12,20 **** #DEFINES = -DSYSV -DNOTRUNCATE # ! DEFINES = -DFCNTL_FOR_O_RDONLY CC = gcc ! #LEXARGS = -ll JFLAGS = -O DEFS = system.h globals.h prototypes.h param.h BASELINE = jpeg.o codec.o huffman.o io.o chendct.o leedct.o lexer.o marker.o stream.o transform.o --- 12,20 ---- #DEFINES = -DSYSV -DNOTRUNCATE # ! #DEFINES = -DFCNTL_FOR_O_RDONLY CC = gcc ! LEXARGS = -ll JFLAGS = -O DEFS = system.h globals.h prototypes.h param.h BASELINE = jpeg.o codec.o huffman.o io.o chendct.o leedct.o lexer.o marker.o stream.o transform.o