This function works perfectly well in a shell script, but it returns
nothing when I employ it from acinclude.m4:
AC_DEFUN([TOUPPER],[
{
echo $1 | sed -n \
'
s/\/*$//
/\//!s/^/.\//
h
s/.*\///
/[a-z]/! d
y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
x
G
s/^\(.*\)\n\(.*\)$/\2/p
'
}
])
If somebody has an alternative way to do this, I'd love to know about
it. But I'd still like to know why this fails. $1 has a value but the
function echos nothing.
--
#include <stdio.h>
int main(){int a[]={74,117,115,116,32,97,110,111,116,104,101,114,32,67,\
32,104,97,99,107,101,114,10};int *b=a;for(;*b>0;printf("%c",*(b++)));}