mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Allow CFLGAS="-std=c99 -D_POSIX_C_SOURCE=2"
Use glib function: strcasecmp -> g_ascii_strcasecmp bzero -> memset strdup -> g_strdump Don't use arithmetic void*+int
This commit is contained in:
@@ -66,22 +66,22 @@ like { return LIKE; }
|
||||
return IDENT;
|
||||
}
|
||||
|
||||
[a-z\xa0-\xff][a-z0-9_#@\xa0-\xff]* { yylval.name = strdup(yytext); return NAME; }
|
||||
[a-z\xa0-\xff][a-z0-9_#@\xa0-\xff]* { yylval.name = g_strdup(yytext); return NAME; }
|
||||
|
||||
'[^']*'' {
|
||||
yyless(yyleng-1);
|
||||
yymore();
|
||||
}
|
||||
'[^']*' {
|
||||
yylval.name = strdup(yytext);
|
||||
yylval.name = g_strdup(yytext);
|
||||
return STRING;
|
||||
}
|
||||
|
||||
(-*[0-9]+|([0-9]*\.[0-9]+)(e[-+]?[0-9]+)?) {
|
||||
yylval.name = strdup(yytext); return NUMBER;
|
||||
yylval.name = g_strdup(yytext); return NUMBER;
|
||||
}
|
||||
~?(\/?[a-z0-9\.\xa0-\xff]+)+ {
|
||||
yylval.name = strdup(yytext); return PATH;
|
||||
yylval.name = g_strdup(yytext); return PATH;
|
||||
}
|
||||
|
||||
. { return yytext[0]; }
|
||||
|
||||
@@ -641,7 +641,7 @@ int mdb_sql_find_sargcol(MdbSargNode *node, gpointer data)
|
||||
|
||||
for (i=0;i<table->num_cols;i++) {
|
||||
col=g_ptr_array_index(table->columns,i);
|
||||
if (!strcasecmp(col->name, (char *)node->parent)) {
|
||||
if (!g_ascii_strcasecmp(col->name, (char *)node->parent)) {
|
||||
node->col = col;
|
||||
break;
|
||||
}
|
||||
@@ -689,7 +689,7 @@ int found = 0;
|
||||
found=0;
|
||||
for (j=0;j<table->num_cols;j++) {
|
||||
col=g_ptr_array_index(table->columns,j);
|
||||
if (!strcasecmp(sqlcol->name, col->name)) {
|
||||
if (!g_ascii_strcasecmp(sqlcol->name, col->name)) {
|
||||
sqlcol->disp_size = mdb_col_disp_size(col);
|
||||
found=1;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user