tom@tnosoes.UUCP (Tom Vijlbrief) (09/19/88)
These diffs and config.h file allow compilation of Larry Walls patch program (patchlevel 11) with Microsoft C 4.00. Tom Vijlbrief #---cut here---cut here---cut here---cut here---cut here--- #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files. # This archive created: Mon Sep 19 14:47:13 MET DST 1988 # Archived by: tnosoes!tom@mcvax.cwi.nl export PATH; PATH=/bin:$PATH echo shar: extracting "'README'" '(542 characters)' if test -f 'README' then echo shar: will not over-write existing file "'README'" else sed 's/^X//' << \SHAR_EOF > 'README' XThese diffs and config.h file allow compilation of XLarry Walls patch program (patchlevel 11) with Microsoft C 4.00. X XThe binary has been posted to comp.binaries.ibm.pc X XTom Vijlbrief (17/9/88) X X=============================================================================== XTom Vijlbrief XTNO Institute for Perception XP.O. Box 23 Phone: +31 34 63 62 77 X3769 DE Soesterberg E-mail: tnosoes!tom@mcvax.cwi.nl XThe Netherlands or: uunet!mcvax!tnosoes!tom X=============================================================================== SHAR_EOF if test 542 -ne "`wc -c < 'README'`" then echo shar: error transmitting "'README'" '(should have been 542 characters)' fi fi # end of overwriting check echo shar: extracting "'config.h'" '(757 characters)' if test -f 'config.h' then echo shar: will not over-write existing file "'config.h'" else sed 's/^X//' << \SHAR_EOF > 'config.h' X/* config.h X * This file was produced by running the Configure script. X * Feel free to modify any of this as the need arises. X */ X X X#/*undef EUNICE /* no file linking? */ X#/*undef VMS /* other assorted ickies? */ X X#define index strchr /* cultural */ X#define rindex strrchr /* differences? */ X X#/*undef void int /* is void to be avoided? */ X X/* How many register declarations are paid attention to? */ X X#define Reg1 register /**/ X#define Reg2 register /**/ X#define Reg3 /**/ X#define Reg4 /**/ X#define Reg5 /**/ X#define Reg6 /**/ X#define Reg7 /**/ X#define Reg8 /**/ X#define Reg9 /**/ X#define Reg10 /**/ X#define Reg11 /**/ X#define Reg12 /**/ X#define Reg13 /**/ X#define Reg14 /**/ X#define Reg15 /**/ X#define Reg16 /**/ X SHAR_EOF if test 757 -ne "`wc -c < 'config.h'`" then echo shar: error transmitting "'config.h'" '(should have been 757 characters)' fi fi # end of overwriting check echo shar: extracting "'diffs'" '(2942 characters)' if test -f 'diffs' then echo shar: will not over-write existing file "'diffs'" else sed 's/^X//' << \SHAR_EOF > 'diffs' X*** ../inp.c Thu Jun 9 12:03:38 1988 X--- inp.c Mon Sep 19 09:48:54 1988 X*************** X*** 194,199 **** X--- 194,203 ---- X return TRUE; /* plan a will work */ X } X X+ #ifdef MSDOS X+ #include <fcntl.h> X+ #endif X+ X /* Keep (virtually) nothing in memory. */ X X void X*************** X*** 208,214 **** X--- 212,222 ---- X using_plan_a = FALSE; X if ((ifp = fopen(filename, "r")) == Nullfp) X fatal2("Can't open file %s\n", filename); X+ #if MSDOS X+ if ((tifd = open(TMPINNAME, O_BINARY|O_CREAT|O_RDWR, 0666)) < 0) X+ #else X if ((tifd = creat(TMPINNAME, 0666)) < 0) X+ #endif X fatal2("Can't open file %s\n", TMPINNAME); X while (fgets(buf, sizeof buf, ifp) != Nullch) { X if (revision != Nullch && !found_revision && rev_in_string(buf)) X*************** X*** 258,264 **** X--- 266,276 ---- X } X Fclose(ifp); X Close(tifd); X+ #ifdef MSDOS X+ if ((tifd = open(TMPINNAME, O_BINARY|O_RDONLY)) < 0) { X+ #else X if ((tifd = open(TMPINNAME, 0)) < 0) { X+ #endif X fatal2("Can't reopen file %s\n", TMPINNAME); X } X } X*** ../pch.c Thu Jun 9 12:03:48 1988 X--- pch.c Mon Sep 19 09:57:44 1988 X*************** X*** 1063,1068 **** X--- 1063,1069 ---- X void X do_ed_script() X { X+ #ifndef MSDOS X Reg1 char *t; X Reg2 long beginning_of_this_line; X Reg3 bool this_line_is_command = FALSE; X*************** X*** 1120,1123 **** X--- 1121,1128 ---- X else X chmod(outname, filemode); X set_signals(1); X+ #else X+ printf("can't use ed\n"); X+ exit(1); X+ #endif X } X*** ../util.c Thu Jun 9 12:03:49 1988 X--- util.c Mon Sep 19 11:27:18 1988 X*************** X*** 240,253 **** X--- 240,257 ---- X #endif X X if (!reset) { X+ #ifndef MSDOS X hupval = signal(SIGHUP, SIG_IGN); X if (hupval != SIG_IGN) X hupval = my_exit; X+ #endif X intval = signal(SIGINT, SIG_IGN); X if (intval != SIG_IGN) X intval = my_exit; X } X+ #ifndef MSDOS X Signal(SIGHUP, hupval); X+ #endif X Signal(SIGINT, intval); X #endif X } X*************** X*** 258,264 **** X--- 262,270 ---- X ignore_signals() X { X #ifndef lint X+ #ifndef MSDOS X Signal(SIGHUP, SIG_IGN); X+ #endif X Signal(SIGINT, SIG_IGN); X #endif X } X*************** X*** 354,356 **** X--- 360,387 ---- X } X return name; X } X+ X+ #if MSDOS X+ X+ link( from, to) X+ char *from, *to; X+ { X+ FILE *fopen(), X+ *ff, *tf; X+ int n_read; X+ char buf[BUFSIZ]; X+ X+ if ((ff= fopen(from, "rb"))== NULL) { X+ perror(from); X+ return(-1); X+ } X+ if ((tf= fopen(to, "wb"))== NULL) { X+ perror(to); X+ return(-1); X+ } X+ while ((n_read=fread(buf, 1, BUFSIZ, ff)) > 0) X+ fwrite( buf, 1, n_read, tf); X+ fclose (ff); X+ fclose (tf); X+ } X+ #endif X*** ../common.h Thu Jun 9 12:03:29 1988 X--- common.h Mon Sep 19 11:20:54 1988 X*************** X*** 148,155 **** X--- 148,157 ---- X long atol(); X long lseek(); X char *mktemp(); X+ #ifndef MSDOS X #ifdef CHARSPRINTF X char *sprintf(); X #else X int *sprintf(); X+ #endif X #endif SHAR_EOF if test 2942 -ne "`wc -c < 'diffs'`" then echo shar: error transmitting "'diffs'" '(should have been 2942 characters)' fi fi # end of overwriting check # End of shell archive exit 0 =============================================================================== Tom Vijlbrief TNO Institute for Perception P.O. Box 23 Phone: +31 34 63 62 77 3769 DE Soesterberg E-mail: tnosoes!tom@mcvax.cwi.nl The Netherlands or: uunet!mcvax!tnosoes!tom ===============================================================================