comparison libcommon/number_decode.c @ 38:f5a26c1d0b93

fc-simtool smsp-dump implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 12 Feb 2021 20:39:15 +0000
parents 4a9bf783491d
children
comparison
equal deleted inserted replaced
37:acf343dace04 38:f5a26c1d0b93
33 dp++; 33 dp++;
34 } 34 }
35 *out = '\0'; 35 *out = '\0';
36 return(0); 36 return(0);
37 } 37 }
38
39 decode_address_digits(inbuf, outbuf, ndigits)
40 u_char *inbuf;
41 char *outbuf;
42 unsigned ndigits;
43 {
44 u_char *inp = inbuf;
45 char *outp = outbuf;
46 unsigned n = 0, b;
47
48 while (n < ndigits) {
49 b = *inp++;
50 *outp++ = gsm_address_digits[b & 0xF];
51 n++;
52 if (n >= ndigits)
53 break;
54 *outp++ = gsm_address_digits[b >> 4];
55 n++;
56 }
57 *outp = '\0';
58 }