freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT schemamania.org>
- To: "TDS Development Group" <freetds AT franklin.metalab.unc.edu>
- Subject: RE: indent: line length
- Date: Sat, 2 Nov 2002 15:19:15 -0500
On Thu, 31 Oct 2002 10:25:53 +0100, ZIGLIO Frediano
<Frediano.Ziglio AT vodafoneomnitel.it> wrote:
> 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...
I'm looking at bcp.c because I'd like freebcp to understand the "-e"
switch. bpc.c v 1.33 doesn't vaguely conform to our standards. It has
some pretty complicated nesting (which I don't see any better way to do),
so as an experiment, I tried indent on it.
It was better, because it K&R'd the braces, putting more code on the
screen. But the code got pretty ugly e.g.,
tds_get_conversion_type(bcpcol->
db_type,
bcpcol->
db_length);
^^^ "t" is in column 80
Using 132, the code looked much more natural. I tried squishing my
tabstop to 3. It made the max line about 90 long, but I couldn't keep
track of the nesting in _bcp_read_hostfile. So I set it back to 8 and
made the window wider. That seems the best solution.
Frediano, I don't what you to switch editors just to work on FreeTDS code.
Can't your terminal convert to 132 columns easily enough? The attached
program emits the correct VT100 escape sequence.
Regards,
--jkl
#include <stdio.h>
main(int argc, char *argv[])
{
char control_sequence[] = " [?3h"; /* set vt100 to 132 columns */
control_sequence[0] = 27; /* 27 is escape */
/* if the program was invoked as "80" , set to 80 columns */
if( strcmp( "80", argv[0]+strlen(argv[0]) -2 ) == 0 )
control_sequence[sizeof(control_sequence)-2] = 'l';
puts (control_sequence);
return 0;
}
-
RE: indent: line length,
James K. Lowden, 11/02/2002
- <Possible follow-up(s)>
- RE: indent: line length, Frediano Ziglio, 11/03/2002
Archive powered by MHonArc 2.6.24.