12000-08-03 Larry Jones <larry.jones@sdrc.com> 2 3 * diff3.c (read_diff): Use cvs_temp_name () instead of tmpnam () so 4 there's at least a chance of getting the file in the correct tmp dir. 5 62000-07-10 Larry Jones <larry.jones@sdrc.com> 7 8 * util.c (printf_output): Fix type clashes. 9 102000-06-15 Larry Jones <larry.jones@sdrc.com> 11 12 * diff3.c (diff3_run, make_3way_diff): Plug memory leaks. 13 141999-12-29 Jim Kingdon <http://developer.redhat.com/> 15 16 * diff.c (compare_files): Use explicit braces with if-if-else, per 17 GNU coding standards and gcc -Wall. 18 191999-11-23 Larry Jones <larry.jones@sdrc.com> 20 21 * diff3.c: Explicitly initialize zero_diff3 to placate neurotic 22 compilers that gripe about implicitly initialized const variables. 23 Reported by Eric Veum <sysv@yahoo.com>. 24 251999-09-15 Larry Jones <larry.jones@sdrc.com> 26 27 * diff.c (diff_run): Move the setjmp call before the options 28 processing since option errors can call fatal which in turn 29 calls longjmp. 30 311999-05-06 Jim Kingdon <http://www.cyclic.com> 32 33 * Makefile.in (DISTFILES): Remove libdiff.mak. 34 * libdiff.mak: Removed; we are back to a single makefile for 35 Visual C++ version 4. 36 371999-04-29 Jim Kingdon <http://www.cyclic.com> 38 39 * diff.c (diff_run): Use separate statement for setjmp call and if 40 statement. This is better style in general (IMHO) but in the case 41 of setjmp the UNICOS compiler apparently cares (I don't have the 42 standard handy, but there are lots of legitimate restrictions on 43 how you can call setjmp). 44 451999-04-26 Jim Kingdon <http://www.cyclic.com> 46 47 * Makefile.in (DISTFILES): Add libdiff.dsp libdiff.mak .cvsignore. 48 491999-04-26 (submitted 1999-03-24) John O'Connor <john@shore.net> 50 51 * libdiff.dsp: new file. MSVC project file used to build the library. 52 53 * libdiff.mak: new file. Makefile for building from the command-line. 54 55 * .cvsignore: Removed un-used entries related to MSVC. Added 56 entries to ignore directories generated by the NT build, Debug 57 and Release. 58 591999-03-24 Larry Jones <larry.jones@sdrc.com> 60 and Olaf Brandes 61 62 * diff3.c (diff3_run): Use a separate stream for the input to 63 output_diff3_merge instead of reopening stdin to avoid problems 64 with leaving it open. 65 661999-02-17 Jim Kingdon <http://www.cyclic.com> 67 and Hallvard B Furuseth. 68 69 * util.c: Use __STDC__ consistently with ./system.h. 70 * system.h: Add comment about PARAMS. 71 721999-01-12 Jim Kingdon <http://www.cyclic.com> 73 74 * Makefile.in, analyze.c, cmpbuf.c, cmpbuf.h, context.c, diff.c, 75 diff.h, diff3.c, diffrun.h, dir.c, ed.c, io.c, normal.c, system.h, 76 util.c: Remove paragraph containing the old snail mail address of 77 the Free Software Foundation. 78 791998-09-21 Jim Kingdon <kingdon@harvey.cyclic.com> 80 81 * util.c (printf_output): Make msg static; avoids auto 82 initializer, which is not portable to SunOS4 /bin/cc. 83 Reported by Mike Sutton@SAIC. 84 851998-09-14 Jim Kingdon <kingdon@harvey.cyclic.com> 86 87 * Makefile.in (DISTFILES): Add diagmeet.note. 88 891998-08-15 Jim Kingdon <kingdon@harvey.cyclic.com> 90 91 * diffrun.h (struct diff_callbacks): Change calling convention of 92 write_output so that a zero length means to output zero bytes. 93 The cvs_output convention is just too ugly/error-prone. 94 * util.c (printf_output): Rewrite to parse format string 95 overselves rather than calling vasprintf, which cannot be 96 implemented in portable C. 97 981998-08-06 David Masterson of kla-tencor.com 99 100 * util.c (flush_output): Don't prototype. 101 102Thu Jul 2 16:34:38 1998 Ian Lance Taylor <ian@cygnus.com> 103 104 Simplify the callback interface: 105 * diffrun.h: Don't include <stdarg.h> or <varargs.h>. 106 (struct diff_callbacks): Remove printf_output field. 107 * util.c: Include <stdarg.h> or <varargs.h>. 108 (printf_output): Use vasprintf and write_output callback rather 109 than printf_output callback. 110 * diff3.c (read_diff): Don't set my_callbacks.printf_output. 111 112Thu Jun 18 12:43:53 1998 Ian Lance Taylor <ian@cygnus.com> 113 114 * diffrun.h: New file. 115 * diff.h: Include diffrun.h. 116 (callbacks): New EXTERN variable. 117 (write_output, printf_output, flush_output): Declare. 118 * diff.c (diff_run): Add parameter callbacks_arg. Use callback 119 functions rather than writing to stdout. Don't open a file if 120 there is a write_output callback. Call perror_with_name rather 121 than perror. 122 (usage): Use callbacks if defined rather than writing to stdout. 123 (compare_files): Call flush_output rather than fflush (outfile). 124 * diff3.c: Include diffrun.h. Change several functions to use 125 output functions from util.c rather than direct printing. Use 126 diff_error and friends rather than printing to stderr. Set global 127 variable outfile. 128 (outfile, callbacks): Declare. 129 (write_output, printf_output, flush_output): Declare. 130 (diff3_run): Add parameter callbacks_arg. Use callback functions 131 rather than writing to stdout. 132 (usage): Use callbacks if defined rather than writing to stdout. 133 (read_diff): Preserve callbacks and outfile around call to 134 diff_run. 135 * util.c (perror_with_name): Use error callback if defined. 136 (pfatal_with_name, diff_error): Likewise. 137 (message5): Use printf_output and write_output. 138 (print_message_queue, print_1_line, output_1_line): Likewise. 139 (begin_output): Reject paginate_flag if there are output 140 callbacks. 141 (write_output, printf_output, flush_output): New functions. 142 * context.c: Change all output to outfile to use printf_output and 143 write_output. 144 * ed.c: Likewise. 145 * ifdef.c: Likewise. 146 * normal.c: Likewise. 147 * side.c: Likewise. 148 * Makefile.in (SOURCES): Add diffrun.h. 149 ($(OBJECTS)): Depend upon diffrun.h. 150 151Fri Jan 16 14:58:19 1998 Larry Jones <larry.jones@sdrc.com> 152 153 * diff.c, diff3.c: Plug memory leaks. 154 155Thu Jan 15 13:36:46 1998 Jim Kingdon <kingdon@harvey.cyclic.com> 156 157 * Makefile.in (installdirs): New rule, for when ../Makefile 158 recurses into this directory (bug reported by W. L. Estes). 159 160Tue Nov 11 10:48:19 1997 Jim Kingdon <kingdon@harvey.cyclic.com> 161 162 * diff.c (diff_run): Change #ifdef on HAVE_SETMODE to #if to match 163 the other uses (fixes compilation error on unix). 164 165 * diff.c (diff_run): Don't set stdout to binary mode. 166 167Mon, 10 Nov 1997 Jim Kingdon 168 169 * diff.c (run_diff): Open outfile in binary mode if --binary. 170 171Thu Nov 6 12:42:12 1997 Karl Fogel <kfogel@floss.red-bean.com> 172 and Paul Eggert <eggert@twinsun.com> 173 174 * analyze.c: applied Paul Eggert's patch to fix the diff3 merge 175 bug described in ccvs/doc/DIFFUTILS-2.7-BUG: 176 (shift_boundaries): new var `inhibit_hunk_merge'; use it to 177 control something important that I don't quite understand, but 178 Paul apparently does, so that's okay. 179 180Sat Nov 1 14:17:57 1997 Michael L.H. Brouwer <michael@thi.nl> 181 182 * Makefile.in: Add call to ranlib to build a table of contents for 183 the library since some systems seem to require this. 184 1851997-10-28 Jim Kingdon 186 187 * .cvsignore: Add files du jour for Visual C++, vc50.pdb and vc50.idb. 188 189 * system.h: Define HAVE_TIME_H. 190 * dir.c [_WIN32]: Define CLOSEDIR_VOID. 191 1921997-10-18 Jim Kingdon 193 194 * build_diff.com: Add diff3.c 195 196Fri Sep 26 14:24:42 1997 Tim Pierce <twp@twp.tezcat.com> 197 198 * diff.c (diff_run): Save old value of optind before calling 199 getopt_long, then restore before returning. Eventually it would 200 be nice if diff_run were fully reentrant. 201 202 New diff3 library for CVS. 203 * Makefile.in (SOURCES): Add diff3.c. 204 (OBJECTS): Add diff3.o. 205 * diff3.c: New file, copied from diffutils-2.7. See diffutils for 206 earlier ChangeLogs. Undefine initialize_main macro. Remove <signal.h>. 207 (diff3_run): Renamed from main(). Add `outfile' argument. Remove 208 SIGCLD handling; we do not fork. Save optind and reset to 0 209 before calling getopt_long; restore after option processing done. 210 (read_diff): Use diff_run with a temporary output file, 211 instead of forking a diff subprocess and reading from a pipe. 212 Change DIFF_PROGRAM to "diff"; this argument is now used only for 213 diagnostic reporting. 214 (xmalloc, xrealloc): Removed. 215 (diff_program): Removed. 216 (diff_program_name): Made extern, so it may be used in other 217 library calls like `error'. 218 (initialize_main): New function. 219 220 Namespace munging. util.c defines both fatal() and 221 perror_with_exit(), but these cannot be used to abort diff3: both 222 attempt to longjmp() to a buffer set in diff.c, used only by 223 diff_run. This is an awful solution, but necessary until the code 224 can be cleaned up. (These functions do not *have* to be renamed, 225 since both are declared static to diff3.c and should not clash 226 with libdiff.a, but it reduces potential confusion.) 227 * diff3.c (diff3_fatal): Renamed from fatal. 228 (diff3_perror_with_exit): Renamed from perror_with_exit. 229 230 Eliminate exit calls. 231 (try_help): Change from `void' to `int'. Return, do not exit. 232 (diff3_fatal, diff3_perror_with_exit, process_diff): Change `exit' 233 to DIFF3_ABORT. 234 (diff3_run): Initialize jump buffer for nonlocal exits. Change 235 exit calls to returns. Change `perror_with_exit' to 236 `perror_with_name' and add a return. Change `fatal' to 237 `diff_error' and add a return. The reasoning is that we shouldn't 238 rely on setjmp/longjmp any more than necessary. 239 240 Redirect stdout. 241 (check_output): Renamed from check_stdout. Take stream argument 242 instead of blindly checking stdout. Do not close stream, but 243 merely fflush it. 244 (diff3_run): Initialize outstream, and close when done. Pass this 245 stream (instead of stdout) to output_diff3_edscript, 246 output_diff3_merge, and output_diff3. 247 248Thu Sep 25 14:34:22 1997 Jim Kingdon <kingdon@harvey.cyclic.com> 249 250 * util.c (begin_output, finish_output): If PR_PROGRAM is not 251 defined (VMS), just give a fatal error if --paginate specified. 252 253 * Makefile.in (DISTFILES): Add ChangeLog build_diff.com 254 Makefile.in. 255 * build_diff.com: New file. 256 257Wed Sep 24 10:27:00 1997 Jim Kingdon <kingdon@harvey.cyclic.com> 258 259 * Makefile.in: Also set top_srcdir. Needed to make today's other 260 Makefile.in change work. 261 262 * .cvsignore: New file. 263 264 * Makefile.in (COMPILE): Add -I options for srcdir (perhaps 265 unneeded) and change -I option for lib to use top_srcdir (needed 266 to avoid mixups with CVS's regex.h vs. the system one). 267 268Sun Sep 21 19:44:42 1997 Jim Kingdon <kingdon@harvey.cyclic.com> 269 270 * Makefile.in (util.o): Change util.c to $<, needed for srcdir. 271 272Sat Sep 20 12:06:41 1997 Tim Pierce <twp@twp.tezcat.com> 273 274 New diff library for CVS, based on diffutils-2.7. See diffutils 275 for earlier ChangeLogs. 276 * Makefile.in, analyze.c, cmpbuf.c, cmpbuf.h, config.hin, 277 context.c, diagmeet.note, diff.c, diff.h, dir.c, ed.c, ifdef.c, 278 io.c, normal.c, side.c, stamp-h.in, system.h, util.c, version.c: 279 New files. 280 (COMPILE): Add -I../lib, so we can get getopt.h. 281 282 * Makefile.in: Removed anything not related to libdiff.a. 283 (dist-dir): New target, copied from ../lib/Makefile.in. 284 (DISTFILES): New variable. 285 (SOURCES): Renamed from `srcs'. 286 (OBJECTS): Renamed from `libdiff_o'. 287 (Makefile): Changed dependencies to reflect 288 new, shallow config directory structure. 289 (stamp-h.in, config.h.in, config.h, stamp-h): Removed. 290 * stamp-h.in, config.h.in: Removed. 291 292 * system.h: Remove dup2 macro (provided by ../lib/dup2.c). 293 Include stdlib.h if STDC_HEADERS is defined (not just 294 HAVE_STDLIB_H). 295 296Sat Sep 20 05:32:18 1997 Tim Pierce <twp@twp.tezcat.com> 297 298 Diff librarification. 299 300 * diff.c (diff_run): New function, renamed from `main'. 301 Initialize `outfile' based on the value of the new `out' filename 302 argument. 303 (initialize_main): New function. 304 * system.h: Removed initialize_main macro. 305 * diffmain.c: New file. 306 * Makefile.in (diff): Added diffmain.o. 307 (libdiff): New target. 308 (AR, libdiff_o): New variables. libdiff_o does not include 309 xmalloc.o, fnmatch.o, getopt.o, getopt1.o, regex.o or error.o, 310 because these functions are already present in CVS. It will take 311 some work to make this more general-purpose. 312 313 Redirect standard output. 314 * util.c: Redirect stdout to outfile: change all naked `printf' 315 and `putchar' statements to `fprintf (outfile)' and `putc (..., 316 outfile)' throughout. This should permit redirecting diff output 317 by changing `outfile' just once in `diff_run'. 318 (output_in_progress): New variable. 319 (begin_output, finish_output): Use `output_in_progress', rather than 320 `outfile', as a semaphore to avoid reentrancy problems. 321 (finish_output): Close `outfile' only if paginate_flag is set. 322 * diff.c (check_output): New function, was check_stdout. Take a 323 `file' argument, and flush it instead of closing it. 324 (diff_run): Change check_stdout to check_output. 325 (compare_files): Fflush outfile, not stdout. 326 327 Eliminate exit statements. 328 * diff.h: Include setjmp.h. 329 (diff_abort_buf): New variable. 330 (DIFF_ABORT): New macro. 331 * diff.c (diff_run): Change all `exit' statements to `return'. 332 Set up diff_abort_buf, so we can abort diff without 333 terminating (for libdiff.a). 334 (try_help): Return int instead of void; do not exit. 335 * util.c (fatal): Use DIFF_ABORT instead of exit. 336 (pfatal_with_name): Use DIFF_ABORT instead of exit. 337 338 Namespace cleanup (rudimentary). Strictly speaking, this is not 339 necessary to make diff into a library. However, namespace 340 clashes between diff and CVS must be resolved immediately, since 341 CVS is the first application targeted for use with difflib. 342 343 * analyze.c, diff.c, diff.h, util.c (diff_error): Renamed from `error'. 344 345 * version.c, diff.c, diff.h, cmp.c, diff3.c, sdiff.c 346 (diff_version_string): Renamed from version_string. 347 * diff.c, util.c, diff.h, diff3.c, error.c (diff_program_name): 348 Renamed from program_name. 349 350 * util.c (xmalloc, xrealloc): Removed. 351 * Makefile.in (diff_o): Added error.o and xmalloc.o. 352 353