2009-11-27  Paul Foley  <paul@mises.com>

	* bibtex-runtime.lisp (setf bib-entry-ref): If SORT.KEY$ is
	changed, remove the cached sort key.

	* icu.lisp: Add ICU sort-key comparisons, avoiding the need to
	define CMP between vectors.

	* cmp.lisp: Define hash table tests on SBCL, CLISP.

2009-11-25  Paul Foley  <paul@mises.com>

	Add support for Unicode collation on CMUCL, using libicu.
	
	* icu.lisp: New file, Unicode collation support.

	* packages.lisp: New exports bib-entry-ref, bib-entry-sort-key.
	New dependency on package cmp.

	* bibtex.asd, bibtex.system: New file, cmp.

	* bst-functions.lisp: Use bib-entry-ref instead of gethash.

	* bst-reader.lisp: Use comparison generics for sorting bib entries.

	* cmp.lisp: New file, comparison generics.

	* bibtex-runtime.lisp (bib-entry):
	New struct.  Make bib-entries be a struct rather than a
	hash table, and move the "special" entries for type and cite-key (and
	sort-key) out into slots.
	(bib-entry-ref): New function, use instead of gethash on bib entries.
	(*generate-sort-key*): New variable, for pluggable Unicode support.
	(bib-entry-sort-key): New.
	(cmp, hash): New methods for comparison generics, calling
	bib-entry-sort-key.

2009-11-22  Matthias Koeppe  <mkoeppe@math.ucdavis.edu>

	* bibtex-runtime.lisp: Fix erroneous "splitting initials warning"
	in names such as "Chandler, Jr., Alfred D."  
	Reported by Paul Foley.

2009-11-22  Paul Foley  <paul@mises.com>

	* bibtex-program.lisp (emulate-bibtex):
	Bind *gc-verbose* in the right package.

	* bibtex.lisp (compile-bst-file):
	Bind *print-length* to avoid truncation.

2009-11-20  Matthias Koeppe  <mkoeppe@math.ucdavis.edu>

	Version 1.0.1
	
	* bibtex.asd, bibtex.lisp, Makefile: Bump version number

	* bibtex.lisp: Use keyword in in-package

2009-07-29  Matthias Koeppe  <mkoeppe@math.ucdavis.edu>

	* bibtex-program.lisp: Don't bind *gc-verbose* on sbcl.

	* bibtex-program.lisp (emulate-bibtex):
	Bind *gc-verbose* only on lisps that have it.

	* packages.lisp (make-bib-entry): Export.
	Patch by Cyrus Harmon.

2008-09-03  Matthias Koeppe  <mkoeppe@math.ucdavis.edu>

	* bibtex.asd: Fix ASDF system version. 
	Reported by Cyrus Harmon.

2008-09-03  Cyrus Harmon  <cyrus@cyrusharmon.org>

	* bibtex.lisp, bibtex-runtime.lisp: Fix warnings by SBCL.

	* bibtex-program.lisp: Remove dependency on PORT.

2007-12-17  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	Use symbols +cite-key+ (rather than the string "KEY") and +entry-type+
	(rather than the string "ENTRY-TYPE") as keys for the cite key and
	the entry types in the hash table representing a bibliographic entry.
	This removes the confusion with the bibliography-defined attribute "KEY".

	* packages.lisp, bst-builtins.lisp,
	bibtex-runtime.lisp (bib-entry-cite-key, bib-entry-type): New
	accessor macros.  Use them throughout.

2007-12-17  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex-runtime.lisp (von-token-p): Implement precise BibTeX
	behavior with regard to special characters.

2007-12-13  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex-program.lisp: Change the defaults to
	*bibtex-split-initials* = true; use the command-line option
	-no-split-initials to change it.

	* bibtex-runtime.lisp (tokenize-bibtex-name):
	Warn when initials are split.

	* bibtex-runtime.lisp (process-bib-entry-command):
	Signal a bib-error on repeated entries.

	* bibtex-program.lisp (emulate-bibtex):
	Report number and type of errors.

	* bibtex.lisp, bibtex-runtime.lisp:
	Be more verbose, like the original BibTeX

