diff options
author | Michal Krol <[email protected]> | 2009-12-10 12:58:44 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-12-10 12:58:44 +0100 |
commit | 417f36ccb062bee01aff92d6fcdf47af3ece3cb4 (patch) | |
tree | 4fb87edb5a712bf8fd805dfc166d203b56daed19 | |
parent | 22200bcafcc77ecdca0127ac72d68e75e2ad7aee (diff) |
glsl/apps: Predefine __GLSL_PP_PREDEFINED_MACRO_TEST for testing.
-rw-r--r-- | src/glsl/apps/process.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glsl/apps/process.c b/src/glsl/apps/process.c index 6c5c7bc420f..b793cc086d8 100644 --- a/src/glsl/apps/process.c +++ b/src/glsl/apps/process.c @@ -132,6 +132,16 @@ main(int argc, return 0; } + if (sl_pp_context_add_predefined(context, "__GLSL_PP_PREDEFINED_MACRO_TEST", "1")) { + fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); + + printf("Error: %s\n", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + free(tokens); + fclose(out); + return 0; + } + if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) { fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); |