mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
glsl: Print out error message in apps/process.
This commit is contained in:
parent
f9bd6f7152
commit
c42428c787
1 changed files with 11 additions and 8 deletions
|
|
@ -104,21 +104,24 @@ main(int argc,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (sl_pp_process(&context, &tokens[tokens_eaten], &outtokens)) {
|
||||
out = fopen(argv[2], "wb");
|
||||
if (!out) {
|
||||
sl_pp_context_destroy(&context);
|
||||
free(tokens);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (sl_pp_process(&context, &tokens[tokens_eaten], &outtokens)) {
|
||||
fprintf(out, "$ERROR: `%s'\n", context.error_msg);
|
||||
|
||||
sl_pp_context_destroy(&context);
|
||||
free(tokens);
|
||||
fclose(out);
|
||||
return -1;
|
||||
}
|
||||
|
||||
free(tokens);
|
||||
|
||||
out = fopen(argv[2], "wb");
|
||||
if (!out) {
|
||||
sl_pp_context_destroy(&context);
|
||||
free(outtokens);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; outtokens[i].token != SL_PP_EOF; i++) {
|
||||
switch (outtokens[i].token) {
|
||||
case SL_PP_NEWLINE:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue