mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
change _errno_ to error_number
This commit is contained in:
parent
73a51d6813
commit
abd18ac7a1
12
backend/ps.c
12
backend/ps.c
@ -37,7 +37,7 @@ int ps_plot(struct zint_symbol *symbol)
|
|||||||
FILE *feps;
|
FILE *feps;
|
||||||
int fgred, fggrn, fgblu, bgred, bggrn, bgblu;
|
int fgred, fggrn, fgblu, bgred, bggrn, bgblu;
|
||||||
float red_ink, green_ink, blue_ink, red_paper, green_paper, blue_paper;
|
float red_ink, green_ink, blue_ink, red_paper, green_paper, blue_paper;
|
||||||
int _errno_ = 0;
|
int error_number = 0;
|
||||||
int textoffset, xoffset, yoffset, textdone, main_width;
|
int textoffset, xoffset, yoffset, textdone, main_width;
|
||||||
char textpart[10], addon[6];
|
char textpart[10], addon[6];
|
||||||
int large_bar_count, comp_offset;
|
int large_bar_count, comp_offset;
|
||||||
@ -67,13 +67,13 @@ int ps_plot(struct zint_symbol *symbol)
|
|||||||
strcpy(symbol->errtxt, "error: malformed background colour target");
|
strcpy(symbol->errtxt, "error: malformed background colour target");
|
||||||
return ERROR_INVALID_OPTION;
|
return ERROR_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
_errno_ = is_sane(SSET, symbol->fgcolour);
|
error_number = is_sane(SSET, symbol->fgcolour);
|
||||||
if (_errno_ == ERROR_INVALID_DATA) {
|
if (error_number == ERROR_INVALID_DATA) {
|
||||||
strcpy(symbol->errtxt, "error: malformed foreground colour target");
|
strcpy(symbol->errtxt, "error: malformed foreground colour target");
|
||||||
return ERROR_INVALID_OPTION;
|
return ERROR_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
_errno_ = is_sane(SSET, symbol->bgcolour);
|
error_number = is_sane(SSET, symbol->bgcolour);
|
||||||
if (_errno_ == ERROR_INVALID_DATA) {
|
if (error_number == ERROR_INVALID_DATA) {
|
||||||
strcpy(symbol->errtxt, "error: malformed background colour target");
|
strcpy(symbol->errtxt, "error: malformed background colour target");
|
||||||
return ERROR_INVALID_OPTION;
|
return ERROR_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
@ -785,6 +785,6 @@ int ps_plot(struct zint_symbol *symbol)
|
|||||||
|
|
||||||
fclose(feps);
|
fclose(feps);
|
||||||
|
|
||||||
return _errno_;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ void getRSSwidths(int val, int n, int elements, int maxWidth, int noNarrow)
|
|||||||
|
|
||||||
int rss14(struct zint_symbol *symbol, unsigned char source[])
|
int rss14(struct zint_symbol *symbol, unsigned char source[])
|
||||||
{ /* GS1 DataBar-14 */
|
{ /* GS1 DataBar-14 */
|
||||||
int _errno_ = 0, i, j, read, mask;
|
int error_number = 0, i, j, read, mask;
|
||||||
short int accum[112], left_reg[112], right_reg[112], x_reg[112], y_reg[112];
|
short int accum[112], left_reg[112], right_reg[112], x_reg[112], y_reg[112];
|
||||||
int data_character[4], data_group[4], v_odd[4], v_even[4];
|
int data_character[4], data_group[4], v_odd[4], v_even[4];
|
||||||
int data_widths[8][4], checksum, c_left, c_right, total_widths[46], writer;
|
int data_widths[8][4], checksum, c_left, c_right, total_widths[46], writer;
|
||||||
@ -154,10 +154,10 @@ int rss14(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
strcpy(symbol->errtxt, "error: input too long");
|
strcpy(symbol->errtxt, "error: input too long");
|
||||||
return ERROR_TOO_LONG;
|
return ERROR_TOO_LONG;
|
||||||
}
|
}
|
||||||
_errno_ = is_sane(NESET, source);
|
error_number = is_sane(NESET, source);
|
||||||
if(_errno_ == ERROR_INVALID_DATA) {
|
if(error_number == ERROR_INVALID_DATA) {
|
||||||
strcpy(symbol->errtxt, "error: invalid characters in data");
|
strcpy(symbol->errtxt, "error: invalid characters in data");
|
||||||
return _errno_;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make some room for a separator row for composite symbols */
|
/* make some room for a separator row for composite symbols */
|
||||||
@ -632,12 +632,12 @@ int rss14(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return _errno_;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rsslimited(struct zint_symbol *symbol, unsigned char source[])
|
int rsslimited(struct zint_symbol *symbol, unsigned char source[])
|
||||||
{ /* GS1 DataBar Limited */
|
{ /* GS1 DataBar Limited */
|
||||||
int _errno_ = 0, i, mask;
|
int error_number = 0, i, mask;
|
||||||
short int accum[112], left_reg[112], right_reg[112], x_reg[112], y_reg[112];
|
short int accum[112], left_reg[112], right_reg[112], x_reg[112], y_reg[112];
|
||||||
int left_group, right_group, left_odd, left_even, right_odd, right_even;
|
int left_group, right_group, left_odd, left_even, right_odd, right_even;
|
||||||
int left_character, right_character, left_widths[14], right_widths[14];
|
int left_character, right_character, left_widths[14], right_widths[14];
|
||||||
@ -651,10 +651,10 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
strcpy(symbol->errtxt, "error: input too long");
|
strcpy(symbol->errtxt, "error: input too long");
|
||||||
return ERROR_TOO_LONG;
|
return ERROR_TOO_LONG;
|
||||||
}
|
}
|
||||||
_errno_ = is_sane(NESET, source);
|
error_number = is_sane(NESET, source);
|
||||||
if(_errno_ == ERROR_INVALID_DATA) {
|
if(error_number == ERROR_INVALID_DATA) {
|
||||||
strcpy(symbol->errtxt, "error: invalid characters in data");
|
strcpy(symbol->errtxt, "error: invalid characters in data");
|
||||||
return _errno_;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make some room for a separator row for composite symbols */
|
/* make some room for a separator row for composite symbols */
|
||||||
@ -898,7 +898,7 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
|
|
||||||
concat(symbol->text, hrt);
|
concat(symbol->text, hrt);
|
||||||
|
|
||||||
return _errno_;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
int general_rules(char field[], char type[])
|
int general_rules(char field[], char type[])
|
||||||
|
Loading…
Reference in New Issue
Block a user