bin/86514: awk -vVAR=val doesn't work without space after -v
[patch]
Alexander Melkov
melkov at comptek.ru
Tue Oct 4 07:00:43 PDT 2005
The following reply was made to PR bin/86514; it has been noted by GNATS.
From: "Alexander Melkov" <melkov at comptek.ru>
To: <bug-followup at FreeBSD.org>, <melkov at comptek.ru>
Cc:
Subject: Re: bin/86514: awk -vVAR=val doesn't work without space after -v [patch]
Date: Tue, 4 Oct 2005 17:51:46 +0400
This is a multi-part message in MIME format.
------=_NextPart_000_00B4_01C5C90C.49E593A0
Content-Type: text/plain;
charset="windows-1251"
Content-Transfer-Encoding: 7bit
--- main.c.orig Sun Nov 7 01:38:28 2004
+++ main.c Tue Oct 4 17:41:42 2005
@@ -102,6 +102,8 @@
case 'v': /* -v a=1 to be done NOW. one -v for each
*/
if (argv[1][2] == '\0' && --argc > 1 &&
isclvar((++argv)[1]))
setclvar(argv[1]);
+ else if (argv[1][2] != '\0' && isclvar(argv[1] + 2))
+ setclvar(argv[1] + 2);
break;
case 'm': /* more memory: -mr=record, -mf=fields */
/* no longer supported */
------=_NextPart_000_00B4_01C5C90C.49E593A0
Content-Type: text/html;
charset="windows-1251"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1251">
<META content=3D"MSHTML 6.00.2800.1515" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>--- main.c.orig Sun Nov 7 01:38:28 2004<BR>+++ =
main.c Tue Oct 4 17:41:42 2005<BR>@@ =
-102,6=20
+102,8=20
@@<BR> &=
nbsp; =20
case 'v': /* -v a=3D1 to be done =
NOW. =20
one -v for each=20
*/<BR> &=
nbsp; =20
if (argv[1][2] =3D=3D '\0' && --argc > 1 &&=20
isclvar((++argv)[1]))<BR> =
&=
nbsp; =20
setclvar(argv[1]);<BR>+ &n=
bsp; &nb=
sp; =20
else if (argv[1][2] !=3D '\0' && isclvar(argv[1] +=20
2))<BR>+  =
; =
=20
setclvar(argv[1] +=20
2);<BR> =
=
break;<BR> &nb=
sp; =20
case 'm': /* more memory: =
-mr=3Drecord,=20
-mf=3Dfields=20
*/<BR> &=
nbsp; &n=
bsp; =20
/* no longer supported */<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_00B4_01C5C90C.49E593A0--
More information about the freebsd-bugs
mailing list