[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] enums patch
From: |
Stéphane Payrard |
Subject: |
Re: [Texmacs-dev] enums patch |
Date: |
Thu, 12 Sep 2002 18:21:43 -0400 |
User-agent: |
Mutt/1.4i |
On (12/09/02 18:09), Stéphane Payrard wrote:
> From: Stéphane Payrard <address@hidden>
> To: address@hidden
> Subject: Re: [Texmacs-dev] enums patch
> Reply-To: address@hidden
> Date: Thu, 12 Sep 2002 18:09:47 -0400
>
> On (12/09/02 16:16), Joris van der Hoeven wrote:
> > From: Joris van der Hoeven <address@hidden>
> > To: address@hidden
> > Subject: Re: [Texmacs-dev] enums patch
> > Reply-To: address@hidden
> > Date: Thu, 12 Sep 2002 16:16:17 +0200 (MET DST)
> >
> >
> > > I will probably rewrite it better and send it tomorrow. Let me say
> > > that symbolic defined in enums are follow no consistant convention and
> > > that all upper case suck big time. I can fix it with a Perl script.
> > > Similar remarks for class names.
> >
> > I have been looking to the patch in more detail.
> > I am not sure that it would really be a good thing to apply it,
> > because many of the #define's are really definitions of constants
> > or masks and *not* new litterals in some new enumeration class.
> > In fact the latter case only occurs a few times and
> > I am not sure about making a specific modification for this.
> >
>
> I don't remember anything against using enums for a set of masks over
> a given integer even if I cannot find an example of this out of hand
> in the litterature.
This seems indeed a well accepted usage.
See for example qdir.h in the Qt header.
enum FilterSpec { Dirs = 0x001,
Files = 0x002,
Drives = 0x004,
NoSymLinks = 0x008,
All = 0x007,
TypeMask = 0x00F,
...
};
The Gnu header don't do that because they pprobably want to
be K&R compatible but we don't want that.
>
> --
> stef
>
>
>
>
> _______________________________________________
> Texmacs-dev mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/texmacs-dev
- Re: [Texmacs-dev] enums patch, Joris van der Hoeven, 2002/09/12
- Re: [Texmacs-dev] enums patch, Stéphane Payrard, 2002/09/12
- Re: [Texmacs-dev] enums patch,
Stéphane Payrard <=
- Re: [Texmacs-dev] enums patch, Joris van der Hoeven, 2002/09/12
- Re: [Texmacs-dev] enums patch, Stéphane Payrard, 2002/09/12
- Re: [Texmacs-dev] enums patch, Joris van der Hoeven, 2002/09/12
- Re: [Texmacs-dev] enums patch, Stéphane Payrard, 2002/09/13
- Re: [Texmacs-dev] enums patch, Joris van der Hoeven, 2002/09/13
- Re: [Texmacs-dev] enums patch, Stéphane Payrard, 2002/09/13
- Re: [Texmacs-dev] enums patch, Joris van der Hoeven, 2002/09/13
- Re: [Texmacs-dev] enums patch, Stéphane Payrard, 2002/09/14
- Re: [Texmacs-dev] enums patch, Joris van der Hoeven, 2002/09/14
Re: [Texmacs-dev] enums patch, Joris van der Hoeven, 2002/09/12