Subject: Re: '//' for comments in C code? (archivers/unace)
To: Christos Zoulas <christos@zoulas.com>
From: Ben Collver <collver1@comcast.net>
List: tech-pkg
Date: 01/21/2004 14:12:58
On Wed, Jan 21, 2004 at 09:48:15PM +0000, Christos Zoulas wrote:
> Sed seems simpler:
>
>
> .c.o:
> @(echo ${CC} ${CFLAGS} -c $< && \
> PID=$$$$ && \
> sed -e 's,//.*$$,,' < $< > tmp$${PID}.c && \
> ${CC} ${CFLAGS} -c tmp$${PID}.c && \
> mv tmp$${PID}.o $@ && \
> rm -f tmp$${PID}.c)
>
> I would have used /dev/stdin, but some cc's check that the file ends in .c
Would this cause the lynx compile to fail?
From /usr/pkgsrc/www/lynx/work/lynx-2-8-4/src/LYMain.c:
printf(gettext(
"See http://lynx.browser.org/ and the online help for more information.\n\n"
));
If I understand it right, sed would change this to
printf(gettext(
"See http:
));
Ben
--
A hacker does for love what others would not do for money.