2007-12-12  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex-runtime.lisp: Attempt to fix some excessive consing.

	(format-bibtex-name-component): Properly handle abbreviating names that start
	with special characters.  Example: "Matiyasevich, {\relax{Yu}}ri V."

	(parse-equivalent-entries-string, compute-bib-equivalence-classes,
	check-multiple-cited-equivalent-entries): New.
	(read-all-bib-files-and-compute-bib-entries): Use it here.

	* bibtex.lisp: Fix pathname cases on Allegro CL.

	(bibtex): Return error history and error count.

	* bibtex: Fix according to new packaging.

	* bibtex-program.lisp: Put definitions in the package :bibtex-program.

	(emulate-bibtex): Signal an exit code according to the value of
	*history* at the end of the bibtex run.

	* bibtex.asd: Fix some dependencies to remove compiler warnings.
	Add bibtex-program as a source file.

	* kpathsea.lisp: Remove use of cl:require.
	Add a specialized implementation for Allegro CL, where the
	implementation of PORT:pipe-input is too slow.

	* packages.lisp (:bibtex-program): New package.

2007-08-24  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	Version 1.0

	Released under the GNU LGPL 2.1 or later with Franz-style Lisp
	clarification.

	* README: Declare CL-BibTeX stable.
	
2007-08-24  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* packages.lisp (packages bibtex-runtime, bibtex-compiler): Always
	shadow #:variable, as it is a standard CL symbol.

	* bibtex.asd: Hans Halvorson approved same license conditions for
	asd file - updating copyright.  Thanks to Cliff Yapp for updating
	the file.

	* bibtex.system: Get source path from *load-truename*.

2007-08-22  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	Re-release CL-BibTeX under the GNU LGPL 2.1 or later
	with Franz-style Lisp clarification.
	
	Thanks to Cliff Yapp for updating the files.
	
	* COPYING-preamble.txt: Add preamble file.

	* COPYING, bibtex-compiler.lisp, bibtex-program.lisp,
	bibtex-runtime.lisp, bibtex.lisp, bibtex.system,
	bst-builtins.lisp, bst-functions.lisp, bst-reader.lisp,
	debian/copyright, interpreter.lisp, kpathsea.lisp,
	lisp-form-builder.lisp, packages.lisp: Change license to LGPLv2.1
	or later with Lisp clarification.

	* README: Change license to LGPLv2.1 or later with Lisp
	clarification, update with current URLs.

2006-12-29  Hans Halvorson  <hhalvors@princeton.edu>

	* bibtex.asd: New file.

2003-03-31  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

 	Version 0.4
	
	* bst-builtins.lisp (CHR.TO.INT$): Fix warning in interpreted mode.

	* bibtex.lisp (*registered-bibtex-style*): New.
	(register-bibtex-style): Set it here.

	(interpreted-bibtex-style, lisp-bibtex-style): New.
	(find-bibtex-style): Use it here.

	* bibtex-runtime.lisp (*foreign-character-purifications*): Removed.
	(defstruct foreign-character, *foreign-characters*,
	define-foreign-character, find-foreign-character): New.
	(bibtex-string-purify): Use it here.

	(bibtex-string-upcase, bibtex-string-downcase,
	bibtex-string-titledowncase): Handle special characters.

2003-02-06  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex-runtime.lisp (+bib-whitespace-character-list+): Add #\Tab.

2003-01-28  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex-runtime.lisp (format-bibtex-name-component,
	format-bibtex-name): Go for bug-for-bug compatibility with BibTeX
	in the domain of tieing short name components.

	(write-tex-group): New optional argument NO-TERMINATE-P; use it to
	suppress unneeded whitespace after control words.  (This gets rid of
	the extraneous whitespace after control words, which was introduced by
	bibtex-string-upcase and bibtex-string-downcase.)

	(bibtex-string-purify): Don't remove whitespace, turn it into a space
	instead.  (This fixes problems with the sort order for some styles.)

2003-01-16  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex-compiler.lisp (bst-compiler-warning): Add report function.
	(compile-bst-function): Resignal errors.

	* bst-builtins.lisp (newline$, write$): Use BBL-TERPRI and BBL-PRINT.

	* bibtex.lisp (bibtex): Use WITH-BBL-OUTPUT.

	* bibtex-runtime.lisp (bib-warn): Print "Warning".
	(read-bib-field-token): Call BIB-WARN, rather than BIB-ERROR, for
	undefined macros.
	(get-merged-bib-entry): New.
	(cited-bib-entries): Resolve crossrefs also if all entries are cited.
	Always merge crossrefed data into entry.

	(*bbl-min-print-line*, *bbl-max-print-line*, *bbl-line-buffer*): New.
	(bbl-print, bbl-terpri, bbl-flush, with-bbl-output): New.

	(read-all-bib-files-and-compute-bib-entries): Fix the case of
	unreadable database files.

