Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: zsh/system library



Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:

> On Sep 2, 10:56am, Peter Stephenson wrote:
> } Subject: Re: PATCH: zsh/system library
> }
> } sed -n -e 's/^#line[ 	].*\"\(.*\)\"/\2/p' \
> }        -e 's/^#[ 	].*\"\(.*\)\"/\2/p' |
> } 
> } should work.
>
> Except that those should be \1 instead of \2 in that formulation.

Here is the patch:

Index: ChangeLog
===================================================================
RCS file: /cvsroot/zsh/zsh/ChangeLog,v
retrieving revision 1.2089
diff -a -u -u -0 -r1.2089 ChangeLog
--- ChangeLog	3 Sep 2003 14:07:25 -0000	1.2089
+++ ChangeLog	7 Sep 2003 04:03:38 -0000
@@ -0,0 +1,4 @@
+2003-09-06  Vin Shelton  <acs@xxxxxxxxxxxxxxxxxxxx>
+
+	* zshconfig.ac: Make sed grok icc's cpp output.
+
Index: zshconfig.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v
retrieving revision 1.39
diff -a -u -r1.39 zshconfig.ac
--- zshconfig.ac	30 Aug 2003 19:16:22 -0000	1.39
+++ zshconfig.ac	7 Sep 2003 04:03:54 -0000
@@ -1081,7 +1081,8 @@
 dnl slashes rather than doubled backslashes in the path.
 echo "#include <signal.h>" > nametmp.c
 sigfile_list="`$CPP nametmp.c |
-sed -n 's/^#[ 	].*\"\(.*\)\"/\1/p' |
+sed -n -e 's/^#line[ 	].*\"\(.*\)\"/\1/p' \
+       -e 's/^#[ 	].*\"\(.*\)\"/\1/p' |
 sed 's/\\\\\\\\/\//g' |
 $AWK '{ if (\$1 ~ \"sig\") files[[\$1]] = \$1 }
   END { for (var in files) print var }'`"
@@ -1128,7 +1129,8 @@
 dnl slashes rather than doubled backslashes in the path.
 echo "#include <errno.h>" > nametmp.c
 errfile_list="`$CPP nametmp.c |
-sed -n 's/^#[ 	].*\"\(.*\)\"/\1/p' |
+sed -n -e 's/^#line[ 	].*\"\(.*\)\"/\1/p' \
+       -e 's/^#[ 	].*\"\(.*\)\"/\1/p' |
 sed 's/\\\\\\\\/\//g' |
 $AWK '{ if (\$1 ~ \"err\") files[[\$1]] = \$1 }
   END { for (var in files) print var }'`"


HTH,
 Vin



Messages sorted by: Reverse Date, Date, Thread, Author