On Jun 17 23:30:44, marc.espie.open...@gmail.com wrote:
> On Sat, Jun 17, 2023 at 10:42:39AM +0200, Jan Stary wrote:
> > $ diffpp /tmp/foo
> > Assigning non-zero to $[ is no longer possible at /usr/local/bin/diffpp
> > line 72.
> >
> > Apparently, the diffpp(1) of print/enscript
> > has been broken for years and nobody noticed.
> > Is anyone using that?
> >
> > Jan
>
> Alternately, you could fix it.
> There are exactly 4 array dereferences that follow $[
> Mechanically substracting 1 in each location does the trick
Thanks for the patch.
While this fixes the syntax error,
diffpp still doesn't seem to work:
$ diffpp file.c < file.c.diff
just sits there (yes, it is the new one).
ktrace until I kill it ends with
60815 perl GIO fd 3 read 358 bytes
"/* Structures can be passed as arguments
* and returned from functions. Unions too. */
#include
struct s {
signed i;
float f;
};
struct s
f(struct s y)
{
struct s x;
x.i = y.i + 1;
x.f = y.f * 2;
return x;
}
int
main(int argc, char** argv)
{
struct s X, Y;
Y.i = 1;
Y.f = 3.1415;
X = f(Y);
printf("%d %f\\n", X.i, X.f);
return 0;
}
"
60815 perl RET read 358/0x166
60815 perl CALL read(3,0x8e9d7eef000,0x2000)
60815 perl RET read 0
60815 perl CALL kbind(0x71ae6bce2098,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2188,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2158,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2158,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2118,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL close(3)
60815 perl RET close 0
60815 perl CALL read(0,0x8ea989ee000,0x2000)
60815 perl GIO fd 0 read 331 bytes
"--- struct.c.orig Mon Jun 19 15:06:55 2023
+++ struct.cMon Jun 19 15:07:20 2023
@@ -4,7 +4,7 @@
#include
struct s {
- int i;
+ signed i;
float f;
};
@@ -22,7 +22,7 @@ main(int argc, char** argv)
{
struct s X, Y;
Y.i = 1;
- Y.f = 3.14;
+ Y.f = 3.1415;
X = f(Y);
printf("%d %f\\n", X.i, X.f);
return 0;
"
60815 perl RET read 331/0x14b
60815 perl CALL read(0,0x8ea989ee000,0x2000)
60815 perl RET read 0
60815 perl CALL kbind(0x71ae6bce2168,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce20e8,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2168,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2148,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2148,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2198,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2168,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2178,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2178,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl CALL kbind(0x71ae6bce2128,24,0x45177899858a9b3a)
60815 perl RET kbind 0
60815 perl PSIG SIGINT SIG_DFL
So it reads the named orig file, it reads the diff from stdin,
and then seems to do nothing.
Jan
> Index: Makefile
> ===
> RCS file: /cvs/ports/print/enscript/Makefile,v
> retrieving revision 1.38
> diff -u -p -r1.38 Makefile
> --- Makefile 11 Mar 2022 19:50:59 - 1.38
> +++ Makefile 17 Jun 2023 21:30:21 -
> @@ -2,7 +2,7 @@ COMMENT= convert ASCII files to PostScr
>
> DISTNAME=enscript-1.6.6
> CATEGORIES= print
> -REVISION=2
> +REVISION=3
>
> HOMEPAGE=https://www.gnu.org/software/enscript/
>
> Index: patches/patch-scripts_diffpp_in
> ===
> RCS file: patches/patch-scripts_diffpp_in
> diff -N patches/patch-scripts_diffpp_in
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-scripts_diffpp_in 17 Jun 2023 21:30:21 -
> @@ -0,0 +1,47 @@
> +Index: scripts/diffpp.in
> +--- scripts/diffpp.in.orig
> scripts/diffpp.in
> +@@