more debug

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1213 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2006-09-18 20:26:24 +00:00
parent 619448ed1d
commit d4f903d4a9
1 changed files with 9 additions and 6 deletions

View File

@ -264,16 +264,18 @@ main(int ac, char *av[]) {
break; break;
case OUT_XER: /* -oxer */ case OUT_XER: /* -oxer */
if(xer_fprint(stdout, pduType, structure)) { if(xer_fprint(stdout, pduType, structure)) {
fprintf(stderr, "%s: Cannot convert into XML\n", fprintf(stderr,
name); "%s: Cannot convert %s into XML\n",
name, pduType->name);
exit(EX_UNAVAILABLE); exit(EX_UNAVAILABLE);
} }
break; break;
case OUT_DER: case OUT_DER:
erv = der_encode(pduType, structure, write_out, stdout); erv = der_encode(pduType, structure, write_out, stdout);
if(erv.encoded < 0) { if(erv.encoded < 0) {
fprintf(stderr, "%s: Cannot convert into DER\n", fprintf(stderr,
name); "%s: Cannot convert %s into DER\n",
name, pduType->name);
exit(EX_UNAVAILABLE); exit(EX_UNAVAILABLE);
} }
DEBUG("Encoded in %ld bytes of DER", (long)erv.encoded); DEBUG("Encoded in %ld bytes of DER", (long)erv.encoded);
@ -281,8 +283,9 @@ main(int ac, char *av[]) {
case OUT_PER: case OUT_PER:
erv = uper_encode(pduType, structure, write_out, stdout); erv = uper_encode(pduType, structure, write_out, stdout);
if(erv.encoded < 0) { if(erv.encoded < 0) {
fprintf(stderr, "%s: Cannot convert into Unaligned PER\n", fprintf(stderr,
name); "%s: Cannot convert %s into Unaligned PER\n",
name, pduType->name);
exit(EX_UNAVAILABLE); exit(EX_UNAVAILABLE);
} }
DEBUG("Encoded in %ld bits of UPER", (long)erv.encoded); DEBUG("Encoded in %ld bits of UPER", (long)erv.encoded);