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
34944f2a
Commit
34944f2a
authored
Oct 07, 2010
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added -fincludes-quoted to generate #includes in double instead of <angle> quotes.
parent
83f2a1cd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
5 deletions
+29
-5
ChangeLog
ChangeLog
+3
-1
asn1c/asn1c.c
asn1c/asn1c.c
+3
-0
libasn1compiler/asn1c_fdeps.c
libasn1compiler/asn1c_fdeps.c
+3
-0
libasn1compiler/asn1c_out.h
libasn1compiler/asn1c_out.h
+6
-1
libasn1compiler/asn1c_save.c
libasn1compiler/asn1c_save.c
+8
-2
libasn1compiler/asn1compiler.h
libasn1compiler/asn1compiler.h
+6
-1
No files found.
ChangeLog
View file @
34944f2a
0.9.23: 2010-
Mar-10
0.9.23: 2010-
Oct-07
* GeneralizedTime fix for working with time offsets which are not
representable in whole hours. (Severity: low; Security impact: low)
Thanks to IP Fabrics, Inc.
* Added -fincludes-quoted to asn1c to generate #includes in "double"
instead of <angle> quotes.
0.9.22: 2008-Nov-19
...
...
asn1c/asn1c.c
View file @
34944f2a
...
...
@@ -97,6 +97,8 @@ main(int ac, char **av) {
asn1_compiler_flags
|=
A1C_NO_CONSTRAINTS
;
}
else
if
(
strcmp
(
optarg
,
"no-include-deps"
)
==
0
)
{
asn1_compiler_flags
|=
A1C_NO_INCLUDE_DEPS
;
}
else
if
(
strcmp
(
optarg
,
"includes-quoted"
)
==
0
)
{
asn1_compiler_flags
|=
A1C_INCLUDES_QUOTED
;
}
else
if
(
strcmp
(
optarg
,
"unnamed-unions"
)
==
0
)
{
asn1_compiler_flags
|=
A1C_UNNAMED_UNIONS
;
}
else
if
(
strcmp
(
optarg
,
"skeletons-copy"
)
==
0
)
{
...
...
@@ -454,6 +456,7 @@ usage(const char *av0) {
" -fbless-SIZE Allow SIZE() constraint for INTEGER etc (non-std.)
\n
"
" -fcompound-names Disambiguate C's struct NAME's inside top-level types
\n
"
" -findirect-choice Compile members of CHOICE as indirect pointers
\n
"
" -fincludes-quoted Generate #includes in
\"
double
\"
instead of <angle> quotes
\n
"
" -fknown-extern-type=<name> Pretend the specified type is known
\n
"
" -fnative-types Use
\"
long
\"
instead of INTEGER_t whenever possible, etc.
\n
"
" -fno-constraints Do not generate constraint checking code
\n
"
...
...
libasn1compiler/asn1c_fdeps.c
View file @
34944f2a
...
...
@@ -25,6 +25,9 @@ asn1c_activate_dependency(asn1c_fdeps_t *deps, asn1c_fdeps_t *cur, const char *d
if
(
start
)
{
start
++
;
end
=
strchr
(
start
,
'>'
);
}
else
if
((
start
=
strchr
(
data
,
'\"'
)))
{
start
++
;
end
=
strchr
(
start
,
'\"'
);
}
if
(
end
)
{
char
*
p
=
alloca
((
end
-
start
)
+
1
);
...
...
libasn1compiler/asn1c_out.h
View file @
34944f2a
...
...
@@ -83,7 +83,12 @@ int asn1c_compiled_output(arg_t *arg, const char *fmt, ...);
} while(0)
/* Generate #include line */
#define GEN_INCLUDE_STD(typename) GEN_INCLUDE("<" typename ".h>")
#define GEN_INCLUDE_STD(typename) do { \
if((arg->flags & A1C_INCLUDES_QUOTED)) { \
GEN_INCLUDE("\"" typename ".h\""); \
} else { \
GEN_INCLUDE("<" typename ".h>"); \
} } while(0)
#define GEN_INCLUDE(filename) do { \
int saved_target = arg->target->target; \
if(!filename) break; \
...
...
libasn1compiler/asn1c_save.c
View file @
34944f2a
...
...
@@ -6,6 +6,11 @@
#include "asn1c_save.h"
#include "asn1c_out.h"
#define HINCLUDE(s) \
((arg->flags & A1C_INCLUDES_QUOTED) \
? fprintf(fp_h, "#include \"%s\"\n", s) \
: fprintf(fp_h, "#include <%s>\n", s)) \
static
int
asn1c_dump_streams
(
arg_t
*
arg
,
asn1c_fdeps_t
*
,
int
,
char
**
);
static
int
asn1c_print_streams
(
arg_t
*
arg
);
static
int
asn1c_save_streams
(
arg_t
*
arg
,
asn1c_fdeps_t
*
,
int
,
char
**
);
...
...
@@ -240,7 +245,8 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps, int optc, char **argv) {
"#define
\t
_%s_H_
\n
"
"
\n
"
,
header_id
,
header_id
);
fprintf
(
fp_h
,
"
\n
#include <asn_application.h>
\n
"
);
fprintf
(
fp_h
,
"
\n
"
);
HINCLUDE
(
"asn_application.h"
);
#define SAVE_STREAM(fp, idx, msg, actdep) do { \
if(TQ_FIRST(&(cs->destination[idx].chunks)) && *msg) \
...
...
@@ -265,7 +271,7 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps, int optc, char **argv) {
fprintf
(
fp_h
,
"
\n
#endif
\t
/* _%s_H_ */
\n
"
,
header_id
);
fprintf
(
fp_c
,
"#include <asn_internal.h>
\n\n
"
);
HINCLUDE
(
"asn_internal.h
"
);
fprintf
(
fp_c
,
"#include
\"
%s.h
\"\n\n
"
,
expr
->
Identifier
);
if
(
arg
->
flags
&
A1C_NO_INCLUDE_DEPS
)
SAVE_STREAM
(
fp_c
,
OT_POST_INCLUDE
,
""
,
1
);
...
...
libasn1compiler/asn1compiler.h
View file @
34944f2a
...
...
@@ -67,7 +67,12 @@ enum asn1c_flags {
*/
A1C_PDU_ALL
=
0x2000
,
A1C_PDU_AUTO
=
0x4000
,
A1C_PDU_TYPE
=
0x8000
A1C_PDU_TYPE
=
0x8000
,
/*
* -fincludes-quoted
* Avoid generating #include <foo>, generate "foo" instead.
*/
A1C_INCLUDES_QUOTED
=
0x10000
};
/*
...
...
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