8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:03:03 +01:00

Solve a visibility/compile time problem on MacOSX - classes -> get_classes (done in head and 2.0, but missed in 2.1)

This commit is contained in:
paulbeach 2009-09-25 13:50:31 +00:00
parent a7af5aad60
commit b8f9861446

View File

@ -124,12 +124,12 @@ static act* global_last_action;
static act* global_first_action;
static UCHAR classes_array[256];
inline UCHAR classes(int idx)
inline UCHAR get_classes(int idx)
{
return classes_array[(UCHAR) idx];
}
inline UCHAR classes(UCHAR idx)
inline UCHAR get_classes(UCHAR idx)
{
return classes_array[idx];
}
@ -1234,7 +1234,7 @@ void CPR_raw_read()
while (c = get_char(input_file))
{
position++;
if ((classes(c) == CHR_WHITE) && sw_trace && token_string) {
if ((get_classes(c) == CHR_WHITE) && sw_trace && token_string) {
*p = 0;
puts(token_string);
token_string[0] = 0;
@ -1252,7 +1252,7 @@ void CPR_raw_read()
}
else {
line_position++;
if (classes(c) != CHR_WHITE)
if (get_classes(c) != CHR_WHITE)
continue_char = (gpreGlob.token_global.tok_keyword == KW_AMPERSAND);
}
}
@ -1361,7 +1361,7 @@ TOK CPR_token()
static bool all_digits(const char* str1)
{
for (; *str1; str1++)
if (!(classes(*str1) & CHR_DIGIT))
if (!(get_classes(*str1) & CHR_DIGIT))
return false;
return true;
@ -2098,7 +2098,7 @@ static TOK get_token()
gpreGlob.token_global.tok_position = position;
gpreGlob.token_global.tok_white_space = 0;
UCHAR char_class = classes(c);
UCHAR char_class = get_classes(c);
#ifdef GPRE_ADA
if ((gpreGlob.sw_language == lang_ada) && (c == '\'')) {
@ -2115,7 +2115,7 @@ static TOK get_token()
bool label = false;
if (gpreGlob.sw_sql && (char_class & CHR_INTRODUCER)) {
while (classes(c = nextchar()) & CHR_IDENT) {
while (get_classes(c = nextchar()) & CHR_IDENT) {
if (p < end) {
*p++ = (TEXT) c;
}
@ -2125,7 +2125,7 @@ static TOK get_token()
}
else if (char_class & CHR_LETTER) {
while (true) {
while (classes(c = nextchar()) & CHR_IDENT)
while (get_classes(c = nextchar()) & CHR_IDENT)
*p++ = (TEXT) c;
if (c != '-' || gpreGlob.sw_language != lang_cobol)
break;
@ -2142,7 +2142,7 @@ static TOK get_token()
if (gpreGlob.sw_language == lang_fortran && line_position < 7)
label = true;
#endif
while (classes(c = nextchar()) & CHR_DIGIT)
while (get_classes(c = nextchar()) & CHR_DIGIT)
*p++ = (TEXT) c;
if (label) {
*p = 0;
@ -2150,7 +2150,7 @@ static TOK get_token()
}
if (c == '.') {
*p++ = (TEXT) c;
while (classes(c = nextchar()) & CHR_DIGIT)
while (get_classes(c = nextchar()) & CHR_DIGIT)
*p++ = (TEXT) c;
}
if (!label && (c == 'E' || c == 'e')) {
@ -2160,7 +2160,7 @@ static TOK get_token()
*p++ = (TEXT) c;
else
return_char(c);
while (classes(c = nextchar()) & CHR_DIGIT)
while (get_classes(c = nextchar()) & CHR_DIGIT)
*p++ = (TEXT) c;
}
return_char(c);
@ -2239,9 +2239,9 @@ static TOK get_token()
}
}
else if (c == '.') {
if (classes(c = nextchar()) & CHR_DIGIT) {
if (get_classes(c = nextchar()) & CHR_DIGIT) {
*p++ = (TEXT) c;
while (classes(c = nextchar()) & CHR_DIGIT)
while (get_classes(c = nextchar()) & CHR_DIGIT)
*p++ = (TEXT) c;
if ((c == 'E' || c == 'e')) {
*p++ = (TEXT) c;
@ -2250,7 +2250,7 @@ static TOK get_token()
*p++ = (TEXT) c;
else
return_char(c);
while (classes(c = nextchar()) & CHR_DIGIT)
while (get_classes(c = nextchar()) & CHR_DIGIT)
*p++ = (TEXT) c;
}
return_char(c);
@ -2865,7 +2865,7 @@ static SSHORT skip_white()
}
#endif
const UCHAR char_class = classes(c);
const UCHAR char_class = get_classes(c);
if (char_class & CHR_WHITE) {
continue;