Re: indent problems

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 05 Jan 2001 21:26:44 +0100

GNU indent 2.1 and later has some issues with long lines..

   When lines become longer then the specified line length,
   GNU `indent' tries to break the line at a logical place.
   This is new as of version 2.1 however and not very
   intelligent or flexible yet.

A workaround is to specify a huge line length (-l100000), or to use a
older version of GNU Indent. The version used on squid-cache.org is
version 1.9.1.

/Henrik

Robert Collins wrote:
>
> I've found with acl.c that running indent produces changes in log debug()() lines - adding CR after CR every time...
> ----- Original Message -----
> From: "Adrian Chadd" <adrian@creative.net.au>
> To: <squid-dev@squid-cache.org>
> Sent: Friday, January 05, 2001 8:44 PM
> Subject: indent problems
>
> >
> > Ok, I'm stumped.
> >
> > I got hit by the "must run indent first!" check duane added.
> > So, I do, on a file (say acl.c..)
> >
> > I end up with most of the file changing.
> >
> > After staring at it for a few minutes I realise that the version
> > of ident might be different. So I get the gindent binary off
> > squid-cache.org (which is 1.9.1), re-run indent on acl.c, and
> > end up with a 4000 line diff fixing up indents.
> >
> > Considering it was "indented" only three days ago, I'm stumped.
> >
> >
> > I've ssh'ed to squid-cache.org and done the commit from there
> > and gindent seems to do the right thing and only give me
> > a small diff.
> >
> > Help? :)
> >
> > This is the script I'm using:
> >
> > #!/bin/sh
> >
> > INDENT="/home/adrian/bin/gindent-1.9.1"
> > INDENTOPTS="-br -ce -i4 -ci4 -l80 -nlp -npcs -npsl -d0 -sc -di0 -psl"
> >
> > if [ "$1" = "" ]; then
> > echo "Need a filename!"
> > exit;
> > fi
> >
> > $INDENT $INDENTOPS $1 $2 $3 $4
> >
> >
> >
> > --
> > Adrian Chadd "Here's five for the cake, and
> > <adrian@creative.net.au> five to buy a clue."
> > - Ryan, Whatever it Takes
> >
Received on Fri Jan 05 2001 - 13:36:30 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:10 MST