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.21; 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-ac,v 1.3 2001/07/18 20:28:35 dmcmahill Exp $ work around a compiler bug which causes arrowheads to not display correctly on NetBSD-1.5 and older alpha's when optimization is used. --- poly.c.orig Sat Aug 5 09:57:25 2000 +++ poly.c Wed Jul 18 16:12:24 2001 @@@@ -3232,4 +3232,5 @@@@ double len, sin, cos; XGCValues values; + short tmps; trans_pat = ObjPtr->trans_pat; @@@@ -3320,8 +3321,8 @@@@ tmp_v[0].x = tmp_v[3].x = v0.x; tmp_v[0].y = tmp_v[3].y = v0.y; - tmp_v[1].x = round(v0.x + aw*cos - ah*sin); - tmp_v[1].y = round(v0.y + aw*sin + ah*cos); - tmp_v[2].x = round(v0.x + aw*cos + ah*sin); - tmp_v[2].y = round(v0.y + aw*sin - ah*cos); + tmps = round(v0.x + aw*cos - ah*sin); tmp_v[1].x = tmps; + tmps = round(v0.y + aw*sin + ah*cos); tmp_v[1].y = tmps; + tmps = round(v0.x + aw*cos + ah*sin); tmp_v[2].x = tmps; + tmps = round(v0.y + aw*sin - ah*cos); tmp_v[2].y = tmps; XFillPolygon(mainDisplay, Win, drawGC, tmp_v, 4, Convex, @@@@ -3340,8 +3341,8 @@@@ tmp_v[0].x = tmp_v[3].x = vnminus1.x; tmp_v[0].y = tmp_v[3].y = vnminus1.y; - tmp_v[1].x = round(vnminus1.x - aw*cos + ah*sin); - tmp_v[1].y = round(vnminus1.y - aw*sin - ah*cos); - tmp_v[2].x = round(vnminus1.x - aw*cos - ah*sin); - tmp_v[2].y = round(vnminus1.y - aw*sin + ah*cos); + tmps = round(vnminus1.x - aw*cos + ah*sin); tmp_v[1].x = tmps; + tmps = round(vnminus1.y - aw*sin - ah*cos); tmp_v[1].y = tmps; + tmps = round(vnminus1.x - aw*cos - ah*sin); tmp_v[2].x = tmps; + tmps = round(vnminus1.y - aw*sin + ah*cos); tmp_v[2].y = tmps; XFillPolygon(mainDisplay, Win, drawGC, tmp_v, 4, Convex, @ 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-ac,v 1.1 1998/08/26 21:18:58 frueauf Exp $ d3 38 a40 116 *** eps.c.orig Thu Feb 19 13:51:02 1998 --- eps.c Thu Feb 19 13:47:35 1998 *************** *** 671,674 **** --- 671,675 ---- int boundingbox_found=FALSE, preview_found=FALSE, found; int boundingbox_atend=FALSE, tiff_preview_ok=FALSE; + int boundingbox_image_w=0, boundingbox_image_h=0; FILE *fp=NULL; struct stat stat_buf; *************** *** 762,765 **** --- 763,768 ---- if (sscanf(&(line[14]), "%f %f %f %f", &llx, &lly, &urx, &ury) == 4) { boundingbox_found = TRUE; + boundingbox_image_w = abs(round(urx-llx)); + boundingbox_image_h = abs(round(ury-lly)); } else if (!boundingbox_found) { c_ptr = FindChar((int)'(', &(line[14])); *************** *** 790,793 **** --- 793,822 ---- return BitmapFileInvalid; } + if (boundingbox_found) { + /* + * If the width and height information in the boundingbox and + * the preview bitmap are differ only by one, we consider + * this a round-off error and adjust the boundingbox so + * that they become identical! + */ + int diff=0; + + diff = image_w - boundingbox_image_w; + if (diff == 1 || diff == (-1)) { + if (urx >= llx) { + urx += (float)diff; + } else { + urx -= (float)diff; + } + } + diff = image_h - boundingbox_image_h; + if (diff == 1 || diff == (-1)) { + if (ury >= lly) { + ury += (float)diff; + } else { + ury -= (float)diff; + } + } + } preview_found = TRUE; if (!ReadPreviewBitmap(fp, image_w, image_h, bps, &bitmap, &image)) { *** exec.c.orig Thu Feb 19 13:51:02 1998 --- exec.c Thu Feb 19 13:26:16 1998 *************** *** 1344,1349 **** rc = FALSE; } else { ! unlink(file_name); ! ReplaceAttrFirstValue(attr_owner_obj, attr_ptr, file_name); } return rc; --- 1344,1368 ---- rc = FALSE; } else { ! char *psz=UtilStrRChr(file_name, '/'); ! int changed=FALSE; ! ! if (psz != NULL) { ! for (psz++; *psz != '\0'; psz++) { ! if ((*psz >= '0' && *psz <= '9') || (*psz >= 'a' && *psz <= 'z') || ! (*psz >= 'A' && *psz <= 'Z')) { ! } else { ! *psz = 'Q'; ! changed = TRUE; ! } ! } ! } ! if (changed && mktemp(file_name) == NULL) { ! MsgBox ("Fail to mktemp(). Command execution aborted.", ! TOOL_NAME, INFO_MB); ! rc = FALSE; ! } else { ! unlink(file_name); ! ReplaceAttrFirstValue(attr_owner_obj, attr_ptr, file_name); ! } } return rc; *** xbitmap.c.orig Thu Feb 19 13:51:02 1998 --- xbitmap.c Thu Feb 19 12:56:15 1998 *************** *** 3932,3935 **** --- 3932,3939 ---- memset(&ctm, 0, sizeof(struct XfrmMtrxRec)); + (*ObjPtr)->orig_obbox.ltx = ltx; + (*ObjPtr)->orig_obbox.lty = lty; + (*ObjPtr)->orig_obbox.rbx = rbx; + (*ObjPtr)->orig_obbox.rby = rby; fval = ((float)(rbx-ltx))/((float)image_w)*((float)1000.0); ctm.m[CTM_SX] = round(fval); *** http.c.orig Tue Dec 2 15:23:15 1997 --- http.c Tue Dec 2 15:24:12 1997 *************** *** 962,966 **** } if (content_type != NULL) free(content_type); ! if (text_type) { int buf_len=strlen(line_ptr); char *return_buf; --- 962,966 ---- } if (content_type != NULL) free(content_type); ! if (text_type || content_length == (-1)) { int buf_len=strlen(line_ptr); char *return_buf; @ 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$ @