simon-svn: halibut: simon

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Wed Aug 29 19:13:11 BST 2012


SVN root:       svn://svn.tartarus.org/sgt
Changes by:     simon
Revision:       9639
Date:           2012-08-29 19:13:11 +0100 (Wed, 29 Aug 2012)

Log message (13 lines):
Revamp of the Halibut error handling mechanism.

I'm not quite sure why I ever thought it was a good idea to have a
central variadic error() function taking an integer error code
followed by some list of arguments that depend on that code. It now
seems obvious to me that it's a much more sensible idea to have a
separate function per error, so that we can check at compile time that
the arguments to each error call are of the right number and type! So
I've done that instead.

A side effect is that the errors are no longer formatted into a
fixed-size buffer before going to stderr, so I can remove all the
%.200s precautions in the format strings.

Modified files:
U   halibut/biblio.c
U   halibut/bk_html.c
U   halibut/bk_info.c
U   halibut/bk_man.c
U   halibut/bk_paper.c
U   halibut/bk_pdf.c
U   halibut/bk_ps.c
U   halibut/bk_text.c
U   halibut/bk_whlp.c
U   halibut/contents.c
U   halibut/error.c
U   halibut/halibut.h
U   halibut/in_afm.c
U   halibut/in_pf.c
U   halibut/in_sfnt.c
U   halibut/index.c
U   halibut/input.c
U   halibut/keywords.c
U   halibut/main.c
U   halibut/malloc.c
U   halibut/ustring.c

Links:
http://svn.tartarus.org/sgt/?rev=9639&view=rev
http://svn.tartarus.org/sgt/halibut/biblio.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/bk_html.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/bk_info.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/bk_man.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/bk_paper.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/bk_pdf.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/bk_ps.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/bk_text.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/bk_whlp.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/contents.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/error.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/halibut.h?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/in_afm.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/in_pf.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/in_sfnt.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/index.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/input.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/keywords.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/main.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/malloc.c?rev=9639&r1=9638&r2=9639
http://svn.tartarus.org/sgt/halibut/ustring.c?rev=9639&r1=9638&r2=9639



More information about the tartarus-commits mailing list