diff -cr xv-3.00a.orig/Makefile xv-3.00a/Makefile *** xv-3.00a.orig/Makefile Thu Apr 22 18:33:22 1993 --- xv-3.00a/Makefile Tue Jul 20 08:29:17 1993 *************** *** 4,17 **** # your C compiler (and options) of choice # if you want to use gcc, use this line, or something like it. ! # CC = gcc -g -traditional # CC = gcc -g -ansi -Dsparc ! CC = cc # if compiling on a Mips machine, (not a DECstation), try this: # CCOPTS = -Olimit 2000 -systype bsd43 ! CCOPTS = -O # if you're using a Sun running OpenWindows, you may want to add these two # options to the CCOPTS line, so it finds the libs and include files --- 4,17 ---- # your C compiler (and options) of choice # if you want to use gcc, use this line, or something like it. ! CC = gcc -g -traditional # CC = gcc -g -ansi -Dsparc ! #CC = cc # if compiling on a Mips machine, (not a DECstation), try this: # CCOPTS = -Olimit 2000 -systype bsd43 ! CCOPTS = -O -Dbsd43 -I/usr/X386/include # if you're using a Sun running OpenWindows, you may want to add these two # options to the CCOPTS line, so it finds the libs and include files *************** *** 190,196 **** $(UNIX) $(BSDTYPES) $(RAND) $(DXWM) \ $(SGI) $(SCO) $(HPUX7) $(UMAX) ! LIBS = -lX11 $(LIBJPEG) $(LIBTIFF) -lm BITMAPS = bitmaps/grasp bitmaps/penn bitmaps/down bitmaps/down1 \ bitmaps/up bitmaps/up1 bitmaps/scrlgray bitmaps/gray50 \ --- 190,196 ---- $(UNIX) $(BSDTYPES) $(RAND) $(DXWM) \ $(SGI) $(SCO) $(HPUX7) $(UMAX) ! LIBS = -L/usr/X386/lib -lX11 $(LIBJPEG) $(LIBTIFF) -lm BITMAPS = bitmaps/grasp bitmaps/penn bitmaps/down bitmaps/down1 \ bitmaps/up bitmaps/up1 bitmaps/scrlgray bitmaps/gray50 \ diff -cr xv-3.00a.orig/jpeg/Makefile xv-3.00a/jpeg/Makefile *** xv-3.00a.orig/jpeg/Makefile Thu Apr 22 18:32:27 1993 --- xv-3.00a/jpeg/Makefile Wed Aug 18 13:41:55 1993 *************** *** 1,20 **** # Makefile for Independent JPEG Group's software ! # This makefile is suitable for Unix-like systems with non-ANSI compilers. ! # If you have an ANSI compiler, makefile.ansi is a better starting point. # Read SETUP instructions before saying "make" !! ! # The name of your C compiler: (passed in from the XV Makefile) ! # CC= cc # You may need to adjust these cc options: ! CFLAGS= -O ${IPATH} ${CONF_LIBRARY} ! # In particular: # Add -DBSD if on a pure BSD system (see jinclude.h). - # Add -DVMS if on a VMS system (see ansi2knr.c). - # Add -DMSDOS if on an MSDOS system (see ansi2knr.c). # Add -DMEM_STATS to enable gathering of memory usage statistics. # You may also want to add -DTWO_FILE_COMMANDLINE or -D switches for other # symbols listed in jconfig.h, if you prefer not to change jconfig.h. --- 1,17 ---- # Makefile for Independent JPEG Group's software ! # This makefile is suitable for Unix-like systems with ANSI-capable compilers. ! # If you have a non-ANSI compiler, makefile.unix is a better starting point. # Read SETUP instructions before saying "make" !! ! # The name of your C compiler: ! CC= cc # You may need to adjust these cc options: ! CFLAGS= -O # In particular: # Add -DBSD if on a pure BSD system (see jinclude.h). # Add -DMEM_STATS to enable gathering of memory usage statistics. # You may also want to add -DTWO_FILE_COMMANDLINE or -D switches for other # symbols listed in jconfig.h, if you prefer not to change jconfig.h. *************** *** 35,43 **** RM= rm -f # library (.a) file creation command AR= ar rc ! ! # run ranlib, if this machine has one... ! AR2= ./RANLIB.csh # source files (independently compilable files) --- 32,39 ---- RM= rm -f # library (.a) file creation command AR= ar rc ! # second step in .a creation (use "touch" if not needed) ! AR2= ranlib # source files (independently compilable files) *************** *** 80,112 **** LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) ! all: ansi2knr cjpeg djpeg # By default, libjpeg.a is not built unless you explicitly request it. # You can add libjpeg.a to the line above if you want it built by default. ! # This rule causes ansi2knr to be invoked. If you use this makefile, ! # make sure PROTO is not defined by jconfig.h. ! ! .c.o: ! ./ansi2knr $*.c tmpansi.c ! $(CC) $(CFLAGS) -c tmpansi.c ! mv tmpansi.o $*.o ! $(RM) tmpansi.c ! ! ansi2knr: ansi2knr.c ! $(CC) $(CFLAGS) -o ansi2knr ansi2knr.c ! ! ! cjpeg: ansi2knr $(COBJECTS) $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS) ! djpeg: ansi2knr $(DOBJECTS) $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) $(LDLIBS) # libjpeg.a is useful if you are including the JPEG software in a larger # program; you'd include it in your link, rather than the individual modules. ! libjpeg.a: ansi2knr $(LIBOBJECTS) $(RM) libjpeg.a $(AR) libjpeg.a $(LIBOBJECTS) $(AR2) libjpeg.a --- 76,95 ---- LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) ! all: cjpeg djpeg # By default, libjpeg.a is not built unless you explicitly request it. # You can add libjpeg.a to the line above if you want it built by default. ! cjpeg: $(COBJECTS) $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS) ! djpeg: $(DOBJECTS) $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) $(LDLIBS) # libjpeg.a is useful if you are including the JPEG software in a larger # program; you'd include it in your link, rather than the individual modules. ! libjpeg.a: $(LIBOBJECTS) $(RM) libjpeg.a $(AR) libjpeg.a $(LIBOBJECTS) $(AR2) libjpeg.a *************** *** 117,123 **** exit 1 clean: ! $(RM) *.o cjpeg djpeg libjpeg.a ansi2knr core tmpansi.* testout.* distribute: $(RM) jpegsrc.tar* --- 100,106 ---- exit 1 clean: ! $(RM) *.o cjpeg djpeg libjpeg.a core testout.* distribute: $(RM) jpegsrc.tar* diff -cr xv-3.00a.orig/jpeg/jmemsys.c xv-3.00a/jpeg/jmemsys.c *** xv-3.00a.orig/jpeg/jmemsys.c Thu Apr 22 18:32:27 1993 --- xv-3.00a/jpeg/jmemsys.c Tue Jul 20 08:29:52 1993 *************** *** 1,15 **** /* ! * jmemansi.c (jmemsys.c) * * Copyright (C) 1992, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * ! * This file provides a simple generic implementation of the system- * dependent portion of the JPEG memory manager. This implementation ! * assumes that you have the ANSI-standard library routine tmpfile(). ! * Also, the problem of determining the amount of memory available ! * is shoved onto the user. */ #include "jinclude.h" --- 1,18 ---- /* ! * jmemnobs.c (jmemsys.c) * * Copyright (C) 1992, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * ! * This file provides a really simple implementation of the system- * dependent portion of the JPEG memory manager. This implementation ! * assumes that no backing-store files are needed: all required space ! * can be obtained from malloc(). ! * This is very portable in the sense that it'll compile on almost anything, ! * but you'd better have lots of main memory (or virtual memory) if you want ! * to process big images. ! * Note that the max_memory_to_use option is ignored by this implementation. */ #include "jinclude.h" *************** *** 22,36 **** extern void free PP((void *ptr)); #endif - #ifndef SEEK_SET /* pre-ANSI systems may not define this; */ - #define SEEK_SET 0 /* if not, assume 0 is correct */ - #endif - static external_methods_ptr methods; /* saved for access to error_exit */ - static long total_used; /* total memory requested so far */ - /* * Memory allocation and freeing are controlled by the regular library --- 25,33 ---- *************** *** 40,46 **** GLOBAL void * jget_small (size_t sizeofobject) { - total_used += sizeofobject; return (void *) malloc(sizeofobject); } --- 37,42 ---- *************** *** 58,138 **** /* * This routine computes the total memory space available for allocation. ! * It's impossible to do this in a portable way; our current solution is ! * to make the user tell us (with a default value set at compile time). ! * If you can actually get the available space, it's a good idea to subtract ! * a slop factor of 5% or so. */ - #ifndef DEFAULT_MAX_MEM /* so can override from makefile */ - #define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ - #endif - GLOBAL long jmem_available (long min_bytes_needed, long max_bytes_needed) { ! return methods->max_memory_to_use - total_used; } /* * Backing store (temporary file) management. ! * Backing store objects are only used when the value returned by ! * jmem_available is less than the total space needed. You can dispense ! * with these routines if you have plenty of virtual memory; see jmemnobs.c. ! */ ! ! ! METHODDEF void ! read_backing_store (backing_store_ptr info, void FAR * buffer_address, ! long file_offset, long byte_count) ! { ! if (fseek(info->temp_file, file_offset, SEEK_SET)) ! ERREXIT(methods, "fseek failed on temporary file"); ! if (JFREAD(info->temp_file, buffer_address, byte_count) ! != (size_t) byte_count) ! ERREXIT(methods, "fread failed on temporary file"); ! } ! ! ! METHODDEF void ! write_backing_store (backing_store_ptr info, void FAR * buffer_address, ! long file_offset, long byte_count) ! { ! if (fseek(info->temp_file, file_offset, SEEK_SET)) ! ERREXIT(methods, "fseek failed on temporary file"); ! if (JFWRITE(info->temp_file, buffer_address, byte_count) ! != (size_t) byte_count) ! ERREXIT(methods, "fwrite failed on temporary file --- out of disk space?"); ! } ! ! ! METHODDEF void ! close_backing_store (backing_store_ptr info) ! { ! fclose(info->temp_file); ! /* Since this implementation uses tmpfile() to create the file, ! * no explicit file deletion is needed. ! */ ! } ! ! ! /* ! * Initial opening of a backing-store object. ! * ! * This version uses tmpfile(), which constructs a suitable file name ! * behind the scenes. We don't have to use temp_name[] at all; ! * indeed, we can't even find out the actual name of the temp file. */ GLOBAL void jopen_backing_store (backing_store_ptr info, long total_bytes_needed) { ! if ((info->temp_file = tmpfile()) == NULL) ! ERREXIT(methods, "Failed to create temporary file"); ! info->read_backing_store = read_backing_store; ! info->write_backing_store = write_backing_store; ! info->close_backing_store = close_backing_store; } --- 54,78 ---- /* * This routine computes the total memory space available for allocation. ! * Here we always say, "we got all you want bud!" */ GLOBAL long jmem_available (long min_bytes_needed, long max_bytes_needed) { ! return max_bytes_needed; } /* * Backing store (temporary file) management. ! * This should never be called and we just error out. */ GLOBAL void jopen_backing_store (backing_store_ptr info, long total_bytes_needed) { ! ERREXIT(methods, "Backing store not supported"); } *************** *** 146,153 **** jmem_init (external_methods_ptr emethods) { methods = emethods; /* save struct addr for error exit access */ ! emethods->max_memory_to_use = DEFAULT_MAX_MEM; ! total_used = 0; } GLOBAL void --- 86,92 ---- jmem_init (external_methods_ptr emethods) { methods = emethods; /* save struct addr for error exit access */ ! emethods->max_memory_to_use = 0; } GLOBAL void Only in xv-3.00a/jpeg: tmpansi.c diff -cr xv-3.00a.orig/tiff/Makefile xv-3.00a/tiff/Makefile *** xv-3.00a.orig/tiff/Makefile Thu Apr 22 18:32:52 1993 --- xv-3.00a/tiff/Makefile Tue Jul 20 08:53:38 1993 *************** *** 138,143 **** clean: rm -f ${ALL} ${OBJS} core a.out mkg3states g3states.h ! tags: ${SRCS} ${CTAGS} ${SRCS} --- 138,143 ---- clean: rm -f ${ALL} ${OBJS} core a.out mkg3states g3states.h ! tags: ${SRCS} ${CTAGS} ${SRCS}