/[svn]/liblscp/trunk/src/client.c
ViewVC logotype

Diff of /liblscp/trunk/src/client.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3665 by schoenebeck, Sun Dec 22 13:01:23 2019 UTC revision 3666 by schoenebeck, Sun Dec 22 13:10:04 2019 UTC
# Line 54  static lscp_status_t _lscp_client_evt_re Line 54  static lscp_status_t _lscp_client_evt_re
54  // General helper functions.  // General helper functions.
55    
56  struct _locale_t {  struct _locale_t {
57          char numeric[32];          char numeric[32+1];
58          char ctype[32];          char ctype[32+1];
59  };  };
60    
61  // we need to ensure a constant locale setting e.g. for parsing  // we need to ensure a constant locale setting e.g. for parsing
# Line 63  struct _locale_t { Line 63  struct _locale_t {
63  // character varies by the invidual locale settings  // character varies by the invidual locale settings
64  static void _save_and_set_c_locale(struct _locale_t* locale)  static void _save_and_set_c_locale(struct _locale_t* locale)
65  {  {
66            locale->numeric[32] = locale->ctype[32] = 0;
67          strncpy(locale->numeric, setlocale(LC_NUMERIC, NULL), 32);          strncpy(locale->numeric, setlocale(LC_NUMERIC, NULL), 32);
68          strncpy(locale->ctype, setlocale(LC_CTYPE, NULL), 32);          strncpy(locale->ctype, setlocale(LC_CTYPE, NULL), 32);
69          setlocale(LC_NUMERIC, "C");          setlocale(LC_NUMERIC, "C");

Legend:
Removed from v.3665  
changed lines
  Added in v.3666

  ViewVC Help
Powered by ViewVC