home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / utils / bug / 1365 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.6 KB  |  88 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!blazng.enet.DEc.COM!watt
  3. From: watt@blazng.enet.DEc.COM (Gill Watt)
  4. Subject: gnu indent feature (undocumented)
  5. Message-ID: <9208121435.AA23229@easynet.crl.dec.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Wed, 12 Aug 1992 14:35:07 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 75
  12.  
  13. howdy,
  14.  
  15. I've noticed the following unusually behavior with gnu-indent.  It
  16. has done this in versions 1.4 and 1.5.
  17.  
  18. The unusual case:
  19. -----------------------------------------------
  20.  
  21. void main(int argc, char *argv[])
  22. {
  23.     switch (argc)
  24.     {
  25.         case 0 :
  26.         printf("hello world");
  27.         break;
  28.     case 1:
  29.         printf("hello world");
  30.         break;
  31.     case 2:
  32.         printf("hello world");
  33.         break;
  34.     case 3:
  35.         printf("hello world");
  36.         break;
  37.     case 4:
  38.         printf("hello world");
  39.         break;
  40.     default:
  41.         break;
  42.     }
  43. }
  44.  
  45.  
  46. A very similar case that works correctly:
  47. -----------------------------------------------
  48.  
  49. void main(int argc, char *argv[])
  50. {
  51.  
  52.     printf("goodbye world");
  53.  
  54.     switch (argc)
  55.     {
  56.     case 0:
  57.         printf("hello world");
  58.         break;
  59.     case 1:
  60.         printf("hello world");
  61.         break;
  62.     case 2:
  63.         printf("hello world");
  64.         break;
  65.     case 3:
  66.         printf("hello world");
  67.         break;
  68.     case 4:
  69.         printf("hello world");
  70.         break;
  71.     default:
  72.         break;
  73.     }
  74. }
  75.  
  76. I run with the following .indent.pro file:
  77.  
  78.  -bad -bap -bbb -nbc -bl -bli0 -c40 -cd40 -cdb -nce 
  79.  -cli4 -cp1 -cs -bs -d0 -di0 -fc1 -fca -i4 -ip6 -l79 -lp -npcs -npsl 
  80.  -sc -nsob -nss -ts8 -nv
  81.  
  82. Great program.  Thanks.
  83.  
  84. -Gill
  85.  
  86.  
  87.  
  88.