1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
Fri Jan 16 14:58:19 1998 Larry Jones <larry.jones@sdrc.com>
* diff.c, diff3.c: Plug memory leaks.
Thu Jan 15 13:36:46 1998 Jim Kingdon <kingdon@harvey.cyclic.com>
* Makefile.in (installdirs): New rule, for when ../Makefile
recurses into this directory (bug reported by W. L. Estes).
Tue Nov 11 10:48:19 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
* diff.c (diff_run): Change #ifdef on HAVE_SETMODE to #if to match
the other uses (fixes compilation error on unix).
* diff.c (diff_run): Don't set stdout to binary mode.
Mon, 10 Nov 1997 Jim Kingdon
* diff.c (run_diff): Open outfile in binary mode if --binary.
Thu Nov 6 12:42:12 1997 Karl Fogel <kfogel@floss.red-bean.com>
and Paul Eggert <eggert@twinsun.com>
* analyze.c: applied Paul Eggert's patch to fix the diff3 merge
bug described in ccvs/doc/DIFFUTILS-2.7-BUG:
(shift_boundaries): new var `inhibit_hunk_merge'; use it to
control something important that I don't quite understand, but
Paul apparently does, so that's okay.
Sat Nov 1 14:17:57 1997 Michael L.H. Brouwer <michael@thi.nl>
* Makefile.in: Add call to ranlib to build a table of contents for
the library since some systems seem to require this.
1997-10-28 Jim Kingdon
* .cvsignore: Add files du jour for Visual C++, vc50.pdb and vc50.idb.
* system.h: Define HAVE_TIME_H.
* dir.c [_WIN32]: Define CLOSEDIR_VOID.
1997-10-18 Jim Kingdon
* build_diff.com: Add diff3.c
Fri Sep 26 14:24:42 1997 Tim Pierce <twp@twp.tezcat.com>
* diff.c (diff_run): Save old value of optind before calling
getopt_long, then restore before returning. Eventually it would
be nice if diff_run were fully reentrant.
New diff3 library for CVS.
* Makefile.in (SOURCES): Add diff3.c.
(OBJECTS): Add diff3.o.
* diff3.c: New file, copied from diffutils-2.7. See diffutils for
earlier ChangeLogs. Undefine initialize_main macro. Remove <signal.h>.
(diff3_run): Renamed from main(). Add `outfile' argument. Remove
SIGCLD handling; we do not fork. Save optind and reset to 0
before calling getopt_long; restore after option processing done.
(read_diff): Use diff_run with a temporary output file,
instead of forking a diff subprocess and reading from a pipe.
Change DIFF_PROGRAM to "diff"; this argument is now used only for
diagnostic reporting.
(xmalloc, xrealloc): Removed.
(diff_program): Removed.
(diff_program_name): Made extern, so it may be used in other
library calls like `error'.
(initialize_main): New function.
Namespace munging. util.c defines both fatal() and
perror_with_exit(), but these cannot be used to abort diff3: both
attempt to longjmp() to a buffer set in diff.c, used only by
diff_run. This is an awful solution, but necessary until the code
can be cleaned up. (These functions do not *have* to be renamed,
since both are declared static to diff3.c and should not clash
with libdiff.a, but it reduces potential confusion.)
* diff3.c (diff3_fatal): Renamed from fatal.
(diff3_perror_with_exit): Renamed from perror_with_exit.
Eliminate exit calls.
(try_help): Change from `void' to `int'. Return, do not exit.
(diff3_fatal, diff3_perror_with_exit, process_diff): Change `exit'
to DIFF3_ABORT.
(diff3_run): Initialize jump buffer for nonlocal exits. Change
exit calls to returns. Change `perror_with_exit' to
`perror_with_name' and add a return. Change `fatal' to
`diff_error' and add a return. The reasoning is that we shouldn't
rely on setjmp/longjmp any more than necessary.
Redirect stdout.
(check_output): Renamed from check_stdout. Take stream argument
instead of blindly checking stdout. Do not close stream, but
merely fflush it.
(diff3_run): Initialize outstream, and close when done. Pass this
stream (instead of stdout) to output_diff3_edscript,
output_diff3_merge, and output_diff3.
Thu Sep 25 14:34:22 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
* util.c (begin_output, finish_output): If PR_PROGRAM is not
defined (VMS), just give a fatal error if --paginate specified.
* Makefile.in (DISTFILES): Add ChangeLog build_diff.com
Makefile.in.
* build_diff.com: New file.
Wed Sep 24 10:27:00 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
* Makefile.in: Also set top_srcdir. Needed to make today's other
Makefile.in change work.
* .cvsignore: New file.
* Makefile.in (COMPILE): Add -I options for srcdir (perhaps
unneeded) and change -I option for lib to use top_srcdir (needed
to avoid mixups with CVS's regex.h vs. the system one).
Sun Sep 21 19:44:42 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
* Makefile.in (util.o): Change util.c to $<, needed for srcdir.
Sat Sep 20 12:06:41 1997 Tim Pierce <twp@twp.tezcat.com>
New diff library for CVS, based on diffutils-2.7. See diffutils
for earlier ChangeLogs.
* Makefile.in, analyze.c, cmpbuf.c, cmpbuf.h, config.hin,
context.c, diagmeet.note, diff.c, diff.h, dir.c, ed.c, ifdef.c,
io.c, normal.c, side.c, stamp-h.in, system.h, util.c, version.c:
New files.
(COMPILE): Add -I../lib, so we can get getopt.h.
* Makefile.in: Removed anything not related to libdiff.a.
(dist-dir): New target, copied from ../lib/Makefile.in.
(DISTFILES): New variable.
(SOURCES): Renamed from `srcs'.
(OBJECTS): Renamed from `libdiff_o'.
(Makefile): Changed dependencies to reflect
new, shallow config directory structure.
(stamp-h.in, config.h.in, config.h, stamp-h): Removed.
* stamp-h.in, config.h.in: Removed.
* system.h: Remove dup2 macro (provided by ../lib/dup2.c).
Include stdlib.h if STDC_HEADERS is defined (not just
HAVE_STDLIB_H).
Sat Sep 20 05:32:18 1997 Tim Pierce <twp@twp.tezcat.com>
Diff librarification.
* diff.c (diff_run): New function, renamed from `main'.
Initialize `outfile' based on the value of the new `out' filename
argument.
(initialize_main): New function.
* system.h: Removed initialize_main macro.
* diffmain.c: New file.
* Makefile.in (diff): Added diffmain.o.
(libdiff): New target.
(AR, libdiff_o): New variables. libdiff_o does not include
xmalloc.o, fnmatch.o, getopt.o, getopt1.o, regex.o or error.o,
because these functions are already present in CVS. It will take
some work to make this more general-purpose.
Redirect standard output.
* util.c: Redirect stdout to outfile: change all naked `printf'
and `putchar' statements to `fprintf (outfile)' and `putc (...,
outfile)' throughout. This should permit redirecting diff output
by changing `outfile' just once in `diff_run'.
(output_in_progress): New variable.
(begin_output, finish_output): Use `output_in_progress', rather than
`outfile', as a semaphore to avoid reentrancy problems.
(finish_output): Close `outfile' only if paginate_flag is set.
* diff.c (check_output): New function, was check_stdout. Take a
`file' argument, and flush it instead of closing it.
(diff_run): Change check_stdout to check_output.
(compare_files): Fflush outfile, not stdout.
Eliminate exit statements.
* diff.h: Include setjmp.h.
(diff_abort_buf): New variable.
(DIFF_ABORT): New macro.
* diff.c (diff_run): Change all `exit' statements to `return'.
Set up diff_abort_buf, so we can abort diff without
terminating (for libdiff.a).
(try_help): Return int instead of void; do not exit.
* util.c (fatal): Use DIFF_ABORT instead of exit.
(pfatal_with_name): Use DIFF_ABORT instead of exit.
Namespace cleanup (rudimentary). Strictly speaking, this is not
necessary to make diff into a library. However, namespace
clashes between diff and CVS must be resolved immediately, since
CVS is the first application targeted for use with difflib.
* analyze.c, diff.c, diff.h, util.c (diff_error): Renamed from `error'.
* version.c, diff.c, diff.h, cmp.c, diff3.c, sdiff.c
(diff_version_string): Renamed from version_string.
* diff.c, util.c, diff.h, diff3.c, error.c (diff_program_name):
Renamed from program_name.
* util.c (xmalloc, xrealloc): Removed.
* Makefile.in (diff_o): Added error.o and xmalloc.o.
|