[NUT-devel] Another suggestion for broadcast [PATCH]

Rich Felker dalias at aerifal.cx
Wed Feb 20 01:10:20 CET 2008


On Tue, Feb 19, 2008 at 07:50:27PM +0000, Måns Rullgård wrote:
> Rich Felker <dalias at aerifal.cx> writes:
> 
> > On Tue, Feb 19, 2008 at 06:45:05PM +0100, Michael Niedermayer wrote:
> >> +main_flags (v)
> >> +    Bit Name            Description
> >> +    0   BROADCAST_MODE  Set if broadcast mode is in use.
> >
> > Doesn't nut.txt say bit numbering goes from highest to lowest? Of
> > course this makes no sense for vlc bitfields... But it should probably
> > be clarified. Or else explicit numeric values rather than but numbers
> > should be used.
> 
> Why not make each flag its own 1-bit field?  Or would that be bad for
> some reason I'm missing?

The flags fields are then not extensible. You have to keep adding more
of them, possibly in discontiguous locations. Practically it just
means slightly more wasted space in files not using obscure flags, but
it's also ugly. I like vlc-flags better.

Rich



More information about the NUT-devel mailing list