Author: yamakenz
Date: Mon Aug 13 08:59:34 2007
New Revision: 4846

Modified:
   trunk/uim/mana.c

Log:
* uim/mana.c
  - (mana_ipc_send_command, mana_eval): Add exception-based error handling


Modified: trunk/uim/mana.c
==============================================================================
--- trunk/uim/mana.c    (original)
+++ trunk/uim/mana.c    Mon Aug 13 08:59:34 2007
@@ -72,7 +72,7 @@
                      FILE **read_fp, FILE **write_fp,
                      const char *str)
 {
-  char *tmp = strdup("");
+  char *tmp = uim_strdup("");
   char buf[8192];
 
   struct sigaction act, oact;
@@ -133,7 +133,7 @@
 
   while (fgets (buf, sizeof(buf), *read_fp) != NULL) {
 
-    tmp = realloc(tmp, strlen(tmp) + strlen(buf) + 1);
+    tmp = uim_realloc(tmp, strlen(tmp) + strlen(buf) + 1);
     strcat(tmp, buf);
 
     if (strchr( buf, '\n' )) {
@@ -207,7 +207,7 @@
 #endif
 
   len = strlen("'") + strlen(ret_buf) + 1;
-  eval_buf = malloc(len);
+  eval_buf = uim_malloc(len);
   snprintf(eval_buf, len, "'%s", ret_buf);
   ret = uim_scm_eval_c_string(eval_buf);
   free(ret_buf);

Reply via email to