2003-01-03  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex-compiler.lisp (coerce-form): New.
	(pop-form): Use it here.

	(type-union*): New.
	("IF$"): Fix handling of *relaxed-compilation*.  Handle the case
	of THEN function returning BOOLEAN and ELSE function returning
	INTEGER.

	(package-as-body): New keyword arg, expected-result-types.
	(package-as-form, package-as-procedure): Pass args to package-as-body.

	(":="): Catch assignments to non-variables.  Request the type of the
	assigned-to variable when popping the new value.

	(compile-literal): New.
	(bst-compile-literal): Use it here. Pass remaining args to
	package-as-form.

	(*silent-compilation*): New variable.
	(bst-compile-warning): Don't signal a condition if *silent-compilation*.
	("IF$"): Bind *silent-compilation* to true during the first pass.

	(assign-loop-variables): New.
	(bst-compile-literal-as-while-body): Use it here.
	(bst-compile-literal-as-while-predicate): New.
	(current-stack-as-values-list): New.
	("WHILE$"): Handle the case of loops with complicated data flow.

	(compile-funcall): Pass the pop-form-args of a function to pop-form
	when popping the arguments.

	* bst-builtins.lisp ("+"): Use build-associative-form.
	("change.case$", "chr.to.int$"): Use the pop-form args
	:NEED-VARIABLE T.  Get rid of LET.

	* bst-functions.lisp (bst-function): New field, pop-form-args.

	* bst-reader.lisp (*bst-readtable*):
	Intern :-symbols into the current package.

	* lisp-form-builder.lisp (build-values-body, build-progn-form): New.

	* packages.lisp (bibtex-runtime, bibtex-compiler):
	Shadow VARIABLE also in CLISP.

2002-12-25  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex.lisp (make-macro-set-form): Don't emit a SETF form if
	nothing is to be set.
	(compile-bst-file): Make some variables constant.  Sort shadowed
	symbols.

	* bibtex-compiler.lisp (*bst-function-call-sequence*): New.
	(*relaxed-compilation*): New.
	(bst-compiler-warning, bst-compile-warning): New.

	(pop-form):  Even if NEED-VARIABLE is :IF-SIDE-EFFECTS, we need to
	make sure we pop single-value forms only!  (This caused a bug when
	compiling a custombib-generated style file.)

	(pop-form): Return a fourth value that disambiguates between a Lisp
	form NIL and the exhausted-stack situation when :WHEN-EMPTY is NIL.
	(pop-single-value-form): Handle this.

	(":="): Do nothing for constant variables.  Otherwise, count
	assignments.

	(get-bst-function): Signal an error if a function is referenced that
	could not be compiled.

	("IF$"): Handle *RELAXED-COMPILATION*.

	(compile-bst-function): HANDLER-BIND for condition
	BST-COMPILER-WARNING.

	(make-some-variables-lexical): Don't try to make constants lexical.
	(make-some-variables-constant): New.

	* bst-reader.lisp: Record BST function calls in
	*BST-FUNCTION-CALL-SEQUENCE*.

	* bst-functions.lisp (bst-function): New fields.
	(register-bst-global-var): New keyword arg.
	(bst-name-to-lisp-name): Handle :constant variables.

	* bst-builtins.lisp (FALSE, TRUE): New pseudo-primitive BST functions.
	(ENTRY.MAX$, GLOBAL.MAX$): Declare constant.

2002-12-15  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	Version 0.3.1
	
	* bst-reader.lisp:  Fix the interpreter to not compute Lisp
	symbols for the BST identifiers, which would fail.

