mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 14:25:23 -04:00
Audit of error codes
This commit is contained in:
parent
58e80a9ff7
commit
608b4b9134
38 changed files with 345 additions and 345 deletions
|
@ -105,7 +105,7 @@ int svg_plot(struct zint_symbol *symbol) {
|
|||
fsvg = fopen(symbol->outfile, "w");
|
||||
}
|
||||
if (fsvg == NULL) {
|
||||
strcpy(symbol->errtxt, "Could not open output file (F60)");
|
||||
strcpy(symbol->errtxt, "660: Could not open output file");
|
||||
return ZINT_ERROR_FILE_ACCESS;
|
||||
}
|
||||
|
||||
|
@ -114,24 +114,24 @@ int svg_plot(struct zint_symbol *symbol) {
|
|||
to_upper((unsigned char*) symbol->bgcolour);
|
||||
|
||||
if (strlen(symbol->fgcolour) != 6) {
|
||||
strcpy(symbol->errtxt, "Malformed foreground colour target (F61)");
|
||||
strcpy(symbol->errtxt, "661: Malformed foreground colour target");
|
||||
fclose(fsvg);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (strlen(symbol->bgcolour) != 6) {
|
||||
strcpy(symbol->errtxt, "Malformed background colour target (F62)");
|
||||
strcpy(symbol->errtxt, "662: Malformed background colour target");
|
||||
fclose(fsvg);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
error_number = is_sane(SSET, (unsigned char*) symbol->fgcolour, strlen(symbol->fgcolour));
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Malformed foreground colour target (F63)");
|
||||
strcpy(symbol->errtxt, "663: Malformed foreground colour target");
|
||||
fclose(fsvg);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
error_number = is_sane(SSET, (unsigned char*) symbol->bgcolour, strlen(symbol->bgcolour));
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Malformed background colour target (F64)");
|
||||
strcpy(symbol->errtxt, "664: Malformed background colour target");
|
||||
fclose(fsvg);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue