mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-22 09:12:22 -05:00
xchat-text compiles but won't run
This commit is contained in:
parent
4328d4ffc1
commit
e0b7f0008b
14
src/fe-text/makefile.mak
Normal file
14
src/fe-text/makefile.mak
Normal file
@ -0,0 +1,14 @@
|
||||
include "..\makeinc.mak"
|
||||
|
||||
COMLIB = ..\common\xchatcommon.lib
|
||||
PROG = xchat-text.exe
|
||||
|
||||
all: fe-text.obj
|
||||
link /out:$(PROG) /entry:mainCRTStartup $(LDFLAGS) $(LIBS) $(COMLIB) fe-text.obj
|
||||
|
||||
fe-text.obj: fe-text.c makefile.mak
|
||||
cl $(CFLAGS) $(GLIB) fe-text.c
|
||||
|
||||
clean:
|
||||
del *.obj
|
||||
del $(PROG)
|
@ -3,6 +3,8 @@ all:
|
||||
@-$(MAKE) /nologo /s /f makefile.mak $@
|
||||
@cd ..\fe-gtk
|
||||
@-$(MAKE) /nologo /s /f makefile.mak $@
|
||||
# @cd ..\fe-text
|
||||
# @-$(MAKE) /nologo /s /f makefile.mak $@
|
||||
|
||||
clean:
|
||||
@del common\*.obj
|
||||
|
@ -1078,3 +1078,81 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/xtext.c xchat-wdk/src/fe
|
||||
#include <gtk/gtkmain.h>
|
||||
#include <gtk/gtksignal.h>
|
||||
#include <gtk/gtkselection.h>
|
||||
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-text/fe-text.c xchat-wdk/src/fe-text/fe-text.c
|
||||
--- xchat-wdk.orig/src/fe-text/fe-text.c 2008-08-29 13:24:17 +0200
|
||||
+++ xchat-wdk/src/fe-text/fe-text.c 2010-08-25 04:16:04 +0200
|
||||
@@ -22,9 +22,13 @@
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
+#ifdef WIN32
|
||||
+#define STDIN_FILENO 0
|
||||
+#define STDOUT_FILENO 1
|
||||
+#else
|
||||
#include <sys/time.h>
|
||||
+#endif
|
||||
#include <sys/types.h>
|
||||
-#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
#include "../common/xchat.h"
|
||||
#include "../common/xchatc.h"
|
||||
@@ -339,7 +343,11 @@
|
||||
te->callback = callback;
|
||||
te->userdata = userdata;
|
||||
|
||||
- gettimeofday (&now, NULL);
|
||||
+#ifdef WIN32
|
||||
+ g_get_current_time (&now);
|
||||
+#else
|
||||
+ gettimeofday (&now, NULL);
|
||||
+#endif
|
||||
te->next_call = now.tv_sec * 1000 + (now.tv_usec / 1000) + te->interval;
|
||||
|
||||
tmr_list = g_slist_prepend (tmr_list, te);
|
||||
@@ -417,7 +425,12 @@
|
||||
void
|
||||
fe_main (void)
|
||||
{
|
||||
- struct timeval timeout, now;
|
||||
+ struct timeval timeout;
|
||||
+#ifdef WIN32
|
||||
+ GTimeVal now;
|
||||
+#else
|
||||
+ struct timeval now;
|
||||
+#endif
|
||||
socketevent *se;
|
||||
timerevent *te;
|
||||
fd_set rd, wd, ex;
|
||||
@@ -428,7 +441,7 @@
|
||||
new_ircwindow (NULL, NULL, SESS_SERVER, 0);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
- bindtextdomain (GETTEXT_PACKAGE, PREFIX"/share/locale");
|
||||
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
@@ -464,7 +477,11 @@
|
||||
shortest = te->next_call;
|
||||
list = list->next;
|
||||
}
|
||||
+#ifdef WIN32
|
||||
+ g_get_current_time (&now);
|
||||
+#else
|
||||
gettimeofday (&now, NULL);
|
||||
+#endif
|
||||
delay = shortest - ((now.tv_sec * 1000) + (now.tv_usec / 1000));
|
||||
timeout.tv_sec = delay / 1000;
|
||||
timeout.tv_usec = (delay % 1000) * 1000;
|
||||
@@ -514,7 +531,11 @@
|
||||
}
|
||||
|
||||
/* now check our list of timeout events, some might need to be called! */
|
||||
+#ifdef WIN32
|
||||
+ g_get_current_time (&now);
|
||||
+#else
|
||||
gettimeofday (&now, NULL);
|
||||
+#endif
|
||||
list = tmr_list;
|
||||
while (list)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user