NetBSD Problem Report #58816
From www@netbsd.org Thu Nov 7 08:38:27 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id AC0131A9238
for <gnats-bugs@gnats.NetBSD.org>; Thu, 7 Nov 2024 08:38:27 +0000 (UTC)
Message-Id: <20241107083826.067D81A923B@mollari.NetBSD.org>
Date: Thu, 7 Nov 2024 08:38:25 +0000 (UTC)
From: rvp@SDF.ORG
Reply-To: rvp@SDF.ORG
To: gnats-bugs@NetBSD.org
Subject: sysutils/xfm: fix startup issue caused by incomplete tradcpp macro expansion
X-Send-Pr-Version: www-1.0
>Number: 58816
>Category: pkg
>Synopsis: sysutils/xfm: fix startup issue caused by incomplete tradcpp macro expansion
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 07 08:40:00 +0000 2024
>Closed-Date: Mon Dec 02 08:03:45 +0000 2024
>Last-Modified: Mon Dec 02 08:05:01 +0000 2024
>Originator: RVP
>Release: pkgsrc-current
>Organization:
>Environment:
NetBSD/amd64 10.99.12
>Description:
Fix for issue b) described here:
https://mail-index.netbsd.org/pkgsrc-users/2024/11/03/msg040503.html
Add a <space> so that HIST_TRANSLATION() is recognized as a macro
rather than as a continuation of the previous line.
(Really, this should be fixed properly by using a general-purpose
macro processor like m4(1) rather than abusing tradcpp(1) on files
which are just _not_ C source code!)
Fix for issue a) is probably just to uninstall `pkg-config-0.29.2nb2'
Dunno how that got installed. Only one of either `pkgconf' or
`pkg-config' needs to be present. (One of the first packages
I install is `pkgconf'; never needed the other.)
>How-To-Repeat:
See mail.
>Fix:
--START patch--
diff -urN xfm-1.4.3.orig/lib/Xfm.cpp xfm-1.4.3/lib/Xfm.cpp
--- xfm-1.4.3.orig/lib/Xfm.cpp 2001-08-23 13:27:03.000000000 +0000
+++ xfm-1.4.3/lib/Xfm.cpp 2024-11-07 08:22:39.527896047 +0000
@@ -269,7 +269,7 @@
Ctrl<Key>J : no-op() \n
#else
Xfm*TextField.baseTranslations:#override\n\
-HIST_TRANSLATION(FocusSet(), ) \
+ HIST_TRANSLATION(FocusSet(), ) \
Shift <Key>Tab:FocusTraverse(b)\n\
<Key>Tab:FocusTraverse()\n\
<FocusIn>:Detail_NotifyAncestor(CursorState,a)\n\
@@ -328,7 +328,7 @@
Xfm*file window*folderlabel.baseTranslations: #override\n\
<Enter> : trackCursor()\n\
<Leave> : trackCursor()\n\
-HIST_TRANSLATION(,) \
+ HIST_TRANSLATION(,) \
<Btn1Up>(2) : fileRefresh()\n
Xfm*file window*viewport.baseTranslations:#override\n\
<Enter>: trackCursor()\n <Leave>: trackCursor()\n
@@ -416,7 +416,7 @@
<Key>q : notify(*file*quit)\n
#else
Xfm*file window*folderlabel.baseTranslations: #override\n\
-HIST_TRANSLATION(,)\
+ HIST_TRANSLATION(,)\
<Btn1Up>(2) : fileRefresh()\n
Xfm*file window*icon box*file_icon.baseTranslations: #override\n\
<Enter> : fileMaybeHighlight()\n\
--END patch--
>Release-Note:
>Audit-Trail:
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58816 CVS commit: pkgsrc/sysutils/xfm
Date: Thu, 7 Nov 2024 15:29:32 +0000
Module Name: pkgsrc
Committed By: nia
Date: Thu Nov 7 15:29:32 UTC 2024
Modified Files:
pkgsrc/sysutils/xfm: Makefile distinfo
Added Files:
pkgsrc/sysutils/xfm/patches: patch-lib_Xfm.cpp
Log Message:
xfm: fix startup issue caused by incomplete tradcpp macro expansion
from RVP via PR pkg/58816
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 pkgsrc/sysutils/xfm/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/sysutils/xfm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xfm/patches/patch-lib_Xfm.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/58816: sysutils/xfm: fix startup issue caused by incomplete
tradcpp macro expansion
Date: Thu, 7 Nov 2024 18:38:00 +0000
On Thu, Nov 07, 2024 at 08:40:00AM +0000, rvp@SDF.ORG wrote:
> #else
> Xfm*TextField.baseTranslations:#override\n\
> -HIST_TRANSLATION(FocusSet(), ) \
> + HIST_TRANSLATION(FocusSet(), ) \
> Shift <Key>Tab:FocusTraverse(b)\n\
> <Key>Tab:FocusTraverse()\n\
Did this ever work in _any_ cpp? Should tradcpp not splice lines when
not in a string constant or preprocessor directive? Or should it
insert a space in that case?
My 1st ed K&R mentions escaped newlines in the context of string
constants and #define, but apparently not otherwise.
gcc -traditional does what tradcpp does but that doesn't prove
anything.
Does the code in xfm that reads the results do its own line splicing?
> (Really, this should be fixed properly by using a general-purpose
> macro processor like m4(1) rather than abusing tradcpp(1) on files
> which are just _not_ C source code!)
Yeah, well, most of the reason tradcpp exists is to support legacy
uses like this.
--
David A. Holland
dholland@netbsd.org
From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58816 CVS commit: [pkgsrc-2024Q3] pkgsrc/sysutils/xfm
Date: Thu, 7 Nov 2024 23:15:23 +0000
Module Name: pkgsrc
Committed By: maya
Date: Thu Nov 7 23:15:23 UTC 2024
Modified Files:
pkgsrc/sysutils/xfm [pkgsrc-2024Q3]: Makefile distinfo
Added Files:
pkgsrc/sysutils/xfm/patches [pkgsrc-2024Q3]: patch-lib_Xfm.cpp
Log Message:
Pullup ticket #6917 - requested by nia
sysutils/xfm: Bug fix
Revisions pulled up:
- sysutils/xfm/Makefile 1.25
- sysutils/xfm/distinfo 1.13
- sysutils/xfm/patches/patch-lib_Xfm.cpp 1.1
---
Module Name: pkgsrc
Committed By: nia
Date: Thu Nov 7 15:29:32 UTC 2024
Modified Files:
pkgsrc/sysutils/xfm: Makefile distinfo
Added Files:
pkgsrc/sysutils/xfm/patches: patch-lib_Xfm.cpp
Log Message:
xfm: fix startup issue caused by incomplete tradcpp macro expansion
from RVP via PR pkg/58816
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.26.1 pkgsrc/sysutils/xfm/Makefile
cvs rdiff -u -r1.12 -r1.12.24.1 pkgsrc/sysutils/xfm/distinfo
cvs rdiff -u -r0 -r1.1.2.2 pkgsrc/sysutils/xfm/patches/patch-lib_Xfm.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: RVP <rvp@SDF.ORG>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/58816: sysutils/xfm: fix startup issue caused by incomplete
tradcpp macro expansion
Date: Fri, 8 Nov 2024 07:18:43 +0000 (UTC)
Two more:
--START patch--
diff -urN xfm-1.4.3.orig/lib/Xfm.cpp xfm-1.4.3/lib/Xfm.cpp
--- xfm-1.4.3.orig/lib/Xfm.cpp 2001-08-23 13:27:03.000000000 +0000
+++ xfm-1.4.3/lib/Xfm.cpp 2024-11-08 06:36:09.938288947 +0000
@@ -359,7 +359,7 @@
Ctrl <Key>h : notify("*view*hide folders")\n\
Ctrl <Key>m : notify("*view*mix folders/files")\n\
Ctrl <Key>u : notify("*view*show hidden files")\n\
-LOG_TRANSLATION \
+ LOG_TRANSLATION \
<Key>n : notify(*file*new)\n\
<Key>m : notify(*file*move)\n\
<Key>c : notify(*file*copy)\n\
@@ -400,7 +400,7 @@
Ctrl <Key>h : notify("*view*hide folders")\n\
Ctrl <Key>m : notify("*view*mix folders/files")\n\
Ctrl <Key>u : notify("*view*show hidden files")\n\
-LOG_TRANSLATION \
+ LOG_TRANSLATION \
<Key>n : notify(*file*new)\n\
<Key>m : notify(*file*move)\n\
<Key>c : notify(*file*copy)\n\
--END patch--
The program's homepage has changed as well. It is now at:
https://www.musikinformatik.uni-mainz.de/ag/xfm/xfm.html
... and with that, this PR can be closed.
-RVP
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/58816: sysutils/xfm: fix startup issue caused by incomplete
tradcpp macro expansion
Date: Fri, 8 Nov 2024 17:05:23 +0000
On Fri, Nov 08, 2024 at 06:21:26AM -0000, Michael van Elst wrote:
> gnats-admin@NetBSD.org ("David Holland via gnats") writes:
>
> > gcc -traditional does what tradcpp does but that doesn't prove
> > anything.
>
> sys3 cpp does:
>
> case '\\': for (;;) {
> if (*p++=='\n') {++lineno[ifno]; break;}
> if (eob(--p)) p=refill(p);
> else {++p; break;}
> } break;
>
> So the sequence of a backslash followed by linefeed is just skipped.
Thanks for checking -- I will not change tradcpp then.
--
David A. Holland
dholland@netbsd.org
State-Changed-From-To: open->closed
State-Changed-By: nia@NetBSD.org
State-Changed-When: Mon, 02 Dec 2024 08:03:45 +0000
State-Changed-Why:
requested by submitter
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58816 CVS commit: pkgsrc/sysutils/xfm
Date: Mon, 2 Dec 2024 08:02:33 +0000
Module Name: pkgsrc
Committed By: nia
Date: Mon Dec 2 08:02:33 UTC 2024
Modified Files:
pkgsrc/sysutils/xfm: Makefile distinfo
pkgsrc/sysutils/xfm/patches: patch-lib_Xfm.cpp
Log Message:
xfm: More little fixes from RVP
PR pkg/58816
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/sysutils/xfm/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/xfm/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/xfm/patches/patch-lib_Xfm.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.