Subject: what's bytes()?
To: netbsd-help <netbsd-help@NetBSD.org>
From: Olwe Bottorff <galanolwe@yahoo.com>
List: netbsd-help
Date: 02/21/2006 12:04:49
Thanks, I had accidentally deleted mine. Now, in
usr.bin/tail/reverse.c I see a bytes(fp, off) in the
reverse() function. What does that do and where is it?

Olwe

--- Dave Huang <khym@azeotrope.org> wrote:

> On Tue, Feb 21, 2006 at 11:28:23AM -0800, Olwe
> Bottorff wrote:
> > I came across the function WR() in some netbsd
> source
> > (reverse.c, part of usr.bin/tail/). I guessing it
> has
> > something to do with reversing the contents of a
> > memory map, which is what reverse is about. What
> does
> > it do and where is it defined?
> 
> It's a macro defined in usr.bin/tail/extern.h:
> 
> #define WR(p, size) \
>         if (write(STDOUT_FILENO, p, size) != size) \
>                 oerr();
> 
> So, all it does is write the buffer to stdout, or
> call oerr() if the write
> fails.
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com