FreeCalypso > hg > freecalypso-tools
view uptools/libcoding/ucs2_bigend.c @ 1012:11391cb6bdc0
patch from fixeria: doc change from SE K2x0 to K2xx
Since their discovery in late 2022, Sony Ericsson K200 and K220 phones
were collectively referred to as SE K2x0 in FreeCalypso documentation.
However, now that SE K205 has been discovered as yet another member
of the same family (same PCBA in different case), it makes more sense
to refer to the whole family as SE K2xx.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 23 Sep 2024 12:23:20 +0000 |
parents | f7228c18463a |
children |
line wrap: on
line source
/* * This library module implements the function for converting a UCS-2 * string from native 16-bit words into a byte buffer for SMS. */ #include <sys/types.h> ucs2_out_bigend(inbuf, outbuf, nuni) u_short *inbuf; u_char *outbuf; unsigned nuni; { u_short *ip = inbuf; u_char *op = outbuf; unsigned n, uni; for (n = 0; n < nuni; n++) { uni = *ip++; *op++ = uni >> 8; *op++ = uni; } }