[comp.lang.c] Re^2: hardcoded constants

maart@cs.vu.nl (Maarten Litmaath) (12/20/88)

remmers@m-net.UUCP (John H. Remmers) writes:
\...
\	#define  Catspace(s,t)  (strlen(s) + strlen(t) + 1)
\...
\	foo = malloc(Catspace(s,t) + sizeof('/'));

% cat c.c
main()
{
	printf("%d\n", sizeof '/');
}
% cc c.c
% a.out
4
%
-- 
fcntl(fd, F_SETFL, FNDELAY):          |Maarten Litmaath @ VU Amsterdam:
      let's go weepin' in the corner! |maart@cs.vu.nl, mcvax!botter!maart