[comp.os.minix] Indent bug.

frank@ladcgw.UUCP (Frank Mayhar) (04/27/89)

A colleague has discovered the following bug in the indent source that was
posted recently.  Given the following input:

void
main(void)
{
    if (c == 0)       /* this is a test */
      {
        putc(c, c);   /* it is only a test */
    }
    exit;
}

And the following .indent.pro file:
-br -c35  -l78 -i4 -bap -ncdb -nfc1 -nsc -ci3 -d0 -di4 -lp -nsob -nce

Indent produces:

void
main(void)
{
    if (c == 0) {	                 /* this is a test */
        putc(c, c);               /* it is only a test */
    }
    exit;
}

That is, the first comment no longer lines up with the second.  Has anyone
else seen this problem, and, if so, do you have a fix?  Please reply directly
to me, as I'm posting this for a friend, and I don't read comp.os.minix myself.
Thanks in advance!
-- 
Frank Mayhar  ..!uunet!ladcgw!frank (soon to be frank@ladc.bull.com)
              Frank-Mayhar%ladc@bco-multics.hbi.honeywell.com (until June 1)
              Bull HN Los Angeles Development Center
              5250 W. Century Blvd., LA, CA  90045  Phone:  (213) 216-6241

hall@cod.NOSC.MIL (Robert R. Hall) (04/30/89)

You didn't mention that .indent.pro in the HOME directory
must have had the preference setting -cd41. 
Fortunately I also had it set in my home directory, and 
thus was able to duplicate the problem.
Given a preference setting -cd41 and -c35, and I also got the
same results using the UNIX indent on a VAX computer, I don't
want to change the MINIX indent port ;-)

  For a fix I suggest you add the preference -cd35 to 
you local .indent.pro or remove the -cd41 in your
HOME direcory .indent.pro

Robert R. Hall
hall@nosc.mil