Skip to Content.
Sympa Menu

freetds - RE: indent: line length

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: indent: line length
  • Date: Thu, 31 Oct 2002 10:25:53 +0100


> >
> > $ perl -ne'if(s/^(\t+).+\n/$1/){ s/\t/./g; $T{$_}++;}
> > END{foreach (keys %T){
> > print "$_:$T{$_}$/"}}' src/*/*.c |sort
> > .......:5
> > ......:23
> > .....:160
> > ....:646
> > ...:1843
> > ..:3310
> > .:4676
>
> It's been something like 46 hours with no comment on this.
> I'd say no news
> is good news.
>
> Frediano, unless you object, I'd like try a line length of
> 132. Is that
> inconvenient for you? It doesn't have to be so wide: 100
> would do fine. I
> think long function names and long parameter lists frequently lead to
> wrapping if the line length is 80, and that it's better to
> avoid that.
>

I have decided a tabstop of 8 for terminal reason and now we want a line
length of 132 ???
I don't understand...
I know I can reformat for print and I can use editor other than vi (I don't
like a line broken into two line of screen)... so limit of 80 is not
mandatory for me...

> Here's another take on the existing code. Remember life
> before Perl? How
> did we ever get anything done?
>
> $ perl -ne's/\t/12345678/g; $T{10*int(length($_)/10)}++;
> END{foreach (keys
> %T){printf( "%3d - %3d\t%4d$/", $_, (9+$_), $T{$_}) }}'
> src/*/*.c |sort
> 0 - 9 6693
> 10 - 19 3309
> 20 - 29 4259
> 30 - 39 4252
> 40 - 49 3017
> 50 - 59 2625
> 60 - 69 2248
> 70 - 79 1255
> 80 - 89 554
> 90 - 99 267
> 100 - 109 113
> 110 - 119 49
> 120 - 129 29
> 130 - 139 37
> 140 - 149 4
> 150 - 159 6
> 180 - 189 1
>
> Meaning if we don't extend the line length, over 1000 lines
> will have to
> wrapped narrower than they are now. But 77% of the lines
> longer than 80 are
> less than 100. Even so, we're only talking about 5% of the
> nonblank lines.
> (I don't know how to get ncsl (non-commented source lines)).
>
> If my suggestion induces controversy, I'll withdraw it.
> Either way, I think
> we're ready to make Friday the Day of the Wrap. Or the weekend, or
> something.
>

My reply to

if ((ret = tds_process_row_tokens(dbproc->tds_socket, &rowtype
&computeid)) == TDS_SUCCEED) {

is
ret = tds_process_row_tokens(dbproc->tds_socket, &rowtype,
&computeid);
if (ret == TDS_SUCCEED) {

I don't like indenting of many levels... Is best to split in functions (as
Brain state sometimes)

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page