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
b36317c2
Commit
b36317c2
authored
Aug 12, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restructured member variable names
parent
2c14a696
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1032 additions
and
1008 deletions
+1032
-1008
libasn1compiler/asn1c_save.c
libasn1compiler/asn1c_save.c
+2
-2
libasn1fix/asn1fix.c
libasn1fix/asn1fix.c
+10
-10
libasn1fix/asn1fix_constr.c
libasn1fix/asn1fix_constr.c
+1
-1
libasn1fix/asn1fix_retrieve.c
libasn1fix/asn1fix_retrieve.c
+12
-12
libasn1parser/asn1p_module.c
libasn1parser/asn1p_module.c
+2
-2
libasn1parser/asn1p_module.h
libasn1parser/asn1p_module.h
+2
-2
libasn1parser/asn1p_xports.c
libasn1parser/asn1p_xports.c
+4
-4
libasn1parser/asn1p_xports.h
libasn1parser/asn1p_xports.h
+5
-2
libasn1parser/asn1p_y.c
libasn1parser/asn1p_y.c
+991
-971
libasn1parser/asn1p_y.h
libasn1parser/asn1p_y.h
+1
-0
libasn1print/asn1print.c
libasn1print/asn1print.c
+2
-2
No files found.
libasn1compiler/asn1c_save.c
View file @
b36317c2
...
...
@@ -208,7 +208,7 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps) {
" * From ASN.1 module
\"
%s
\"\n
"
" *
\t
found in
\"
%s
\"\n
"
" */
\n\n
"
,
arg
->
mod
->
Identifier
,
arg
->
mod
->
ModuleName
,
arg
->
mod
->
source_file_name
);
fprintf
(
fp_h
,
...
...
@@ -217,7 +217,7 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps) {
" * From ASN.1 module
\"
%s
\"\n
"
" *
\t
found in
\"
%s
\"\n
"
" */
\n\n
"
,
arg
->
mod
->
Identifier
,
arg
->
mod
->
ModuleName
,
arg
->
mod
->
source_file_name
);
...
...
libasn1fix/asn1fix.c
View file @
b36317c2
...
...
@@ -118,7 +118,7 @@ asn1f_fix_module__phase_1(arg_t *arg) {
TQ_FOR
(
omod
,
&
arg
->
asn
->
modules
,
mod_next
)
{
int
sameNames
;
if
(
omod
==
arg
->
mod
)
break
;
sameNames
=
strcmp
(
omod
->
Identifier
,
arg
->
mod
->
Identifier
)
?
0
:
1
;
sameNames
=
strcmp
(
omod
->
ModuleName
,
arg
->
mod
->
ModuleName
)
?
0
:
1
;
if
(
omod
->
module_oid
&&
arg
->
mod
->
module_oid
)
{
/* Compare only the OID. */
if
(
asn1p_oid_compare
(
omod
->
module_oid
,
...
...
@@ -126,18 +126,18 @@ asn1f_fix_module__phase_1(arg_t *arg) {
FATAL
(
"ASN.1 module %s in %s "
"has the same OBJECT IDENTIFIER"
" as module %s"
,
omod
->
Identifier
,
omod
->
ModuleName
,
omod
->
source_file_name
,
arg
->
mod
->
Identifier
arg
->
mod
->
ModuleName
);
RET2RVAL
(
-
1
,
rvalue
);
}
else
if
(
sameNames
)
{
WARNING
(
"ASN.1 module %s is defined more than once, with different OIDs"
,
omod
->
Identifier
);
WARNING
(
"ASN.1 module %s is defined more than once, with different OIDs"
,
omod
->
ModuleName
);
RET2RVAL
(
1
,
rvalue
);
}
}
else
if
(
sameNames
)
{
FATAL
(
"ASN.1 module %s is defined more than once"
,
omod
->
Identifier
);
omod
->
ModuleName
);
RET2RVAL
(
-
1
,
rvalue
);
}
}
...
...
@@ -150,7 +150,7 @@ asn1f_fix_module__phase_1(arg_t *arg) {
break
;
default:
FATAL
(
"Module %s defined with ambiguous global tagging mode"
,
arg
->
mod
->
Identifier
);
arg
->
mod
->
ModuleName
);
RET2RVAL
(
-
1
,
rvalue
);
}
...
...
@@ -162,7 +162,7 @@ asn1f_fix_module__phase_1(arg_t *arg) {
break
;
case
MSF_unk_INSTRUCTIONS
:
WARNING
(
"Module %s defined with unrecognized "
"encoding reference"
,
arg
->
mod
->
Identifier
);
"encoding reference"
,
arg
->
mod
->
ModuleName
);
RET2RVAL
(
1
,
rvalue
);
/* Fall through */
case
MSF_TAG_INSTRUCTIONS
:
...
...
@@ -170,7 +170,7 @@ asn1f_fix_module__phase_1(arg_t *arg) {
break
;
default:
FATAL
(
"Module %s defined with ambiguous encoding reference"
,
arg
->
mod
->
Identifier
);
arg
->
mod
->
ModuleName
);
RET2RVAL
(
-
1
,
rvalue
);
}
...
...
@@ -452,10 +452,10 @@ asn1f_check_duplicate(arg_t *arg) {
"Please rename either instance to resolve the conflict"
,
arg
->
expr
->
Identifier
,
arg
->
expr
->
_lineno
,
arg
->
mod
->
Identifier
,
arg
->
mod
->
ModuleName
,
tmparg
.
expr
->
Identifier
,
tmparg
.
expr
->
_lineno
,
tmparg
.
mod
->
Identifier
,
tmparg
.
mod
->
ModuleName
,
diff_files
?
" ("
:
""
,
diff_files
?
tmparg
.
mod
->
source_file_name
:
""
,
diff_files
?
")"
:
""
...
...
libasn1fix/asn1fix_constr.c
View file @
b36317c2
...
...
@@ -446,7 +446,7 @@ _asn1f_compare_tags(arg_t *arg, asn1p_expr_t *a, asn1p_expr_t *b) {
"improper use of "
"EXTENSIBILITY IMPLIED flag "
"of module %s"
,
arg
->
mod
->
Identifier
);
arg
->
mod
->
ModuleName
);
}
return
-
1
;
}
else
{
...
...
libasn1fix/asn1fix_retrieve.c
View file @
b36317c2
...
...
@@ -51,7 +51,7 @@ asn1f_lookup_in_imports(arg_t *arg, asn1p_module_t *mod, const char *name) {
* Okay, right now we have a module name and, hopefully, an OID.
* Search the arg->asn for the specified module.
*/
mod
=
asn1f_lookup_module
(
arg
,
xp
->
from
,
xp
->
from_
oid
);
mod
=
asn1f_lookup_module
(
arg
,
xp
->
from
ModuleName
,
xp
->
identifier
.
oid
);
if
(
mod
==
NULL
)
{
/* Conditional debug */
if
(
!
(
arg
->
expr
->
_mark
&
TM_BROKEN
))
{
...
...
@@ -59,7 +59,7 @@ asn1f_lookup_in_imports(arg_t *arg, asn1p_module_t *mod, const char *name) {
FATAL
(
"Cannot find external module
\"
%s
\"
"
"mentioned for "
"
\"
%s
\"
at line %d"
,
xp
->
from
,
name
,
arg
->
expr
->
_lineno
);
xp
->
from
ModuleName
,
name
,
arg
->
expr
->
_lineno
);
}
/* ENOENT/ETOOMANYREFS */
return
NULL
;
...
...
@@ -97,7 +97,7 @@ asn1f_lookup_module(arg_t *arg, const char *module_name, asn1p_oid_t *oid) {
* somewhere in the IMPORTS section AND OID is given.
*/
TQ_FOR
(
xp
,
&
(
arg
->
mod
->
imports
),
xp_next
)
{
if
(
strcmp
(
module_name
,
xp
->
from
))
if
(
strcmp
(
module_name
,
xp
->
from
ModuleName
))
continue
;
if
(
oid
)
{
FATAL
(
"Ambiguous reference: "
...
...
@@ -111,7 +111,7 @@ asn1f_lookup_module(arg_t *arg, const char *module_name, asn1p_oid_t *oid) {
* Yes, there is a renaming.
* Make lookup use OID instead.
*/
oid
=
xp
->
from_
oid
;
oid
=
xp
->
identifier
.
oid
;
}
}
...
...
@@ -134,7 +134,7 @@ asn1f_lookup_module(arg_t *arg, const char *module_name, asn1p_oid_t *oid) {
}
}
if
(
strcmp
(
module_name
,
mod
->
Identifier
)
==
0
)
if
(
strcmp
(
module_name
,
mod
->
ModuleName
)
==
0
)
return
mod
;
}
...
...
@@ -167,7 +167,7 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
DEBUG
(
"(%s) in %s for line %d"
,
asn1f_printable_reference
(
ref
),
mod
->
Identifier
,
mod
->
ModuleName
,
ref
->
_lineno
);
if
(
ref
->
comp_count
==
1
)
{
...
...
@@ -251,16 +251,16 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
if
(
modulename
)
{
FATAL
(
"Module %s referred by %s in module %s "
"does not contain the requested symbol"
,
imports_from
->
Identifier
,
imports_from
->
ModuleName
,
asn1f_printable_reference
(
ref
),
mod
->
Identifier
);
mod
->
ModuleName
);
}
else
{
FATAL
(
"Module %s referred in IMPORTS section "
"for %s of module %s does not contain "
"the requested symbol"
,
imports_from
->
Identifier
,
imports_from
->
ModuleName
,
asn1f_printable_reference
(
ref
),
mod
->
Identifier
);
mod
->
ModuleName
);
}
}
return
expr
;
...
...
@@ -277,7 +277,7 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
if
(
ref_tc
==
NULL
)
{
DEBUG
(
"Module
\"
%s
\"
does not contain
\"
%s
\"
"
"mentioned at line %d: %s"
,
mod
->
Identifier
,
mod
->
ModuleName
,
identifier
,
ref
->
_lineno
,
strerror
(
errno
)
...
...
@@ -406,7 +406,7 @@ asn1f_compatible_with_exports(arg_t *arg, asn1p_module_t *mod, const char *name)
arg
->
expr
->
_mark
|=
TM_BROKEN
;
FATAL
(
"EXPORTS section of module %s in %s "
"does not mention %s at line %d"
,
mod
->
Identifier
,
mod
->
source_file_name
,
name
,
mod
->
ModuleName
,
mod
->
source_file_name
,
name
,
arg
->
expr
->
_lineno
);
}
...
...
libasn1parser/asn1p_module.c
View file @
b36317c2
...
...
@@ -27,8 +27,8 @@ asn1p_module_free(asn1p_module_t *mod) {
if
(
mod
)
{
asn1p_expr_t
*
expr
;
if
(
mod
->
Identifier
)
free
(
mod
->
Identifier
);
if
(
mod
->
ModuleName
)
free
(
mod
->
ModuleName
);
if
(
mod
->
module_oid
)
asn1p_oid_free
(
mod
->
module_oid
);
...
...
libasn1parser/asn1p_module.h
View file @
b36317c2
...
...
@@ -36,9 +36,9 @@ typedef struct asn1p_module_s {
char
*
source_file_name
;
/*
* Human-readable module
identifier
.
* Human-readable module
reference
.
*/
char
*
Identifier
;
/* Module name */
char
*
ModuleName
;
/*
* Unique module identifier, OID.
...
...
libasn1parser/asn1p_xports.c
View file @
b36317c2
...
...
@@ -25,10 +25,10 @@ asn1p_xports_new() {
void
asn1p_xports_free
(
asn1p_xports_t
*
xp
)
{
if
(
xp
)
{
if
(
xp
->
from
)
free
(
xp
->
from
);
if
(
xp
->
from_
oid
)
asn1p_oid_free
(
xp
->
from_
oid
);
if
(
xp
->
from
ModuleName
)
free
(
xp
->
from
ModuleName
);
if
(
xp
->
identifier
.
oid
)
asn1p_oid_free
(
xp
->
identifier
.
oid
);
free
(
xp
);
}
}
libasn1parser/asn1p_xports.h
View file @
b36317c2
...
...
@@ -17,8 +17,11 @@ typedef struct asn1p_xports_s {
/*
* Module name and optional OID, occur after FROM.
*/
char
*
from
;
/* Name of the module */
asn1p_oid_t
*
from_oid
;
/* Optional OID of the module */
char
*
fromModuleName
;
/* Name of the module */
struct
AssignedIdentifier
{
asn1p_oid_t
*
oid
;
/* Optional OID of the module */
asn1p_value_t
*
value
;
/* DefinedValue */
}
identifier
;
/*
* Number of entities to import.
...
...
libasn1parser/asn1p_y.c
View file @
b36317c2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
libasn1parser/asn1p_y.h
View file @
b36317c2
...
...
@@ -7,6 +7,7 @@ typedef union {
asn1p_constraint_t
*
a_constr
;
/* Constraint */
enum
asn1p_constraint_type_e
a_ctype
;
/* Constraint type */
asn1p_xports_t
*
a_xports
;
/* IMports/EXports */
struct
AssignedIdentifier
a_aid
;
/* Assigned Identifier */
asn1p_oid_t
*
a_oid
;
/* Object Identifier */
asn1p_oid_arc_t
a_oid_arc
;
/* Single OID's arc */
struct
asn1p_type_tag_s
a_tag
;
/* A tag */
...
...
libasn1print/asn1print.c
View file @
b36317c2
...
...
@@ -65,9 +65,9 @@ asn1print_module(asn1p_t *asn, asn1p_module_t *mod, enum asn1print_flags flags)
if
(
flags
&
APF_PRINT_XML_DTD
)
printf
(
"<!-- ASN.1 module
\n
"
);
printf
(
"%s "
,
mod
->
Identifier
);
printf
(
"%s "
,
mod
->
ModuleName
);
if
(
mod
->
module_oid
)
{
asn1print_oid
(
strlen
(
mod
->
Identifier
),
mod
->
module_oid
,
flags
);
asn1print_oid
(
strlen
(
mod
->
ModuleName
),
mod
->
module_oid
,
flags
);
printf
(
"
\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