summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-11-18 15:32:59 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-11-18 15:32:59 +0000
commite3084d3ffae3e57ddf89507e69f61b83c5ceaf90 (patch)
tree3869ee504a86dab03e941f482744b0bf18ed6f3c /src/fe-common
parent14e5dc8b8e477baa000ba4b5073027eb629b416d (diff)
downloadirssi-e3084d3ffae3e57ddf89507e69f61b83c5ceaf90.zip
Win32 fixes - Irssi now compiles with MSVC++ :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@851 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/fe-core-commands.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c
index b3c607ed..c942c3dd 100644
--- a/src/fe-common/core/fe-core-commands.c
+++ b/src/fe-common/core/fe-core-commands.c
@@ -185,7 +185,8 @@ static void show_help(const char *data)
if (last != NULL && g_strcasecmp(rec->cmd, last->cmd) == 0)
continue; /* don't display same command twice */
- if (strlen(rec->cmd) >= findlen && g_strncasecmp(rec->cmd, data, findlen) == 0)
+ if ((int)strlen(rec->cmd) >= findlen &&
+ g_strncasecmp(rec->cmd, data, findlen) == 0)
{
if (rec->cmd[findlen] == '\0')
{
@@ -306,8 +307,8 @@ static void cmd_cat(const char *data)
/* SYNTAX: EXEC <cmd line> */
static void cmd_exec(const char *cmdline)
{
- int buflen = 512;
- char tmpbuf[buflen];
+#ifndef WIN32
+ char tmpbuf[512];
char *foo;
FILE *stream;
@@ -320,7 +321,7 @@ static void cmd_exec(const char *cmdline)
return;
}
- while (fgets(tmpbuf, buflen, stream)) {
+ while (fgets(tmpbuf, sizeof(tmpbuf), stream)) {
/* strip \n characters appended from fgets
This is safer than using gets, though it is more work tbd
*/
@@ -337,9 +338,9 @@ static void cmd_exec(const char *cmdline)
}
pclose(stream);
+#endif
}
-
/* SYNTAX: BEEP */
static void cmd_beep(void)
{