diff options
Diffstat (limited to 'examples/example/example.c')
-rw-r--r-- | examples/example/example.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/example/example.c b/examples/example/example.c new file mode 100644 index 0000000..5c28ba6 --- /dev/null +++ b/examples/example/example.c @@ -0,0 +1,24 @@ +/* This is a very simple example of how to use the CLooGLib inside your + * programs. You should compile it by typing 'make' (after edition of the + * makefile), then test it for instance by typing + * 'more FILE.cloog | ./example' (or example.exe under Cygwin). + */ + +# include <stdio.h> +# include <cloog/cloog.h> + +int main() +{ CloogProgram * program ; + CloogOptions * options ; + + options = cloog_options_malloc() ; + program = cloog_program_read(stdin,options) ; + + program = cloog_program_generate(program,options) ; + cloog_program_pprint(stdout,program,options) ; + + cloog_options_free(options) ; + cloog_program_free(program) ; + + return 0 ; +} |