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
c0d0491e
Commit
c0d0491e
authored
Feb 25, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commonizing
parent
74ee31fa
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
54 deletions
+82
-54
asn1c/Makefile.am
asn1c/Makefile.am
+2
-0
asn1c/Makefile.in
asn1c/Makefile.in
+6
-3
asn1c/asn1c.c
asn1c/asn1c.c
+7
-15
asn1c/enber.c
asn1c/enber.c
+6
-18
asn1c/sys-common.h
asn1c/sys-common.h
+55
-0
asn1c/unber.c
asn1c/unber.c
+6
-18
No files found.
asn1c/Makefile.am
View file @
c0d0491e
...
...
@@ -18,6 +18,8 @@ asn1c_LDADD = \
bin_PROGRAMS
=
asn1c unber enber
noinst_HEADERS
=
sys-common.h
dist_man1_MANS
=
asn1c.1 unber.1 enber.1
check_SCRIPTS
=
check-parsing.sh
...
...
asn1c/Makefile.in
View file @
c0d0491e
...
...
@@ -14,6 +14,7 @@
@SET_MAKE@
SOURCES
=
asn1c.c enber.c unber.c
srcdir
=
@srcdir@
...
...
@@ -39,8 +40,8 @@ POST_UNINSTALL = :
host_triplet
=
@host@
bin_PROGRAMS
=
asn1c
$(EXEEXT)
unber
$(EXEEXT)
enber
$(EXEEXT)
subdir
=
asn1c
DIST_COMMON
=
README
$(dist_man1_MANS)
$(
srcdir)
/Makefile.am
\
$(srcdir)
/Makefile.in
DIST_COMMON
=
README
$(dist_man1_MANS)
$(
noinst_HEADERS)
\
$(srcdir)
/Makefile.
am
$(srcdir)
/Makefile.
in
ACLOCAL_M4
=
$(top_srcdir)
/aclocal.m4
am__aclocal_m4_deps
=
$(top_srcdir)
/configure.in
am__configure_deps
=
$(am__aclocal_m4_deps)
$(CONFIGURE_DEPENDENCIES)
\
...
...
@@ -87,6 +88,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
man1dir
=
$(mandir)
/man1
NROFF
=
nroff
MANS
=
$(dist_man1_MANS)
HEADERS
=
$(noinst_HEADERS)
ETAGS
=
etags
CTAGS
=
ctags
DIST_SUBDIRS
=
$(SUBDIRS)
...
...
@@ -216,6 +218,7 @@ asn1c_LDADD = \
$(top_builddir)
/libasn1fix/libasn1fix.la
\
$(top_builddir)
/libasn1compiler/libasn1compiler.la
noinst_HEADERS
=
sys-common.h
dist_man1_MANS
=
asn1c.1 unber.1 enber.1
check_SCRIPTS
=
check-parsing.sh
TESTS
=
check-parsing.sh
...
...
@@ -618,7 +621,7 @@ check-am: all-am
$(MAKE)
$(AM_MAKEFLAGS)
$(check_SCRIPTS)
$(MAKE)
$(AM_MAKEFLAGS)
check-TESTS
check
:
check-recursive
all-am
:
Makefile $(PROGRAMS) $(MANS)
all-am
:
Makefile $(PROGRAMS) $(MANS)
$(HEADERS)
installdirs
:
installdirs-recursive
installdirs-am
:
for
dir
in
"
$(DESTDIR)$(bindir)
"
"
$(DESTDIR)$(man1dir)
"
;
do
\
...
...
asn1c/asn1c.c
View file @
c0d0491e
/*-
* Copyright (c) 2003, 2004
Lev Walkin <vlm@lionet.info>
* All rights reserved.
* Copyright (c) 2003, 2004
, 2005
*
Lev Walkin <vlm@lionet.info>.
All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -29,15 +29,7 @@
* This is the program that connects the libasn1* libraries together.
* It uses them in turn to parse, fix and then compile or print the ASN.1 tree.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
/* for stat(2) */
#include <unistd.h>
#include <sysexits.h>
/* for EX_USAGE */
#include <assert.h>
#include <errno.h>
#include "sys-common.h"
#include <asn1parser.h>
/* Parse the ASN.1 file and build a tree */
#include <asn1fix.h>
/* Fix the ASN.1 tree */
...
...
@@ -46,11 +38,11 @@
#include <asn1c_compat.h>
/* Portable basename(3) and dirname(3) */
static
void
usage
(
const
char
*
av0
);
/* Print the Usage screen and exit */
#undef COPYRIGHT
#define COPYRIGHT \
"Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>\n"
#undef COPYRIGHT
#define COPYRIGHT \
"Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>\n"
static
void
usage
(
const
char
*
av0
);
/* Print the Usage screen and exit */
int
main
(
int
ac
,
char
**
av
)
{
...
...
asn1c/enber.c
View file @
c0d0491e
/*-
* Copyright (c) 2004 Lev Walkin <vlm@lionet.info>
* All rights reserved.
* Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -25,18 +24,7 @@
*
* $Id$
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <sysexits.h>
/* for EX_USAGE */
#include <assert.h>
#include <errno.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "sys-common.h"
#include <asn1parser.h>
/* For static string tables */
...
...
@@ -45,14 +33,14 @@
#include <ber_tlv_tag.c>
#include <ber_tlv_length.c>
#undef COPYRIGHT
#define COPYRIGHT \
"Copyright (c) 2004 Lev Walkin <vlm@lionet.info>\n"
static
void
usage
(
const
char
*
av0
,
int
);
/* Print the Usage screen and exit */
static
int
process
(
const
char
*
fname
);
/* Perform the BER decoding */
static
int
process_line
(
const
char
*
fname
,
char
*
line
,
int
lineno
);
#undef COPYRIGHT
#define COPYRIGHT \
"Copyright (c) 2004 Lev Walkin <vlm@lionet.info>\n"
static
int
no_validation
;
/* -n */
int
...
...
asn1c/sys-common.h
0 → 100644
View file @
c0d0491e
/*-
* Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
/* for stat(2) */
#include <unistd.h>
#include <assert.h>
#include <errno.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef WIN32
#include <sysexits.h>
/* for EX_USAGE & others */
#else
/* WIN32 */
#ifndef EX_USAGE
#define EX_USAGE 64
#endif
#ifndef EX_DATAERR
#define EX_DATAERR 65
#endif
#ifndef EX_SOFTWARE
#define EX_SOFTWARE 70
#endif
#define alloca _alloca
#define snprintf _snprintf
#endif
/* WIN32 */
asn1c/unber.c
View file @
c0d0491e
/*-
* Copyright (c) 2004 Lev Walkin <vlm@lionet.info>
* All rights reserved.
* Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -25,18 +24,7 @@
*
* $Id$
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <sysexits.h>
/* for EX_USAGE */
#include <assert.h>
#include <errno.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "sys-common.h"
#include <asn1parser.h>
/* For static string tables */
...
...
@@ -48,14 +36,14 @@
#include <RELATIVE-OID.c>
#include <asn_codecs_prim.c>
#undef COPYRIGHT
#define COPYRIGHT \
"Copyright (c) 2004 Lev Walkin <vlm@lionet.info>\n"
static
void
usage
(
const
char
*
av0
);
/* Print the Usage screen and exit */
static
int
process
(
const
char
*
fname
);
/* Perform the BER decoding */
static
int
decode_tlv_from_string
(
const
char
*
datastring
);
#undef COPYRIGHT
#define COPYRIGHT \
"Copyright (c) 2004 Lev Walkin <vlm@lionet.info>\n"
static
int
single_type_decoding
=
0
;
/* -1 enables that */
static
int
pretty_printing
=
1
;
/* -p disables that */
static
char
*
indent_buffer
=
" "
;
/* -i controls that */
...
...
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