comparison simtool/pbupdate.c @ 12:8a34f5b7c812

gsm7_encode_table[] factored out into libcommon
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 12 Feb 2021 01:15:22 +0000
parents 62cdfed70de7
children
comparison
equal deleted inserted replaced
11:62cdfed70de7 12:8a34f5b7c812
8 #include <strings.h> 8 #include <strings.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #include "curfile.h" 11 #include "curfile.h"
12 12
13 static u_char gsm7_encode_table[256] = { 13 extern u_char gsm7_encode_table[256];
14 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0x00 */
15 0xFF, 0xFF, '\n', 0xFF, 0xFF, '\r', 0xFF, 0xFF,
16 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0x10 */
17 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
18 ' ', '!', '"', '#', 0x02, '%', '&', 0x27, /* 0x20 */
19 '(', ')', '*', '+', ',', '-', '.', '/',
20 '0', '1', '2', '3', '4', '5', '6', '7', /* 0x30 */
21 '8', '9', ':', ';', '<', '=', '>', '?',
22 0x00, 'A', 'B', 'C', 'D', 'E', 'F', 'G', /* 0x40 */
23 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
24 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', /* 0x50 */
25 'X', 'Y', 'Z', 0xBC, 0xAF, 0xBE, 0x94, 0x11,
26 0xFF, 'a', 'b', 'c', 'd', 'e', 'f', 'g', /* 0x60 */
27 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
28 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', /* 0x70 */
29 'x', 'y', 'z', 0xA8, 0xC0, 0xA9, 0xBD, 0xFF,
30 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0x80 */
31 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
32 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0x90 */
33 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
34 0xFF, 0x40, 0xFF, 0x01, 0x24, 0x03, 0xFF, 0x5F, /* 0xA0 */
35 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
36 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 0xB0 */
37 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x60,
38 0xFF, 0xFF, 0xFF, 0xFF, 0x5B, 0x0E, 0x1C, 0x09, /* 0xC0 */
39 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
40 0xFF, 0x5D, 0xFF, 0xFF, 0xFF, 0xFF, 0x5C, 0xFF, /* 0xD0 */
41 0x0B, 0xFF, 0xFF, 0xFF, 0x5E, 0xFF, 0xFF, 0x1E,
42 0x7F, 0xFF, 0xFF, 0xFF, 0x7B, 0x0F, 0x1D, 0xFF, /* 0xE0 */
43 0x04, 0x05, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF,
44 0xFF, 0x7D, 0x08, 0xFF, 0xFF, 0xFF, 0x7C, 0xFF, /* 0xF0 */
45 0x0C, 0x06, 0xFF, 0xFF, 0x7E, 0xFF, 0xFF, 0xFF
46 };
47 14
48 static char * 15 static char *
49 decode_qstring_alpha(cp, record, maxlen, filename_for_errs, lineno_for_errs) 16 decode_qstring_alpha(cp, record, maxlen, filename_for_errs, lineno_for_errs)
50 char *cp, *filename_for_errs; 17 char *cp, *filename_for_errs;
51 u_char *record; 18 u_char *record;