1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
Description: Port to GNOME 2.
Author: Sam Hocevar (Debian packages) <sam+deb@zoy.org>
Forwarded: no
Last-Update: 2003-05-30
---
--- gniall.orig/Makefile.am
+++ gniall/Makefile.am
@@ -1,7 +1,7 @@
bin_PROGRAMS = gniall
INCLUDES = \
- $(GNOME_INCLUDEDIR)
+ $(GNOME2_CFLAGS)
gniall_SOURCES = \
gnome.c \
@@ -9,8 +9,7 @@
niall.h
gniall_LDADD = \
- $(GNOME_LIBDIR) \
- $(GNOMEUI_LIBS)
+ $(GNOME2_LIBS)
$(bin_PROGRAMS): gnome.o niall.o
gnome.o: niall.h
--- gniall.orig/configure.in
+++ gniall/configure.in
@@ -3,10 +3,10 @@
dnl Initialise automake.
AM_INIT_AUTOMAKE(gNiall,0.7.1)
-AM_ACLOCAL_INCLUDE(macros)
+#AM_ACLOCAL_INCLUDE(macros)
dnl Checks for gnome libraries.
-GNOME_INIT
+#GNOME_INIT
dnl Checks for programs.
AC_PROG_CC
@@ -21,8 +21,11 @@
AC_FUNC_VPRINTF
dnl Compilation checks.
-GNOME_COMPILE_WARNINGS
-GNOME_X_CHECKS
+#GNOME_COMPILE_WARNINGS
+#GNOME2_X_CHECKS
+PKG_CHECK_MODULES(GNOME2, ["libgnomeui-2.0"])
+AC_SUBST(GNOME2_CFLAGS)
+AC_SUBST(GNOME2_LIBS)
dnl Output a Makefile.
AC_OUTPUT(Makefile)
--- gniall.orig/gnome.c
+++ gniall/gnome.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
+#define GTK_ENABLE_BROKEN
#include <gtk/gtk.h>
#include <gnome.h>
@@ -346,10 +347,13 @@
windowAbout = gnome_about_new (PACKAGE, VERSION,
_("(C) 1999 Gary Benson/Dirty Rat Software"),
- authors,
_("gNiall (`genial') attempts to learn a language from sentences that you type in. " \
"Occasionally it will say something profound..."),
- _("http://rat.spunge.org"));
+ authors,
+ NULL,
+ "",
+ //_("http://rat.spunge.org"),
+ NULL);
gtk_widget_show(windowAbout);
}
--- gniall.orig/niall.c
+++ gniall/niall.c
@@ -301,17 +301,21 @@
{
int i;
+ fprintf(stderr, " %s and %s \n", Buffer, Word);
if((strlen(Buffer)+strlen(Word)+1)>BufSize)
{
+ fprintf(stderr, "FUCK ! overflow\n");
Niall_Warning("Buffer overflow - %d bytes exceeded.",BufSize);
- for(i=strlen(Buffer);i<BufSize;i++) Buffer[i]='<';
+ for(i=strlen(Buffer);i<BufSize;i++) { fprintf(stderr, "blork\n"); Buffer[i]='<'; }
Buffer[BufSize-1]=0;
}
else
{
+ fprintf(stderr, "OK - strcat\n");
strcat(Buffer,Word);
}
+ fprintf(stderr, "blorked\n");
}
/* Add the next word on to the end of the buffer
@@ -384,7 +388,9 @@
*/
StringWord(Buffer,BufSize,WordList);
Buffer[0]=toupper(Buffer[0]);
+ fprintf(stderr, "speaking 1\n");
safeStrcat(Buffer,BufSize,".");
+ fprintf(stderr, "speaking 2\n");
}
|