386BSD 0.1 development
[unix-history] / usr / src / usr.bin / diff / ChangeLog
CommitLineData
ff8cb055
WJ
1Sun Jan 6 18:42:23 1991 Michael I Bushnell (mib at geech.ai.mit.edu)
2
3 * Version 1.15 released.
4
5 * version.c: Updated from 1.15 alpha to 1.15
6
7 * context.c (print_context_number_range,
8 print_unidiff_number_range): Don't print N,M when N=M, print
9 just N instead.
10
11 * README: Updated for version 1.15.
12 Makefile: Updated for version 1.15.
13
14 * diff3.c (main): Don't get confused if one of the arguments
15 is a directory.
16
17 * diff.c (compare_files): Don't get confused if comparing
18 standard input to a directory; print error instead.
19
20 * analyze.c (diff_2_files), context.c (print_context_header,
21 print_context_script), diff.c (main), diff.h (enum
22 output_style): Tread unidiff as an output style in its own
23 right. This also generates an error when both -u and -c are
24 given.
25
26 * diff.c (main): Better error messages when regexps are bad.
27
28 * diff.c (compare_files): Don't assume stdin is opened.
29
30 * diff3.c (read_diff): Don't assume things about the order of
31 descriptor assignment and closes.
32
33 * util.c (setup_output): Don't assume things about the order
34 of descriptor assignment and closes.
35
36 * diff.c (compare_files): Set a flag so that closes don't
37 happen more than once.
38
39 * diff.c (main): Don't just flush stdout, do a close. That
40 way on broken systems we can still get errors.
41
42Mon Dec 24 16:24:17 1990 Richard Stallman (rms at mole.ai.mit.edu)
43
44 * diff.c (usage): Use = for args of long options.
45
46Mon Dec 17 18:19:20 1990 Michael I Bushnell (mib at geech.ai.mit.edu)
47
48 * context.c (print_context_label): Labels were interchanged badly.
49
50 * context.c (pr_unidiff_hunk): Changes to deal with files
51 ending in incomplete lines.
52 * util.c (print_1_line): Other half of the changes.
53
54Mon Dec 3 14:23:55 1990 Richard Stallman (rms at mole.ai.mit.edu)
55
56 * diff.c (longopts, usage): unidiff => unified.
57
58Wed Nov 7 17:13:08 1990 Richard Stallman (rms at mole.ai.mit.edu)
59
60 * analyze.c (diff_2_files): No warnings about newlines for -D.
61
62 * diff.c (pr_unidiff_hunk): Remove ref to output_patch_flag.
63
64Tue Oct 23 23:19:18 1990 Richard Stallman (rms at mole.ai.mit.edu)
65
66 * diff.c (compare_files): For -D, compare even args are same file.
67 * analyze.c (diff_2_files): Likewise.
68 Also, output even if files have no differences.
69
70 * analyze.c (diff_2_files): Print missing newline messages last.
71 Return 2 if a newline is missing.
72 Print them even if files end with identical text.
73
74Mon Oct 22 19:40:09 1990 Richard Stallman (rms at mole.ai.mit.edu)
75
76 * diff.c (usage): Return 2.
77
78Wed Oct 10 20:54:04 1990 Richard Stallman (rms at mole.ai.mit.edu)
79
80 * diff.c (longopts): Add +new-files.
81
82Sun Sep 23 22:49:29 1990 Richard Stallman (rms at mole.ai.mit.edu)
83
84 * context.c (print_context_script): Handle unidiff_flag.
85 (print_context_header): Likewise.
86 (print_unidiff_number_range, pr_unidiff_hunk): New functions.
87 * diff.c (longopts): Add element for +unidiff.
88 (main): Handle +unidiff and -u.
89 (usage): Mention them.
90
91Wed Sep 5 16:33:22 1990 Richard Stallman (rms at mole.ai.mit.edu)
92
93 * io.c (find_and_hash_each_line): Deal with missing final newline
94 after buffering necessary context lines.
95
96Sat Sep 1 16:32:32 1990 Richard Stallman (rms at mole.ai.mit.edu)
97
98 * io.c (find_identical_ends): ROBUST_OUTPUT_FORMAT test was backward.
99
100Thu Aug 23 17:17:20 1990 Richard Stallman (rms at mole.ai.mit.edu)
101
102 * diff3.c (WIFEXITED): Undef it if WEXITSTATUS is not defined.
103 * context.c (find_function): Don't try to return values.
104
105Wed Aug 22 11:54:39 1990 Richard Stallman (rms at mole.ai.mit.edu)
106
107 * diff.h (O_RDONLY): Define if not defined.
108
109Tue Aug 21 13:49:26 1990 Richard Stallman (rms at mole.ai.mit.edu)
110
111 * Handle -L option.
112 * context.c (print_context_label): New function.
113 (print_context_header): Use that.
114 * diff.c (main): Recognize the option.
115 (usage): Updated.
116 * diff.h (file_label): New variable.
117 * diff3.c (main): Recognize -L instead of -t.
118
119 * diff3.c (main): Support -m without other option.
120
121 * diff3.c (WEXITSTATUS, WIFEXITED): Define whenever not defined.
122
123 * diff3.c (bcopy, index, rindex): Delete definitions; not used.
124 (D_LINENUM, D_LINELEN): Likewise.
125 (struct diff_block): lengths includes newlines.
126 (struct diff3_block): Likewise.
127 (always_text, merge): New variables.
128 (read_diff): Return address of end, not size read. Calls changed.
129 Pass -a to diff if given to diff3.
130 current_chunk_size now an int. Detect error in `pipe'.
131 Check for incomplete line of output here.
132 (scan_diff_line): Don't make scan_ptr + 2 before knowing it is valid.
133 No need to check validity of diff output here.
134 Include newline in length of line.
135 (main): Compute rev_mapping here. Handle -a and -m.
136 Error message if excess -t operands. Error for incompatible options.
137 Error if `-' given more than once.
138 Fix error storing in tag_strings.
139 (output_diff3): REV_MAPPING is now an arg. Call changed.
140 Change syntax of "missing newline" message.
141 Expect length of line to include newline.
142 (output_diff3_edscript): Return just 0 or 1.
143 REV_MAPPING is now an arg. Call changed.
144 (output_diff3_merge): New function.
145 (process_diff): Better error message for bad diff format.
146 (fatal, perror_with_exit): Return status 2.
147
148 * analyze.c (diff_2_files): Report missing newline in either
149 or both files, if not robust output style.
150
151 * util.c (setup_output): Detect error from pipe.
152 No need to close stdin.
153
154 * util.c (print_1_line): Change format of missing-newline msg.
155 Change if statements to switch.
156
157 * io.c (slurp): Don't mention differences in final newline if -B.
158
159 * io.c (binary_file_p): Use ISO char set as criterion, not ASCII.
160
161 * io.c (find_identical_ends): Increase value of BEG0 by 1.
162 Other changes in backwards scan to avoid decrementing pointers
163 before start of array, and set LINES properly.
164
165 * diff.h (ROBUST_OUTPUT_STYLE): New macro.
166 * io.c (find_identical_ends, find_and_hash_each_line): Use that macro.
167
168 * diff.h (dup2): Don't define if XENIX.
169
170 * diff.c (main): Check for write error at end.
171
172 * context.c (find_function): Don't return a value.
173 Use argument FILE rather than global files.
174
175 * analyze.c: Add external function declarations.
176 * analyze.c (build_script): Turn off explicit check for final newline.
177
178 * analyze.c (discard_confusing_lines): Make integers unsigned.
179
180Tue Jul 31 21:37:16 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
181
182 * io.c (find_and_hash_each_line): Correct the criterion
183 for leaving out the newline from the end of the line.
184
185Tue May 29 21:28:16 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
186
187 * dir.c (diff_dirs): Free things only if nonzero.
188
189Mon Apr 16 18:31:05 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
190
191 * diff.h (NDIR_IN_SYS): New macro controls location of ndir.h.
192
193 * diff3.c (xmalloc, xrealloc): Don't die if size == 0 returns 0.
194
195Sun Mar 25 15:58:42 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
196
197 * analyze.c (discard_confusing_lines):
198 `many' wasn't being used; use it.
199 Cancelling provisionals near start of run must handle already
200 cancelled provisionals.
201 Cancelling subruns of provisionals was cancelling last nonprovisional.
202
203Sat Mar 24 14:02:51 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
204
205 * analyze.c (discard_confusing_lines):
206 Threshold for line occurring many times scales by square root
207 of total lines.
208 Within each run, cancel any long subrun of provisionals.
209 Don't update `provisional' while cancelling provisionals.
210 In big outer loop, handle provisional and nonprovisional separately.
211
212Thu Mar 22 16:35:33 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
213
214 * analyze.c (discard_confusing_lines):
215 The first loops to discard provisionals from ends failed to step.
216 In second such loops, keep discarding all consecutive provisionals.
217 Increase threshold for stopping discarding, and also check for
218 consecutive nondiscardables as separate threshold.
219
220Fri Mar 16 00:33:08 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
221
222 * diff3.c (read_diff): Pass -- as first arg to diff.
223
224 * diff3.c: Include wait.h or define equivalent macros.
225 (read_diff): Don't use stdio printing error in the inferior.
226 Remember the pid and wait for it. Report failing status.
227 Report failure of vfork.
228
229Sun Mar 11 17:10:32 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
230
231 * diff3.c (main): Accept -t options and pass to output_diff3_edscript.
232 (usage): Mention -t.
233 (read_diff): Use vfork.
234 (vfork): Don't use it on Sparc.
235
236 * diff.h (vfork): Don't use it on Sparc.
237
238Tue Mar 6 22:37:20 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
239
240 * diff3.c (dup2): Don't define on Xenix.
241
242 * Makefile: Comments for Xenix.
243
244Thu Mar 1 17:19:23 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
245
246 * analyze.c (diff_2_files): `message' requires three args.
247
248Fri Feb 23 10:56:50 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
249
250 * diff.h, util.c, diff3.c: Change 'void *' to 'VOID *', with
251 VOID defined as void if __STDC__, char if not.
252
253Sun Feb 18 20:31:58 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
254
255 * Makefile: Add rules for getopt.c, getopt1.c, getopt.h.
256
257 * getopt.c, getopt.h, getopt1.c: New files.
258
259 * main.c (main, usage): Add long options.
260
261 * analyze.c (shift_boundaries): Remove unused var 'j_end'.
262
263Thu Feb 8 02:43:16 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
264
265 * GNUmakefile: include ../Makerules before Makefile.
266
267Fri Feb 2 23:21:38 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
268
269 * analyze.c (diif_2_files): If -B or -I, don't return 1
270 if all changes were ignored.
271
272Wed Jan 24 20:43:57 1990 Richard Stallman (rms at albert.ai.mit.edu)
273
274 * diff3.c (fatal): Output to stderr.
275
276Thu Jan 11 00:25:56 1990 David J. MacKenzie (djm at hobbes.ai.mit.edu)
277
278 * diff.c (usage): Mention -v.
279
280Wed Jan 10 16:06:38 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
281
282 * diff3.c (output_diff3_edscript): Return number of overlaps.
283 (main): If have overlaps, exit with status 1.
284
285Sun Dec 24 10:29:20 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
286
287 * io.c (find_equiv_class): Fix typo that came from changing init of B
288 to an assigment.
289
290 * version.c: New file.
291 * diff.c (main): -v prints version number.
292
293 * io.c (binary_file_p): Null char implies binary file.
294
295Fri Nov 17 23:44:55 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
296
297 * util.c (print_1_line): Fix off by 1 error.
298
299Thu Nov 16 13:51:10 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
300
301 * util.c (xcalloc): Function deleted.
302
303 * io.c (slurp): Null-terminate the buffer.
304
305 * io.c (read_files): Delete unused vars.
306
307 * io.c (find_equiv_class): Don't index by N if too low.
308
309 * dir.c (dir_sort): Delete the extra declaration of compare_names.
310
311 * diff.h: Don't declare xcalloc. Declare some other functions.
312
313 * analyze.c (shift_boundaries):
314 Test for END at end of range before indexing by it.
315 Fix typo `preceeding' in var names.
316
317Sat Nov 11 14:04:16 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
318
319 * diff3.c (using_to_diff3_block): Delete unused vars.
320 (make_3way_diff, process_diff_control, read_diff, output_diff3): Likewise.
321
322Mon Nov 6 18:15:50 EST 1989 Jay Fenlason (hack@ai.mit.edu)
323
324 * README Fix typo.
325
326Fri Nov 3 15:27:47 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
327
328 * diff.c (usage): Mention -D.
329
330 * ifdef.c (print_ifdef_hunk): Write comments on #else and #endif.
331
332Sun Oct 29 16:41:07 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
333
334 * diff.c (compare_files): Don't fflush for identical files.
335
336Wed Oct 25 17:57:12 1989 Randy Smith (randy at apple-gunkies.ai.mit.edu)
337
338 * diff3.c (using_to_diff3_block): When defaulting lines from
339 FILE0, only copy up to just under the *lowest* line mentioned
340 in the next diff.
341
342 * diff3.c (fatal): Add \n to error messages.
343
344Wed Oct 25 15:05:49 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
345
346 * Makefile (tapefiles): Add ChangeLog.
347
348Tue Oct 3 00:51:17 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
349
350 * diff3.c (process_diff, create_diff3_block): Init ->next field.
351
352Fri Sep 29 08:16:45 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
353
354 * util.c (line_cmp): Alter end char of line 2, not line 1.
355
356Wed Sep 20 00:12:37 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
357
358 * Makefile (diff.tar): Expect ln to fail on some files;
359 copy them with cp.
360
361Mon Sep 18 02:54:29 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
362
363 * Handle -D option:
364 * io.c (find_and_hash_each_line): Keep all lines of 1st file.
365 * diff.c (main): Handle -D option.
366 (compare_files): Reject -D if files spec'd are directories.
367 * analyze.c (diff_2_files): Handle OUTPUT_IFDEF case.
368
369Fri Sep 1 20:15:50 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
370
371 * diff.c (option_list): Rename arg VECTOR as OPTIONVEC.
372
373Mon Aug 28 17:58:27 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
374
375 * diff.c (compare_files): Clear entire inf[i].stat.
376
377Wed Aug 23 17:48:47 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu)
378
379 * io.c (find_identical_ends): Sign was backward
380 determining where to bound the scan for the suffix.
381
382Wed Aug 16 12:49:16 1989 Richard Stallman (rms at hobbes.ai.mit.edu)
383
384 * analyze.c (diff_2_files): If -q, treat all files as binary.
385 * diff.c (main): Detect -q, record in no_details_flag.
386
387Sun Jul 30 23:12:00 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
388
389 * diff.c (usage): New function.
390 (main): Call it.
391
392Wed Jul 26 02:02:19 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
393
394 * diff.c (main): Make -C imply -c.
395
396Thu Jul 20 17:57:51 1989 Chris Hanson (cph at kleph)
397
398 * io.c (find_and_hash_each_line): Bug fix in context handling,
399 introduced by last change.
400
401Fri Jul 14 17:39:20 1989 Chris Hanson (cph at kleph)
402
403 * analyze.c: To make RCS work correctly on files that don't
404 necessarily end in newline, introduce some changes that cause
405 diffs to be sensitive to missing final newline. Because
406 non-RCS modes don't want to be affected by these changes, they
407 are conditional on `output_style == OUTPUT_RCS'.
408 (diff_2_files) [OUTPUT_RCS]: Suppress the "File X missing
409 newline" message.
410 (build_script) [OUTPUT_RCS]: Cause the last line to compare as
411 different if exactly one of the files is missing its final
412 newline.
413
414 * io.c (find_and_hash_each_line): Bug fix in
415 ignore_space_change mode. Change line's length to include the
416 newline. For OUTPUT_RCS, decrement last line's length if
417 there is no final newline.
418 (find_identical_ends) [OUTPUT_RCS]: If one of the files is
419 missing a final newline, make sure it's not included in either
420 the prefix or suffix.
421
422 * util.c (print_1_line): Change line output routine to account
423 for line length including the newline.
424
425Tue Jun 27 02:35:28 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
426
427 * Makefile: Inserted $(archpfx) where appropriate.
428
429Wed May 17 20:18:43 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
430
431 * diff3.c [USG]: Include fcntl.h.
432
433 * diff.h [USG]: New compilation flags HAVE_NDIR, HAVE_DIRECT.
434
435Wed Apr 26 15:35:57 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
436
437 * dir.c (diff_dirs): Two new args, NONEX1 and NONEX2, say to pretend
438 nonex dirs are empty.
439 (dir_sort): New arg NONEX, likewise.
440 * diff.c (compare_files): Pass those args.
441 Sometimes call diff_dirs if subdir exists in just one place.
442
443Wed Apr 12 01:10:27 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
444
445 * io.c (find_identical_ends): Set END0 *after* last char
446 during backward scan for suffix.
447
448Sat Apr 8 15:49:49 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu)
449
450 * diff3.c (using_to_diff3_block): Now find high marks in files 1
451 and 2 through mapping off of the last difference instead of the
452 first.
453
454 * diff3.c: Many trivial changes to spelling inside comments.
455
456Fri Feb 24 12:38:03 1989 Randall Smith (randy at gluteus.ai.mit.edu)
457
458 * util.c, normal.c, io.c, ed.c, dir.c, diff.h, diff.c, context.c,
459 analyze.c, Makefile: Changed copyright header to conform with new
460 GNU General Public license.
461 * diff3.c: Changed copyright header to conform with new GNU
462 General Public license.
463 * COPYING: Made a hard link to /gp/rms/COPYING.
464
465Fri Feb 24 10:01:58 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
466
467 * io.c (slurp): Leave 2 chars space at end of buffer, not one.
468 (find_identical_ends): Special case if either file is empty;
469 don't try to make a sentinel since could crash.
470
471Wed Feb 15 14:24:48 1989 Jay Fenlason (hack at apple-gunkies.ai.mit.edu)
472
473 * diff3.c (message) Re-wrote routine to avoid using alloca()
474
475Wed Feb 15 06:19:14 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
476
477 * io.c (find_identical_ends): Delete the variable `bytes'.
478
479Sun Feb 12 11:50:36 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
480
481 * io.c (slurp): ->bufsize is nominal amount we have room for;
482 add room for sentinel when calling xmalloc or xrealloc.
483
484 * io.c (find_identical_ends): Do need overrun check in finding suffix.
485
486Fri Feb 10 01:28:15 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
487
488 * diff.c (main): -C now takes arg to specify context length.
489 Now -p to show C function name--Damned IEEE!
490 Fatal error if context length spec'd twice.
491
492 * ed.c (print_ed_hunk): Now special treatment only for lines containing
493 precisely a dot and nothing else. Output `..', end the insert,
494 substitute that one line, then resume the insert if nec.
495
496 * io.c (find_and_hash_lines): When backing up over starting context,
497 don't move past buffer-beg.
498
499 * io.c (find_identical_ends): Use sentinels to make the loops faster.
500 If files are identical, skip the 2nd loop and return quickly.
501 (slurp): Leave 1 char extra space after each buffer.
502
503 * analyze.c (diff_2_files): Mention difference in final newlines.
504
505Wed Jan 25 22:44:44 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
506
507 * dir.c (diff_dirs): Use * when calling fcn ptr variable.
508
509Sat Dec 17 14:12:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
510
511 * Makefile: New vars INSTALL and LIBS used in some rules;
512 provide default defns plus commented-put defns for sysV.
513
514Thu Nov 17 16:42:53 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
515
516 * dir.c (dir_sort): Open-trouble not fatal; just say # files is -1.
517 (diff_dirs): If dir_sort does that, give up and return 2.
518
519 * diff.c (compare_files): Don't open directories.
520 Don't close them specially either.
521 Cross-propagate inf[i].dir_p sooner.
522
523Sun Nov 13 11:19:36 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
524
525 * diff.h: Declare index, rindex.
526
527 * diff.c (compare_files): If comparing foodir with b/f,
528 use foodir/f, not foodir/b/f.
529
530 * diff.c (compare_files): Don't print "are identical" msg for 2 dirs.
531 Status now 1 if one file is a dir and the other isn't, etc.
532
533Thu Nov 3 16:30:24 1988 Randall Smith (randy at gluteus.ai.mit.edu)
534
535 * Makefile: Added a define for diff3 to define DIFF_PROGRAM.
536
537 * util.c: Added hack to make sure that perror was not called with
538 a null pointer.
539
540 * diff.c: Changed S_IFDIR to S_IFMT in masking type of file bits
541 out.
542
543 * diff3.c: Included USG compatibility defines.
544
545 * diff.h: Moved sys/file.h into #else USG section (not needed or
546 wanted on System V).
547
548 * ed.c, analyze.c, context.c: Shortened names to 12 characters for
549 the sake of System V (too simple not to do).
550\f
551Local Variables:
552mode: indented-text
553left-margin: 8
554version-control: never
555End: