aboutsummaryrefslogtreecommitdiffstats
path: root/asn1c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-10-13 09:13:56 +0000
committerLev Walkin <vlm@lionet.info>2004-10-13 09:13:56 +0000
commitf748451c7b70297b62b072b041261527f01ec847 (patch)
treec9de041837e705ddeb83402b2da3bccd86e32cd3 /asn1c
parent144db9ba4ff5b048fa49274ef5d25d67f216deb3 (diff)
-X for XML DTD
Diffstat (limited to 'asn1c')
-rw-r--r--asn1c/asn1c.18
-rw-r--r--asn1c/asn1c.c8
2 files changed, 13 insertions, 3 deletions
diff --git a/asn1c/asn1c.1 b/asn1c/asn1c.1
index b331d440..7a6f87f5 100644
--- a/asn1c/asn1c.1
+++ b/asn1c/asn1c.1
@@ -3,18 +3,19 @@
asn1c \- ASN.1 Compiler
.SH SYNOPSIS
asn1c [\fB\-E\fR [\fB-F\fR] | \fB\-P\fR | \fB\-R\fR]
- [\fB\-S\fR\fIdir\fR]
+ [\fB\-S\fR\fIdir\fR] [\fB-X\fR]
[\fB\-W\fR\fIdebug-\fR...] [\fB\-f\fR\fIoption\fR...] [\fB\-p\fR\fIrint-\fR...]
\fIinfile\fR...
.SH DESCRIPTION
asn1c compiles the ASN.1 specifications into the set of
-target language (C/C++) encoders and decoders for BER, DER,
+target language (C/C++) encoders and decoders for BER, DER, XER,
and other encoding standards.
.SH OPTIONS
.TP
\fIOverall Options\fR
\fB\-E \-F \-P \-R\fR
.BI "\-S " directory
+\fB\-X
.TP
\fIWarning Options\fR
.br
@@ -50,6 +51,9 @@ omitting the usual support code.
.TP
\fB\-S\fR \fIdirectory\fR
Use the specified directory with ASN.1 skeleton files.
+.TP
+.B \-X
+Generate the XML DTD schema for the specified ASN.1 files.
.SH WARNING OPTIONS
.TP
.B \-Werror
diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c
index 98a607aa..32e6e744 100644
--- a/asn1c/asn1c.c
+++ b/asn1c/asn1c.c
@@ -70,7 +70,7 @@ main(int ac, char **av) {
/*
* Process command-line options.
*/
- while((ch = getopt(ac, av, "EFf:hLPp:RS:vW:")) != -1)
+ while((ch = getopt(ac, av, "EFf:hLPp:RS:vW:X")) != -1)
switch(ch) {
case 'E':
print_arg__print_out = 1;
@@ -146,6 +146,11 @@ main(int ac, char **av) {
exit(EX_USAGE);
}
break;
+ case 'X':
+ print_arg__print_out = 1; /* Implicit -E */
+ print_arg__fix_n_print = 1; /* Implicit -F */
+ asn1_printer_flags |= APF_PRINT_XML_DTD;
+ break;
default:
usage(av[0]);
}
@@ -299,6 +304,7 @@ usage(const char *av0) {
" -R Restrict output (tables only, no support code)\n"
" -S <dir> Directory with support (skeleton?) files\n"
" (Default is \"%s\")\n"
+" -X Generate and print the XML DTD\n"
"\n"
" -Werror Treat warnings as errors; abort if any warning\n"