2002-12-15  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	Version 0.3
	
	* bst-builtins.lisp (CALL.TYPE$): Use bst-intern rather than intern.

	* bibtex.system (*bibtex-source-pathname*, *bibtex-binary-pathname*):
	New variables.
	(mk:defsystem "BIBTEX"): Use them here.

	* bibtex.lisp (*bibtex-pprint-dispatch*): Moved here.
	(compile-bst-file): Make two compiler passes.
	(bibtex): Make *bib-macros* an equalp hash.

	* bibtex-compiler.lisp (*lisp-stream*, lisp-write): Removed.
	(*bibtex-pprint-dispatch*): Moved to bibtex.lisp.
	(max-side-effectss, remove-variables-from-side-effects,
	package-as-body, IF$, compile-funcall): Handle the new side
	effects "variables-used-before-assigned" and
	"unconditionally-assigned-variables".
	(bst-gentemp): Use bst-intern rather than intern.
	(print-bst-function-info): New.
	(compile-bst-function): Changed interface; modify the passed
	bst-function structure.
	(make-some-variables-lexical): New.

	* bst-functions.lisp (side-effects, bst-function): New fields.
	(*bst-package*): New variable.
	(bst-intern): New function.
	(bst-name-to-lisp-name): Use bst-intern rather than intern.

	* bst-reader.lisp (get-bst-commands-and-process, INTEGERS,
	STRINGS): Store into *bst-definition-sequence*, rather than
	writing to *lisp-stream*.
	(FUNCTION): Changed call to compile-bst-function.

2002-12-11  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* bibtex-runtime.lisp (bibtex-string-upcase): Really upcase (not
	downcase) the string.  Reported by Solofo Ramangalahy.
	
	* packages.lisp: Allegro portability fix.  Thanks to Drew McDermott.

	* interpreter.lisp (bst-execute-body, bst-execute-stack-literal,
	bst-pop/coerce, bst-coerce/push):  Handle the case of the empty
	BST function body {}.

	* bibtex-compiler.lisp (mvform): Use an extra field to
	disambiguate between the Lisp form () and the empty BST function
	body {}.  Change uses throughout.  
	Reported by Drew McDermott.
	
2002-11-25  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	Version 0.2
	
	* bibtex: New shell script.

	* bibtex-compiler.lisp (lisp-write): Use pprint dispatch function
	for DEFINE-BIBTEX-STYLE.
	(IF$, compile-bst-function): Change call to bst-name-to-lisp-name.

	* run-lisp: Added from CLOCC.

	* kpathsea.lisp (find-file): Implement for SBCL; implement for all
	other platforms using CLOCC PORT.

	* bst-reader.lisp (*bst-readtable*): Portability fix for CLISP in
	macro-character function of #\:.
	(INTEGERS, STRINGS): Changed use of BST-NAME.
	(ITERATE, READ, REVERSE, SORT): Fix for target package.

	* bst-functions.lisp (bst-name-to-lisp-name): Use *SPECIAL* naming
	convention for special variables.

	* bst-builtins.lisp (CALL.TYPE$): Fixes for the target package.

	* bibtex.lisp (compile-bst-file): Write out defpackage, in-package, and
	define-bibtex-style forms.
	(*bibtex-styles*, register-bibtex-style, define-bibtex-style,
	find-bibtex-style): New.
	(bibtex, cl-bibtex): Unified functionality into the BIBTEX function;
	removed CL-BIBTEX.  Use FIND-BIBTEX-STYLE.

	* bibtex-runtime.lisp (mark-history): Set *err-count* to 1 if new
	level of error reached.
	(process-bib-preamble-command): Fix to handle extra level of
	quoting around preamble strings.
	(make-bib-entry, merge-bib-entries): New.
	(*min-crossref*): New variable.
	(cited-bib-entries): Implement the crossref feature.
	(for-all-tex-tokens, do-tex-tokens): New.
	(bibtex-string-width): Handle special chars.
	(tex-alpha-char-p): New.
	(read-tex-control-sequence): New keyword argument :AT-IS-LETTER.
	(get-aux-command-and-process): Handle the \@input command to deal
	with nested .aux files.
	(*foreign-character-purifications*): New.
	(bibtex-string-purify): Do the purification.

2002-03-18  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	* kpathsea.lisp (find-file): Take pathname designators, not strings.
	* bibtex.lisp (bibtex, cl-bibtex): Likewise.
	  Suggested by Paul Foley.

	* packages.lisp, bibtex-runtime.lisp (write-bib-entry): New function.

2002-03-14  Matthias Koeppe  <mkoeppe@mail.math.uni-magdeburg.de>

	Version 0.1