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
|
Description: This patch applies changes to the source which are necessary
to compile the Tgif Debian package. The contents of this patch has been
extracted from the Tgif Debian package version 4.1.45-2 before the transition
to source format 3.0 (quilt).
Author: Carlo Segre <segre@debian.org>
Last-Update: 2010-09-01
--- a/convxim.c
+++ b/convxim.c
@@ -42,10 +42,10 @@
#ifndef _NO_XIMP
#define DEFAULT_MODIFIERS ""
-#define DEFAULT_LANG "ja_JP.EUC"
+#define DEFAULT_LANG "ja_JP.eucJP"
#else /* _NO_XIMP */
#define DEFAULT_MODIFIERS "@im=_XWNMO"
-#define DEFAULT_LANG "ja_JP.ujis"
+#define DEFAULT_LANG "ja_JP.eucJP"
#endif /* ~_NO_XIMP */
typedef struct tagXICInfo {
--- a/setup.c
+++ b/setup.c
@@ -1178,6 +1178,18 @@
return TRUE;
}
+void InitTgifDir() {
+ char *c_ptr=NULL;
+ if ((c_ptr=getenv("HOME")) == NULL) {
+ strcpy(homeDir, DIR_SEP_STR);
+ } else if (strlen(c_ptr) >= MAXPATHLENGTH-1) {
+ strcpy(homeDir, DIR_SEP_STR);
+ } else {
+ strcpy(homeDir, c_ptr);
+ }
+ sprintf(tgifDir, "%s%c.%s", homeDir, DIR_SEP, TOOL_NAME);
+}
+
void Setup()
{
int bitmask=0, x_neg_in_def=FALSE, y_neg_in_def=FALSE;
--- a/tgif.c
+++ b/tgif.c
@@ -345,6 +345,7 @@
argc--; argv++;
}
InitPaperSize();
+ InitTgifDir();
InitTmpDir();
InitPatFill();
if (PRTGIF && !cmdLineOpenDisplay) {
--- a/Tgif.tmpl
+++ b/Tgif.tmpl
@@ -52,7 +52,10 @@
-D_DONT_REENCODE=\"FFDingbests:ZapfDingbats\" \@@\
-DDEFATTRGROUP=\"TANGRAM-II:Declaration:Events:Messages:Rewards:Initialization:Watches\" \@@\
-D_NO_NKF -D_NO_CHINPUT -D_NO_XCIN \@@\
- -DUSE_XT_INITIALIZE -DPTHREAD
+ -DUSE_XT_INITIALIZE -DPRINT_CMD=\"lpr\" \@@\
+ -D_TMP_DIR_IN_HOME_DIR -DPTHREAD
+XCOMM -DUSE_XAPPLRESDIR \@@\
+XCOMM -DXAPPLOADDIR_DEF=\"/usr/X11R6/lib/X11/app-defaults\" \@@\
MOREDEFINES =
XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|