Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Indentation in switch()
Home

[Freeciv-Dev] Re: Indentation in switch()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Indentation in switch()
From: "pasky@xxxxxxxxxxx" <dbsmith@xxxxxxxxxxx>
Date: Wednesday, 05 Dec 2001 20:16:26 -500

Originally to: David Bryan Smith

  by provide.net (CommuniGate Pro SMTP 3.5b5)
  with ESMTP id 6257649 for dbsmith@xxxxxxxxxxx; Wed, 05 Dec 2001 14:19:25 -0500
Received: from pi (localhost [127.0.0.1])
        by pi.glockenspiel.complete.org (Postfix) with ESMTP
        id 4C1413B935; Wed,  5 Dec 2001 14:18:11 -0500 (EST)
Received: with LISTAR (v1.0.0; list freeciv-dev); Wed, 05 Dec 2001 14:18:11 
-0500 (EST)
Delivered-To: virtual-freeciv.org-freeciv-dev@xxxxxxxxxxxx
Received: from machine.sinus.cz (pasky.ji.cz [62.44.12.54])
        by pi.glockenspiel.complete.org (Postfix) with SMTP id 3A3213B854
        for <freeciv-dev@xxxxxxxxxxx>; Wed,  5 Dec 2001 14:18:09 -0500 (EST)
Received: (qmail 17376 invoked by uid 2001); 5 Dec 2001 19:18:07 -0000
Date: Wed, 5 Dec 2001 20:18:07 +0100
From: Petr Baudis <pasky@xxxxxxxxxxx>
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx,
        Freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Indentation in switch()
Message-ID: <20011205191807.GM19852@xxxxxxxxxxx>
References: <20011205132609.GG19852@xxxxxxxxxxx> 






05180629.49060.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 






05180629.49060.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
User-Agent: Mutt/1.3.23.2i
X-archive-position: 5092
X-listar-version: Listar v1.0.0
Sender: freeciv-dev-bounce@xxxxxxxxxxx
Errors-To: freeciv-dev-bounce@xxxxxxxxxxx
X-original-sender: pasky@xxxxxxxxxxx
Precedence: bulk
X-list: freeciv-dev

Dear diary, on Wed, Dec 05, 2001 at 07:06:29PM CET, I got a letter,
where Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> told me, that...
>  --- Petr Baudis <pasky@xxxxxxxxxxx> wrote: 
>
> > > > with indent -kr -i2 -cli1
> > -cli2 has desired result it looks.
>
> On my indent it gives:
>
> switch (i) {
>   case 0:
>   break;
>   case 1:
>   {
>     ++i;
>   }
>   default:
>   break;
> }
Sorry, however I just didn't manage to get something like this from indent :).

host@machine:~$ cat switch.c
switch (i) {
case 0:
break;
case 1:
{
  ++i;
}
default:
break;
}
host@machine:~$ indent -kr -i2 -cli2 <switch.c
switch (i) {
  case 0:
    break;
  case 1:
    {
      ++i;
    }
  default:
    break;
}
host@machine:~$ indent --version
GNU indent 2.2.6

--

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC, FreeCiv hacking
.
  "A common mistake that people make, when trying to design
   something completely foolproof is to underestimate the
   ingenuity of complete fools."
     -- Douglas Adams in Mostly Harmless
.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: Indentation in switch(), pasky@xxxxxxxxxxx <=