public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Hans de Goede <jwrdegoede@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/xfig] epel10: - Fix Text size field inserts characters on left instead of right (#490257)
Date: Sat, 30 May 2026 14:25:35 GMT [thread overview]
Message-ID: <178015113581.1.14872355499777064172.rpms-xfig-8b23145fcb03@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/xfig
Branch : epel10
Commit : 8b23145fcb03d25ec8a166a39345f54b65181ce0
Author : Hans de Goede <jwrdegoede@fedoraproject.org>
Date : 2009-03-15T15:34:17+00:00
Stats : +88/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/xfig/c/8b23145fcb03d25ec8a166a39345f54b65181ce0?branch=epel10
Log:
- Fix Text size field inserts characters on left instead of right (#490257)
- Fix xfig-Xaw3d does not display messages in message panel (#490259)
---
diff --git a/xfig-3.2.5-rh490257.patch b/xfig-3.2.5-rh490257.patch
new file mode 100644
index 0000000..7c193b8
--- /dev/null
+++ b/xfig-3.2.5-rh490257.patch
@@ -0,0 +1,59 @@
+--- 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);
++ }
+ }
+ }
+
diff --git a/xfig-3.2.5-rh490259.patch b/xfig-3.2.5-rh490259.patch
new file mode 100644
index 0000000..4b50498
--- /dev/null
+++ b/xfig-3.2.5-rh490259.patch
@@ -0,0 +1,20 @@
+--- 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);
diff --git a/xfig.spec b/xfig.spec
index 4ed4000..c9f9e5d 100644
--- a/xfig.spec
+++ b/xfig.spec
@@ -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 @@ Patch13: xfig-3.2.5-urwfonts.patch
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 @@ Files common to both the plain Xaw and the Xaw3d version of xfig.
%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 @@ fi
%changelog
+* Sun Mar 15 2009 Hans de Goede <hdegoede@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@lists.fedoraproject.org> - 3.2.5-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
reply other threads:[~2026-05-30 14:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178015113581.1.14872355499777064172.rpms-xfig-8b23145fcb03@fedoraproject.org \
--to=jwrdegoede@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox