Debian Codegraph @

ChangeLog

raw
1 2021-12-26 06:46:00-0600 Nelson H. F. Beebe <[email protected]>
2
3 Release bibclean 3.07 with minor patch for --fix-degrees.
4
5 * bibisbn.c: Update version number and date.
6
7 * configure.ac: Update version number and date.
8
9 * fix.c: Preserve space after "St.", "Sta.", and "Ste." in
10 author/editor names.
11
12 * option.c: Update copyright year range.
13
14 2021-08-10 07:49:51-0600 Nelson H. F. Beebe <[email protected]>
15
16 Release bibclean 3.06 with new bibisbn tool.
17
18 * chek.c: Increase STD_MAX_TOKEN from 20000 to 200000 to
19 match TeX Live 2019 and later.
20
21 * fix.c: Rename local variable brace_protect to
22 brace_protect_local to avoid shadowing global variable
23 of same name.
24
25 * isbn.c: Add comment about new bibisbn tool, and code to
26 implement bibisbn.
27
28 2020-05-18 09:29:27-0700 Nelson H. F. Beebe <[email protected]>
29
30 * Release bibclean 3.05 with minor change to support DESTDIR
31 prefix in Makefile install targets (see automake documentation
32 in the section DESTDIR for the motivation and expected
33 behavior). There are no changes in bibclean itself.
34
35 * Makefile.in: Add DESTDIR support.
36
37 * bibclean.man: Update version number and date.
38
39 * bibclean.h: Regenerate from current bibclean.man.
40
41 * test/okay/*.err: Update those that include the bibclean
42 version number.
43
44 2019-11-21 10:50:01-0700 Nelson H. F. Beebe <[email protected]>
45
46 * Prepare, but do not release, bibclean 3.04 with minor changes to
47 address behavior and customization issues raised by a remote
48 user.
49
50 * Makefile.in: Add ${XDEFS} to DEFS value, and add large
51 comment block before XDEFS assignment to document local
52 customizations at some sites.
53
54 * chek.c: Make STD_MAX_TOKEN compile-time settable, and
55 document the reason for the increase in its default value from
56 1000 to 20000 (BibTeX evolution in TeX Live distributions).
57
58 Add a block enabled by nondefault compile-time definition of
59 DOI_RAW_VALID to accept DOI = "10.xxx" values in BibTeX entries.
60 I do NOT want this to be a default for bibclean, because I feel
61 that BibTeX entries should use the URL form of DOI values, and
62 BibTeX styles that support DOI keywords should strip the URL
63 prefix in the output .bbl file.
64
65 * configure.ac: Update version and date.
66
67 * do.c: In do_initfile(), skip comment lines and empty lines,
68 rather than passing them to do_single_arg() or do_new_pattern().
69 That could be considered a bug fix, but I never noticed
70 unexpected behavior in 29 years of use of bibclean on hundreds
71 of millions of BibTeX entries.
72
73 * token.h: Increase MAX_TOKEN from 32760 to 65525 and
74 revise comment documentation that justifies that change.
75
76 2018-03-12 06:44:34-0600 Nelson H. F. Beebe <[email protected]>
77
78 * Release bibclean 3.03 with no user-visible changes, but with
79 internal redesign to eliminate all memory leaks. Previously,
80 the user-extendable ISBN and keywords tables contained a mixture
81 of compile-time static strings, and optional user-provided
82 dynamic strings, so their storage was never dynamically
83 recovered. With the new code in this version, at startup, all
84 static strings in those tables are dynamically reallocated, and
85 then, just before exit, their storage is freed. Memory leak
86 detectors in clang and gcc (compiler options -fsanitize=address
87 -fsanitize=undefined -fsanitize-recover=all), and Solaris dbx
88 (check -all) now report zero memory leaks when execution
89 terminates. While those changes might be seen as cosmetic, they
90 will be beneficial if bibclean is again extended in the future,
91 and new memory leaks appear during development and testing.
92
93 * configure.ac: New name for old configure.in to meet recent
94 autoconf requirements. Update version and PACKAGE_DATE.
95
96 * bibclean.c: Add two function prototypes. Call
97 keyword_initialize() on startup. Add new wrapper function
98 finish(status) to call free_keyword_table() and
99 free_ISBN_table() before successful exits, and replace all but
100 two exit(EXIT_xxx) calls by finish(EXIT_xxx). The exceptions
101 are for fatal errors that are caught early in execution.
102 Failure exits intentionally do not do memory cleanups.
103
104 * bibclean.key: Add rules for ISMN and ORCID-numbers; the latter
105 are present in Web of Science BibTeX output, and record unique
106 check-digited identifiers for authors (see https://orcid.org/
107 and https://en.wikipedia.org/wiki/ORCID).
108
109 * dbx-test.run: New file to automate memory leak checking in
110 Solaris dbx over almost all of the test suite. It uses "check
111 -all" to maximize error checking, but has to use "suppress rui"
112 to suppress read-from-uninitialized checks, because the Solaris
113 C library function, strlen(), raises such errors, perhaps
114 because it acts on words, rather than bytes.
115
116 * do.c: Add new functions free_keyword_table() and
117 keyword_initialize(). Revise add_one_keyword() and
118 add_one_pattern() to free strings before assigning new ones.
119 Change exit() calls to finish() calls to localize memory cleanup
120 immediately before termination.
121
122 * isbn.c: Add new function free_ISBN_table(). Change logic in
123 ISBN_range[] table handling to require (and check for) begin /
124 end / countries triples to be all non--NULL, or all NULL;
125 previously, countries was handled differently. All assignments
126 to ISBN_range[] table entries are now either NULL, or the result
127 of a Strdup() call, so all non--NULL pointers in that table are
128 allowable in FREE() calls.
129
130 * isbn.h: Add function prototype for free_ISBN_table().
131
132 * match.c: Add condition (p >= &line[0]) in loop to ensure that
133 memory before line[0] is never referenced.
134
135 * option.c: Add prototypes for finish() and free_keyword_table().
136 Change exit() calls to finish() calls to localize memory cleanup
137 immediately before termination. Update copyright year ranges.
138
139 * isbn.tbl: change all but last entry's NULL pointers to empty
140 strings ("") to match logic changes in ISBN_range[] table
141 handling.
142
143 * isbn-el-to-bibclean-isbn.awk: Change NULL initializations of
144 countries field to empty string ("") to match logic changes in
145 bibclean to remove all memory leaks.
146
147 * test/plain.bst: Copy of standard BibTeX style file so that
148 systems that have a bibtex executable, but lack that style file,
149 or don't have environment variable search paths to find it
150 elsewhere, can find it here during "make check" runs.
151
152 2017-06-09 08:20:55-0600 Nelson H. F. Beebe <[email protected]>
153
154 * Release bibclean 3.02 with minor extensions.
155
156 * chek.c: Revise validate_DOI() to recognize any of a list
157 of DOI prefixes introduced by the DOI agency in 2016.
158 Revise validate_URL() to recognize "https:" protocol,
159 and to issue only one warning message (previously, two
160 similar warnings could be produced).
161
162 * fix.c: Repair an incorrectly-nested multiline comment.
163
164 * configure.in: Update revision date and version number.
165
166 * keybrd.c and match.c: Tabify leading spaces.
167
168 * test/okay/*.err: Update 5 such files to reflect changes in
169 warning messages.
170
171 2017-04-01 12:11:32-0600 Nelson H F Beebe <[email protected]>
172
173 * Release bibclean 3.01 with support for OpenBSD pledge-style
174 privilege reduction. This is a security feature, and legitimate
175 use of bibclean is not affected. Version 3.01 otherwise behaves
176 identically to 3.00.
177
178 * configure.in: Change version and date.
179
180 * option.c: Revise copyright years.
181
182 2016-02-29 09:55:45-0600 Nelson H. F. Beebe <[email protected]>
183
184 * Release bibclean 3.00 with improved standardization of
185 configure-file installation locations, rehosting of
186 already-built installations in new positions in the file tree,
187 and -[no-]fix-degrees options.
188
189 * configure.in: Change version and date.
190
191 * Makefile.in: Change $(var) to ${var} throughout. Add
192 datarootdir, datadir, bibcleandir, and initdir variables and
193 revise "make install" commands to reflect new locations
194
195 * bibclean.c: Revise locations of installed configuration files.
196 Add large code block near start of main() to permit configuration
197 files to be found relative to the bibclen executable, allowing
198 trivial rehosting of a pre-built installation tree to anywhere
199 else in the filesystem (e.g., in a user's home directory tree).
200 Add declaration of fix_degrees.
201
202 * fix.c: Add new fix_author_degrees() function.
203
204 * option.c: Add support for -[no-]fix-degrees options. Allow
205 USER and HOST to be undefined, and absent from the executable
206 for privacy reasons. Update copyright years.
207
208 2015-02-15 13:40:28-0600 Nelson H. F. Beebe <[email protected]>
209
210 * Release bibclean 2.17.
211
212 * Makefile.in and test/*: Add greatly expanded test suite.
213
214 * configure.in: Change version and date.
215
216 * option.c: Add --no-brace-protect option, and revise copyright years
217
218 2014-04-03 12:10:55-0600 Nelson H. F. Beebe <[email protected]>
219
220 * Release bibclean 2.16 after 15 months of extensive internal
221 use and testing.
222
223 2013-01-01 15:07:45-0700 Nelson H. F. Beebe <[email protected]>
224
225 ============================
226 Development of bibclean 2.16
227 ============================
228
229 This is the first major update of bibclean in a decade, a period in
230 which it has successfully processed millions of BibTeX entries and
231 been an essential, reliable, and robust tool for creating high-quality
232 BibTeX data and databases. During that time, it has exhibited ZERO
233 bugs.
234
235 That decade of use, however, showed limitations in bibclean's cleanup
236 and correction of accents and title bracing, and the manual work
237 necessitated in further repairs of BibTeX entries generated from
238 publisher Web site data made it increasingly urgent to improve
239 bibclean so that a computer can do much more of the bibliographer's
240 drudge work.
241
242 During that decade, document URLs became common, and DOI (Digital
243 Object Identifier) and ISBN-13 book numbers were introduced. In early
244 2013, 40% of the more than 740,000 entries in the TeX User Group and
245 BibNet Project bibliography archives contain URL values, 27% contain
246 DOI values, and 6% contain ISBN-13 values (but they appear in 82% of
247 Book/Proceedings entries). Because ISBNs were only introduced in
248 1972, there will always be a substantial fraction of book-like entries
249 for which no ISBNs have been issued.
250
251 Only limited syntax checking on URLs and DOIs is possible, but because
252 a DOI is intended to be a unique document identifier, it should be
253 rare for there to be more than one DOI value, so this new version
254 checks for exceptions to that rule. It is regrettable that the DOI
255 consortium at
256
257 http://dx.doi.org/
258
259 did not learn from past mistakes, and require a simple but rigorous
260 syntax for all DOI values, and include error correction digits that
261 could be used to detect, and even repair, single and double character
262 errors. All that can be sure about a DOI value is that it begins with
263 "10." followed by a decimal digit string identifying the publisher,
264 followed by a slash, followed by anything whatever. In browser-usable
265 form, it begins "http://dx.doi.org/10."; that site then redirects it
266 to the current owner of the document (the original publisher might no
267 longer exist).
268
269 In 1997, this author developed bibsearch
270
271 http://www.math.utah.edu/pub/bibsearch
272
273 to provide an interface to the MG (Managing Gigabytes) fast free-text
274 search engine. Extensive experience with bibsearch shows that its
275 inability to restrict searches to document subfields is a major
276 limitation: entries can be found quickly (in just milliseconds). As a
277 result, there are usually many entries found that are not of interest,
278 and the search often hides the sought-for golden needle in a file of
279 chaff. Also, it is not possible to easily extract subsets of the
280 date, such as a list of unique authors or journals whose entries match
281 the search.
282
283 Consequently, in 2008, this author developed bibtosql and bibsql: see
284
285 http://www.math.utah.edu/~beebe/talks/index.html#2009
286 http://www.math.utah.edu/pub/bibsql
287
288 They provide a way to get clean (thanks to bibclean!) BibTeX data
289 into, and out of, three different SQL databases (MySQL, PostgreSQL,
290 and SQLite3). That makes it possible to do precise subfield
291 searching, with SQL queries like this:
292
293 select filename, year, label from bibtab
294 where (author like '%Knuth%')
295 and (title like '%TeX%')
296 order by filename, year, label;
297
298 It also allows implementing extensive sanity checks on BibTeX data
299 (e.g., find unexpected digits in author or editor values, probably
300 left there because of errors in conversion of publisher data that
301 superscripted author names to relate them to author address values).
302 Those sanity checks are now run automatically prior to Web publication
303 of newly-updated or newly-released BibTeX files at the sites
304
305 http://www.math.utah.edu/pub/bibnet/
306 http://www.math.utah.edu/pub/tex/bib/index-table.html
307
308 SQL searches also facilitate automated extraction of material from the
309 entire corpus for use in other BibTeX bibliographies. Nightly cron
310 jobs produce temporary files containing possible updates to author-
311 and subject-specific bibliographies, making it much less likely that
312 new material is overlooked. Cron jobs run several times daily update
313 the SQL databases with data from recently-changed BibTeX files.
314
315 An rcsdiff of the final code for bibclean version 2.16 shows about 530
316 replaced lines (out of about 15,260 original lines of code in version
317 2.15), and 2900 new lines. Thus, version 2.16 is a SUBSTANTIAL update
318 that must receive extensive local use before it is released on the Web
319 at
320
321 http://www.math.utah.edu/pub/bibclean
322
323 Here is a summary of the many changes for version 2.16:
324
325 * Change license fields in comment preambles from "public
326 domain" to "GNU General Public License, version 2 or later".
327
328 * Change copyright owner to include the Free Software
329 Foundation.
330
331 * Makefile.in: Change file order in cmp and diff commands in
332 check targets to conventional order "diff oldfile newfile".
333
334 Add new check-syntax target and several related targets for
335 additional source-code syntax checking.
336
337 Add more tests to CHECK-BIBTEX list, and remove their file
338 extensions, with suitable changes in the commands in the
339 check-bibtex target.
340
341 Extend check-bibtex target commands to number the tests, and
342 produce reports of passes and failures; expect a final
343 report that says ALL TESTS PASSED!
344
345 * README: Update author addresses.
346
347 * bibclean.c: Update author addresses. Add declaration of new
348 brace_protect, fix_accents, fix_font_changes, and fix_math
349 options. Use new IN_SET() macro to simplify some coding.
350 Revise warning location data to use conventional GNU-style
351 filename:lineno:message format, but retain WARNING_PREFIX on
352 stdout so that warnings in the output can be readily found
353 and removed as repairs are made.
354
355 * bibclean.h: Regenerate to reflect new options and their
356 documentation.
357
358 * bibclean.ini: Add three more bibdate patterns and two more
359 pages patterns.
360
361 * bibclean.man: Update author addresses. Document new options
362 (-copyleft, -copyright, -[no]-brace-protect,
363 -[no-]fix-accents) (-[no-]fix-braces, -[no-]fix-math,
364 -[no-]quiet, and -output-file).
365
366 * chek.c: Add new functions for ISBN-13 and ISSN-L support, and
367 limited checks on DOI and URL values.
368
369 * configure.in: Update version number and date, and add checks
370 for six extra C/C++ syntax checkers, and for a declaration of
371 fileno().
372
373 * configure: Regenerate with latest autoconf (2.69).
374
375 * custom.h: Add definition of IN_SET() macro.
376
377 * chek.c: Add new functions bad_ISBN_13(), check_DOI(),
378 check_ISBN_13(), check_ISSN_L(), is_DOI_char(),
379 is_ISBN_13_char(), validate_DOI(), validate_ISBN_13(), and
380 validate_URL().
381
382 * do.c: Add booktitle to fixes[]. Add DOI, ISBN-13, and
383 ISSN_L to checks[]. Add book-DOI, book-URL, DOI, ISBN-13,
384 ISSN-L, xxDOI, ZMclass, ZMnumber, and ZMreviewer to
385 field_pair[]. Use new IN_SET() macro to simplify some
386 coding. Remove one unused format item in a debug print
387 statement. Bind editor field to check_other() (like the
388 author field: the editor field had been forgotten in earlier
389 bibclean versions). Bind abstract, annote, note, and remark
390 to fix_math_spacing(). Bind booktitle to fix_title().
391
392 * fix.c: Replace bracing algorithm in fix_title() and put
393 its use under control of the new -brace-protect option. Add
394 new functions fix_accent_bracing(), fix_math_spacing(), and
395 squeeze_space() for support of the new fix-accents and
396 -fix-math options. Use new IN_SET() macro to simplify some
397 coding. Add several macros (COPY_1(), COPY_2(), ...,
398 STORE_NUL()) to simplify coding.
399
400 REMARK: the complex -fix-accents, -fix-braces, and -fix-math
401 support is the largest feature addition with this release,
402 and will save me much time in future Web-to-BibTeX data
403 conversions.
404
405 * fndfil.c: Use new IN_SET() macro to simplify some coding.
406
407 * isbn.c: Add new functions fix_ISBN_13(),
408 hyphenate_one_ISBN_13(), and next_ISBN_13().
409
410 * isbn.tbl: New version with latest ISBN pattern data fetched on
411 08 January 2013 from
412
413 http://www.isbn-international.org/agency?rmpdf=1
414 http://www.isbn-international.org/agency?rmpdf=1&sort=agency
415 http://www.isbn-international.org/agency?rmxml=1
416 http://www.isbn-international.org/page/ranges
417
418 and converted from XML to Emacs Lisp code with
419 RangeMessage-xml-to-el.awk and from that output, to an
420 initializer in C code with isbn-el-to-bibclean-isbn.awk.
421
422 It is important to update isbn.tbl INFREQUENTLY, because that
423 requires rebuilding and reinstalling bibclean. Instead, just
424 add new patterns to the bibclean.isbn file that is normally
425 installed as the hidden file $(prefix)/bin/.bibclean.isbn.
426 There have been lots of changes to the ISBN patterns since the
427 previous version of isbn.tbl from 23-Aug-2003, so it was
428 worthwhile to update it for this major new release of
429 bibclean.
430
431 * keybrd.c: Move two declarations inside nearest enclosing
432 braced statement. Make kbcode() and kbget() static, because
433 they are not used outside this file.
434
435 * match.c: Use new IN_SET() macro to simplify some coding.
436
437 * option.c: Update author addresses. Add support for new options
438 (-copyleft, -copyright, -[no]-brace-protect,
439 -[no-]fix-accents) (-[no-]fix-braces, -[no-]fix-math,
440 -[no-]quiet, and -output-file). Include copyleft statement
441 in -version output. Remove duplication of option lists in
442 two functions by using new top-level help_lines[] array.
443
444 * save/*: Update with current file versions.
445
446 * test/*.{bib,opt}: Add several new tests of new features.
447
448 * test/okay/*: Update to reflect changed behavior of this
449 version of bibclean.
450
451 * test/testopt[l-o].{bib,opt}: test files for new features.
452
453 * xstdio.h: Add additional test for HAVE_FILENO_DECL.
454
455 2003-08-23 19:30:25-0600 Nelson H. F. Beebe <[email protected]>
456
457 * Makefile.in: Update CPPFLAGS and LDFLAGS to import
458 configure-time values. Add doc/bibclean.pdf,
459 doc/bibclean.ps, tstctype.c, and typedefs.h to DIST-FILES.
460 Add check-setup target so that compilations of test programs
461 do not clutter test output. Add new check-ctype test, after
462 tracing test failures on OpenBSD 3.2 to broken <ctype.h>
463 support. Supply some missing echo statements to make the
464 test output wrappers similar. Add check for missing LaTeX
465 and/or BibTeX in check-scribe. Add FIXBLG macro and use to
466 remove unwanted crud from .blg files. Add tstctype target.
467
468 * bibclean.c: Update version number to 2.14, and update file
469 header FAX number.
470
471 * configure.in: Update version number to 2.14, and add check for
472 _Bool type.
473
474 * isbn.tbl: Update from latest emacs.el.
475
476 * xstdbool.h: When <stdbool.h> is not available, remap _Bool to
477 private type to avoid reserved-word conflicts on some recent
478 compilers.
479
480
481 2003-08-22 16:57:15-0600 Nelson H. F. Beebe <[email protected]>
482
483 Start new version 2.14, as promised below in log entry for
484 2001-08-29 16:41:50-0600.
485
486 More changes to make splint (formerly, lclint) much happier.
487 Also, introduce use of C++98/C99 bool type, wrapped for
488 portability to older compilers. Eventually, bool may replace the
489 similar YESorNO type. Use of bool provides splint with more
490 information, enhancing error checking.
491
492 * Makefile.in: Update many dependency lists to add new header
493 files. Add splint and splint.log targets. Add SPLINT,
494 SPLINTFLAGS, and XSPLINTFLAGS macros.
495
496 * custom.h: Add splint annotations.
497
498 * ch.h: Add several (int) typecasts to reduce instances of
499 char/int type mixing.
500
501 * isbn.h: Add splint annotations.
502
503 * match.h: Add splint annotations. Add file wrapper conditional.
504
505 * token.h: Increase MAX_TOKEN, and add long comment about it.
506
507 * typedefs.h: New file to avoid duplication of seven typedefs in
508 several source files.
509
510 * xctype.h: Change definitions of Isxxx() macros to produce
511 Boolean result.
512
513 * xlimits.h: Remove L suffix on INT_MAX value.
514
515 * xstdbool.h: New file to wrap C99 <stdbool.h>
516
517 * yesorno.h: Add file wrapper conditional.
518
519 * configure.in: Add check for stdbool.h and SPLINT.
520
521 * bibclean.c: Add splint annotations. Move typedefs into
522 typedefs.h. Include typedefs.h and xstdbool.h. Add several
523 (int) typecasts to reduce instances of char/int type mixing.
524 Change isxxx() functions to is_xxx() to avoid conflict with
525 reserved names in C89 and C99, and make their type bool instead
526 of int. Change conditionals based on zero/nonzero tests to
527 explicit Boolean relational expressions.
528
529 * chek.c: Add splint annotations. Move typedefs into typedefs.h.
530 Include typedefs.h. Add several (int) typecasts to reduce
531 instances of char/int type mixing. Change isxxx() functions to
532 Isxxx().
533
534 * do.c: Add splint annotations. Move typedefs into typedefs.h.
535 Include typedefs.h. Add several (char) and (int) typecasts to
536 reduce instances of char/int type mixing. Change isxxx()
537 functions to Isxxx(). Change isxxx() functions to is_xxx() to
538 avoid conflict with reserved names in C89 and C99, and make
539 their type bool instead of int.
540
541 * fix.c: Add splint annotations. Move typedefs into typedefs.h.
542 Include match.h and typedefs.h. Add several (char) and (int)
543 typecasts to reduce instances of char/int type mixing.
544
545 * fndfil.c: Add splint annotations. Include xstdbool.h. Add
546 several (char) and (int) typecasts to reduce instances of
547 char/int type mixing. Change isxxx() functions to Isxxx().
548 Change isxxx() functions to is_xxx() to avoid conflict with
549 reserved names in C89 and C99, and make their type bool instead
550 of int. Change conditionals based on zero/nonzero tests to
551 explicit Boolean relational expressions. Rename
552 file_is_readable() and FILE_IS_READABLE() to is_file_readable()
553 and IS_FILE_READABLE(), and change their type from int to bool.
554
555 * isbn.c: Add splint annotations. Include xstdbool.h. Add several
556 (char) and (int) typecasts to reduce instances of char/int type
557 mixing. Change isxxx() functions to Isxxx(). Change
558 conditionals based on zero/nonzero tests to explicit Boolean
559 relational expressions.
560
561 * keybrd.c: Add several (int) typecasts to reduce instances of
562 char/int type mixing. Change conditionals based on zero/nonzero
563 tests to explicit Boolean relational expressions.
564
565 * match.c: Add splint annotations. Include xstdbool.h. Add several
566 (char) and (int) typecasts to reduce instances of char/int type
567 mixing. Change isxxx() functions to Isxxx(). Change
568 conditionals based on zero/nonzero tests to explicit Boolean
569 relational expressions.
570
571 * option.c: Add splint annotations. Move typedefs into
572 typedefs.h. Include typedefs.h and xstdbool.h. Add several
573 (char) and (int) typecasts to reduce instances of char/int type
574 mixing. Change isxxx() functions to Isxxx(). Change isxxx()
575 functions to is_xxx() to avoid conflict with reserved names in
576 C89 and C99, and make their type bool instead of int. Change
577 conditionals based on zero/nonzero tests to explicit Boolean
578 relational expressions.
579
580 * romtol.c: Add splint annotations. Include xstdbool.h. Add
581 several (char) and (int) typecasts to reduce instances of
582 char/int type mixing. Change isxxx() functions to Isxxx().
583 Change isxxx() functions to is_xxx() to avoid conflict with
584 reserved names in C89 and C99, and make their type bool instead
585 of int. Change conditionals based on zero/nonzero tests to
586 explicit Boolean relational expressions.
587
588 * strist.c: Change conditionals based on zero/nonzero tests to
589 explicit Boolean relational expressions.
590
591 * strtol.c: Add splint annotations. Include xstdbool.h. Check
592 for NULL nptr. Add several (char) and (int) typecasts to reduce
593 instances of char/int type mixing. Change isxxx() functions to
594 Isxxx(). Change conditionals based on zero/nonzero tests to
595 explicit Boolean relational expressions. Change int negative to
596 bool is_negative.
597
598 * vaxvms.c: Add splint annotations. Change isxxx() functions to
599 Isxxx().
600
601 * vmswild.c: Add splint annotations. Change isxxx() functions to
602 is_xxx() to avoid conflict with reserved names in C89 and C99,
603 and make their type bool instead of int.
604
605
606 2001-10-06 15:45:03-0600 Nelson H. F. Beebe <[email protected]>
607
608 These changes for version 2.13 were suggested by the excellent
609 lclint utility, or by more C++ compilations:
610
611 * bibclean.c: Reset pt->patterns to NULL after freeing its
612 storage.
613
614 * chek.c: Include xstdlib.h to get strtol() prototype.
615
616 * fix.c: Add checks for NULL author argument, and NULL next
617 pointer.
618
619 * isbn.c: Add check for NULL the_countries pointer.
620
621 * keybrd.c: Add lclint /*@-modobserver@*/ comment.
622
623 * match.c: Add lclint and lint fall-through comments, and correct
624 type of string-length argument in sprintf() call from size_t to
625 int.
626
627 * vmswild.c: Set p to NULL after freeing its storage.
628
629 * Makefile.in:
630 Update file lists.
631
632 Do not save bibtex's stdout for comparisons with master copies,
633 because some bibtex versions produce memory usage statistics on
634 stdout, and others do not.
635
636
637 2001-08-29 16:41:50-0600 Nelson H. F. Beebe <[email protected]>
638
639 * Release version 2.12. This release has been delayed since the
640 `completion' logged below on 7-Nov-2000, partly for lack of time
641 to complete extensive testing, but mostly to resolve the problem
642 of getting up-to-date ISBN data. Both of these have now been
643 satisfactorily dealt with, :^)!
644
645 A companion version 2.13 will be released shortly; it is
646 intended that its source code (*.c, *.h, configure.in) be
647 identical to that of 2.12, apart from version numbering;
648 however, the 2.13 test suite has been completely redesigned and
649 extended. Source changes beyond 2.13 will be incorporated in
650 version 2.14.
651
652
653 2001-08-29 16:17:51-0600 Nelson H. F. Beebe <[email protected]>
654
655 * isbn.c: Fix bug in add_one_ISBN_range(): incorrectly assigned
656 NULL the_countries instead of "" to ISBN_range[where].countries,
657 invalidating the requirement of non-NULL entries in the
658 ISBN_range[] table (except for the last one, which flags table
659 end).
660
661 Fix bug in do_print_ISBN_table(): when
662 ISBN_range[k].countries[0] == "", set country_names to NULL
663 instead of "". Otherwise, the output incorrectly contains bogus
664 empty lines.
665
666 * isbn.tbl: Replace contents with data derived automatically on
667 8-Aug-2001 from data at the International ISBN Agency Web site.
668 Work in November 2000 with that data turned up a number of
669 errors and omissions which were reported to the Agency, and have
670 now been repaired.
671
672 * bibclean.isbn: New file obtained from "./bibclean
673 --print-ISBN-table". Since this data is already provided in
674 isbn.tbl, this file is superfluous, but is retained (and will be
675 installed) as a demonstration of the dynamic ISBN table
676 facility.
677
678
679 2001-08-28 18:50:34-0600 Nelson H. F. Beebe <[email protected]>
680
681 * Makefile.in: Major overhaul of check target family, replacing
682 all TEST-xxx variables and test-xxx targets, with CHECK-xxx
683 variables and check-xxx targets. This gives much cleaner test
684 output, analogous to what many other packages now use. Instead
685 of top-level test*.* files, there is now a directory tree test
686 with input files, and test/okay with expected output files.
687
688 Testing with "make check" is divided into five subtargets
689 (check-match check-romtol check-bibtex check-latex
690 check-scribe), each of which includes a loop over base files,
691 making it trivial to add new tests, simply by updating the
692 CHECK-xxx variables, and adding suitable input files in ./test.
693
694 About 20 new tests have been added to check the parsing of most
695 of the command line options that can be tested portably
696 (-trace-file-opening cannot be, since the output depends on
697 user-defined search paths and local directory tree conventions).
698 Lack of such testing in previous versions was responsible for
699 the omitted -no-keep-string-spaces table entry bug (see below).
700
701 Update install-xxx targets.
702
703 * Makefile.in: Update comments to Lisp style. Add uninstall-xxx
704 targets.
705
706 * bibclean.c: Add code to out_lines() to make screen_lines == 0
707 suppress paging, so that --help can be used in batch mode, for
708 testing, or dumping the entire help document.
709
710 * keybrd.c: Add code in get_screen_lines() to return 0 if either
711 stdin or stdout is not a terminal device.
712
713 * option.c: Add missing -no-keep-string-spaces option entry in
714 options[].
715
716 * option.c: Change BIBCLEAN_VERSION to use PACKAGE_xxx variables
717 set in configure.in, to remove the need to update this file when
718 the version number changes.
719
720 * match.c: Supply missing semicolon in K&R declaration of
721 match_failure().
722
723
724 2001-08-27 12:36:34-0600 Nelson H. F. Beebe <[email protected]>
725
726 * bibclean.c: Update version number to 2.13.
727
728 * option.c: Update version number to 2.13, and include xlimits.h.
729
730 * testisxn.{eok,bok}: Update to reflect new output.
731
732 * Makefile.in: Update distclean target removals.
733
734 * acconfig.h: Remove (subsumed by new configure.in file).
735
736 * configure.in: Update with new autoconf-2.5x AH_TEMPLATE() and
737 AH_BOTTOM() macros that allow elimination of acconfig.h,
738 update call to AC_INIT(), and add call to new AC_CONFIG_SRCDIR().
739
740 * custom.h: Update with material previously included in
741 hand-generated config.hin. That file is now created
742 automatically by autoheader.
743
744
745 2000-11-25 Nelson H. F. Beebe <[email protected]>
746
747 * Replace isbn.tbl with new (25-Nov-2000) data derived
748 automatically from the World-Wide Web site of The International
749 ISBN Agency at
750
751 http://www.isbn.spk-berlin.de/html/prefix.htm
752
753 This data is at least a year newer than the previous contents of
754 isbn.tbl, and includes several new regions (\approx countries),
755 and a great many changes in allowable publisher ranges.
756
757 Provided that Web site continues to be accessible, it should be
758 possible to simply provide updates to .bibclean.isbn, instead of
759 changing isbn.tbl, and releasing a new version of bibclean.
760
761
762 2000-11-25 Nelson H. F. Beebe <[email protected]>
763
764 * Version 2.13 almost completed.
765
766 * Add missing array dimension in isbn.tbl; this bug
767 was in isbn-el-to-bibclean-isbn.awk, and has been
768 fixed there too.
769
770 * In isbn.c, assign "" instead of the_countries to
771 ISBN_range[where].countries, because it is not expected to ever
772 be a NULL pointer. If it is, then there can be a NULL pointer
773 dereference when a .bibclean.isbn file is read and processed.
774
775 1999-11-07 Nelson H. F. Beebe <[email protected]>
776
777 * Version 2.12 completed.
778
779 * Implement eight new options: "-ISBN-file filename",
780 "-keyword-file filename", "-[no-]debug-match-failures",
781 "-[no-]print-ISBN-table", and "-[no-]print-keyword-table".
782
783 * Files changed with this release: ChangeLog, Makefile.in,
784 bibclean.c, bibclean.h, bibclean.hlp, bibclean.html,
785 bibclean.man, bibclean.pdf, bibclean.ps, bibclean.txt,
786 configure, configure.sed, do.c, fndfil.c, isbn.c, keybrd.c,
787 match.c, match.lok, option.c, romtol.c, testisxn.bok,
788 testisxn.eok, and xstring.h.
789
790 * Files new with this release: isbn.h and isbn.tbl.
791
792 * Makefile.in: adjust dependency lists, and add bibclean.html and
793 bibclean.pdf to the docs target
794
795 * bibclean.c: add definitions of compile-time overridable
796 environment variables BIBCLEANISBN and BIBCLEANKEY, with
797 suitable default definitions of their files.
798
799 * bibclean.c: add new code to call do_ISBN_file(),
800 do_keyword_file(), do_print_ISBN_table(), and
801 do_print_keyword_table().
802
803 * bibclean.c: Add two blanks to trace-file-opening output string
804 to get lineup with new tracing in fndfil.c:file_is_readable().
805
806 * bibclean.h: regenerate to include documentation of new
807 commands.
808
809 * bibclean.hlp: regenerate automatically
810
811 * bibclean.html: regenerate automatically
812
813 * bibclean.man: update with documentation of the new options,
814 and new sections "ISBN INITIALIZATION FILES" and "KEYWORD
815 INITIALIZATION FILES"
816
817 * bibclean.pdf: regenerate automatically
818
819 * bibclean.ps: regenerate automatically
820
821 * bibclean.txt: regenerate automatically
822
823 * configure: regenerate automatically
824
825 * configure.sed: extend with substitutions to remove the
826 non-portable default compiler options that autoconf generates
827
828 * do.c: major update with new functions add_keyword(),
829 add_one_keyword(), do_keyword_file, and
830 do_print_keyword_table() to handle two of the new options.
831
832 These new functions are quite similar to new ones in isbn.c,
833 but not sufficiently so to permit code sharing without further
834 generalization. Once the ISBN ones were written and debugged,
835 the ones in this file were produced from them by
836 straightforward edit substitutions, and worked correctly
837 immediately.
838
839 Replace strcmp() uses by calls to STREQUAL macro.
840
841 Move field_pair[] out of do_field() into private file scope,
842 so that it can be accesed by the new functions.
843
844 Add MRclass and xxMRclass to the field_pair[] table.
845
846 Remove duplicate xxURI from field_pair[] table.
847
848 Give field_pair[] a compile-time adjustable size MAX_KEYWORD,
849 with plenty of extra space for run-time updates (I do not want
850 to use malloc() to expand this table).
851
852 * fndfil.c: Replace lone strcmp() use by call to STREQUAL macro.
853
854 * fndfil.c: Replace FILE_IS_READABLE() macro to call new function
855 file_is_readable(), which now provides tracing of access() calls.
856
857 * isbn.c: major update with new functions add_ISBN_range(),
858 add_one_ISBN_range(), do_print_ISBN_table(),
859 is_valid_ISBN_prefix(), ISBN_match_country_language(), and
860 ISBN_initialize() to support two of the new options.
861
862 Move the ISBN_range[] table out of fix_ISBN() into private
863 file scope, so that it can be accessed by the new functions.
864
865 Give ISBN_range[] a compile-time adjustable size
866 MAX_ISBN_RANGE, with plenty of extra space for run-time
867 updates (I do not want to use malloc() to expand this table).
868
869 Apply massive update to ISBN_range[] table entries to reflect
870 changes from the ISBN numeric index registry volume
871 (Publishers' International ISBN Directory, 19th edition,
872 1992/1993, Volume 2, Numerical ISBN Section, R. R. Bowker, New
873 York, 1992, ISBN 3-598-21601-7, to the same volume of the 25th
874 edition, 1998/1999, ISBN 3-598-21607-6). The need for such
875 updates was a major impetus for the new run-time ISBN-range
876 customization features.
877
878 The companion Emacs Lisp file, isbn.el, has been similarly
879 updated; it is not included in the bibclean distribution, but
880 can be obtained at either of these locations:
881
882 ftp://ftp.math.utah.edu/pub/emacs/isbn.el
883 http://www.math.utah.edu/pub/emacs/isbn.el
884
885 Replace calls to strcmp() by STREQUAL and STRGREATER macros.
886
887 * isbn.h: new file to encapulate public interface to ISBN
888 support code.
889
890 * isbn.tbl: new file containing initialization of ISBN_range[]
891 table; this file is generated automatically from isbn.el by
892 a new awk program, isbn-el-to-bibclean-isbn.awk.
893
894 * keybrd.c: change bindings of \r and \n from KEYBOARD_DOWN
895 to KEYBOARD_PGDN, to match bindings in more and less pagers.
896
897 * match.c: add support for new "-[no-]debug-match-failures"
898 options, with new functions match_failure() and
899 match_warning().
900
901 Rename private macro isspecial() to is_special() to avoid
902 conflict with that name in <ctype.h> on Apple Macintosh
903 Rhapsody 5.5, sigh... I believe that their supplying
904 such a symbol is a violation of ANSI/ISO Standard C, which
905 reserves names matching "^(is|to)[a-z][a-zA-Z0-9_]*$" for
906 future expansion.
907
908 Correct bug in handling of '.' pattern.
909
910 Update comment in main() test program to document which keys
911 are handled.
912
913 Add definition of MIN() macro.
914
915 Correct `Roman' to `roman'.
916
917 * option.c: update BIBCLEAN_VERSION to reflect this release.
918
919 Add support for the new options, with additional entries in
920 the options[] table in do_args(), new usage summaries in
921 opt_help() and usage(), and new functions
922 opt_debug_match_failures(), opt_ISBN_file(),
923 opt_keyword_file(), opt_print_ISBN_table(), and
924 opt_print_keyword_table().
925
926 * romtol.c: change from gets() to fgets(), for safety (though
927 that function was used only in the test program, and did not
928 compromise the security of bibclean)
929
930 * xstring.h: add STRGREATER macro
931
932
933 Sun May 10 06:28:55 1998 Nelson H. F. Beebe <[email protected]>
934
935 * Version 2.11.4 completed.
936
937 * Files changed with this release: ChangeLog Makefile.in README
938 bibclean.c bibclean.h bibclean.html bibclean.man custom.h fix.c
939 isbn.c option.c.
940
941 * New files with this release: testbib6.bok testbib6.eok
942 testbib6.org.
943
944 * Makefile.in: Add testbib6.org to the BIBTEX-TESTS list to
945 exercise the bug fix in fix_month() described below.
946
947 Change modes of installed files to permit group write access.
948
949 Change the mode of the installed .bibcleanrc file to ensure
950 readability.
951
952 Save any old installed version of bibclean as bibclean.old during
953 "make install".
954
955 Create a hard link from the installed bibclean to bibclean-2.11.4,
956 and similarly, for the installed manual page. That way, if a
957 later version comes out and is installed, then bibclean-2.11.4
958 will still remain accessible. [I'm doing this for all of my
959 software distributions; extensive experience with GNUware, and
960 even commercial packages like Matlab and Maple, on ten
961 architectures, has shown the desirability of having multiple
962 versions available as a check when a suspected bug turns up.]
963
964 The "make uninstall" command will remove the
965 version-number-specific installed files, if you wish to back out
966 of an install.
967
968 Change symbolic links to hard links; they are all used in a
969 context where this has no side effects.
970
971 Change CP to mean "rcp -p", so as to preserve file time stamps on
972 installation.
973
974 * README: Update my mailing addresses.
975
976 * bibclean.c: Update my mailing addresses in the file header.
977
978 * bibclean.h: Automatically generated from the formatted output of
979 bibclean.man to include that file's changes.
980
981 * bibclean.hhtml: Automatically generated from bibclean.man to
982 include that file's changes.
983
984 * bibclean.man: Update my mailing addresses in the file header and
985 the AUTHOR section. Document the new exit behavior for -author
986 and -version. Documen the new GNU/POSIX --option support, and add
987 a paragraph on the handling of filenames that would be confused
988 with option names. Add cross references to bibcheck(1),
989 bibdup(1), bibjoin(1), biblabel(), and biborder(1).
990
991 * custom.h: Change type of sleep() on NeXT from int to unsigned
992 int.
993
994 * fix.c: Fix a rarely-encountered, but long-standing, bug in
995 fix_month(). Prior to this version, a value
996
997 mar # "\slash" # apr
998
999 would be incorrectly transformed
1000
1001 month = mar # "\slash" # " # apr # "
1002
1003 because in_quoted_string was incorrect for the remaineder of
1004 the value.
1005
1006 If the input value was changed to
1007
1008 mar # "\slash " # apr
1009
1010 then that space inside the quoted string preserved the correctness
1011 of in_quoted_string, and the output was correct.
1012
1013 * isbn.c: Add several countries to the list of recognized ISBN
1014 prefixes. Similar updates have been added to the Emacs Lisp file,
1015 isbn.el, available in a separate software distribution. Update my
1016 mailing addresses in the file header.
1017
1018 * option.c: : Update my mailing addresses on opt_author(). Add
1019 support for GNU/POSIX-style --options. Update bibclean version
1020 number. Make -author and -version handling exit with a success
1021 code after their output on stderr.
1022
1023
1024 Sat May 4 07:52:26 1996 Nelson H. F. Beebe <[email protected]>
1025
1026 * Version 2.11.3 (final edits before public release)
1027
1028 * Build and test bibclean under 8 IBM PC DOS C and C++
1029 compilers, and under VAX VMS 6.1. bibclean already builds and
1030 tests successfully under about 40 C and C++ compilers on 10
1031 different UNIX architectures.
1032
1033 * Update README, ibmpc/dos/README and vms/vax/README files.
1034
1035 * In bibclean.c, move sanity checks on HAVE_xxx pattern matching
1036 flags to custom.h.
1037
1038 * In bibclean.man, update version release date to match that set
1039 in option.c.
1040
1041 * In chek.c, update computation of stdlog_on_stdout to be
1042 stricter. Fix off-by-one error in loop termination condition in
1043 u72copy_element(). Add code in copy_element() to skip trailing
1044 space and hyphens, to avoid generating bogus warnings about
1045 checksum mismatches.
1046
1047 * In configure.in, remove -g from CFLAGS if we are compiling
1048 with lcc because it produces bad debug symbol tables on Sun
1049 Solaris 2.x.
1050
1051 * In do.c, remove unused LAST_SCREEN_LINE macro. Change open of
1052 bibliography files to use binary mode in OS_PCDOS.
1053
1054 * In fix.c, change types of n and nupper in fix_title() from int
1055 to size_t to avoid type conflict warnings from some compilers.
1056
1057 * In fndfil.c, remove unused NEWLINE() macro. Update remainder
1058 of code to match fndfil.c in DVI 3.0 development tree.
1059
1060 * In isbn.c, add workaround for bug in Watcom 10.0 C++ compilers
1061 in ISBN_hyphenate(). Fix serious bug in squeeze_ISBN() that had
1062 gone undetected for a very long time: the loop exit condition
1063 referred to in_ISBN instead of *in_ISBN.
1064
1065 * In keybrd.c, add #include <starlet.h> to get some needed
1066 library function headers. Remove some old unused macros.
1067 Update get_screen_lines() for VAX VMS 6.x.
1068
1069 * In Makefile.in, remove some obsolete files and targets, update
1070 the DIST-FILES list, and add missing testbib5.org file to
1071 BIBTEX-TESTS list. Remove DIST-FILES-BIN list, since the share
1072 bundle option is no longer provided, and DIST-FILES now has all
1073 files listed. Add match, romtol, and subdist targets. Add
1074 dependency on subdist of distribution file targets. Add
1075 test-match and test-romtol targets.
1076
1077 * In match.c, add month_patterns[], pages_patterns[], and
1078 volume_patterns[]. Update messages to include input line
1079 number. Modify process() to accept ``key = "value",'' lines
1080 that can be easily extracted from bibliography file collections.
1081 A test suite has been prepared in match.dat, and the test-match
1082 and match targets added to Makefile.in to support this testing.
1083
1084 * In option.c, update release date in BIBCLEAN_VERSION.
1085
1086 * In vaxvms.c, include <lib$routines.h> and <starlet.h> for more
1087 function prototypes. Update for VAX VMS 6.x. Add conditionals
1088 around memxxx() functions, so as to avoid linker warnings about
1089 duplicate symbols, and add missing return values in the memxxx()
1090 functions. Change LIB$SPAWN to lib$spawn.
1091
1092 * In vmswild.c, remove unused LINSIZ macro.
1093
1094
1095 Sun Apr 28 08:54:38 1996 Nelson H. F. Beebe <[email protected]>
1096
1097 * Version 2.11.3 (continued):
1098
1099 * Makefile.in (test-bibtex): Add test-bibtex-7 with test files
1100 testcodn.{org,bok,eok}, to test CODEN handling.
1101
1102
1103 Thu Apr 25 11:24:18 1996 Nelson H. F. Beebe <[email protected]>
1104
1105 * Version 2.11.3:
1106
1107 * In bibclean.c, remove declarations of unused functions that
1108 were moved to new file chek.c in 2.11.0. Change one test (n <=
1109 0) to (n == 0) to avoid compiler warnings about test of unsigned
1110 values for being negative.
1111
1112 * Add CODEN validation support to chek.c, and completely rewrite
1113 the ISBN and ISSN handling. The reason for the latter is that
1114 by defining a simple list grammar for CODEN, ISBN, and ISSN
1115 string values, the code becomes cleaner and more rigorous, and
1116 parts of it can be shared for the checking of all three types.
1117 Future versions of bibclean may add support for additional
1118 key/value pairs for which the string values can also be
1119 validated, and such support will then be very simple to supply.
1120 New functions added: check_CODEN(), bad_CODEN(), copy_element(),
1121 incomplete_CODEN(), is_CODEN_char(), is_ISBN_char(),
1122 is_ISSN_char(), parse_list(), parse_element(),
1123 parse_separator(), validate_CODEN(), validate_ISBN(),
1124 validate_ISSN(). New typedef added: parse_data.
1125
1126 These improvements necessitated a change in testisxn.eok, since
1127 the recognition of ISBN values (and also CODEN and ISSN values)
1128 is now quite strict, so some of the erroneous ISBNs in
1129 testisxn.org are now handled slightly differently. The same
1130 number of error messages are issued in both 2.11.2 and 2.11.3
1131 however.
1132
1133 * Add mention of the CODEN validations to bibclean.man.
1134
1135 * Add CODEN entry in out_value() checks[] array in do.c.
1136
1137
1138 Mon Mar 4 16:23:20 1996 Nelson H. F. Beebe <[email protected]>
1139
1140 * Version 2.11.2: This version adds six new command-line
1141 options: -[no]-align-equals, -[no]-keep-preamble-spaces,
1142 and -[no]-keep-string-spaces.
1143
1144 The first pair of these was suggested by Matthew Morley
1145 <[email protected]> who contributed an implementation for a
1146 much older version of bibclean (2.05); the idea has been used, but
1147 not the contributed code.
1148
1149 The second and third pairs supply a need that has developed as
1150 the TUG and BibNet bibliography collections have grown: namely,
1151 sometimes bibliographies have rather long, and carefully spaced,
1152 @Preamble{} and @String{} entries, and these new options allow
1153 the internal spacing in those entries to be preserved.
1154
1155 * bibclean.c: Add the six new options to the file header comments.
1156 Add function out_verbatim() to handle output without space
1157 fiddling. Add new macros KEEP_PREAMBLE_SPACES() and
1158 KEEP_STRING_SPACES(), and use them in get_next_non_blank() and
1159 out_string().
1160
1161 * bibclean.man: Document the new -[no]-align-equals,
1162 -[no]-keep-preamble-spaces, and -[no]-keep-string-spaces options.
1163
1164 * do.c: Add new macros KEEP_PREAMBLE_SPACES() and
1165 KEEP_STRING_SPACES(), and use them in several places. Add new
1166 global variables keep_preamble_spaces and keep_string_spaces.
1167 Make in_preamble instead of static, since it is now needed in
1168 bibclean.c too. Add new functions do_preamble_2() and
1169 do_string_2() to hold old bodies of do_preamble() and do_string(),
1170 to simplify setting of in_preamble and in_string flags. Add
1171 support in out_equals() for -align-equals option. The code for
1172 -keep-preamble-spaces and -keep-string-spaces turned out to be
1173 quite hard to get right, largely because of the design flaw (for
1174 which I alone hold responsibility) that input space is discarded
1175 at a rather low level, rather than being collected as a legitimate
1176 token that is carried up to the highest levels, and then
1177 discarded, or otherwise modified.
1178
1179 * fix.c: Add additional checks in fix_pages() to avoid inserting
1180 en-dashes where they don't belong.
1181
1182 * keybrd.c: Add MIN() macro. Add new functions beep() and
1183 erase_characters() to shorten coding. Move search code out of
1184 do_more() into separate function do_search(). Add support for
1185 word-erase, line-erase, and line-reprint in do_search(). When a
1186 search string is reused, print it again. Beep if too many
1187 characters are entered in a search string. Add support for
1188 forward-paragraph and backward-paragraph commands. Correct
1189 binding of M-> to be KEYBOARD_END instead of KEYBOARD_HOME. Add
1190 support for X Window System arrow keys, and PgUP and PgDn keys.
1191
1192 * option.c: Add new functions opt_align_equals(),
1193 opt_keep_preamble_spaces(), and opt_keep_string_spaces(), plus
1194 corresponding entries in the options[] array, and document them
1195 in the opt_help() help_lines[] and usage() usage_lines[] arrays.
1196
1197
1198 Sat Oct 7 08:59:48 1995 Nelson H. F. Beebe <[email protected]>
1199
1200 * Version 2.11: The major change for this new version is the
1201 conversion of the source code to use the GNU autoconf system so
1202 that on UNIX systems, the configure script can automatically
1203 prepare a header file, config.h, that deals with the variations
1204 in UNIX and compiler implementations. This entailed:
1205
1206 (a) the creation of 3 new files: Makefile.in,
1207 config.hin, and configure.in;
1208
1209 (b) elimination of 12 header files: machdefs.h os.h
1210 osatari.h ospcdos.h osprimos.h osrmx.h ostops20.h
1211 osunix.h osvaxvms.h osvmcms.h unixlib.h xstddef.h;
1212
1213 (c) adjustments of #include statements, protecting most
1214 with #if HAVE_xxx ... #endif;
1215
1216 (d) change of the NEW_STYLE and STDC macros to
1217 HAVE_STDC;
1218
1219 (e) replacement of free() calls by macro FREE(), so as
1220 to be able to hide some typecasting to deal with
1221 defective C/C++ implementations.
1222
1223 * bibclean.c: The code in this file became too large for IBM PC
1224 DOS compilers, so it has been split into 10 new header files:
1225 ch.h config.h custom.h delete.h keybrd.h pattern.h
1226 token.h toklst.h xunistd.h yesorno.h
1227 and 5 additional source code files:
1228 chek.c do.c fix.c keybrd.c option.c.
1229 [The name is chek.c, rather than check.c, to avoid a conflict
1230 with the GNU standard Makefile target, check.] The 683-line
1231 revision history has been moved from bibclean.c into this new
1232 ChangeLog file (see below), following GNU Project conventions;
1233 I've not bothered to revise the recording style to match that
1234 supported by the GNU Emacs add-change-log-entry-other-window
1235 command.
1236
1237 This file splitting reduced bibclean.c from 8K lines to 2K
1238 lines, and the file do.c, at 2.9K lines, is now the largest
1239 source code file. Here is a current source code line count:
1240
1241 % wc -l *.c | sort +0nr -1
1242 11626 total
1243 2885 do.c
1244 2094 bibclean.c
1245 1051 vmswild.c
1246 880 vaxvms.c
1247 790 isbn.c
1248 774 chek.c
1249 606 keybrd.c
1250 572 fix.c
1251 569 fndfil.c
1252 551 option.c
1253 395 match.c
1254 240 strtol.c
1255 174 romtol.c
1256 45 strist.c
1257
1258 % wc -l *.h | sort +0nr -1
1259 835 total
1260 260 bibclean.h
1261 178 config.h
1262 81 custom.h
1263 51 toklst.h
1264 47 keybrd.h
1265 37 ch.h
1266 26 xctype.h
1267 18 xstring.h
1268 17 xstdlib.h
1269 16 xstat.h
1270 15 token.h
1271 12 xtypes.h
1272 12 xunistd.h
1273 11 pattern.h
1274 10 delete.h
1275 10 match.h
1276 9 xerrno.h
1277 9 xlimits.h
1278 9 xpwd.h
1279 7 yesorno.h
1280
1281 Despite the increased number of source files between versions
1282 2.10 and 2.11, the total source code has been reduced from 16.6K
1283 lines to 12.5K lines, largely due to the use of GNU configure.
1284 Of course, one must factor in about 1K new lines in Makefile.in,
1285 config.hin, and configure.in, and 1.6K lines in the
1286 automatically-generated configure script.
1287
1288 In summary, although this was my first use of autoconf, and the
1289 development effort stretched over 3 otherwise very busy weeks, I
1290 believe the payoff for other programs will be significant,
1291 because their config.in and configure.in files will be very
1292 similar to those for bibclean, so the conversion effort will be
1293 much smaller.
1294
1295 Once config.h files are manually generated for other operating
1296 systems, they too will be largely reusable for most of my other
1297 programs in C/C++.
1298
1299 * do.c: In get_line(), change
1300 if (*(p-1) == '\\')
1301 to
1302 if ((p > &line[0]) && (*(p-1) == '\\'))
1303 in order to avoid possible out-of-bounds pointer reference.
1304
1305 * fix.c: In fix_pages(), add code
1306 * match.c: In next_s(), change
1307 for (++s; ; )
1308 to
1309 for (++s; *s; )
1310 to eliminate compiler warnings about the final return() being
1311 unreachable. The additional test of *s against '\0' is of
1312 no significance for execution time.
1313
1314 * Makefile.in: remove vaxvms.c and vmswild.c, since they will be
1315 handled now by a separate Makefile for VAX VMS and OpenVMS.
1316
1317 * README: Completely rewrite, with new installation instructions
1318 for UNIX using the configure script, and new subsections
1319 containing status reports of installation attempts on all major
1320 UNIX variants.
1321
1322
1323 Revision history (reverse time order):
1324
1325
1326 [08-Mar-1995] 2.10.1
1327 In get_braced_string(), handle overlooked case of \"{x}.
1328
1329
1330 [04-Jun-1994]--[18-Oct-1994] 2.10
1331 Add support for simple forward and backward searches
1332 in help display in do_more().
1333
1334 Add World-Wide Web URI, URL, and URN names to the list
1335 of field names that are forced to uppercase. Disable
1336 code in out_s() that breaks lines at punctuation
1337 characters, because this can introduce unwanted line
1338 breaks in file names and WWW names.
1339
1340 Add code in out_c() to preserve last line in output
1341 buffer, so that a subsequent DELETE_LINE operation
1342 will have a complete line to delete. Previously, with
1343 -delete-empty, if the output buffer filled up in the
1344 middle of a line that was going to be deleted, the
1345 initial part of the line would be (incorrectly)
1346 output. This was a hard bug to track down, because it
1347 happened very rarely. Extend out_flush() to force out
1348 all buffered output.
1349
1350 Change bad_ISBN() to not put incorrect hyphens back
1351 into ISBNs. ISBN hyphen positions vary, because large
1352 publishers get short prefixes, and small publishers
1353 get long prefixes. The ISBN is a 10-character value
1354 of the form
1355
1356 countrygroupnumber-publishernumber-booknumber-checkdigit
1357
1358 where the first three fields are of variable width and
1359 contain only the digits [0-9], and the last
1360 single-character checkdigit field contains [0-9X].
1361 Larger country groups or publishers have smaller
1362 numbers, and correspondingly larger booknumbers.
1363 Thus, the TeXbook ISBN, 0-201-13447-0, consists of 0
1364 for English-language countries, 201 for
1365 Addison-Wesley, 13447 for the book number, and 0 for
1366 the check digit. Although it is permissible to use
1367 spaces instead of hyphends, we prefer the latter in
1368 order to have unbreakable text for improved
1369 readability and editing convenience.
1370
1371 Add code in fix_title() to supply braces around
1372 brace-level-zero TeX control words containing
1373 upper-case letters, to obtain conversions like these:
1374 "\TeX{} for the Impatient" -> "{\TeX} for the Impatient"
1375 "\TeX\ for the Impatient" -> "{\TeX} for the Impatient"
1376 in order to protect the control words from downcasing
1377 in some BibTeX styles.
1378
1379 Change DELETE_CHAR and DELETE_LINE values to be
1380 outside the range of possible signed or unsigned
1381 character values, so as not to interfere with handling
1382 of 8-bit character data.
1383
1384 Add new functions bcolumn(), bdelc(), bdelline(),
1385 bflush(), blastc(), bpeekc(), and bputc() to localize
1386 access to the output buffer, buf[], and the variables
1387 that record line number, column number, and output
1388 byte position. Completely rewrite out_c() to use
1389 these new functions, substantially simplifying the
1390 code.
1391
1392 Add original_file initialized to the_file in error()
1393 and warning(), and used in out_status(), to more
1394 accurately reflect output file positions. Previously,
1395 the error messages themselves resulted in modification
1396 of these values.
1397
1398 In new_entry(), initialize non_white_chars to zero.
1399 Previously, if multiple input files were specified,
1400 the first entry in files after the first was not
1401 correctly recognized if it started on the first line.
1402 This bug went undetected for so long because bibclean
1403 is rarely used with multiple input files.
1404
1405 At most calls of out_with_parbreak_error(), put the
1406 current character back into the input stream so that
1407 it is output after the error message instead of before.
1408 This is more likely to avoid splitting an input token.
1409
1410 The remaining fixes are for bugs and problems caught
1411 by Alf-Christian Achilles <[email protected]>
1412 who maintains a very large bibliography collection on
1413 ftp.ira.uka.de in /pub/bibliography consisting of
1414 about 300 bibliographies, and 800 bibcleaned files,
1415 occupying about 100MB.
1416
1417 In trim_value(), check for final "\<space>" control
1418 sequence, and discard it; previously, only the space
1419 was discarded, leaving an erroneous bare backslash.
1420
1421 In get_braced_string(), add missing additional
1422 boundary check in loop to convert braced string to
1423 quoted string.
1424
1425 Add DELETE_WHITESPACE support. In out_c(), this
1426 requests discarding of all trailing whitespace in the
1427 output buffer. In do_BibTeX_entry(), do_group(),
1428 do_preamble(), and do_Scribe_entry(), if
1429 prettyprinting, call out_c(DELETE_WHITESPACE) after
1430 parsing optional space following the @ and the name.
1431 Previously, a newline following the @ or the name
1432 would be preserved, which is legal, but not desirable
1433 in prettyprinted output. At end of do_one_file(),
1434 call out_c(DELETE_WHITESPACE) to discard trailing
1435 space at end of file.
1436
1437 Add -[no-]German-style option to provide for special
1438 treatment of quote characters inside braced strings,
1439 following the conventions of german.sty, which
1440 overloads quote to simplify input and representation
1441 of German umlaut accents, sharp-s (es-zet), ligature
1442 separators, invisible hyphens, raised/lowered quotes,
1443 French guillemets, and discretionary hyphens.
1444
1445 Add external file isbn.c, and call to ISBN_hyphenate()
1446 in bad_ISBN() and check_ISBN(), so that correct
1447 hyphenation of ISBNs is automatically supplied.
1448
1449
1450 [01-Mar-1994] 2.09
1451 Add -[no-]keep-linebreaks, -[no-]keep-parbreaks, and
1452 -[no-]keep-spaces. This required usurping two control
1453 characters, Ctl-N and Ctl-P, for LINEBREAK and
1454 PARBREAK respectively; should such characters occur in
1455 an input string value, they will be misinterpreted,
1456 and will not be preserved in the output.
1457
1458 This restriction could be eliminated if value strings
1459 had such characters converted to escape sequences
1460 which were converted back again on output; however,
1461 this would pose a substantial complication for column
1462 position tracking, and carry a run-time penalty from
1463 the extra conversions. Since control characters are
1464 not expected to be present in value strings, loss of
1465 two of them is not expected to be a problem.
1466
1467
1468 [24-Sep-1993] 2.08
1469 Update bibclean.c to handle characters in range
1470 128..255 when char is a signed data type, and extend
1471 testbib1.bib with more tests of the complete character
1472 set. Augment Makefile with convenience targets for
1473 each host environment. Add private input character
1474 pushback support, because ANSI/ISO Standard C only
1475 guarantees one character of pushback, and bibclean
1476 needs at least 3.
1477
1478
1479 [04-Jun-1993] 2.07
1480 Update *.h files from DVI development to include support
1481 for DEC Alpha 3000/500x OSF 1.2 (cc, c89, cxx), and HP
1482 9000/735 HP-UX A.09.01 (cc, c89, CC, gcc, g++). Private
1483 memset() below is not compiled on DEC Alpha to avoid
1484 conflicts with vendor-supplied version.
1485
1486
1487 [30-Nov-1992 -- 29-Jan-1993] 2.06
1488 [1] Extend fix_author() to handle conversion of
1489 "Smith, Jr., A. B." to "A. B. {Smith, Jr.}", and
1490 "Smith Jr., A. B." to "A. B. {Smith Jr.}". Introduce
1491 new auxiliary function check_junior() called by
1492 fix_author().
1493
1494 [2] Extend month_pair[] table to include abbreviated month
1495 names. Add new function month_token() and rewrite
1496 fix_month() to use it to do a token-based parse of the
1497 current_value[] string in order to be able to handle
1498 conversions like these:
1499
1500 "January" --> jan
1501 "Jan." --> jan
1502 "January 24" --> jan # " 24"
1503 "24 Jan." --> "24 " # jan
1504 "May/June" --> may # "/" # jun
1505 "February and May" --> feb # " and " # may
1506
1507 New test input files have been added, with new
1508 expected output and error files.
1509
1510 [3] Add -[no-]fix-font-changes switch and new function
1511 opt_fix_font_changes() to supply additional braces
1512 around font changes in titles to prevent letter case
1513 conversion by some BibTeX stylos. The real work is
1514 done in the new function brace_font_changes() called
1515 at the end of fix_title().
1516
1517 [4] Fix bug in out_value() with -delete-empty-fields
1518 requested. The code incorrectly assumed that a string
1519 value of 2 or fewer characters was an empty string.
1520 That is correct if the string value is a quoted
1521 string, but wrong if the string value is a 1- or
1522 2-character macro. The code now correctly checks
1523 explicitly for empty string, rather than using its
1524 length to make the deletion decision. Thanks to
1525 Manfred Aben <[email protected]> for reporting
1526 this bug!
1527
1528 [5] Fix bug in get_token(); the code must test for a
1529 non-NULL pointer before calling SKIP_SPACE(). Thanks
1530 to Gil Webster <[email protected]> for reporting this
1531 bug! [And thanks to the Internet funding agencies,
1532 who make worldwide collaboration like this possible.]
1533
1534 [6] Add support for Roman numeral matching in match.c.
1535 New file romtol.c contains romtol(), isroman(), and a
1536 test program.
1537
1538 [7] Add calls to perror() at file open failures.
1539
1540 [8] Fix stupid error in brace_font_changes(); s[] was not
1541 NUL-terminated before the final call to strcpy().
1542
1543 [9] In format(), make newmsg[] an internal static array
1544 instead of reusing shared_string; otherwise, a warning
1545 message from check_length() wipes out the current
1546 string value.
1547
1548 [10] In main(), initialize the_file.input.filename to an
1549 empty string, to avoid dereferencing a NULL pointer in
1550 warning() during command-line option parsing.
1551
1552 [11] In do_args(), add code to display erroneous option
1553 switches.
1554
1555 [12] In apply_function(), make string comparisons use
1556 longer of the minimum match length and the option
1557 switch length, so that all characters of the option
1558 switch are tested. Previously, option misspellings
1559 after the minimum match length went undetected.
1560
1561 [13] Add -[no-]prettyprint support, with new functions
1562 do_string(), opt_prettyprint(), out_at(),
1563 out_close_brace(), out_comma(), out_newline(),
1564 out_open_brace(), out_other(), and out_token(), and
1565 new data type token_t. Move do_comma() processing
1566 out of do_field_value_pair() so that it can be used
1567 by do_string().
1568
1569 [14] Add BYTE_VAL() macro for printing of characters with
1570 octal formats.
1571
1572 [15] Change tag/key to key/field to agree with Appendix B
1573 of LaTeX User's Guide and Reference Manual. Change
1574 format items %t/%k to %k/%f to match key/field
1575 terminology. The user impact of this rather large
1576 source code and documentation change should be
1577 minimal, and the removal of the disagreement with the
1578 LaTeX book needs to be done now, rather than later.
1579 bibclean.ini does not use either of the changed format
1580 items.
1581
1582 [16] Change keyboard uses of key to keyboard, so key now
1583 refers exclusively to bibliography citation keys.
1584
1585 [17] Change MAX_COLUMN to MAX_WIDTH and add -max-width
1586 support, with new function opt_max_width() and new
1587 variable max_width. Include "xlimits.h".
1588
1589 [18] Add BIBCLEAN_EXT and BIBCLEAN_INI to define
1590 environment variables that can supply alternate
1591 initialization file extension and name. Add
1592 GETDEFAULT() macro to simplify coding.
1593
1594 [19] Rename put_char() to out_c(), and remove macro out_c().
1595
1596 [20] Add line wrapping support for lexical analysis output
1597 in out_c().
1598
1599 [21] Add ``# line nnn "filename"'' output from out_token()
1600 for lexical analysis output.
1601
1602 [22] Add strdup macro to redefine that name as
1603 strdup_private to avoid problems with incorrect
1604 <string.h> declarations of that function (for DEC
1605 Alpha OSF/1).
1606
1607 [23] Add out_input_position() and token_start so that
1608 out_token() can record both starting and ending line
1609 numbers of a multi-line value token in lexical
1610 analyzer output.
1611
1612 [24] Add check for non-zero brace level at end-of-file in
1613 do_one_file().
1614
1615 [25] Add support for @Include{...}, a proposed extension
1616 of BibTeX.
1617
1618 [26] Add append_value(), do_newline(),
1619 do_optional_inline_comment(), do_optional_space(),
1620 do_space(), get_inline_comment(),
1621 get_optional_space(), and out_complex_value() so that
1622 intervening space can be output when lexing, and so
1623 that we can support in-line comments as well as
1624 horizontal and vertical space between lexical items,
1625 according to the proposed grammar for BibTeX. Add
1626 do_preamble() to do rigorous parse of @Preamble{...}.
1627 Revise do_BibTeX_value() to support recognition of
1628 optional space between tokens of a string expression,
1629 splitting it into two separate functions
1630 do_BibTeX_value_1() and do_BibTeX_value_2() to handle
1631 the two cases of prettyprinting and lexical analysis.
1632 Add out_string() to localize test for output style.
1633
1634 [27] Add checks for end-of-file in quoted and braced
1635 strings so these errors get reported. Suppress
1636 pattern value checking for empty values; some of the
1637 check_xxx() functions did this already, but some did
1638 not. Now the test is localized in one place, in
1639 out_value(), for all of them.
1640
1641
1642 [16-Nov-1992 -- 24-Nov-1992] 2.05
1643 Add Makefile steps to automatically extract help() text
1644 from output of manual pages into new file bibclean.h, so
1645 the built-in documentation stays up-to-date. The usage
1646 messages still need manual adjustment if switches are
1647 added or changed.
1648
1649 Add missing test of check_values in check_patterns().
1650
1651 Add support for optional warning messages with
1652 patterns from initialization files. New function:
1653 get_token(). New parsing code in do_new_pattern() to
1654 handle optional warning message strings. Add message
1655 argument to add_pattern().
1656
1657 Remove strip_comments() since comment processing is
1658 now handled by get_token() and do_new_pattern(). This
1659 permits unescaped comment characters inside quoted
1660 strings.
1661
1662 Write bibclean.reg, an initialization file similar to
1663 bibclean.ini, but with regular expressions.
1664
1665 Replace cascaded if statements for regular expression
1666 testing with loop over patterns in check_patterns().
1667
1668 Move inclusion of match.h to after definition of
1669 typedef YESorNO, and change type of match_pattern()
1670 from int to YESorNO.
1671
1672 Add do_fileinit() and code in main() to call
1673 do_fileinit() for each named input file with an
1674 extension, replacing that extension with INITFILE_EXT
1675 (default .ini). This adds a bibliography-specific
1676 initialization capability to the system-wide,
1677 user-wide, and job-wide files already supported.
1678
1679 Change -keep-initials and -keep-names to -fix-initials
1680 and -fix-names, making them positive, rather than
1681 negative, options. Also, make them independent by
1682 moving invocations of fix_periods() outside of
1683 fix_author(), and by checking fix_names in
1684 fix_author() instead of at start of fix_namelist().
1685
1686 Add -[no-]read-init-files option to allow control over
1687 which initialization files are read.
1688
1689 Add -[no-]trace-file-opening option to allow easy
1690 tracing of file opening attempts by the program. A
1691 similar feature in my DVI drivers has proved enormously
1692 valuable in tracking down problems of missing files.
1693
1694 Rename entry_name[] to current_entry_name[], key[] to
1695 current_key[], tag[] to current_tag[], and value[] to
1696 current_value[] to get more distinctive names for
1697 those global variables.
1698
1699 Include the value string matching code selection in the
1700 version() message; this is needed so that users can
1701 prepare initialization files with the correct pattern
1702 syntax.
1703
1704 Make several MAX_xxx symbolic constants definable
1705 at compile time.
1706
1707 Add MAX_PATTERN_NAMES constant, and increase
1708 pattern_names[] table to that size, leaving empty slots
1709 for expansion. Extend add_pattern() so that
1710 unrecognized key names result in creation of new entries
1711 in pattern_names[], making the set of key/value pairs
1712 extensible without modification of the bibclean source
1713 code. Add check_other() to handle checking of other
1714 keywords.
1715
1716 Add unexpected() to localize issuing of unexpected value
1717 warnings.
1718
1719 Repair next_s() in match.c to skip past <backslash><non-letter>
1720 TeX control sequence; it was stopping one character
1721 early.
1722
1723 Revise upper-case letter bracing code in fix_title()
1724 to handle more cases.
1725
1726 Rewrite space collapsing code in fix_pages() to only
1727 collapse space around en-dashes. The previous code
1728 was too aggressive, so that "319 with 30 illustrations"
1729 became "319 with30illustrations".
1730
1731 Add check_tag() called from do_tag_name(), and add
1732 second argument, value, to check_patterns().
1733
1734 Add format() called from error() and warning() to
1735 expand %e (@entry name), %k (key), %t (tag), %v
1736 (value), and %% (percent) format items in messages.
1737 This feature is needed so user-defined messages in
1738 initialization files can get key, tag, and value into
1739 messages. It also simplifies, and improves, calls to
1740 warning() and error().
1741
1742 Add some missing (void) typecasts before str***() calls.
1743
1744 Change word_length() to return one more than true
1745 length at end of string. Change tests in out_s() to
1746 > MAX_COLUMN instead of >= MAX_COLUMN. Previously, if
1747 a line ended exactly at column MAX_COLUMN, bibclean
1748 could produce a spurious blank line, and would
1749 sometimes wrap a line earlier than necessary. Add
1750 additional punctuation wrap points in out_s(), and
1751 remove tests for non-blank whitespace in switch()
1752 statement.
1753
1754 Change type of all string index variables from int to
1755 size_t.
1756
1757 In get_simple_string(), use enum type for type codes if
1758 NEW_STYLE.
1759
1760 In check_year(), validate all sequences of 1 or more
1761 digits.
1762
1763 Use the C preprocessor to define memmove() to be
1764 Memmove(), so we always use our own version. Too many
1765 C and C++ implementations were found to be lacking it,
1766 sigh... Similarly, we provide our own version of
1767 strtol() (in a separate file) from the DVI 3.0
1768 development, because it too is missing from older UNIX
1769 systems.
1770
1771 Complete port to IBM PC DOS with Turbo C 2.0, and
1772 Turbo C and C++ 3.0. This required economization of
1773 storage for arrays of size [MAX_TOKEN_SIZE] to get
1774 global data below 64KB without having to reduce
1775 MAX_TOKEN.
1776
1777 Added code in do_more() and preprocessor conditionals
1778 in out_lines() to handle character-at-a-time input for
1779 help paging on IBM PC DOS. Keyboard function keys
1780 PgUp, PgDn, End, Home, Up arrow and Down arrow are
1781 also recognized. This was easy to do because most PC
1782 DOS C compilers provide getch() to get a keyboard
1783 character without echo. No fiddling of terminal modes
1784 is needed like it is on other systems.
1785
1786 The IBM PC DOS port exposed a problem in findfile(),
1787 where it was assumed that an environment variable
1788 would not be longer than the longest filename. Turbo
1789 C sets the latter to 80 characters, but environment
1790 variables can be set that are almost 128 characters
1791 long. Microsoft C 5.0 also sets it to 80, but C 5.1
1792 sets it to 144, and C 6.0 and C and C++ 7.0 set it to
1793 260. This has been handled by defining MAXPATHLEN at
1794 compile time, overriding the built-in defaults.
1795
1796 Add support for character-at-a-time input for help
1797 paging on VAX VMS, and for getting the screen size in
1798 get_screen_lines().
1799
1800 Rename do_more_init() to kbopen(), do_more_term() to
1801 kbclose(), and use kbget() in do_more() to conceal the
1802 heavily-O/S dependent details of the kbxxx()
1803 functions.
1804
1805 Introduce STREQUAL() macro to simplify coding.
1806
1807 Introduce KEY_FUNCTION_ENTRY type and apply_function()
1808 to simplify coding, and use it in do_args(),
1809 do_preargs(), and out_value(). Argument actions are
1810 moved into separate functions, opt_xxx(). Rename
1811 show_author() to opt_author(), and help() to
1812 opt_help(). Rename do_file() to do_one_file(), and
1813 move file loop code from main() into new do_files().
1814
1815 Split large body of get_simple_string() into four new
1816 functions, get_braced_string(), get_digit_string(),
1817 get_quoted_string(), and get_identifier_string().
1818
1819 Add check_inodes() to determine whether stdlog and
1820 stdout are the same file. If so, we need to ensure
1821 that each warning message begins a new line, without
1822 double spacing unnecessarily when they are different
1823 files.
1824
1825 Add memset() implementation for SunOS 4.1.1 CC (C++)
1826 and BSD 4.3 UNIX because it is missing from their
1827 run-time libraries.
1828
1829 Replace fopen() by macro FOPEN() to work around
1830 erroneous fopen() prototype for SunOS 4.1.1 CC (C++).
1831
1832 Complete port to IBM PC DOS with Microsoft C 5.1 and
1833 6.0 compilers. Minor source changes (the CONST macro
1834 below) needed to work around compiler errors.
1835
1836
1837 [15-Nov-1992] 2.04
1838 Minor changes to complete successful VAX VMS
1839 installation and test.
1840
1841
1842 [15-Nov-1992] 2.03
1843 Add match_pattern() support for consistent pattern
1844 matching in the check_xxx() functions, using new code
1845 defined separately in match.c.
1846
1847 Add support for run-time redefinition of patterns via
1848 one or more initialization file(s) found in the PATH
1849 (system-defined) and BIBINPUTS (user-defined) search
1850 paths. New functions: add_pattern(),
1851 check_patterns(), do_initfile(), do_new_pattern(),
1852 do_single_arg(), enlarge_table(), get_line(),
1853 strdup(), strip_comments(), and trim_value(). New C
1854 preprocessor symbols: HAVE_OLDCODE, HAVE_PATTERNS,
1855 HAVE_RECOMP, and HAVE_REGEXP. One of these should be
1856 defined at compile time; if none are, then
1857 HAVE_PATTERNS is the default.
1858
1859 Since options can now be specified in initialization
1860 files, they each need negations so the command line
1861 can override values from an initialization file.
1862
1863 Change all YES/NO flags to new type, YESorNO, for
1864 better type checking.
1865
1866 Add do_more(), do_more_init(), and do_more_term(), for
1867 pausing during help output; a private version of
1868 screen paging is used instead of a pager invoked by
1869 system() for better portability across systems. Set
1870 SCREEN_LINES to 0 at compile time to suppress this
1871 feature.
1872
1873 In fix_title(), add code to brace upper-case letters
1874 for cases like:
1875 "X11" -> "{X11}"
1876 "Standard C Library" -> "Standard {C} Library"
1877 "C++ Book" -> "{C}++ Book"
1878 leaving
1879 "A xxx"
1880 unchanged.
1881
1882
1883 [11-Nov-1992] 2.02
1884 Add bad_ISBN(), bad_ISSN(), check_ISBN(), and
1885 check_ISSN() for validation of ISBN and ISSN values.
1886 ISBN == "International Standard Book Number", and ISSN
1887 = "International Standard Serial Number".
1888
1889 Add testisxn.bib and testisxn.bok to the test
1890 collection, with steps in the Makefile to run the
1891 test.
1892
1893 Add support for embedded \" in Scribe value strings
1894 (forgotten in 2.01 revision); they are converted from
1895 \"x to {\"x}.
1896
1897
1898 [10-Nov-1992] 2.01
1899 Add support for conversion of level-0 \"x to {\"x} and
1900 x"y to x{"}y in value strings. Such input is illegal
1901 for BibTeX, and causes hard-to-find errors, since
1902 BibTeX raises an error at the line where it runs out
1903 of string collection space, rather than at the
1904 beginning of the collection point.
1905
1906
1907 [06-Nov-1992] 2.00
1908 Add full Scribe .bib file input compatibility with
1909 -scribe command-line option.
1910
1911 Add support for multiple .bib file arguments on
1912 command line, with new do_file() function to process
1913 them.
1914
1915 Allow slash as well as hyphen for introducing
1916 command-line options on VAX VMS and IBM PC DOS.
1917
1918 Add argument summary to help() (text extracted
1919 verbatim from the manual pages).
1920
1921 Add new -delete-empty-fields, -keep-names,
1922 -no-parbreaks, -remove-OPT-prefixes, and -no-warnings
1923 command-line options and support code.
1924
1925 Add new out_with_error() and out_with_parbreak_error()
1926 functions, and APPEND_CHAR() and EMPTY_STRING() macros
1927 to shorten and clarify coding.
1928
1929 Add flush_inter_entry_space() function to standardize
1930 line spacing.
1931
1932 Increase array sizes to MAX_TOKEN_SIZE (= MAX_TOKEN +
1933 3) to reduce array bounds checking in inner loops.
1934
1935 Add additional file position tracking to enhance error
1936 localization (structures IO_PAIR and POSITION, and
1937 functions new_io_pair(), new_position(),
1938 out_position(), and out_status()). Error messages are
1939 parsable by GNU Emacs M-x next-error (C-x `) when
1940 bibclean is run from Emacs by the command
1941 M-x compile<RET>bibclean foo.bib >foo.new
1942
1943 Use arrays of constant strings for multiple string
1944 output via new function out_lines(), instead of multiple
1945 calls to fprintf().
1946
1947 Add additional checking via check_chapter(),
1948 check_month(), check_number(), check_pages(),
1949 check_volume(), check_year(), and match_regexp().
1950
1951 Supply implementation of memmove() library function
1952 missing from g++ 2.2.2 library.
1953
1954
1955 [03-Oct-1992] 1.06
1956 Correct logic error in do_comma() that prevented correct
1957 recognition of @name(key = "value") where the last
1958 key/value pair did not have a trailing comma.
1959
1960 Add C++ support.
1961
1962 Add key_pair[] and entry_pair[] tables for
1963 standardization of letter case usage, and use the new
1964 NAME_PAIR type in fix_month().
1965
1966 Update author address.
1967
1968 Rename author() to show_author() to avoid shadowing
1969 global names.
1970
1971 Fix two assignments of constant strings to char*
1972 pointers.
1973
1974 Remove variable at_line_number which was defined, but
1975 never used.
1976
1977
1978 [01-Aug-1992] 1.05
1979 Add -keep-initials switch support (thanks to Karl Berry
1980 <[email protected]>). Internationalize telephone and FAX
1981 numbers.
1982
1983
1984 [02-Jan-1992] 1.04
1985 Modify fix_title() to ignore macros. Modify
1986 fix_author()) to ignore author lists with parentheses
1987 (e.g. author = "P. D. Q. Bach (113 MozartStrasse,
1988 Vienna, Austria)").
1989
1990
1991 [31-Dec-1991] 1.03
1992 Add fix_title() to supply braces around unbraced
1993 upper-case acronyms in titles, and add private
1994 definition of MAX().
1995
1996
1997 [15-Nov-1991] 1.02
1998 Handle @String(...) and @Preamble(...), converting
1999 outer parentheses to braces. Insert spaces after
2000 author and editor initials, and normalize names to
2001 form "P. D. Q. Bach" instead of "Bach, P. D. Q.".
2002
2003
2004 [10-Oct-1991] 1.01
2005 Increase MAX_TOKEN to match enlarged BibTeX, and add
2006 check against STD_MAX_TOKEN.
2007 Output ISBN and ISSN in upper case.
2008 Always surround = by blanks in key = "value".
2009
2010
2011 [19-Dec-1990] 1.00 (version number unchanged)
2012 Install Sun386i bug fix.
2013
2014
2015 [08-Oct-1990] 1.00
2016 Original version.