head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.54 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.52 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.50 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.48 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.46 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.44 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.42 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.40 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.38 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.36 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.34 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.32 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.30 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.28 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.26 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.24 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.22 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.20 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.4.0.18 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.16 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.14 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.12 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.10 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.8 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.6 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.4 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.2 pkgsrc-2003Q4-base:1.4 buildlink2-base:1.4 netbsd-1-3-PATCH003:1.1; locks; strict; comment @# @; 1.4 date 2001.10.17.12.47.20; author dmcmahill; state dead; branches; next 1.3; 1.3 date 2001.07.18.20.28.35; author dmcmahill; state Exp; branches; next 1.2; 1.2 date 99.01.24.11.47.33; author frueauf; state dead; branches; next 1.1; 1.1 date 98.08.26.21.18.58; author frueauf; state Exp; branches; next ; desc @@ 1.4 log @update to tgif-4.1.41. Partial list of changes are: -fixes the bugs addressed by the patches in tgif-4.1.40nb3 -several other bug fixes. -Fix a bug with "on_resize=" attribute -Fix a bug with Tgif.DeleteCmdAsCut -Remove a redundant "a4" string in the generates PS file if A4 paper is requested -Add horizontal scroll for mouse wheel -Add a compiler option -D_DONT_REENCODE -Add ConvertToBezier in the Poly/Polygon submenu of the Edit Menu -Add a bunch of commands for adding tick marks to a poly/polygon/spline object. -New Tgif.tmpl-darwin file for Darwin/Mac OS X (with XFree86) -Update tgwb (the tgif-based whiteboard application) to use a new Reliable IP-multicast Library -Add a new X default, Tgif.UseXPmVersion1ForXPmDeck -Add new X defaults, Tgif.SlideShowWindowOffsets -Add the following new internal commands: edit_attr_in_text_mode() for a more detailed list refer to the HISTORY file included with tgif. @ text @$NetBSD: patch-ab,v 1.3 2001/07/18 20:28:35 dmcmahill Exp $ Fixes a bug in exporting postscript from the command line where the temporary directory name is not initialized properly. Patch is from the tgif author and it will be in the next release. *** tgif.c.orig Wed Jul 18 10:33:11 2001 --- tgif.c Wed Jul 18 10:33:25 2001 *************** *** 336,339 **** --- 336,340 ---- } InitPaperSize(); + InitTmpDir(); if (PRTGIF && !cmdLineOpenDisplay) InitDontReencode(NULL); if (argc <= 0) { *** setup.e.orig Wed Jul 18 10:33:08 2001 --- setup.e Wed Jul 18 10:33:32 2001 *************** *** 183,186 **** --- 183,187 ---- extern void InitPaperSize ARGS_DECL((void)); extern void CleanUpPaperSize ARGS_DECL((void)); + extern void InitTmpDir ARGS_DECL((void)); extern void Setup ARGS_DECL((void)); extern void CleanUpResiduals ARGS_DECL((void)); *** setup.c.orig Wed Jul 18 10:33:05 2001 --- setup.c Wed Jul 18 10:36:36 2001 *************** *** 843,846 **** --- 843,895 ---- } + void InitTmpDir() + { + int tmp_dir_in_x_def=FALSE; + char *c_ptr=NULL; + + if (!PRTGIF || cmdLineOpenDisplay) { + /* do not translate -- program constants */ + if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "TmpDir")) != NULL) { + UtilTrimBlanks(c_ptr); + if (*c_ptr == '\0') { + fprintf(stderr, TgLoadString(STID_INVALID_DIR_IN_X_DEFAULT), + c_ptr, TOOL_NAME, "TmpDir"); + fprintf(stderr, "\n"); + } else { + UtilStrCpyN(tmpDir, sizeof(tmpDir)-1, c_ptr); + strcat(tmpDir, DIR_SEP_STR); + if (UtilIsDirectory(tmpDir)) { + tmp_dir_in_x_def = TRUE; + } else { + fprintf(stderr, TgLoadString(STID_TMP_DIR_NOT_EXIST_USE_XDEF), + tmpDir, TOOL_NAME, "TmpDir"); + fprintf(stderr, "\n"); + } + } + } + } + if (!tmp_dir_in_x_def) { + #ifndef _TMP_DIR_IN_HOME_DIR + UtilStrCpyN(tmpDir, sizeof(tmpDir), TMP_DIR); + if (!PRTGIF || cmdLineOpenDisplay) { + if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "TmpDirInHomeDir")) != + NULL && UtilStrICmp(c_ptr, "true") == 0) { + UtilStrCpyN(tmpDir, sizeof(tmpDir)-1, tgifDir); + strcat(tmpDir, DIR_SEP_STR); + } + } + #else /* _TMP_DIR_IN_HOME_DIR */ + UtilStrCpyN(tmpDir, sizeof(tmpDir)-1, tgifDir); + strcat(tmpDir, DIR_SEP_STR); + if (!PRTGIF || cmdLineOpenDisplay) { + if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "TmpDirInHomeDir")) != + NULL && UtilStrICmp(c_ptr, "false") == 0) { + UtilStrCpyN(tmpDir, sizeof(tmpDir), TMP_DIR); + } + } + #endif /* ~_TMP_DIR_IN_HOME_DIR */ + } + } + void Setup() { *************** *** 849,853 **** int bg_pixel=(-1); char *c_ptr=NULL; ! int def_x_neg=0, def_y_neg=0, paper_size_set, tmp_dir_in_x_def=FALSE; struct stat stat_buf; XWMHints wmhints; --- 898,902 ---- int bg_pixel=(-1); char *c_ptr=NULL; ! int def_x_neg=0, def_y_neg=0, paper_size_set; struct stat stat_buf; XWMHints wmhints; *************** *** 1448,1487 **** GetWorkingDirectory(bootDir, sizeof(bootDir)); } ! /* do not translate -- program constants */ ! if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "TmpDir")) != NULL) { ! UtilTrimBlanks(c_ptr); ! if (*c_ptr == '\0') { ! fprintf(stderr, TgLoadString(STID_INVALID_DIR_IN_X_DEFAULT), ! c_ptr, TOOL_NAME, "TmpDir"); ! fprintf(stderr, "\n"); ! } else { ! UtilStrCpyN(tmpDir, sizeof(tmpDir)-1, c_ptr); ! strcat(tmpDir, DIR_SEP_STR); ! if (UtilIsDirectory(tmpDir)) { ! tmp_dir_in_x_def = TRUE; ! } else { ! fprintf(stderr, TgLoadString(STID_TMP_DIR_NOT_EXIST_USE_XDEF), ! tmpDir, TOOL_NAME, "TmpDir"); ! fprintf(stderr, "\n"); ! } ! } ! } ! if (!tmp_dir_in_x_def) { ! #ifndef _TMP_DIR_IN_HOME_DIR ! UtilStrCpyN(tmpDir, sizeof(tmpDir), TMP_DIR); ! if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "TmpDirInHomeDir")) != ! NULL && UtilStrICmp(c_ptr, "true") == 0) { ! UtilStrCpyN(tmpDir, sizeof(tmpDir)-1, tgifDir); ! strcat(tmpDir, DIR_SEP_STR); ! } ! #else /* _TMP_DIR_IN_HOME_DIR */ ! UtilStrCpyN(tmpDir, sizeof(tmpDir)-1, tgifDir); ! strcat(tmpDir, DIR_SEP_STR); ! if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "TmpDirInHomeDir")) != ! NULL && UtilStrICmp(c_ptr, "false") == 0) { ! UtilStrCpyN(tmpDir, sizeof(tmpDir), TMP_DIR); ! } ! #endif /* ~_TMP_DIR_IN_HOME_DIR */ ! } enableMouseWheel = TRUE; if (threeDLook && (c_ptr=XGetDefault(mainDisplay, TOOL_NAME, --- 1497,1502 ---- GetWorkingDirectory(bootDir, sizeof(bootDir)); } ! InitTmpDir(); ! enableMouseWheel = TRUE; if (threeDLook && (c_ptr=XGetDefault(mainDisplay, TOOL_NAME, @ 1.3 log @forgot to cvs add first... @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @Update tgif to 4.0.7, provided in pr 6861 by Dan McMahill. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.1 1998/08/26 21:18:58 frueauf Exp $ d3 145 a147 11 --- cutpaste.c.orig Wed Aug 19 10:08:28 1998 +++ cutpaste.c Wed Aug 19 10:09:33 1998 @@@@ -31,4 +31,8 @@@@ */ +/* DAN added the following 2 lines for NetBSD-1.3 */ +#include +#include + #include #include @ 1.1 log @Update tgif to 3.0p17x, submitted in pr 6044 by Dan McMahill with some minor cleanup by me. @ text @d1 1 a1 1 $NetBSD$ @