Skip to Content.
Sympa Menu

freetds - Re: element of style

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Chris Eleveld <ihermit2 AT yahoo.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: element of style
  • Date: Sat, 24 Aug 2002 09:09:54 -0700 (PDT)



I would personally reccomend keepign the strange
decimal numbers as we may need to change the hex
numbers based on the endianness of the platform we are
building on.

--- Brian Bruns <camber AT ais.org> wrote:
> On 24 Aug 2002, Frediano Ziglio wrote:
>
> > Il sab, 2002-08-24 alle 09:09, James K.Lowden ha
> scritto:
> > > Contributors,
> > >
> > > There are several places in e.g. tds/convert.c
> that use comparisons to
> > > very strange decimal numbers. I'd like to see
> us use hex instead, when
> > > we're looking for overflow conditions and such.
>
> >
> > Sound right..
> > Perhaps should best to add a CodingStyle document
> to FreeTDS...
>
> http://www.freetds.org/CodingStyle
>
> Addtions and corrections are welcome.
>
> > I know that { should be placed after
> while/if/switch/for (exception for
> > functions/struct). But case should be indented
> from switch or not?
> > Should we use tab or space (how many?) to indent?
> >
>
> > INT_16_MAX is quite different from INT_MAX. We
> don't know INT_MAX in
> > every platform but INT_16_MAX is always 0x8000...
> > The only problem should be INT_64_MAX... is
> 0x8000000000000000l or
> > 0x8000000000000000ll or 0x8000000000000000i64 ?
> > There are some defines in inttypes.h to handle
> this stuff...
> > Perhaps is better to define because is easy to
> forgot a zero...
>
> inttypes.h is not extremely portable. We should
> handle this in autoconf
> or simply assign the values once in tds.h
>
> > > because by relying on the system header files,
> we avoid bumping into
> > > compiler corner cases, valid expressions that
> some compilers will fail to
> > > comprehend.
> > >
> > > --jkl
> > >
> > freddy77
> >
>
>
> ---
> You are currently subscribed to freetds as:
> [ihermit2 AT yahoo.com]
> To unsubscribe, forward this message to
$subst('Email.Unsub')


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com




Archive powered by MHonArc 2.6.24.

Top of Page