Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site pyuxss.UUCP Path: utzoo!watmath!clyde!floyd!harpo!ulysses!gamma!pyuxww!pyuxss!aaw From: aaw@pyuxss.UUCP (Aaron Werman) Newsgroups: net.lang.c Subject: Re: read(fd,&y,sizeof y) Message-ID: <302@pyuxss.UUCP> Date: Wed, 28-Mar-84 11:11:18 EST Article-I.D.: pyuxss.302 Posted: Wed Mar 28 11:11:18 1984 Date-Received: Fri, 30-Mar-84 02:47:47 EST References: <17552@sri-arpa.UUCP>, <1815@rlgvax.UUCP>, <315@ccieng5.UUCP> Organization: Bell Communications Research, Piscataway N.J. Lines: 23 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