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
9175a28a
Commit
9175a28a
authored
7 years ago
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deprecate EMIT_ASN_DEBUG, move under ASN_ namespace
parent
5615304c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
13 deletions
+18
-13
configure.ac
configure.ac
+2
-2
skeletons/asn_internal.h
skeletons/asn_internal.h
+8
-3
tests/tests-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
...ts-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
+2
-2
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
+2
-2
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
+2
-2
tests/tests-c-compiler/check-src/check-70.-fwide-types.c
tests/tests-c-compiler/check-src/check-70.-fwide-types.c
+1
-1
tests/tests-c-compiler/check-src/check-70.c
tests/tests-c-compiler/check-src/check-70.c
+1
-1
No files found.
configure.ac
View file @
9175a28a
...
@@ -40,8 +40,8 @@ AC_ARG_ENABLE([ASN_DEBUG],
...
@@ -40,8 +40,8 @@ AC_ARG_ENABLE([ASN_DEBUG],
[produce debug log during `make check` testing])],
[produce debug log during `make check` testing])],
[enable_asn_debug=$enableval], [enable_asn_debug=no])
[enable_asn_debug=$enableval], [enable_asn_debug=no])
AS_IF([test x$enable_asn_debug != xno], [
AS_IF([test x$enable_asn_debug != xno], [
TESTSUITE_CFLAGS="-D
EMIT_ASN
_DEBUG"
TESTSUITE_CFLAGS="-D
ASN_EMIT
_DEBUG"
SKELETONS_CFLAGS="-D
EMIT_ASN
_DEBUG"
SKELETONS_CFLAGS="-D
ASN_EMIT
_DEBUG"
])
])
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
...
...
This diff is collapsed.
Click to expand it.
skeletons/asn_internal.h
View file @
9175a28a
...
@@ -31,12 +31,17 @@ int get_asn1c_environment_version(void); /* Run-time version */
...
@@ -31,12 +31,17 @@ int get_asn1c_environment_version(void); /* Run-time version */
#define asn_debug_indent 0
#define asn_debug_indent 0
#define ASN_DEBUG_INDENT_ADD(i) do{}while(0)
#define ASN_DEBUG_INDENT_ADD(i) do{}while(0)
#ifdef EMIT_ASN_DEBUG
#warning "Use ASN_EMIT_DEBUG instead of EMIT_ASN_DEBUG"
#define ASN_EMIT_DEBUG EMIT_ASN_DEBUG
#endif
/*
/*
* A macro for debugging the ASN.1 internals.
* A macro for debugging the ASN.1 internals.
* You may enable or override it.
* You may enable or override it.
*/
*/
#ifndef ASN_DEBUG
/* If debugging code is not defined elsewhere... */
#ifndef ASN_DEBUG
/* If debugging code is not defined elsewhere... */
#if
EMIT_ASN
_DEBUG == 1
/* And it was asked to emit this code... */
#if
ASN_EMIT
_DEBUG == 1
/* And it was asked to emit this code... */
#if __STDC_VERSION__ >= 199901L
#if __STDC_VERSION__ >= 199901L
#ifdef ASN_THREAD_SAFE
#ifdef ASN_THREAD_SAFE
/* Thread safety requires sacrifice in output indentation:
/* Thread safety requires sacrifice in output indentation:
...
@@ -58,13 +63,13 @@ int asn_debug_indent;
...
@@ -58,13 +63,13 @@ int asn_debug_indent;
void
CC_PRINTFLIKE
(
1
,
2
)
ASN_DEBUG_f
(
const
char
*
fmt
,
...);
void
CC_PRINTFLIKE
(
1
,
2
)
ASN_DEBUG_f
(
const
char
*
fmt
,
...);
#define ASN_DEBUG ASN_DEBUG_f
#define ASN_DEBUG ASN_DEBUG_f
#endif
/* C99 */
#endif
/* C99 */
#else
/*
EMIT_ASN
_DEBUG != 1 */
#else
/*
ASN_EMIT
_DEBUG != 1 */
#if __STDC_VERSION__ >= 199901L
#if __STDC_VERSION__ >= 199901L
#define ASN_DEBUG(...) do{}while(0)
#define ASN_DEBUG(...) do{}while(0)
#else
/* not C99 */
#else
/* not C99 */
static
void
CC_PRINTFLIKE
(
1
,
2
)
ASN_DEBUG
(
const
char
*
fmt
,
...)
{
(
void
)
fmt
;
}
static
void
CC_PRINTFLIKE
(
1
,
2
)
ASN_DEBUG
(
const
char
*
fmt
,
...)
{
(
void
)
fmt
;
}
#endif
/* C99 or better */
#endif
/* C99 or better */
#endif
/*
EMIT_ASN
_DEBUG */
#endif
/*
ASN_EMIT
_DEBUG */
#endif
/* ASN_DEBUG */
#endif
/* ASN_DEBUG */
/*
/*
...
...
This diff is collapsed.
Click to expand it.
tests/tests-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
View file @
9175a28a
...
@@ -42,7 +42,7 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
...
@@ -42,7 +42,7 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
(
void
)
app_key
;
(
void
)
app_key
;
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
#ifdef
EMIT_ASN
_DEBUG
#ifdef
ASN_EMIT
_DEBUG
unsigned
char
*
b
,
*
bend
;
unsigned
char
*
b
,
*
bend
;
b
=
buf
+
buf_offset
;
b
=
buf
+
buf_offset
;
bend
=
b
+
size
;
bend
=
b
+
size
;
...
@@ -140,7 +140,7 @@ load_object_from(const char *fname, enum expectation expectation, unsigned char
...
@@ -140,7 +140,7 @@ load_object_from(const char *fname, enum expectation expectation, unsigned char
fbuf_chunk
<
fbuf_left
fbuf_chunk
<
fbuf_left
?
fbuf_chunk
:
fbuf_left
,
?
fbuf_chunk
:
fbuf_left
,
fbuf_left
);
fbuf_left
);
#ifdef
EMIT_ASN
_DEBUG
#ifdef
ASN_EMIT
_DEBUG
if
(
st
)
{
if
(
st
)
{
fprintf
(
stderr
,
"=== currently ===
\n
"
);
fprintf
(
stderr
,
"=== currently ===
\n
"
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
...
...
This diff is collapsed.
Click to expand it.
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
View file @
9175a28a
...
@@ -42,7 +42,7 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
...
@@ -42,7 +42,7 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
(
void
)
app_key
;
(
void
)
app_key
;
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
#ifdef
EMIT_ASN
_DEBUG
#ifdef
ASN_EMIT
_DEBUG
unsigned
char
*
b
,
*
bend
;
unsigned
char
*
b
,
*
bend
;
b
=
buf
+
buf_offset
;
b
=
buf
+
buf_offset
;
bend
=
b
+
size
;
bend
=
b
+
size
;
...
@@ -140,7 +140,7 @@ load_object_from(const char *fname, enum expectation expectation, unsigned char
...
@@ -140,7 +140,7 @@ load_object_from(const char *fname, enum expectation expectation, unsigned char
fbuf_chunk
<
fbuf_left
fbuf_chunk
<
fbuf_left
?
fbuf_chunk
:
fbuf_left
,
?
fbuf_chunk
:
fbuf_left
,
fbuf_left
);
fbuf_left
);
#ifdef
EMIT_ASN
_DEBUG
#ifdef
ASN_EMIT
_DEBUG
if
(
st
)
{
if
(
st
)
{
fprintf
(
stderr
,
"=== currently ===
\n
"
);
fprintf
(
stderr
,
"=== currently ===
\n
"
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
...
...
This diff is collapsed.
Click to expand it.
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
View file @
9175a28a
...
@@ -32,7 +32,7 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
...
@@ -32,7 +32,7 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
(
void
)
app_key
;
(
void
)
app_key
;
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
assert
(
buf_offset
+
size
<
sizeof
(
buf
));
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
#ifdef
EMIT_ASN
_DEBUG
#ifdef
ASN_EMIT
_DEBUG
unsigned
char
*
b
,
*
bend
;
unsigned
char
*
b
,
*
bend
;
b
=
buf
+
buf_offset
;
b
=
buf
+
buf_offset
;
bend
=
b
+
size
;
bend
=
b
+
size
;
...
@@ -122,7 +122,7 @@ load_object_from(const char *fname, unsigned char *fbuf, size_t size, enum encty
...
@@ -122,7 +122,7 @@ load_object_from(const char *fname, unsigned char *fbuf, size_t size, enum encty
?
fbuf_chunk
:
fbuf_left
,
?
fbuf_chunk
:
fbuf_left
,
fbuf_left
,
fbuf_left
,
fname
);
fname
);
#ifdef
EMIT_ASN
_DEBUG
#ifdef
ASN_EMIT
_DEBUG
if
(
st
)
{
if
(
st
)
{
fprintf
(
stderr
,
"=== currently ===
\n
"
);
fprintf
(
stderr
,
"=== currently ===
\n
"
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
...
...
This diff is collapsed.
Click to expand it.
tests/tests-c-compiler/check-src/check-70.-fwide-types.c
View file @
9175a28a
...
@@ -118,7 +118,7 @@ load_object_from(enum expectation expectation, unsigned char *fbuf, size_t size,
...
@@ -118,7 +118,7 @@ load_object_from(enum expectation expectation, unsigned char *fbuf, size_t size,
fbuf_chunk
<
fbuf_left
fbuf_chunk
<
fbuf_left
?
fbuf_chunk
:
fbuf_left
,
?
fbuf_chunk
:
fbuf_left
,
fbuf_left
);
fbuf_left
);
#ifdef
EMIT_ASN
_DEBUG
#ifdef
ASN_EMIT
_DEBUG
if
(
st
)
{
if
(
st
)
{
fprintf
(
stderr
,
"=== currently ===
\n
"
);
fprintf
(
stderr
,
"=== currently ===
\n
"
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
...
...
This diff is collapsed.
Click to expand it.
tests/tests-c-compiler/check-src/check-70.c
View file @
9175a28a
...
@@ -112,7 +112,7 @@ load_object_from(enum expectation expectation, unsigned char *fbuf, size_t size,
...
@@ -112,7 +112,7 @@ load_object_from(enum expectation expectation, unsigned char *fbuf, size_t size,
fbuf_chunk
<
fbuf_left
fbuf_chunk
<
fbuf_left
?
fbuf_chunk
:
fbuf_left
,
?
fbuf_chunk
:
fbuf_left
,
fbuf_left
);
fbuf_left
);
#ifdef
EMIT_ASN
_DEBUG
#ifdef
ASN_EMIT
_DEBUG
if
(
st
)
{
if
(
st
)
{
fprintf
(
stderr
,
"=== currently ===
\n
"
);
fprintf
(
stderr
,
"=== currently ===
\n
"
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
...
...
This diff is collapsed.
Click to expand it.
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