I have the unfortunate task of trying to take an app written in 2008 (ish) which uses zint and upgrading it to the latest version of zint
This app doesn't seem to have upgraded the zint lib since it was written , and there is no code repository history before 2019
I've managed to get it to compile using the latest version of zint (2.12) with one exception. The project is complaining about the ZBarcode_Export
not being defined. I have looked a any number of zint versions and can't find the definition
I do have a horrible feeling that this is a custom function added to the zint codebase (yes, the author included the specific version of zint into their codebase)
Looking at the library.c file (where ZBarcode_Export is defined in my codebase) it is basically a reference to vml
int ZBarcode_Export(struct zint_symbol *symbol, int rotate_angle, int font_size, char* font, const char*& ret_val)
{
return vml_plot(symbol, rotate_angle, font_size, font, ret_val);
}
with vml_plot defined as
extern int vml_plot(struct zint_symbol *symbol, int rotate_angle, int font_size, char* font, const char*& ret_val);
at the top of library.c
Digging further into the code, I find that there's a vml.c file which contains the vml_plot function
However, now I cannot find the vml.c file in any version of zint either ;)
The file in my repo exists, and has this header
/* vml.c - Scalable Vector Graphics */
/*
libzint - the open source barcode library
Copyright (C) 2009 Robin Stuart <robin@zint.org.uk>
This file only contains the vml_plot function
So I was guessing that it was / is / used to be part of zint
Rather than going further and further down the rabbit hole I was wondering if anyone knows anything about this.
Or, perhaps a better options - does anyone know how I can convert this vml_plot call into something that zint has today ?
I have attached the vml.c file that I have
Hi, interesting, first I've heard of the VML format.
I don't know how reliable the copyright attribution is - may just be a copy/paste thing. Also looks as if someone rather crudely tacked on some C++ stuff (
l_str
) .ZBarcode_Export()
is also in C++ (reference arg).Don't know what to say really. You'd need to determine how vital to the app producing this file format is, which from Wikipedia appears to only be supported by old Microsoft apps.
thanks for the help and advice
Hi Julian,
For what it's worth I double checked all of my backups of Zint right back to version 0.2 from 2006 and I can confirm that vml.c was never part of Zint, so this file was not made by me. I don't remember coming across this file type before and I'm pretty certain the author of this file never contacted me about supporting it, so you really have found a strange beast here. Sorry I can't shed any more light but thank you for sharing this oddity.
Robin.