changeset 8:265b8103530c

sms-encode-text: emit empty messages as ""
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 05 Aug 2023 06:40:50 +0000
parents cd2d82ec5144
children 003660a57f99
files enc-text/gsm7.c enc-text/ucs2.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/enc-text/gsm7.c	Sat Aug 05 06:32:37 2023 +0000
+++ b/enc-text/gsm7.c	Sat Aug 05 06:40:50 2023 +0000
@@ -42,8 +42,10 @@
 		fputs("dcs 0 septet\nmsg ", stdout);
 		if (msgtext_gsmlen)
 			emit_hex_out(msgtext_gsm7, msgtext_gsmlen, stdout);
-		else
-			fputs("empty", stdout);
+		else {
+			putchar('"');
+			putchar('"');
+		}
 		putchar('\n');
 		exit(0);
 	}
--- a/enc-text/ucs2.c	Sat Aug 05 06:32:37 2023 +0000
+++ b/enc-text/ucs2.c	Sat Aug 05 06:40:50 2023 +0000
@@ -37,8 +37,10 @@
 		if (msgtext_unilen) {
 			ucs2_out_bigend(msgtext_uni, ucs2_be, msgtext_unilen);
 			emit_hex_out(ucs2_be, msgtext_unilen * 2, stdout);
-		} else
-			fputs("empty", stdout);
+		} else {
+			putchar('"');
+			putchar('"');
+		}
 		putchar('\n');
 		exit(0);
 	}