[uim-commit] r2571 - trunk/uim
ekato at freedesktop.org
ekato at freedesktop.org
Wed Dec 14 05:34:47 PST 2005
Author: ekato
Date: 2005-12-14 05:34:41 -0800 (Wed, 14 Dec 2005)
New Revision: 2571
Modified:
trunk/uim/skk.c
Log:
* uim/skk.c (look_popen) : Suppress error message.
(look_get_top_word) : Don't read to the end.
Modified: trunk/uim/skk.c
===================================================================
--- trunk/uim/skk.c 2005-12-14 10:34:49 UTC (rev 2570)
+++ trunk/uim/skk.c 2005-12-14 13:34:41 UTC (rev 2571)
@@ -3345,12 +3345,12 @@
FILE *fp;
int len;
- len = strlen(LOOK_COMMAND) + strlen(str) + 1;
+ len = strlen(LOOK_COMMAND) + strlen(str) + strlen(" 2>/dev/null") + 1;
command = malloc(len + 1);
if (!command)
return NULL;
- snprintf(command, len + 1, "%s %s", LOOK_COMMAND, str);
+ snprintf(command, len + 1, "%s %s%s", LOOK_COMMAND, str, " 2>/dev/null");
fp = popen(command, "r");
free(command);
@@ -3383,7 +3383,7 @@
}
}
/* read to the end */
- while (fgets(buf, 512, fp) != NULL) ;
+ /* while (fgets(buf, 512, fp) != NULL) ; */
pclose(fp);
return ret_;
More information about the uim-commit
mailing list