mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Add method for dynamically checking version info
Suggestion by aragon@phat.za.net for python-zint
This commit is contained in:
@ -983,8 +983,8 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source,int
|
||||
error_number = ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
if ((symbol->eci < 3) || (symbol->eci > 26) || (symbol->eci == 14) || (symbol->eci == 19) || (symbol->eci == 25)) {
|
||||
strcpy(symbol->errtxt, "Invalid or unsupported ECI mode (B18)");
|
||||
if ((symbol->eci < 3) || (symbol->eci > 999999)) {
|
||||
strcpy(symbol->errtxt, "Invalid ECI mode (B18)");
|
||||
error_number = ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
@ -1304,3 +1304,7 @@ int ZBarcode_Render(struct zint_symbol *symbol, const float width, const float h
|
||||
// Send the request to the render_plot method
|
||||
return render_plot(symbol, width, height);
|
||||
}
|
||||
|
||||
int ZBarcode_Version() {
|
||||
return (ZINT_VERSION_MAJOR * 10000) + (ZINT_VERSION_MINOR * 100) + ZINT_VERSION_RELEASE;
|
||||
}
|
Reference in New Issue
Block a user