Skip to Content.
Sympa Menu

freetds - RE: indent: line length

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: indent: line length
  • Date: Wed, 30 Oct 2002 15:48:13 -0500


> From: Lowden, James K [mailto:LowdenJK AT bernstein.com]
> Sent: October 28, 2002 3:49 PM
>
> $ 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.

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.

--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.






Archive powered by MHonArc 2.6.24.

Top of Page