# HG changeset patch # User Mychaela Falconia # Date 1616642783 0 # Node ID 30fbaa652ea572baa298912c61ea40cd4fb6f653 # Parent 5637794913a8b250c7d154c1442e94b5ecd4ee20 pcm-sms-decode & sms-pdu-decode: rm remains of bad chars count diff -r 5637794913a8 -r 30fbaa652ea5 uptools/libcoding/gsm7_decode.c --- a/uptools/libcoding/gsm7_decode.c Thu Mar 25 03:06:53 2021 +0000 +++ b/uptools/libcoding/gsm7_decode.c Thu Mar 25 03:26:23 2021 +0000 @@ -9,9 +9,9 @@ extern u_short gsm7_decode_table[128]; extern u_short gsm7ext_decode_table[128]; -gsm7_to_ascii_or_ext(inbuf, inlen, outbuf, outlenp, ascii_ext, newline_ok, errp) +gsm7_to_ascii_or_ext(inbuf, inlen, outbuf, outlenp, ascii_ext, newline_ok) u_char *inbuf, *outbuf; - unsigned inlen, *outlenp, *errp; + unsigned inlen, *outlenp; { u_char *inp, *endp, *outp; unsigned gsm, uni; @@ -74,6 +74,4 @@ *outp = '\0'; if (outlenp) *outlenp = outp - outbuf; - if (errp) - *errp = 0; } diff -r 5637794913a8 -r 30fbaa652ea5 uptools/libcoding/ucs2_decode.c --- a/uptools/libcoding/ucs2_decode.c Thu Mar 25 03:06:53 2021 +0000 +++ b/uptools/libcoding/ucs2_decode.c Thu Mar 25 03:26:23 2021 +0000 @@ -8,9 +8,9 @@ #include #include -ucs2_to_ascii_or_ext(inbuf, inlen, outbuf, outlenp, ascii_ext, newline_ok, errp) +ucs2_to_ascii_or_ext(inbuf, inlen, outbuf, outlenp, ascii_ext, newline_ok) u_char *inbuf, *outbuf; - unsigned inlen, *outlenp, *errp; + unsigned inlen, *outlenp; { u_char *inp, *endp, *outp; unsigned uni; @@ -59,6 +59,4 @@ *outp = '\0'; if (outlenp) *outlenp = outp - outbuf; - if (errp) - *errp = 0; } diff -r 5637794913a8 -r 30fbaa652ea5 uptools/sms-pdu-decode/pdu-common.c --- a/uptools/sms-pdu-decode/pdu-common.c Thu Mar 25 03:06:53 2021 +0000 +++ b/uptools/sms-pdu-decode/pdu-common.c Thu Mar 25 03:26:23 2021 +0000 @@ -252,7 +252,7 @@ unsigned udhl, udh_octets, udh_chars, ud_chars; u_char ud7[160], decode_buf[481]; int do_hexdump; - unsigned decoded_len, badchars; + unsigned decoded_len; if (handle_sca() < 0) return(-1); @@ -354,23 +354,18 @@ case 7: gsm7_to_ascii_or_ext(ud7 + udh_chars, ud_chars, decode_buf, &decoded_len, - ascii_ext_mode, 1, - &badchars); + ascii_ext_mode, 1); break; case 16: ucs2_to_ascii_or_ext(pdu + pdu_ptr + udh_chars, ud_chars, decode_buf, &decoded_len, - ascii_ext_mode, 1, - &badchars); + ascii_ext_mode, 1); break; } printf("Length: %u", ud_chars); if (decoded_len != ud_chars) printf("->%u", decoded_len); - if (badchars) - printf(" (%u bad char%s)", badchars, - badchars != 1 ? "s" : ""); putchar('\n'); } }