comparison enc-text/gsm7.c @ 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 a16b1b9728f6
children e56bb9f09ff1
comparison
equal deleted inserted replaced
7:cd2d82ec5144 8:265b8103530c
40 } 40 }
41 if (msgtext_gsmlen <= 160) { 41 if (msgtext_gsmlen <= 160) {
42 fputs("dcs 0 septet\nmsg ", stdout); 42 fputs("dcs 0 septet\nmsg ", stdout);
43 if (msgtext_gsmlen) 43 if (msgtext_gsmlen)
44 emit_hex_out(msgtext_gsm7, msgtext_gsmlen, stdout); 44 emit_hex_out(msgtext_gsm7, msgtext_gsmlen, stdout);
45 else 45 else {
46 fputs("empty", stdout); 46 putchar('"');
47 putchar('"');
48 }
47 putchar('\n'); 49 putchar('\n');
48 exit(0); 50 exit(0);
49 } 51 }
50 if (!concat_enable) { 52 if (!concat_enable) {
51 fprintf(stderr, "error: message exceeds 160 chars\n"); 53 fprintf(stderr, "error: message exceeds 160 chars\n");