[barcode] Patches to barcode-0.97 to enable boxes around codes

Alessandro Rubini rubini@gnu.org
Tue, 5 Mar 2002 10:42:33 +0100


Hello.

Thanks for contributing to barcode.

> I had a need to put boxes around the bar codes in order to
> facilitate easier cutting of the labels for use with DLT tapes.

Unfortunately, I can't accept your patch as done because it introduces
a major incompatibility in the library interface. On the other hand,
I'm willing to accept it if redone to prevent incompatibilities.

This means adding "barcode_border()", and possibly
"encode_and_print_with_border()", thus not changing the existing
prototype for encode_and_print.

Please note that adding fields to the structure is not a major
problem, but please add them at the end and only read them if you find
a flag set. (to prevent most problems for apps not recompiling, not a
problem since libbarcode is only ststic and not dynamic, but good
policy anyway (people might have it dynamic, you don't know)).
It's not completely safe, I agree, but a good measure.

Obvously, I might ask you to write the docs as well, when I like
the approach (otherwise, I just might take a looot of time to do it
myself). Please add your name to copyright notes, too.

> In addition I also
> needed the barcodes to be of a particular size. If you just specify a
> table today with barcode, it will autosize the barcodes to fit the space
> available. Even though one could probably fix this using the margins,
> I found it easier to be able to specify the geometry of the barcode and
> make it count even inside a table entry.

This was already contributed in 0.98 (release a few days ago), but it
only uses widxhei (not +xoff+yoff). I didn't read yours, yet. Again,
if you re-diff against 0.98 it would be great.

Thanks again
/alessandro