Author: yamakenz
Date: Mon Aug 13 00:02:51 2007
New Revision: 4838

Modified:
   trunk/uim/uim-ipc.c

Log:
* uim/uim-ipc.c
  - (uim_ipc_open_command_with_option, uim_ipc_send_command):
    Replace libc memory allocation functions with uim_*()


Modified: trunk/uim/uim-ipc.c
==============================================================================
--- trunk/uim/uim-ipc.c (original)
+++ trunk/uim/uim-ipc.c Mon Aug 13 00:02:51 2007
@@ -184,7 +184,7 @@
       argv[1] = NULL;
     } else {
       argv[0] = (char *)command;
-      str = p = strdup(option);
+      str = p = uim_strdup(option);
       for (ap = &argv[1]; (*ap = strsep(&p, " ")) != NULL;) {
        if (**ap != '\0')
          if (++ap >= &argv[9])
@@ -194,7 +194,7 @@
     }
     if (uim_issetugid()) {
       int cmd_len = strlen(command) + 30;
-      char *fullpath_command = malloc(cmd_len);
+      char *fullpath_command = uim_malloc(cmd_len);
       char *cmd_name = strrchr(command, '/');
 
       if (cmd_name && cmd_name + 1 != '\0')
@@ -242,7 +242,7 @@
                     FILE **read_fp, FILE **write_fp,
                     const char *command, const char *str)
 {
-  char *tmp = strdup("");
+  char *tmp = uim_strdup("");
   char buf[8192];
 
   if (*read_fp == NULL || *write_fp == NULL) {
@@ -279,7 +279,7 @@
       break;
     }
 
-    tmp = realloc(tmp, strlen(tmp) + strlen(buf) + 1);
+    tmp = uim_realloc(tmp, strlen(tmp) + strlen(buf) + 1);
     strcat(tmp, buf);
   }
  

Reply via email to