Skip to content
Snippets Groups Projects
Commit 5ba113b0 authored by Lev Walkin's avatar Lev Walkin
Browse files

macro to enable default output

parent 4cd4304f
No related branches found
No related tags found
No related merge requests found
...@@ -76,6 +76,7 @@ main(int ac, char **av) { ...@@ -76,6 +76,7 @@ main(int ac, char **av) {
} }
break; break;
case 'p': case 'p':
opt_toxml = 0; /* Override '-x' */
opt_print++; opt_print++;
break; break;
case 's': case 's':
...@@ -88,6 +89,7 @@ main(int ac, char **av) { ...@@ -88,6 +89,7 @@ main(int ac, char **av) {
} }
break; break;
case 'x': case 'x':
opt_print = 0; /* Override '-p' */
opt_toxml++; opt_toxml++;
break; break;
case 'h': case 'h':
...@@ -101,7 +103,11 @@ main(int ac, char **av) { ...@@ -101,7 +103,11 @@ main(int ac, char **av) {
" -n <num> Process files <num> times\n" " -n <num> Process files <num> times\n"
" -s <size> Set the stack usage limit\n" " -s <size> Set the stack usage limit\n"
" -p Print out the decoded contents\n" " -p Print out the decoded contents\n"
" -x Print out as XML\n" " -x Print out as XML"
#ifdef ASN_DECODER_DEFAULT_OUTPUT_XML
" (default)"
#endif
"\n"
, av[0], (long)suggested_bufsize); , av[0], (long)suggested_bufsize);
exit(EX_USAGE); exit(EX_USAGE);
} }
...@@ -114,6 +120,10 @@ main(int ac, char **av) { ...@@ -114,6 +120,10 @@ main(int ac, char **av) {
exit(EX_USAGE); exit(EX_USAGE);
} }
#ifdef ASN_DECODER_DEFAULT_OUTPUT_XML
if(!opt_print) opt_toxml++;
#endif
setvbuf(stdout, 0, _IOLBF, 0); setvbuf(stdout, 0, _IOLBF, 0);
for(num = 0; num < number_of_iterations; num++) { for(num = 0; num < number_of_iterations; num++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment