change _errno_ to error_number

This commit is contained in:
hooper114 2008-09-02 19:48:13 +00:00
parent 73a51d6813
commit abd18ac7a1
2 changed files with 16 additions and 16 deletions

View File

@ -37,7 +37,7 @@ int ps_plot(struct zint_symbol *symbol)
FILE *feps;
int fgred, fggrn, fgblu, bgred, bggrn, bgblu;
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;
char textpart[10], addon[6];
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");
return ERROR_INVALID_OPTION;
}
_errno_ = is_sane(SSET, symbol->fgcolour);
if (_errno_ == ERROR_INVALID_DATA) {
error_number = is_sane(SSET, symbol->fgcolour);
if (error_number == ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "error: malformed foreground colour target");
return ERROR_INVALID_OPTION;
}
_errno_ = is_sane(SSET, symbol->bgcolour);
if (_errno_ == ERROR_INVALID_DATA) {
error_number = is_sane(SSET, symbol->bgcolour);
if (error_number == ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "error: malformed background colour target");
return ERROR_INVALID_OPTION;
}
@ -785,6 +785,6 @@ int ps_plot(struct zint_symbol *symbol)
fclose(feps);
return _errno_;
return error_number;
}

View File

@ -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[])
{ /* 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];
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;
@ -154,10 +154,10 @@ int rss14(struct zint_symbol *symbol, unsigned char source[])
strcpy(symbol->errtxt, "error: input too long");
return ERROR_TOO_LONG;
}
_errno_ = is_sane(NESET, source);
if(_errno_ == ERROR_INVALID_DATA) {
error_number = is_sane(NESET, source);
if(error_number == ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "error: invalid characters in data");
return _errno_;
return error_number;
}
/* 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[])
{ /* 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];
int left_group, right_group, left_odd, left_even, right_odd, right_even;
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");
return ERROR_TOO_LONG;
}
_errno_ = is_sane(NESET, source);
if(_errno_ == ERROR_INVALID_DATA) {
error_number = is_sane(NESET, source);
if(error_number == ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "error: invalid characters in data");
return _errno_;
return error_number;
}
/* 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);
return _errno_;
return error_number;
}
int general_rules(char field[], char type[])