Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
7415bffa
Commit
7415bffa
authored
Aug 16, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-t option and minor changes
parent
b4eb8b5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
15 deletions
+32
-15
asn1c/Makefile.am
asn1c/Makefile.am
+3
-0
asn1c/Makefile.in
asn1c/Makefile.in
+9
-6
asn1c/asn1c.c
asn1c/asn1c.c
+20
-9
No files found.
asn1c/Makefile.am
View file @
7415bffa
...
...
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
-I
${top_srcdir}
/libasn1parser
\
-I
${top_srcdir}
/libasn1print
\
-I
${top_srcdir}
/libasn1fix
\
-I
${top_srcdir}
/skeletons
\
-DDATADIR
=
\"
${pkgdatadir}
\"
LDADD
=
\
...
...
@@ -15,6 +16,8 @@ LDADD = \
${top_builddir}
/libasn1print/libasn1print.la
\
${top_builddir}
/libasn1compiler/libasn1compiler.la
asn1c_SOURCES
=
asn1c.c decoder.c decoder.h
bin_PROGRAMS
=
asn1c
dist_man1_MANS
=
asn1c.1
...
...
asn1c/Makefile.in
View file @
7415bffa
...
...
@@ -14,7 +14,7 @@
@SET_MAKE@
SOURCES
=
asn1c.c
SOURCES
=
$(asn1c_SOURCES)
srcdir
=
@srcdir@
top_srcdir
=
@top_srcdir@
...
...
@@ -53,8 +53,8 @@ CONFIG_CLEAN_FILES =
am__installdirs
=
"
$(DESTDIR)$(bindir)
"
"
$(DESTDIR)$(man1dir)
"
binPROGRAMS_INSTALL
=
$(INSTALL_PROGRAM)
PROGRAMS
=
$(bin_PROGRAMS)
a
sn1c_SOURCES
=
asn1c.c
asn1c_OBJECTS
=
asn1c.
$(OBJEXT
)
a
m_asn1c_OBJECTS
=
asn1c.
$(OBJEXT)
decoder.
$(OBJEXT)
asn1c_OBJECTS
=
$(am_asn1c_OBJECTS
)
asn1c_LDADD
=
$(LDADD)
asn1c_DEPENDENCIES
=
${top_builddir}
/libasn1parser/libasn1parser.la
\
${top_builddir}
/libasn1fix/libasn1fix.la
\
...
...
@@ -63,7 +63,7 @@ asn1c_DEPENDENCIES = ${top_builddir}/libasn1parser/libasn1parser.la \
DEFAULT_INCLUDES
=
-I
.
-I
$(srcdir)
-I
$(top_builddir)
depcomp
=
$(SHELL)
$(top_srcdir)
/depcomp
am__depfiles_maybe
=
depfiles
@AMDEP_TRUE@
DEP_FILES
=
./
$(DEPDIR)
/asn1c.Po
@AMDEP_TRUE@
DEP_FILES
=
./
$(DEPDIR)
/asn1c.Po
./
$(DEPDIR)
/decoder.Po
COMPILE
=
$(CC)
$(DEFS)
$(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS)
\
$(CPPFLAGS)
$(AM_CFLAGS)
$(CFLAGS)
LTCOMPILE
=
$(LIBTOOL)
--mode
=
compile
$(CC)
$(DEFS)
\
...
...
@@ -72,8 +72,8 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
CCLD
=
$(CC)
LINK
=
$(LIBTOOL)
--mode
=
link
$(CCLD)
$(AM_CFLAGS)
$(CFLAGS)
\
$(AM_LDFLAGS)
$(LDFLAGS)
-o
$@
SOURCES
=
asn1c.c
DIST_SOURCES
=
asn1c.c
SOURCES
=
$(asn1c_SOURCES)
DIST_SOURCES
=
$(asn1c_SOURCES)
RECURSIVE_TARGETS
=
all-recursive check-recursive dvi-recursive
\
html-recursive info-recursive install-data-recursive
\
install-exec-recursive install-info-recursive
\
...
...
@@ -204,6 +204,7 @@ AM_CPPFLAGS = \
-I
${top_srcdir}
/libasn1parser
\
-I
${top_srcdir}
/libasn1print
\
-I
${top_srcdir}
/libasn1fix
\
-I
${top_srcdir}
/skeletons
\
-DDATADIR
=
\"
${pkgdatadir}
\"
LDADD
=
\
...
...
@@ -212,6 +213,7 @@ LDADD = \
${top_builddir}
/libasn1print/libasn1print.la
\
${top_builddir}
/libasn1compiler/libasn1compiler.la
asn1c_SOURCES
=
asn1c.c decoder.c decoder.h
dist_man1_MANS
=
asn1c.1
check_SCRIPTS
=
check-parsing.sh
TESTS
=
check-parsing.sh
...
...
@@ -289,6 +291,7 @@ distclean-compile:
-
rm
-f
*
.tab.c
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/asn1c.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/decoder.Po@am__quote@
.c.o
:
@am__fastdepCC_TRUE@
if
$(COMPILE)
-MT
$@
-MD
-MP
-MF
"$(DEPDIR)/$*.Tpo"
-c
-o
$@
$<;
\
...
...
asn1c/asn1c.c
View file @
7415bffa
...
...
@@ -19,14 +19,16 @@
#include <asn1c_compat.h>
/* Portable basename(3) and dirname(3) */
#include "decoder.h"
/* -t: decode TL[V?] string */
static
void
usage
(
char
*
av0
);
/* Print the Usage screen and exit(EX_USAGE) */
int
main
(
int
ac
,
char
**
av
)
{
enum
asn1p_flags
asn1_parser_flags
=
A1P_NOFLAGS
;
enum
asn1f_flags
asn1_fixer_flags
=
A1F_NOFLAGS
;
enum
asn1c_flags
asn1_compiler_flags
=
A1C_NOFLAGS
;
enum
asn1print_flags
_e
print_arg__flags
=
APF_NOFLAGS
;
enum
asn1p_flags
asn1_parser_flags
=
A1P_NOFLAGS
;
enum
asn1f_flags
asn1_fixer_flags
=
A1F_NOFLAGS
;
enum
asn1c_flags
asn1_compiler_flags
=
A1C_NOFLAGS
;
enum
asn1print_flags
asn1_print_flags
=
APF_NOFLAGS
;
int
print_arg__print_out
=
0
;
/* Don't compile, just print parsed */
int
print_arg__fix_n_print
=
0
;
/* Fix and print */
int
warnings_as_errors
=
0
;
/* Treat warnings as errors */
...
...
@@ -39,7 +41,7 @@ main(int ac, char **av) {
/*
* Process command-line options.
*/
while
((
ch
=
getopt
(
ac
,
av
,
"EFf:LPRS:W:"
))
!=
-
1
)
while
((
ch
=
getopt
(
ac
,
av
,
"EFf:LPRS:
t:
W:"
))
!=
-
1
)
switch
(
ch
)
{
case
'E'
:
print_arg__print_out
=
1
;
...
...
@@ -62,13 +64,16 @@ main(int ac, char **av) {
char
*
known_type
=
optarg
+
18
;
ret
=
asn1f_make_known_external_type
(
known_type
);
assert
(
ret
==
0
||
errno
==
EEXIST
);
}
else
if
(
strcmp
(
optarg
,
"undoc"
)
==
0
)
{
/* Enable undocumented operation */
asn1_print_flags
|=
APF_FULL_CONSTRAINTS
;
}
else
{
fprintf
(
stderr
,
"-f%s: Invalid argument
\n
"
,
optarg
);
exit
(
EX_USAGE
);
}
break
;
case
'L'
:
print_arg_
_flags
|=
APF_LINE_COMMENTS
;
asn1_print
_flags
|=
APF_LINE_COMMENTS
;
break
;
case
'P'
:
asn1_compiler_flags
|=
A1C_PRINT_COMPILED
;
...
...
@@ -79,6 +84,10 @@ main(int ac, char **av) {
case
'S'
:
skeletons_dir
=
optarg
;
break
;
case
't'
:
if
(
decode_tlv_from_string
(
optarg
))
exit
(
EX_DATAERR
);
exit
(
0
);
case
'W'
:
if
(
strcmp
(
optarg
,
"error"
)
==
0
)
{
warnings_as_errors
=
1
;
...
...
@@ -151,10 +160,10 @@ main(int ac, char **av) {
}
/*
* Dump the parsed ASN.1 tree if -E specified and -F is
not
given.
* Dump the parsed ASN.1 tree if -E specified and -F is
NOT
given.
*/
if
(
print_arg__print_out
&&
!
print_arg__fix_n_print
)
{
if
(
asn1print
(
asn
,
print_arg_
_flags
))
if
(
asn1print
(
asn
,
asn1_print
_flags
))
exit
(
EX_SOFTWARE
);
return
0
;
}
...
...
@@ -181,7 +190,7 @@ main(int ac, char **av) {
* Dump the parsed ASN.1 tree if -E specified and -F is given.
*/
if
(
print_arg__print_out
&&
print_arg__fix_n_print
)
{
if
(
asn1print
(
asn
,
print_arg_
_flags
))
if
(
asn1print
(
asn
,
asn1_print
_flags
))
exit
(
EX_SOFTWARE
);
return
0
;
}
...
...
@@ -248,6 +257,8 @@ usage(char *av0) {
"
\t
\t
(Default is
\"
%s
\"
)
\n
"
"
\t
-R
\t
Restrict output (tables only, no support code)
\n
"
"
\n
"
"
\t
-t <data>
\t
Decode the given tag[/length] sequence
\n
"
"
\n
"
"
\t
-ftypes88
\t
Use only ASN.1:1988 embedded types
\n
"
/*
"\t-fconstr90\tUse only ASN.1:1990 constructs (not available)\n"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment