[TUHS] C entry keyword
imp at bsdimp.com
Tue Oct 30 23:56:54 AEST 2018
I'd imagine you'd use it like so (in more modern C):
void *memcpy(void *src, void *dst, size_t len)
char *rv = dst;
while (len--) *dst++ =*src; /* not always a trivial body */
rv = dst; /* Swap args and jump to memcpy */
dst = src;
src = rv;
Variations on this theme are often done in assembler for these routines,
though the example is an attempt to cope with the diversity of interfaces
that grew up after v6 unix was released in the world, so it's not likely
this particular example inspired it...
On Tue, Oct 30, 2018 at 4:00 AM Angelo Papenhoff <aap at papnet.eu> wrote:
> On 30/10/18, Steve Simon wrote:
> > “entry” was a reserved word in K&R Ed.1,
> > my personal favourite C trivia. I have never seen it used outside
> fortran on mainframes though.
> I think PL/1 on Multics uses it, which is probably how it "got into" C.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TUHS