🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Gill Watt Wed, 12 Aug 1992 14:35
gnu indent feature (undocumented)
#636
Author: Gill Watt
Date: Wed, 12 Aug 1992 14:35
72 lines
1707 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads