FreeCalypso > hg > freecalypso-tools
comparison uptools/libcoding/ucs2_decode.c @ 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 | 1c599681fd60 |
| children |
comparison
equal
deleted
inserted
replaced
| 803:5637794913a8 | 804:30fbaa652ea5 |
|---|---|
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 | 10 |
| 11 ucs2_to_ascii_or_ext(inbuf, inlen, outbuf, outlenp, ascii_ext, newline_ok, errp) | 11 ucs2_to_ascii_or_ext(inbuf, inlen, outbuf, outlenp, ascii_ext, newline_ok) |
| 12 u_char *inbuf, *outbuf; | 12 u_char *inbuf, *outbuf; |
| 13 unsigned inlen, *outlenp, *errp; | 13 unsigned inlen, *outlenp; |
| 14 { | 14 { |
| 15 u_char *inp, *endp, *outp; | 15 u_char *inp, *endp, *outp; |
| 16 unsigned uni; | 16 unsigned uni; |
| 17 | 17 |
| 18 inp = inbuf; | 18 inp = inbuf; |
| 57 *outp++ = uni; | 57 *outp++ = uni; |
| 58 } | 58 } |
| 59 *outp = '\0'; | 59 *outp = '\0'; |
| 60 if (outlenp) | 60 if (outlenp) |
| 61 *outlenp = outp - outbuf; | 61 *outlenp = outp - outbuf; |
| 62 if (errp) | |
| 63 *errp = 0; | |
| 64 } | 62 } |
