Ethereal-dev: RE: [ethereal-dev] c code in ncp2222.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Graham Bloice" <graham.bloice@xxxxxxxxxxxxx>
Date: Fri, 22 Sep 2000 17:09:10 +0100
Gets my vote

GB

>
>
> I like it! I like the ".inc" suffix.
>
> --gilbert
>
> Jeff Foster <jfoste@xxxxxxxxxxxx> on 09/22/2000 10:52:55 AM
>
> To:   "'Graham Bloice'" <graham.bloice@xxxxxxxxxxxxx>,
> ethereal-dev@xxxxxxxx,
>       Gilbert Ramirez <gram@xxxxxxxxxx>
> cc:    (bcc: Gilbert Ramirez/Tivoli Systems)
> Subject:  RE: [ethereal-dev] c code in ncp2222.h
>
>
>
>
>
>
> per: Graham Bloice
>
> > > What do you think? Which is cleaner?
> > >
> > > 1. Moving the C code into a separate compilation unit and making
> > > all the data tables in the generated C non-static.
> > >
> > > 2. Keeping the symbols static by using #included source code and
> > > putting in a comment to better explain this hack?
> >
> > How about putting the source code into another *.c file and
> #include that
> ?
> >
> > I believe that there is something similar in GTK/Glib
> >
>
> Option 6:
>
> Create a include file with a different extension and use it i.e.
>
> #include "ncp2222.inc"
>  - or -
> #include "ncp2222.sup"
>
> The extension can be whatever is acceptable to all.  This will keep
> code out of the .h files and allow you to do what you want.
>
> Will this work and does it cause problems with the make routines ?
>
> >
> > > 3. Moving the C code into the python script as strings and putting it
> > > in the generated C file.
> > >
> > > If people want it another way (that is, other than the current
> > > way, which is #2), I'll change it. In the end it matters little to me.
> > >
> > > --gilbert
> > >
>
>
> Jeff Foster
> jfoste@xxxxxxxxxxxx
>
>
>