changeset 804:30fbaa652ea5

pcm-sms-decode & sms-pdu-decode: rm remains of bad chars count
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 25 Mar 2021 03:26:23 +0000
parents 5637794913a8
children a43c5dc251dc
files uptools/libcoding/gsm7_decode.c uptools/libcoding/ucs2_decode.c uptools/sms-pdu-decode/pdu-common.c
diffstat 3 files changed, 7 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }
--- 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 <sys/types.h>
 #include <stdio.h>
 
-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;
 }
--- 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');
 		}
 	}