freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Lowden, James K" <LowdenJK AT bernstein.com>
- To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] coding style choices
- Date: Tue, 4 Nov 2003 10:30:48 -0500
> From: ZIGLIO Frediano [mailto:Frediano.Ziglio AT vodafone.com]
> Sent: November 4, 2003 5:16 AM
> > >
> > > > if (cd != (iconv_t)-1)
> > >
> > indent(1) is a tool; I don't want to be a slave to it.
>
> I know but helps my to keep my code in a good state.
> Using many editors (from vim under Linux, anjuta, an older vi under
> HP/UX, Dev/C++, VC6 under windows for testing...) indent help me very
> much.
I guess if we use INVALID_DESCRIPTOR, it won't matter so much how often you
re-indent iconv.c.
> > > > static const iconv_t INVALID_DESCRIPTOR = (iconv_t)-1;
> >
> > I don't foresee any portability problem.
>
> I'm too syntetic... Some (old) compilers allocate space for this
> constant for ever module that declare the constant so I
> prefer #define.
OK, as you like. For the record, I think you're being too stingy. I'd
rather use (what I consider) better form, and let old compilers catch up. I
bet FreeTDS is compiled by gcc 90% of the time.
> > > > /*
> > > > * Multiline comments are formatted like this,
> > > > * and phrased as sentences.
> > > > */
>
> I see.. I'd like also single line comment ( /* comment */ ).
Naturally.
> IMHO you can fill doc/CodingStyle with new comment style.
Good idea. I'll wait a bit in case someone else wants to voice an opinion.
> I'd like to change this stuff before 0.62 cause this code was added
> after 0.61. I don't like lines like
>
> dbc->attr.attr_autocommit = state;
>
> I prefer something like
>
> dbc->attr_autocommit = state;
Oh, my, no, I wouldn't have taken that route. I would use:
dbc->attr.autocommit = state;
As a matter of fact, I'm planning just that for Bill's cursor status
structure (since he was kind enough to fix the bcp structure). See
TDS_CURSOR_STATUS in tds.h. It's not used yet, but it's meant to replace
declare_status
cursor_row_status
open_status
fetch_status
close_status
dealloc_status
in TDS_CURSOR.
Repetitive names nearly always indicate an implicit structure, and implicit
structures are nearly always inferior to explicit ones.
--jkl
-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.
-
[freetds] coding style choices,
James K. Lowden, 11/01/2003
-
[freetds] Max OS X Panther,
John Gilmore-Baldwin, 11/03/2003
-
Re: [freetds] Max OS X Panther (solved?),
John Gilmore-Baldwin, 11/03/2003
- Re: [freetds] Max OS X Panther (solved?), James K. Lowden, 11/03/2003
- Re: [freetds] Max OS X Panther (solved?), Daniel Fazekas, 11/04/2003
- Re: [freetds] Max OS X Panther (solved?), Doug Norton, 11/05/2003
-
Re: [freetds] Max OS X Panther (solved?),
John Gilmore-Baldwin, 11/03/2003
- <Possible follow-up(s)>
- RE: [freetds] coding style choices, ZIGLIO Frediano, 11/03/2003
- RE: [freetds] coding style choices, Lowden, James K, 11/03/2003
- RE: [freetds] coding style choices, ZIGLIO Frediano, 11/04/2003
- RE: [freetds] coding style choices, Lowden, James K, 11/04/2003
- RE: [freetds] coding style choices, ZIGLIO Frediano, 11/04/2003
- RE: [freetds] coding style choices, Lowden, James K, 11/04/2003
-
[freetds] Max OS X Panther,
John Gilmore-Baldwin, 11/03/2003
Archive powered by MHonArc 2.6.24.