Commit 140cdbec authored by Mark's avatar Mark Committed by Mouse

converter-example output JER to console

The list of formats that are text output is a hardcoded list that didn't
include JER
parent 67b7788c
......@@ -2,9 +2,9 @@
* Generic converter template for a selected ASN.1 type.
* Copyright (c) 2005-2017 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
*
*
* To compile with your own ASN.1 type, redefine the PDU as shown:
*
*
* cc -DPDU=MyCustomType -o myDecoder.o -c converter-example.c
*/
#ifdef HAVE_CONFIG_H
......@@ -130,7 +130,7 @@ ats_simple_name(enum asn_transfer_syntax syntax) {
return "PER";
case ATS_ALIGNED_BASIC_PER:
case ATS_ALIGNED_CANONICAL_PER:
return "APER";
return "APER";
default:
return "<?>";
}
......@@ -431,7 +431,8 @@ main(int ac, char *av[]) {
if(isatty(1)) {
const int is_text_output = osyntax == ATS_NONSTANDARD_PLAINTEXT
|| osyntax == ATS_BASIC_XER
|| osyntax == ATS_CANONICAL_XER;
|| osyntax == ATS_CANONICAL_XER
|| osyntax == ATS_BASIC_JER;
if(is_text_output) {
binary_out = stdout;
} else {
......@@ -608,7 +609,7 @@ buffer_shift_left(size_t offset, int bits) {
uint8_t *ptr = DynamicBuffer.data + DynamicBuffer.offset + offset;
uint8_t *end = DynamicBuffer.data + DynamicBuffer.offset
+ DynamicBuffer.length - 1;
if(!bits) return;
DEBUG("Shifting left %d bits off %ld (o=%ld, u=%ld, l=%ld)",
......@@ -782,7 +783,7 @@ data_decode_from_file(enum asn_transfer_syntax isyntax, asn_TYPE_descriptor_t *p
asn_codec_ctx_t *opt_codec_ctx = 0;
void *structure = 0;
asn_dec_rval_t rval;
size_t old_offset;
size_t old_offset;
size_t new_offset;
int tolerate_eof;
size_t rd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment