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
f9492a93
Commit
f9492a93
authored
Sep 13, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
419f6757
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
skeletons/converter-sample.c
skeletons/converter-sample.c
+8
-8
No files found.
skeletons/converter-sample.c
View file @
f9492a93
...
...
@@ -293,7 +293,7 @@ static void add_bytes_to_buffer(const void *data2add, size_t bySize) {
if
(
DynamicBuffer
.
allocated
>=
(
DynamicBuffer
.
offset
+
DynamicBuffer
.
length
+
bySize
))
{
/* No buffer reallocation is necessary */
DEBUG
(
"
\t
No buffer reallocation is necessary"
);
}
else
if
(
bySize
<=
DynamicBuffer
.
offset
)
{
DEBUG
(
"
\t
Contents shifted by %ld"
,
DynamicBuffer
.
offset
);
...
...
@@ -316,7 +316,7 @@ static void add_bytes_to_buffer(const void *data2add, size_t bySize) {
DynamicBuffer
.
offset
=
0
;
DynamicBuffer
.
allocated
=
newsize
;
DynamicBuffer
.
nreallocs
++
;
DEBUG
(
"
\t
Buffer reallocated to %ld
, %d time
"
,
DEBUG
(
"
\t
Buffer reallocated to %ld
(%d time)
"
,
newsize
,
DynamicBuffer
.
nreallocs
);
}
...
...
@@ -385,7 +385,7 @@ static void *data_decode_from_file(asn_TYPE_descriptor_t *pduType, const char *f
/* Append the new data into the intermediate buffer */
add_bytes_to_buffer
(
fbuf
,
rd
);
i_bptr
=
DynamicBuffer
.
data
+
DynamicBuffer
.
offset
;
i_size
=
DynamicBuffer
.
allocated
;
i_size
=
DynamicBuffer
.
length
;
}
else
{
i_bptr
=
fbuf
;
i_size
=
rd
;
...
...
@@ -428,11 +428,6 @@ static void *data_decode_from_file(asn_TYPE_descriptor_t *pduType, const char *f
if
(
fp
!=
stdin
)
fclose
(
fp
);
return
structure
;
case
RC_WMORE
:
DEBUG
(
"RC_WMORE, continuing %ld with %ld..%ld..%ld"
,
(
long
)
rval
.
consumed
,
(
long
)
DynamicBuffer
.
offset
,
(
long
)
DynamicBuffer
.
length
,
(
long
)
DynamicBuffer
.
allocated
);
/*
* Adjust position inside the source buffer.
*/
...
...
@@ -440,6 +435,11 @@ static void *data_decode_from_file(asn_TYPE_descriptor_t *pduType, const char *f
DynamicBuffer
.
offset
+=
rval
.
consumed
;
DynamicBuffer
.
length
-=
rval
.
consumed
;
}
DEBUG
(
"RC_WMORE, continuing %ld with %ld..%ld..%ld"
,
(
long
)
rval
.
consumed
,
(
long
)
DynamicBuffer
.
offset
,
(
long
)
DynamicBuffer
.
length
,
(
long
)
DynamicBuffer
.
allocated
);
rval
.
consumed
=
0
;
continue
;
case
RC_FAIL
:
...
...
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