102 Octstr *wml_binary = NULL;
103 int i, ret = 0, opt,
file = 0, zero = 0, numstatus = 0, wml_strict = 1;
110 while ((opt =
getopt(argc, argv,
"hsbzrn:f:c:")) != EOF) {
139 if (numstatus == -1) {
141 error(num,
"Error in the handling of argument to option n");
143 panic(0,
"Stopping.");
151 panic(0,
"Couldn't open output file.");
158 error(0,
"Invalid option %c", opt);
160 panic(0,
"Stopping.");
165 error(0,
"Missing arguments.");
167 panic(0,
"Stopping.");
176 if (wml_text == NULL)
177 panic(0,
"Couldn't read WML source file.");
182 for (i = 0; i <= num; i++) {
202 "Here's the binary output: \n\n"));
void error(int err, const char *fmt,...)
void octstr_append(Octstr *ostr1, const Octstr *ostr2)
void octstr_append_char(Octstr *ostr, int ch)
int octstr_print(FILE *f, Octstr *ostr)
static void set_zero(Octstr *ostr)
#define octstr_get_cstr(ostr)
int getopt(int argc, char **argv, char *opts)
Octstr * octstr_imm(const char *cstr)
void octstr_insert(Octstr *ostr1, const Octstr *ostr2, long pos)
void log_set_output_level(enum output_level level)
#define octstr_dump(ostr, level,...)
int wml_compile(Octstr *wml_text, Octstr *charset, Octstr **wml_binary, Octstr *version)
Octstr * octstr_format(const char *fmt,...)
void octstr_destroy(Octstr *ostr)
char filename[FILENAME_MAX+1]
#define octstr_create(cstr)
Octstr * octstr_read_file(const char *filename)
int log_open(char *filename, int level, enum excl_state excl)
long octstr_len(const Octstr *ostr)
long octstr_parse_long(long *nump, Octstr *ostr, long pos, int base)
void gwlib_shutdown(void)
int octstr_pretty_print(FILE *f, Octstr *ostr)
void wml_init(int wml_xml_strict)