Definition at line 81 of file test_si.c.
References charset, debug(), error(), file, file_name, getopt(), gwlib_init(), gwlib_shutdown(), help(), log_set_output_level(), octstr_append(), octstr_create, octstr_destroy(), octstr_dump, octstr_format(), octstr_imm(), octstr_pretty_print(), octstr_read_file(), optarg, optind, panic, and si_compile().
97 while ((opt =
getopt(argc, argv,
"hf:c:v:")) != EOF) {
109 panic(0,
"Cannot open output file");
123 error(0,
"Invalid option %c", opt);
125 panic(0,
"Stopping");
131 error(0,
"Missing arguments");
133 panic(0,
"Stopping");
138 panic(0,
"Cannot read the si document");
143 output =
octstr_format(
"%s",
"si compiler returned %d\n", ret);
155 debug(
"test.si", 0,
"si binary was");
void error(int err, const char *fmt,...)
void octstr_append(Octstr *ostr1, const Octstr *ostr2)
int si_compile(Octstr *si_doc, Octstr *charset, Octstr **si_binary)
int getopt(int argc, char **argv, char *opts)
Octstr * octstr_imm(const char *cstr)
void log_set_output_level(enum output_level level)
#define octstr_dump(ostr, level,...)
Octstr * octstr_format(const char *fmt,...)
void octstr_destroy(Octstr *ostr)
#define octstr_create(cstr)
Octstr * octstr_read_file(const char *filename)
void debug(const char *place, int err, const char *fmt,...)
void gwlib_shutdown(void)
int octstr_pretty_print(FILE *f, Octstr *ostr)