Commit Graph

50 Commits

Author SHA1 Message Date
Denis Kenzior caeb1650a1 util: Remove last glib uses 2018-12-27 18:18:51 -06:00
Denis Kenzior 9d18385e5f util: Remove encode_hex 2018-12-27 18:18:51 -06:00
Denis Kenzior d793b291b3 util: Remove decode_hex 2018-12-27 18:18:51 -06:00
Denis Kenzior 4059d4226b util: Switch character conversions to ell
Switch various conversions from GSM/UCS2 to UTF8 from glib based
implementation over to ell.

This also converts all related g_free calls to l_free calls (though in
the end they are equivalent calls to free)
2018-12-27 18:18:51 -06:00
Denis Kenzior 9c7a87673a util: Use l_utf8_to_ucs2be instead of g_convert 2018-12-27 18:18:51 -06:00
Denis Kenzior 5229080d92 util: Use ell in convert_utf8_to_gsm 2018-12-27 18:18:51 -06:00
Denis Kenzior c4ed942e40 util: use ell in convert_ucs2_to_gsm_with_lang 2018-12-27 18:18:51 -06:00
Denis Kenzior d5f117be80 util: Convert pack7_bit / unpack_7bit to use l_malloc 2018-12-27 18:18:51 -06:00
Denis Kenzior 70c70a67b0 util: Use bool instead of gboolean 2018-12-27 18:18:51 -06:00
Denis Kenzior 674b28f150 util: Use L_ARRAY_SIZE instead of TABLE_SIZE 2018-12-27 18:18:51 -06:00
Nandini Rebello d984a59f3d util: adding 8 national sms alphabets
Adding national language tables for hindi,kannada,malayalam,
oriya,punjabi,tamil,telugu and urdu.
2018-10-15 14:07:27 -05:00
Nandini Rebello 032aaef87d sms: fix a missing entry in single shift table
Fix a missing char in the nation language set in single shift table
for a special character. Character set again validated.
2018-10-11 10:15:49 -05:00
Nandini Rebello 7e82a2d940 util: add bengali and gujrati sms alphabets 2018-10-01 14:52:03 -05:00
Denis Kenzior 54de04a828 util: Make sure to handle special empty strings
Some SIMs contain an EFspn with the contents all set to 'filler'
characters, e.g. 0xFF.  We mistakenly do not handle these strings
correctly.

Aug  8 11:40:00 mx31tt01 daemon.info ofonod[622]: Aux: >
AT+CRSM=176,28486,0,0,17\r
Aug  8 11:40:00 mx31tt01 daemon.info ofonod[622]: Aux: < \r\n+CRSM:
144,0,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\r\n\r\nOK\r\n
Aug  8 11:40:00 mx31tt01 daemon.debug ofonod[622]:
drivers/atmodem/sim.c:at_crsm_read_cb() crsm_read_cb: 90, 00, 17
Aug  8 11:40:00 mx31tt01 daemon.debug ofonod[622]:
src/simfs.c:sim_fs_op_read_block_cb() bufoff: 0, dataoff: 0, tocopy: 17
Aug  8 11:40:00 mx31tt01 daemon.err ofonod[622]: EFspn read
successfully, but couldn't parse
2012-08-16 00:47:59 -05:00
Denis Kenzior 416c1937c9 util: Style issues 2012-07-16 22:51:43 -05:00
Denis Kenzior bce1879c1b util: update comment from previous commit
Cite the specification verbatim
2012-07-16 22:51:20 -05:00
Guillaume Zajac 1710be9c89 util: Fix GSM to UTF8 conversion mechanism 2012-07-16 22:41:34 -05:00
Marcel Holtmann 7e6afe37bf core: Update copyright information 2011-10-10 13:39:42 -07:00
Denis Kenzior d7d24f55ee util: Fix convert_utf8_to_gsm_best_lang logic 2011-02-03 14:18:16 -06:00
Aki Niemi cfb8b40a04 util: Add best dialect picker API 2011-02-03 14:16:16 -06:00
Denis Kenzior 5f3701cda5 util: Use gboolean for returning success / failure 2011-02-03 13:50:42 -06:00
Aki Niemi a1dbd89052 util: Refactor conversion table handling 2011-02-03 13:44:45 -06:00
Aki Niemi 59b00052d3 util: Fix style issue with long lines 2011-02-02 11:03:21 +02:00
Lucas De Marchi d77999cc59 util: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 13:05:16 -06:00
Jeevaka Badrappan 627ec8b0c3 util: coding style fixes - rule M6 2010-11-22 05:05:07 -06:00
Jeevaka Badrappan dfa7cf7145 util: Remove extra tab 2010-11-17 10:03:26 -06:00
Jeevaka Badrappan 4196182770 Fix multi-line comment style issues 2010-09-21 21:16:01 -05:00
Denis Kenzior ebcfe67d91 util: Clean up some coding style violations 2010-09-14 11:49:25 -05:00
Denis Kenzior 1a340c7cf1 util: Return the number of bytes read, not chars
To be consistent with the documentation header and other functions of
this type
2010-09-14 11:45:11 -05:00
Jeevaka Badrappan 7cf26fef9d util: Add UCS2 to GSM 7bit converion function 2010-09-14 09:58:49 -05:00
Lucas De Marchi 3783026372 Fix common misspelling in source files
Fix common misspellings by using the list available at
http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

