home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.utils.bug
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!blazng.enet.DEc.COM!watt
- From: watt@blazng.enet.DEc.COM (Gill Watt)
- Subject: gnu indent feature (undocumented)
- Message-ID: <9208121435.AA23229@easynet.crl.dec.com>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Wed, 12 Aug 1992 14:35:07 GMT
- Approved: bug-gnu-utils@prep.ai.mit.edu
- Lines: 75
-
- howdy,
-
- I've noticed the following unusually behavior with gnu-indent. It
- has done this in versions 1.4 and 1.5.
-
- The unusual case:
- -----------------------------------------------
-
- void main(int argc, char *argv[])
- {
- switch (argc)
- {
- case 0 :
- printf("hello world");
- break;
- case 1:
- printf("hello world");
- break;
- case 2:
- printf("hello world");
- break;
- case 3:
- printf("hello world");
- break;
- case 4:
- printf("hello world");
- break;
- default:
- break;
- }
- }
-
-
- A very similar case that works correctly:
- -----------------------------------------------
-
- void main(int argc, char *argv[])
- {
-
- printf("goodbye world");
-
- switch (argc)
- {
- case 0:
- printf("hello world");
- break;
- case 1:
- printf("hello world");
- break;
- case 2:
- printf("hello world");
- break;
- case 3:
- printf("hello world");
- break;
- case 4:
- printf("hello world");
- break;
- default:
- break;
- }
- }
-
- I run with the following .indent.pro file:
-
- -bad -bap -bbb -nbc -bl -bli0 -c40 -cd40 -cdb -nce
- -cli4 -cp1 -cs -bs -d0 -di0 -fc1 -fca -i4 -ip6 -l79 -lp -npcs -npsl
- -sc -nsob -nss -ts8 -nv
-
- Great program. Thanks.
-
- -Gill
-
-
-
-