[uim-commit] r638 - trunk/xim
ekato at freedesktop.org
ekato at freedesktop.org
Sun Feb 13 07:57:09 PST 2005
Author: ekato
Date: 2005-02-13 07:57:06 -0800 (Sun, 13 Feb 2005)
New Revision: 638
Modified:
trunk/xim/helper.cpp
trunk/xim/locale.cpp
trunk/xim/main.cpp
trunk/xim/util.cpp
trunk/xim/ximserver.cpp
Log:
* xim/locale.cpp : Define _GNU_SOURCE to use asprintf and include
<stdio.h>. Remove sanity check added in r636.
* xim/util.cpp (vasprintf) : Use length 1 for check len. Thanks
to Konosuke Watanabe.
* xim/helper.cpp : Define _GNU_SOURCE to use asprintf.
* xim/ximserver.cpp : Ditto.
* xim/main.cpp : Ditto.
Modified: trunk/xim/helper.cpp
===================================================================
--- trunk/xim/helper.cpp 2005-02-13 05:57:54 UTC (rev 637)
+++ trunk/xim/helper.cpp 2005-02-13 15:57:06 UTC (rev 638)
@@ -36,6 +36,7 @@
# include "config.h"
#endif
+#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Modified: trunk/xim/locale.cpp
===================================================================
--- trunk/xim/locale.cpp 2005-02-13 05:57:54 UTC (rev 637)
+++ trunk/xim/locale.cpp 2005-02-13 15:57:06 UTC (rev 638)
@@ -36,6 +36,8 @@
# include "config.h"
#endif
+#define _GNU_SOURCE
+#include <stdio.h>
#include <locale.h>
#include <iconv.h>
#include <errno.h>
@@ -287,9 +289,6 @@
char *tmp, *tmpp;
int len = 0;
- if (locales == NULL)
- return NULL;
-
tmp = tmpp = strdup(locales);
char *orig_locale = strdup(setlocale(LC_CTYPE, NULL));
Modified: trunk/xim/main.cpp
===================================================================
--- trunk/xim/main.cpp 2005-02-13 05:57:54 UTC (rev 637)
+++ trunk/xim/main.cpp 2005-02-13 15:57:06 UTC (rev 638)
@@ -37,6 +37,7 @@
# include "config.h"
#endif
+#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <locale.h>
Modified: trunk/xim/util.cpp
===================================================================
--- trunk/xim/util.cpp 2005-02-13 05:57:54 UTC (rev 637)
+++ trunk/xim/util.cpp 2005-02-13 15:57:06 UTC (rev 638)
@@ -87,7 +87,7 @@
int len;
char c;
- len = vsnprintf(&c, 0, fmt, ap);
+ len = vsnprintf(&c, 1, fmt, ap);
if (len < 0)
return len;
Modified: trunk/xim/ximserver.cpp
===================================================================
--- trunk/xim/ximserver.cpp 2005-02-13 05:57:54 UTC (rev 637)
+++ trunk/xim/ximserver.cpp 2005-02-13 15:57:06 UTC (rev 638)
@@ -34,6 +34,7 @@
# include "config.h"
#endif
+#define _GNU_SOURCE
#include <stdio.h>
#include <ctype.h>
#include <locale.h>
More information about the Uim-commit
mailing list