From the list cited above, the substitution script found the following
misspelling:

reponsible->responsible
2010-09-14 16:01:47 +09:00
Aki Niemi ff093fb6d3 Fix wrong code point in Portuguese table 2010-09-09 16:30:21 +03:00
Andrzej Zaborowski 9f925b3620 util: Add a "sim string" encoding utility. 2010-06-09 12:43:27 -05:00
Denis Kenzior 213e1ed65a Fix: Use g_try_malloc instead of g_malloc in util
In these cases we were checking for NULL return, but the function used
should have been g_try_malloc instead.
2010-03-16 17:21:06 -05:00
Denis Kenzior 9bed04ca2f Style: Trailing whitespace & extra lines 2010-01-12 17:54:37 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Marcel Holtmann 0b359e89db Use error label instead of err or err_out 2009-12-24 07:09:09 -08:00
Denis Kenzior 955e6a61ee Style: Fix a few more occurences of if/else
See Linux coding style document for details
2009-12-17 21:45:39 -06:00
Denis Kenzior b1932334da Refactor SMS language dialect encoding / decoding
- Introduce new enum gsm_dialect instead of unsigned char arguments
- Use ISO639 3 letter codes for conversion tables
- Use a single lookup table instead of 4 different ones
2009-09-08 12:44:51 -05:00
Denis Kenzior bfbe142774 Fix style issues 2009-09-08 09:42:29 -05:00
Aki Niemi 462b0b8249 Add support for national language variants
Add API for supporting character conversion using national language
variants. Also, add conversion tables for Turkish, Spanish and
Portuguese, and fix the default table. The lookup algorithms were
tweaked to support multiple tables.
2009-09-08 14:16:23 +03:00
Denis Kenzior d4ccad4b72 Fix trailing whitespace 2009-08-06 17:29:11 -05:00
Denis Kenzior 04aae280a0 Fix signedness warning 2009-07-13 22:33:48 -05:00
Denis Kenzior 8d88ff2e11 Don't process surrogate pair chars
These are not valid UCS2 chars
2009-07-07 14:33:59 -05:00
Denis Kenzior 5f04cb1c3e Fix length check for valid UCS2 starting with 0xff 2009-07-07 14:33:59 -05:00
Denis Kenzior 467db7dd7f Add utility to convert SIM FS strings to UTF8 2009-07-06 19:33:24 -05:00
Denis Kenzior ee38e24040 GSM to UTF8 should accept empty strings 2009-07-06 19:32:23 -05:00
Denis Kenzior 5068e895cb Don't fail in own_buf if items_written is NULL 2009-06-19 21:12:16 -05:00
Denis Kenzior 219a94a502 Only USSD needs the special <cr> handling
Apparently all Cell Broadcasts are always 88 bytes long, with a
6 byte header and 82 byte payload.  <cr> character is used as a
terminator and padding for the unused payload
2009-06-05 19:58:27 -05:00
Denis Kenzior a78b36290b Add implementation of telephony daemon 2009-05-05 21:14:19 -07:00