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
093ba2e5
Commit
093ba2e5
authored
Apr 04, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
highlight optionality
parent
87b14d32
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
skeletons/OBJECT_IDENTIFIER.c
skeletons/OBJECT_IDENTIFIER.c
+3
-3
skeletons/OBJECT_IDENTIFIER.h
skeletons/OBJECT_IDENTIFIER.h
+3
-3
No files found.
skeletons/OBJECT_IDENTIFIER.c
View file @
093ba2e5
...
@@ -652,7 +652,7 @@ OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *oid, void *arcs, unsigned int ar
...
@@ -652,7 +652,7 @@ OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *oid, void *arcs, unsigned int ar
int
int
OBJECT_IDENTIFIER_parse_arcs
(
const
char
*
oid_text
,
ssize_t
oid_txt_length
,
OBJECT_IDENTIFIER_parse_arcs
(
const
char
*
oid_text
,
ssize_t
oid_txt_length
,
long
*
arcs
,
unsigned
int
arcs_slots
,
const
char
**
oid_text_end
)
{
long
*
arcs
,
unsigned
int
arcs_slots
,
const
char
**
o
pt_o
id_text_end
)
{
unsigned
int
arcs_count
=
0
;
unsigned
int
arcs_count
=
0
;
const
char
*
oid_end
;
const
char
*
oid_end
;
long
value
=
0
;
long
value
=
0
;
...
@@ -663,7 +663,7 @@ OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length,
...
@@ -663,7 +663,7 @@ OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length,
}
state
=
ST_SKIPSPACE
;
}
state
=
ST_SKIPSPACE
;
if
(
!
oid_text
||
oid_txt_length
<
-
1
||
(
arcs_slots
&&
!
arcs
))
{
if
(
!
oid_text
||
oid_txt_length
<
-
1
||
(
arcs_slots
&&
!
arcs
))
{
if
(
o
id_text_end
)
*
oid_text_end
=
oid_text
;
if
(
o
pt_oid_text_end
)
*
opt_
oid_text_end
=
oid_text
;
errno
=
EINVAL
;
errno
=
EINVAL
;
return
-
1
;
return
-
1
;
}
}
...
@@ -715,7 +715,7 @@ OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length,
...
@@ -715,7 +715,7 @@ OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length,
}
/* for() */
}
/* for() */
if
(
o
id_text_end
)
*
oid_text_end
=
oid_text
;
if
(
o
pt_oid_text_end
)
*
opt_
oid_text_end
=
oid_text
;
/* Finalize last arc */
/* Finalize last arc */
switch
(
state
)
{
switch
(
state
)
{
...
...
skeletons/OBJECT_IDENTIFIER.h
View file @
093ba2e5
...
@@ -105,8 +105,8 @@ ssize_t OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add,
...
@@ -105,8 +105,8 @@ ssize_t OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add,
* If (oid_txt_length == -1), the strlen() will be invoked to determine the
* If (oid_txt_length == -1), the strlen() will be invoked to determine the
* size of the (oid_text) string.
* size of the (oid_text) string.
*
*
* After return, the optional (oid_text_end) is set to the character after
* After return, the optional (o
pt_o
id_text_end) is set to the character after
* the last parsed one. (oid_text_end) is never less than (oid_text).
* the last parsed one. (o
pt_o
id_text_end) is never less than (oid_text).
*
*
* RETURN VALUES:
* RETURN VALUES:
* -1: Parse error.
* -1: Parse error.
...
@@ -117,7 +117,7 @@ ssize_t OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add,
...
@@ -117,7 +117,7 @@ ssize_t OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add,
* This is useful for (_arc_slots) value estimation.
* This is useful for (_arc_slots) value estimation.
*/
*/
int
OBJECT_IDENTIFIER_parse_arcs
(
const
char
*
oid_text
,
ssize_t
oid_txt_length
,
int
OBJECT_IDENTIFIER_parse_arcs
(
const
char
*
oid_text
,
ssize_t
oid_txt_length
,
long
arcs
[],
unsigned
int
arcs_slots
,
const
char
**
oid_text_end
);
long
arcs
[],
unsigned
int
arcs_slots
,
const
char
**
o
pt_o
id_text_end
);
/*
/*
* Internal functions.
* Internal functions.
...
...
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