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