Newer
Older
}
else{
return List_Nbr(list)-i;
}
}
if(j != (int)strlen(format))
return -1;
return 0;
}

Christophe Geuzaine
committed
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
int CheckViewErrorFlags(Post_View *v){
if(View->adaptive) return 0; // hope for the best :-)
char *name[8] = { "point", "line", "triangle", "quadrangle",
"tetrahedron", "hexahedron", "prism", "pyramid" };
char *type[3] = { "scalar", "vector", "tensor" };
if(8 * 3 != VIEW_NB_ELEMENT_TYPES){
Msg(GERROR, "Please upgrade CheckViewErrorFlags!");
return 0;
}
for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++)
if(ViewErrorFlags[i])
Msg(GERROR, "%d %s %s%s in View[%d] contain%s a wrong number of values",
ViewErrorFlags[i], type[i%3], name[i/3], (ViewErrorFlags[i] > 1) ? "s" : "",
v->Index, (ViewErrorFlags[i] > 1) ? "" : "s");
return 0;
}
void yyerror(char *s){
Msg(GERROR, "'%s', line %d : %s (%s)", yyname, yylineno-1, s, yytext);
}

Christophe Geuzaine
committed
void yymsg(int type, char *fmt, ...){
va_list args;
va_start (args, fmt);
vsprintf (tmp, fmt, args);
va_end (args);

Christophe Geuzaine
committed
Msg(type, "'%s', line %d : %s", yyname, yylineno-1, tmp);