1*43c1707eStholo2001-04-25 Derek Price <dprice@collab.net> 2*43c1707eStholo 3*43c1707eStholo * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400. 4*43c1707eStholo 5*43c1707eStholo2001-03-24 Noel Cragg <noel@shave.red-bean.com> 6*43c1707eStholo 7*43c1707eStholo * diff.c: fix typo in usage string. 8*43c1707eStholo 9*43c1707eStholo2001-03-20 Derek Price <derek.price@openavenue.com> 10*43c1707eStholo for Karl Tomlinson <k.tomlinson@auckland.ac.nz> 11*43c1707eStholo 12*43c1707eStholo * diff3.c (main): changed the common file of the two diffs to 13*43c1707eStholo OLDFILE for merges and edscripts so that the diffs are more likely 14*43c1707eStholo to contain the intended changes. Not changing the horizon-lines 15*43c1707eStholo arg for the second diff. If the two diffs have the same parameters 16*43c1707eStholo equal changes in each diff are more likely to appear the same. 17*43c1707eStholo 18*43c1707eStholo * analyze.c (shift_boundaries): undid Paul Eggert's patch to fix 19*43c1707eStholo the diff3 merge bug described in ccvs/doc/DIFFUTILS-2.7-BUG. The 20*43c1707eStholo patch is no longer necessary now that diff3 does its differences 21*43c1707eStholo differently. I think the hunk merges provide a better indication 22*43c1707eStholo of the area modified by the user now that the diffs are actually 23*43c1707eStholo done between the appropriate revisions. 24*43c1707eStholo 25*43c1707eStholo2001-03-15 Derek Price <derek.price@openavenue.com> 26*43c1707eStholo 27*43c1707eStholo * Makefile.am (INCLUDES): Add -I$(top_srcdir)/lib for platforms which 28*43c1707eStholo need the regex library there. 29*43c1707eStholo 30*43c1707eStholo * Makefile.in: Regenerated. 31*43c1707eStholo 32*43c1707eStholo2001-03-14 Derek Price <derek.price@openavenue.com> 33*43c1707eStholo 34*43c1707eStholo * .cvsignore: Added '.deps'. 35*43c1707eStholo 36*43c1707eStholo Pavel Roskin <proski@gnu.org> 37*43c1707eStholo 38*43c1707eStholo * Makefile.am: New file. 39*43c1707eStholo * Makefile.in: Regenerated. 40*43c1707eStholo 41*43c1707eStholo2001-02-22 Derek Price <derek.price@openavenue.com> 42*43c1707eStholo Pavel Roskin <proski@gnu.org> 43*43c1707eStholo 44*43c1707eStholo * Makefile.in: Don't define PR_PROGRAM - it's defined by configure. 45*43c1707eStholo Remove separate rule for util.c. 46*43c1707eStholo 47*43c1707eStholo2001-02-06 Derek Price <derek.price@openavenue.com> 48*43c1707eStholo Rex Jolliff <Rex_Jolliff@notes.ymp.gov> 49*43c1707eStholo Shawn Smith <Shawn_Smith@notes.ymp.gov> 50*43c1707eStholo 51*43c1707eStholo * dir.c: Replace opendir, closedir, & readdir calls with CVS_OPENDIR, 52*43c1707eStholo CVS_CLOSEDIR, & CVS_READDIR in support of changes to handle VMS DEC C 53*43c1707eStholo 5.7 {open,read,close}dir problems. Check today's entry in the vms 54*43c1707eStholo subdir for more. 55*43c1707eStholo * system.h: definitions of CVS_*DIR provided here. 56*43c1707eStholo 57*43c1707eStholo2000-12-21 Derek Price <derek.price@openavenue.com> 58*43c1707eStholo 59*43c1707eStholo * Makefile.in: Some changes to support Automake targets 60*43c1707eStholo 61*43c1707eStholo2000-10-26 Larry Jones <larry.jones@sdrc.com> 62*43c1707eStholo 63*43c1707eStholo * Makefile.in: Get PR_PROGRAM from autoconf instead of hard coding. 64*43c1707eStholo (Patch submitted by Urs Thuermann <urs@isnogud.escape.de>.) 65*43c1707eStholo Also add a dependency for util.o on Makefile since PR_PROGRAM gets 66*43c1707eStholo compiled in. 67*43c1707eStholo 68e77048c1Stholo2000-08-03 Larry Jones <larry.jones@sdrc.com> 69e77048c1Stholo 70e77048c1Stholo * diff3.c (read_diff): Use cvs_temp_name () instead of tmpnam () so 71e77048c1Stholo there's at least a chance of getting the file in the correct tmp dir. 72e77048c1Stholo 73e77048c1Stholo2000-07-10 Larry Jones <larry.jones@sdrc.com> 74e77048c1Stholo 75e77048c1Stholo * util.c (printf_output): Fix type clashes. 76e77048c1Stholo 77e77048c1Stholo2000-06-15 Larry Jones <larry.jones@sdrc.com> 78e77048c1Stholo 79e77048c1Stholo * diff3.c (diff3_run, make_3way_diff): Plug memory leaks. 80e77048c1Stholo 81e77048c1Stholo1999-12-29 Jim Kingdon <http://developer.redhat.com/> 82e77048c1Stholo 83e77048c1Stholo * diff.c (compare_files): Use explicit braces with if-if-else, per 84e77048c1Stholo GNU coding standards and gcc -Wall. 85e77048c1Stholo 86e77048c1Stholo1999-11-23 Larry Jones <larry.jones@sdrc.com> 87e77048c1Stholo 88e77048c1Stholo * diff3.c: Explicitly initialize zero_diff3 to placate neurotic 89e77048c1Stholo compilers that gripe about implicitly initialized const variables. 90e77048c1Stholo Reported by Eric Veum <sysv@yahoo.com>. 91e77048c1Stholo 92e77048c1Stholo1999-09-15 Larry Jones <larry.jones@sdrc.com> 93e77048c1Stholo 94e77048c1Stholo * diff.c (diff_run): Move the setjmp call before the options 95e77048c1Stholo processing since option errors can call fatal which in turn 96e77048c1Stholo calls longjmp. 97e77048c1Stholo 98892c0aadStholo1999-05-06 Jim Kingdon <http://www.cyclic.com> 99892c0aadStholo 100892c0aadStholo * Makefile.in (DISTFILES): Remove libdiff.mak. 101892c0aadStholo * libdiff.mak: Removed; we are back to a single makefile for 102892c0aadStholo Visual C++ version 4. 103892c0aadStholo 104892c0aadStholo1999-04-29 Jim Kingdon <http://www.cyclic.com> 105892c0aadStholo 106892c0aadStholo * diff.c (diff_run): Use separate statement for setjmp call and if 107892c0aadStholo statement. This is better style in general (IMHO) but in the case 108892c0aadStholo of setjmp the UNICOS compiler apparently cares (I don't have the 109892c0aadStholo standard handy, but there are lots of legitimate restrictions on 110892c0aadStholo how you can call setjmp). 111892c0aadStholo 112892c0aadStholo1999-04-26 Jim Kingdon <http://www.cyclic.com> 113892c0aadStholo 114892c0aadStholo * Makefile.in (DISTFILES): Add libdiff.dsp libdiff.mak .cvsignore. 115892c0aadStholo 116892c0aadStholo1999-04-26 (submitted 1999-03-24) John O'Connor <john@shore.net> 117892c0aadStholo 118892c0aadStholo * libdiff.dsp: new file. MSVC project file used to build the library. 119892c0aadStholo 120892c0aadStholo * libdiff.mak: new file. Makefile for building from the command-line. 121892c0aadStholo 122892c0aadStholo * .cvsignore: Removed un-used entries related to MSVC. Added 123892c0aadStholo entries to ignore directories generated by the NT build, Debug 124892c0aadStholo and Release. 125892c0aadStholo 126892c0aadStholo1999-03-24 Larry Jones <larry.jones@sdrc.com> 127892c0aadStholo and Olaf Brandes 128892c0aadStholo 129892c0aadStholo * diff3.c (diff3_run): Use a separate stream for the input to 130892c0aadStholo output_diff3_merge instead of reopening stdin to avoid problems 131892c0aadStholo with leaving it open. 132892c0aadStholo 133c71bc7e2Stholo1999-02-17 Jim Kingdon <http://www.cyclic.com> 134c71bc7e2Stholo and Hallvard B Furuseth. 135c71bc7e2Stholo 136c71bc7e2Stholo * util.c: Use __STDC__ consistently with ./system.h. 137c71bc7e2Stholo * system.h: Add comment about PARAMS. 138c71bc7e2Stholo 139c71bc7e2Stholo1999-01-12 Jim Kingdon <http://www.cyclic.com> 140c71bc7e2Stholo 141c71bc7e2Stholo * Makefile.in, analyze.c, cmpbuf.c, cmpbuf.h, context.c, diff.c, 142c71bc7e2Stholo diff.h, diff3.c, diffrun.h, dir.c, ed.c, io.c, normal.c, system.h, 143c71bc7e2Stholo util.c: Remove paragraph containing the old snail mail address of 144c71bc7e2Stholo the Free Software Foundation. 145c71bc7e2Stholo 146c71bc7e2Stholo1998-09-21 Jim Kingdon <kingdon@harvey.cyclic.com> 147c71bc7e2Stholo 148c71bc7e2Stholo * util.c (printf_output): Make msg static; avoids auto 149c71bc7e2Stholo initializer, which is not portable to SunOS4 /bin/cc. 150c71bc7e2Stholo Reported by Mike Sutton@SAIC. 151c71bc7e2Stholo 152c71bc7e2Stholo1998-09-14 Jim Kingdon <kingdon@harvey.cyclic.com> 153c71bc7e2Stholo 154c71bc7e2Stholo * Makefile.in (DISTFILES): Add diagmeet.note. 155c71bc7e2Stholo 156c71bc7e2Stholo1998-08-15 Jim Kingdon <kingdon@harvey.cyclic.com> 157c71bc7e2Stholo 158c71bc7e2Stholo * diffrun.h (struct diff_callbacks): Change calling convention of 159c71bc7e2Stholo write_output so that a zero length means to output zero bytes. 160c71bc7e2Stholo The cvs_output convention is just too ugly/error-prone. 161c71bc7e2Stholo * util.c (printf_output): Rewrite to parse format string 162c71bc7e2Stholo overselves rather than calling vasprintf, which cannot be 163c71bc7e2Stholo implemented in portable C. 164c71bc7e2Stholo 165b2346922Stholo1998-08-06 David Masterson of kla-tencor.com 166b2346922Stholo 167b2346922Stholo * util.c (flush_output): Don't prototype. 168b2346922Stholo 169b2346922StholoThu Jul 2 16:34:38 1998 Ian Lance Taylor <ian@cygnus.com> 170b2346922Stholo 171b2346922Stholo Simplify the callback interface: 172b2346922Stholo * diffrun.h: Don't include <stdarg.h> or <varargs.h>. 173b2346922Stholo (struct diff_callbacks): Remove printf_output field. 174b2346922Stholo * util.c: Include <stdarg.h> or <varargs.h>. 175b2346922Stholo (printf_output): Use vasprintf and write_output callback rather 176b2346922Stholo than printf_output callback. 177b2346922Stholo * diff3.c (read_diff): Don't set my_callbacks.printf_output. 178b2346922Stholo 179b2346922StholoThu Jun 18 12:43:53 1998 Ian Lance Taylor <ian@cygnus.com> 180b2346922Stholo 181b2346922Stholo * diffrun.h: New file. 182b2346922Stholo * diff.h: Include diffrun.h. 183b2346922Stholo (callbacks): New EXTERN variable. 184b2346922Stholo (write_output, printf_output, flush_output): Declare. 185b2346922Stholo * diff.c (diff_run): Add parameter callbacks_arg. Use callback 186b2346922Stholo functions rather than writing to stdout. Don't open a file if 187b2346922Stholo there is a write_output callback. Call perror_with_name rather 188b2346922Stholo than perror. 189b2346922Stholo (usage): Use callbacks if defined rather than writing to stdout. 190b2346922Stholo (compare_files): Call flush_output rather than fflush (outfile). 191b2346922Stholo * diff3.c: Include diffrun.h. Change several functions to use 192b2346922Stholo output functions from util.c rather than direct printing. Use 193b2346922Stholo diff_error and friends rather than printing to stderr. Set global 194b2346922Stholo variable outfile. 195b2346922Stholo (outfile, callbacks): Declare. 196b2346922Stholo (write_output, printf_output, flush_output): Declare. 197b2346922Stholo (diff3_run): Add parameter callbacks_arg. Use callback functions 198b2346922Stholo rather than writing to stdout. 199b2346922Stholo (usage): Use callbacks if defined rather than writing to stdout. 200b2346922Stholo (read_diff): Preserve callbacks and outfile around call to 201b2346922Stholo diff_run. 202b2346922Stholo * util.c (perror_with_name): Use error callback if defined. 203b2346922Stholo (pfatal_with_name, diff_error): Likewise. 204b2346922Stholo (message5): Use printf_output and write_output. 205b2346922Stholo (print_message_queue, print_1_line, output_1_line): Likewise. 206b2346922Stholo (begin_output): Reject paginate_flag if there are output 207b2346922Stholo callbacks. 208b2346922Stholo (write_output, printf_output, flush_output): New functions. 209b2346922Stholo * context.c: Change all output to outfile to use printf_output and 210b2346922Stholo write_output. 211b2346922Stholo * ed.c: Likewise. 212b2346922Stholo * ifdef.c: Likewise. 213b2346922Stholo * normal.c: Likewise. 214b2346922Stholo * side.c: Likewise. 215b2346922Stholo * Makefile.in (SOURCES): Add diffrun.h. 216b2346922Stholo ($(OBJECTS)): Depend upon diffrun.h. 217b2346922Stholo 2182286d8edStholoFri Jan 16 14:58:19 1998 Larry Jones <larry.jones@sdrc.com> 2192286d8edStholo 2202286d8edStholo * diff.c, diff3.c: Plug memory leaks. 2212286d8edStholo 2222286d8edStholoThu Jan 15 13:36:46 1998 Jim Kingdon <kingdon@harvey.cyclic.com> 2232286d8edStholo 2242286d8edStholo * Makefile.in (installdirs): New rule, for when ../Makefile 2252286d8edStholo recurses into this directory (bug reported by W. L. Estes). 2262286d8edStholo 2272286d8edStholoTue Nov 11 10:48:19 1997 Jim Kingdon <kingdon@harvey.cyclic.com> 2282286d8edStholo 2292286d8edStholo * diff.c (diff_run): Change #ifdef on HAVE_SETMODE to #if to match 2302286d8edStholo the other uses (fixes compilation error on unix). 2312286d8edStholo 2322286d8edStholo * diff.c (diff_run): Don't set stdout to binary mode. 2332286d8edStholo 2342286d8edStholoMon, 10 Nov 1997 Jim Kingdon 2352286d8edStholo 2362286d8edStholo * diff.c (run_diff): Open outfile in binary mode if --binary. 2372286d8edStholo 2382286d8edStholoThu Nov 6 12:42:12 1997 Karl Fogel <kfogel@floss.red-bean.com> 2392286d8edStholo and Paul Eggert <eggert@twinsun.com> 2402286d8edStholo 2412286d8edStholo * analyze.c: applied Paul Eggert's patch to fix the diff3 merge 2422286d8edStholo bug described in ccvs/doc/DIFFUTILS-2.7-BUG: 2432286d8edStholo (shift_boundaries): new var `inhibit_hunk_merge'; use it to 2442286d8edStholo control something important that I don't quite understand, but 2452286d8edStholo Paul apparently does, so that's okay. 2462286d8edStholo 2472286d8edStholoSat Nov 1 14:17:57 1997 Michael L.H. Brouwer <michael@thi.nl> 2482286d8edStholo 2492286d8edStholo * Makefile.in: Add call to ranlib to build a table of contents for 2502286d8edStholo the library since some systems seem to require this. 2512286d8edStholo 2522286d8edStholo1997-10-28 Jim Kingdon 2532286d8edStholo 2542286d8edStholo * .cvsignore: Add files du jour for Visual C++, vc50.pdb and vc50.idb. 2552286d8edStholo 2562286d8edStholo * system.h: Define HAVE_TIME_H. 2572286d8edStholo * dir.c [_WIN32]: Define CLOSEDIR_VOID. 2582286d8edStholo 2592286d8edStholo1997-10-18 Jim Kingdon 2602286d8edStholo 2612286d8edStholo * build_diff.com: Add diff3.c 2622286d8edStholo 2632286d8edStholoFri Sep 26 14:24:42 1997 Tim Pierce <twp@twp.tezcat.com> 2642286d8edStholo 2652286d8edStholo * diff.c (diff_run): Save old value of optind before calling 2662286d8edStholo getopt_long, then restore before returning. Eventually it would 2672286d8edStholo be nice if diff_run were fully reentrant. 2682286d8edStholo 2692286d8edStholo New diff3 library for CVS. 2702286d8edStholo * Makefile.in (SOURCES): Add diff3.c. 2712286d8edStholo (OBJECTS): Add diff3.o. 2722286d8edStholo * diff3.c: New file, copied from diffutils-2.7. See diffutils for 2732286d8edStholo earlier ChangeLogs. Undefine initialize_main macro. Remove <signal.h>. 2742286d8edStholo (diff3_run): Renamed from main(). Add `outfile' argument. Remove 2752286d8edStholo SIGCLD handling; we do not fork. Save optind and reset to 0 2762286d8edStholo before calling getopt_long; restore after option processing done. 2772286d8edStholo (read_diff): Use diff_run with a temporary output file, 2782286d8edStholo instead of forking a diff subprocess and reading from a pipe. 2792286d8edStholo Change DIFF_PROGRAM to "diff"; this argument is now used only for 2802286d8edStholo diagnostic reporting. 2812286d8edStholo (xmalloc, xrealloc): Removed. 2822286d8edStholo (diff_program): Removed. 2832286d8edStholo (diff_program_name): Made extern, so it may be used in other 2842286d8edStholo library calls like `error'. 2852286d8edStholo (initialize_main): New function. 2862286d8edStholo 2872286d8edStholo Namespace munging. util.c defines both fatal() and 2882286d8edStholo perror_with_exit(), but these cannot be used to abort diff3: both 2892286d8edStholo attempt to longjmp() to a buffer set in diff.c, used only by 2902286d8edStholo diff_run. This is an awful solution, but necessary until the code 2912286d8edStholo can be cleaned up. (These functions do not *have* to be renamed, 2922286d8edStholo since both are declared static to diff3.c and should not clash 2932286d8edStholo with libdiff.a, but it reduces potential confusion.) 2942286d8edStholo * diff3.c (diff3_fatal): Renamed from fatal. 2952286d8edStholo (diff3_perror_with_exit): Renamed from perror_with_exit. 2962286d8edStholo 2972286d8edStholo Eliminate exit calls. 2982286d8edStholo (try_help): Change from `void' to `int'. Return, do not exit. 2992286d8edStholo (diff3_fatal, diff3_perror_with_exit, process_diff): Change `exit' 3002286d8edStholo to DIFF3_ABORT. 3012286d8edStholo (diff3_run): Initialize jump buffer for nonlocal exits. Change 3022286d8edStholo exit calls to returns. Change `perror_with_exit' to 3032286d8edStholo `perror_with_name' and add a return. Change `fatal' to 3042286d8edStholo `diff_error' and add a return. The reasoning is that we shouldn't 3052286d8edStholo rely on setjmp/longjmp any more than necessary. 3062286d8edStholo 3072286d8edStholo Redirect stdout. 3082286d8edStholo (check_output): Renamed from check_stdout. Take stream argument 3092286d8edStholo instead of blindly checking stdout. Do not close stream, but 3102286d8edStholo merely fflush it. 3112286d8edStholo (diff3_run): Initialize outstream, and close when done. Pass this 3122286d8edStholo stream (instead of stdout) to output_diff3_edscript, 3132286d8edStholo output_diff3_merge, and output_diff3. 3142286d8edStholo 3152286d8edStholoThu Sep 25 14:34:22 1997 Jim Kingdon <kingdon@harvey.cyclic.com> 3162286d8edStholo 3172286d8edStholo * util.c (begin_output, finish_output): If PR_PROGRAM is not 3182286d8edStholo defined (VMS), just give a fatal error if --paginate specified. 3192286d8edStholo 3202286d8edStholo * Makefile.in (DISTFILES): Add ChangeLog build_diff.com 3212286d8edStholo Makefile.in. 3222286d8edStholo * build_diff.com: New file. 3232286d8edStholo 3242286d8edStholoWed Sep 24 10:27:00 1997 Jim Kingdon <kingdon@harvey.cyclic.com> 3252286d8edStholo 3262286d8edStholo * Makefile.in: Also set top_srcdir. Needed to make today's other 3272286d8edStholo Makefile.in change work. 3282286d8edStholo 3292286d8edStholo * .cvsignore: New file. 3302286d8edStholo 3312286d8edStholo * Makefile.in (COMPILE): Add -I options for srcdir (perhaps 3322286d8edStholo unneeded) and change -I option for lib to use top_srcdir (needed 3332286d8edStholo to avoid mixups with CVS's regex.h vs. the system one). 3342286d8edStholo 3352286d8edStholoSun Sep 21 19:44:42 1997 Jim Kingdon <kingdon@harvey.cyclic.com> 3362286d8edStholo 3372286d8edStholo * Makefile.in (util.o): Change util.c to $<, needed for srcdir. 3382286d8edStholo 3392286d8edStholoSat Sep 20 12:06:41 1997 Tim Pierce <twp@twp.tezcat.com> 3402286d8edStholo 3412286d8edStholo New diff library for CVS, based on diffutils-2.7. See diffutils 3422286d8edStholo for earlier ChangeLogs. 3432286d8edStholo * Makefile.in, analyze.c, cmpbuf.c, cmpbuf.h, config.hin, 3442286d8edStholo context.c, diagmeet.note, diff.c, diff.h, dir.c, ed.c, ifdef.c, 3452286d8edStholo io.c, normal.c, side.c, stamp-h.in, system.h, util.c, version.c: 3462286d8edStholo New files. 3472286d8edStholo (COMPILE): Add -I../lib, so we can get getopt.h. 3482286d8edStholo 3492286d8edStholo * Makefile.in: Removed anything not related to libdiff.a. 3502286d8edStholo (dist-dir): New target, copied from ../lib/Makefile.in. 3512286d8edStholo (DISTFILES): New variable. 3522286d8edStholo (SOURCES): Renamed from `srcs'. 3532286d8edStholo (OBJECTS): Renamed from `libdiff_o'. 3542286d8edStholo (Makefile): Changed dependencies to reflect 3552286d8edStholo new, shallow config directory structure. 3562286d8edStholo (stamp-h.in, config.h.in, config.h, stamp-h): Removed. 3572286d8edStholo * stamp-h.in, config.h.in: Removed. 3582286d8edStholo 3592286d8edStholo * system.h: Remove dup2 macro (provided by ../lib/dup2.c). 3602286d8edStholo Include stdlib.h if STDC_HEADERS is defined (not just 3612286d8edStholo HAVE_STDLIB_H). 3622286d8edStholo 3632286d8edStholoSat Sep 20 05:32:18 1997 Tim Pierce <twp@twp.tezcat.com> 3642286d8edStholo 3652286d8edStholo Diff librarification. 3662286d8edStholo 3672286d8edStholo * diff.c (diff_run): New function, renamed from `main'. 3682286d8edStholo Initialize `outfile' based on the value of the new `out' filename 3692286d8edStholo argument. 3702286d8edStholo (initialize_main): New function. 3712286d8edStholo * system.h: Removed initialize_main macro. 3722286d8edStholo * diffmain.c: New file. 3732286d8edStholo * Makefile.in (diff): Added diffmain.o. 3742286d8edStholo (libdiff): New target. 3752286d8edStholo (AR, libdiff_o): New variables. libdiff_o does not include 3762286d8edStholo xmalloc.o, fnmatch.o, getopt.o, getopt1.o, regex.o or error.o, 3772286d8edStholo because these functions are already present in CVS. It will take 3782286d8edStholo some work to make this more general-purpose. 3792286d8edStholo 3802286d8edStholo Redirect standard output. 3812286d8edStholo * util.c: Redirect stdout to outfile: change all naked `printf' 3822286d8edStholo and `putchar' statements to `fprintf (outfile)' and `putc (..., 3832286d8edStholo outfile)' throughout. This should permit redirecting diff output 3842286d8edStholo by changing `outfile' just once in `diff_run'. 3852286d8edStholo (output_in_progress): New variable. 3862286d8edStholo (begin_output, finish_output): Use `output_in_progress', rather than 3872286d8edStholo `outfile', as a semaphore to avoid reentrancy problems. 3882286d8edStholo (finish_output): Close `outfile' only if paginate_flag is set. 3892286d8edStholo * diff.c (check_output): New function, was check_stdout. Take a 3902286d8edStholo `file' argument, and flush it instead of closing it. 3912286d8edStholo (diff_run): Change check_stdout to check_output. 3922286d8edStholo (compare_files): Fflush outfile, not stdout. 3932286d8edStholo 3942286d8edStholo Eliminate exit statements. 3952286d8edStholo * diff.h: Include setjmp.h. 3962286d8edStholo (diff_abort_buf): New variable. 3972286d8edStholo (DIFF_ABORT): New macro. 3982286d8edStholo * diff.c (diff_run): Change all `exit' statements to `return'. 3992286d8edStholo Set up diff_abort_buf, so we can abort diff without 4002286d8edStholo terminating (for libdiff.a). 4012286d8edStholo (try_help): Return int instead of void; do not exit. 4022286d8edStholo * util.c (fatal): Use DIFF_ABORT instead of exit. 4032286d8edStholo (pfatal_with_name): Use DIFF_ABORT instead of exit. 4042286d8edStholo 4052286d8edStholo Namespace cleanup (rudimentary). Strictly speaking, this is not 4062286d8edStholo necessary to make diff into a library. However, namespace 4072286d8edStholo clashes between diff and CVS must be resolved immediately, since 4082286d8edStholo CVS is the first application targeted for use with difflib. 4092286d8edStholo 4102286d8edStholo * analyze.c, diff.c, diff.h, util.c (diff_error): Renamed from `error'. 4112286d8edStholo 4122286d8edStholo * version.c, diff.c, diff.h, cmp.c, diff3.c, sdiff.c 4132286d8edStholo (diff_version_string): Renamed from version_string. 4142286d8edStholo * diff.c, util.c, diff.h, diff3.c, error.c (diff_program_name): 4152286d8edStholo Renamed from program_name. 4162286d8edStholo 4172286d8edStholo * util.c (xmalloc, xrealloc): Removed. 4182286d8edStholo * Makefile.in (diff_o): Added error.o and xmalloc.o. 4192286d8edStholo 420