Paul Eggert wrote:
> diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
> index b7276a3..031bc21 100644
> --- a/m4/absolute-header.m4
> +++ b/m4/absolute-header.m4
> @@ -81,12 +81,12 @@ changequote(,)
>        gl_dirsep_regex='/'
>        ;;
>    esac
> -  gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'$1|{
> +  gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'$1|!d
>        s|.*"\(.*'"${gl_dirsep_regex}"'$1\)".*|\1|
>        s|^/[^/]|//&|
>        p
>        q
> -    }'
> +    '

This patch is working like the current code:

$ { echo foobar ; echo '#line 1 "/usr/include/foo/stdio.h"'; echo blabla; echo 
'#line 22 "/usr/include/foo/stdio.h"'; echo '#line 1 
"/usr/include/foo/stdlib.h"'; } > in

$ sed -n -e '\|/stdio.h|{
s|.*"\(.*/stdio.h\)".*|\1|
s|^/[^/]|//&|
p
q
}' < in
///usr/include/foo/stdio.h

$ sed -n -e '\|/stdio.h|!d
s|.*"\(.*/stdio.h\)".*|\1|
s|^/[^/]|//&|
p
q' < in
///usr/include/foo/stdio.h

But it does not help for the NeXTstep case, where sed chokes on any
regex delimiter that is not a slash. So what's the point? Just to avoid
a group of commands? That is not what Daniel's 'sed' is having a problem
with.

Bruno
-- 
In memoriam Bekir Çoban-zade <http://en.wikipedia.org/wiki/Bekir_Çoban-zade>

Reply via email to