read(fd,&y,sizeof y)
Aaron Werman
aaw at pyuxss.UUCP
Thu Mar 29 02:11:18 AEST 1984
<set -nt>
why not put together a suite of macros like:
#define Read(fd, charP, charCount) \
( (int) read((file *)fd, (char *)charP, (int) charCount) )
#define Ldtseek(lp) ( (int) ldseek( (LDFILE *) ld) )
or alternatively you could recode all routines in your system to accept
only full words (passed as "char *" to be known heretoafter as the
"universal type"). Each system routine would thus merely have to cast
the type in statements, like
typedef char * WORD;
WORD strlen(s) WORD s;{
WORD p = s;
while (*p++);
return (WORD) (p - s - 1);}
-but BCPL did it first, and saved time on casts.
{harpo,houxm,ihnp4}!pyuxss!aaw
:-) Aaron Werman
More information about the Comp.lang.c
mailing list