rpms/xfig/devel xfig-3.2.5-rh490257.patch, NONE, 1.1 xfig-3.2.5-rh490259.patch, NONE, 1.1 xfig.spec, 1.56, 1.57

Hans de Goede jwrdegoede at fedoraproject.org
Sun Mar 15 15:34:49 UTC 2009


Author: jwrdegoede

Update of /cvs/extras/rpms/xfig/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22098

Modified Files:
	xfig.spec 
Added Files:
	xfig-3.2.5-rh490257.patch xfig-3.2.5-rh490259.patch 
Log Message:
* Sun Mar 15 2009 Hans de Goede <hdegoede at redhat.com> 3.2.5-16
- Fix Text size field inserts characters on left instead of right (#490257)
- Fix xfig-Xaw3d does not display messages in message panel (#490259)


xfig-3.2.5-rh490257.patch:

--- NEW FILE xfig-3.2.5-rh490257.patch ---
--- xfig.3.2.5/w_util.c	2007-01-16 18:58:18.000000000 +0100
+++ xfig.3.2.5.wip/w_util.c	2009-03-15 13:31:47.000000000 +0100
@@ -932,21 +932,23 @@
     DeclareArgs(4);
     spin_struct *spins = (spin_struct*) info;
     char	buf[200];
-    int		val, i, pos;
+    int		val, i, modified = 0;
+    XawTextPosition pos;
 
     /* save cursor position */
     FirstArg(XtNinsertPosition, &pos);
     GetValues(spins->widget);
 
-    buf[sizeof(buf)-1]='\0';
-    strncpy(buf,panel_get_value(spins->widget),sizeof(buf));
+    snprintf(buf, sizeof(buf), "%s", panel_get_value(spins->widget));
+
     for (i=0; i<strlen(buf); )
 	/* delete any non-digits (including leading "-" when min >= 0 */
 	if ((spins->min >= 0.0 && buf[i] == '-') || ((buf[i] < '0' || buf[i] > '9') && buf[i] != '-') || 
 			(i != 0 && buf[i] == '-')) {
-	    strcpy(&buf[i],&buf[i+1]);
+	    memmove(&buf[i], &buf[i+1], strlen(&buf[i]));
 	    /* adjust cursor for char we just removed */
 	    pos--;
+	    modified = 1;
 	} else {
 	    i++;
 	}
@@ -954,15 +956,21 @@
     if (strlen(buf) > 0 && !(strlen(buf)==1 && buf[0] == '-')) {
 	val = atoi(buf);
 	/* only check max.  If min is, say 3 and user wants to type 10, the 1 is too small */
-	if (val > (int) spins->max)
+	if (val > (int) spins->max) {
 	    val = (int) spins->max;
-	sprintf(buf,"%d", val);
+	    sprintf(buf,"%d", val);
+	    modified = 1;
+        }
     }
-    panel_set_value(spins->widget, buf);
-    /* put cursor back */
-    if (pos < strlen(buf)) {
-	FirstArg(XtNinsertPosition, pos+1);
-	SetValues(spins->widget);
+
+    if (modified) {
+        panel_set_value(spins->widget, buf);
+
+	/* put cursor back */
+	if (pos < strlen(buf)) {
+	    FirstArg(XtNinsertPosition, (pos+1));
+	    SetValues(spins->widget);
+	}
     }
 }
 

xfig-3.2.5-rh490259.patch:

--- NEW FILE xfig-3.2.5-rh490259.patch ---
--- xfig.3.2.5/w_msgpanel.c	2005-07-26 18:40:01.000000000 +0200
+++ xfig.3.2.5.xaw3d/w_msgpanel.c	2009-03-15 16:13:31.000000000 +0100
@@ -85,13 +85,15 @@
 init_msg(Widget tool)
 {
     /* now the message panel */
-    FirstArg(XtNfont, roman_font);
-    FirstArg(XtNwidth, MSGPANEL_WD);
+    FirstArg(XtNfont, roman_font);
+    NextArg(XtNwidth, MSGPANEL_WD);
     NextArg(XtNheight, MSGPANEL_HT);
     NextArg(XtNstring, "\0");
     NextArg(XtNfromVert, cmd_form);
     NextArg(XtNvertDistance, -INTERNAL_BW);
     NextArg(XtNborderWidth, INTERNAL_BW);
+    NextArg(XtNtopMargin, 1);
+    NextArg(XtNbottomMargin, 1);
     NextArg(XtNdisplayCaret, False);
     NextArg(XtNtop, XtChainTop);
     NextArg(XtNbottom, XtChainTop);


Index: xfig.spec
===================================================================
RCS file: /cvs/extras/rpms/xfig/devel/xfig.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- xfig.spec	26 Feb 2009 09:22:38 -0000	1.56
+++ xfig.spec	15 Mar 2009 15:34:17 -0000	1.57
@@ -3,7 +3,7 @@
 Summary: An X Window System tool for drawing basic vector graphics
 Name: xfig
 Version: 3.2.5
-Release: 15%{?dist}
+Release: 16%{?dist}
 License: MIT
 Group: Applications/Multimedia
 URL: http://www.xfig.org/
@@ -24,6 +24,8 @@
 Patch14: xfig-3.2.5-zoom-crash.patch
 Patch15: xfig-3.2.5-missing-protos.patch
 Patch16: xfig-3.2.5-modepanel.patch
+Patch17: xfig-3.2.5-rh490257.patch
+Patch18: xfig-3.2.5-rh490259.patch
 
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
@@ -101,6 +103,8 @@
 %patch14 -p1 -b .zoom-crash
 %patch15 -p1
 %patch16 -p1
+%patch17 -p1
+%patch18 -p1
 ln -nfs Doc/xfig.man xfig.man
 find -type f -print0 | xargs -0 chmod -x
 sed -i.save 's/\r//g' Doc/html/index.html
@@ -198,6 +202,10 @@
 
 
 %changelog
+* Sun Mar 15 2009 Hans de Goede <hdegoede at redhat.com> 3.2.5-16
+- Fix Text size field inserts characters on left instead of right (#490257)
+- Fix xfig-Xaw3d does not display messages in message panel (#490259)
+
 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.5-15
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list