Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jan 2001 02:18:14 -0800 (PST)
From:      thz@lennartz-electronic.de
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/24146: indent broken by commit from 09/12/2000
Message-ID:  <200101081018.f08AIEV05738@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         24146
>Category:       bin
>Synopsis:       indent broken by commit from 09/12/2000
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 08 02:20:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Zenker
>Release:        4.2-STABLE
>Organization:
>Environment:
FreeBSD mezcal.tue.le 4.2-STABLE FreeBSD 4.2-STABLE #0: Fri Dec 22 14:39:49 CET 2000     thz@mezcal.tue.le:/usr/obj/usr/src/sys/MEZCAL  i386
>Description:
The commit from 9. dec. 2000 to `indent' broke the formatting of
functions with structure pointer in the prototype.
>How-To-Repeat:
Format the following function with indent after 9. december:

void
foo(struct bar *bar)
{
    return 0;
}

>Fix:
Reinserting of two of lines removed by the commit from 9/12/2000
allows again for a correct formatting of this type of functions.


Index: lexi.c
===================================================================
RCS file: /usr/cvs/FreeBSD/src/usr.bin/indent/lexi.c,v
retrieving revision 1.3.6.1
diff -u -r1.3.6.1 lexi.c
--- lexi.c      2000/12/09 19:05:05     1.3.6.1
+++ lexi.c      2000/12/21 11:54:15
@@ -261,6 +261,8 @@
                return (casestmt);

            case 3:             /* a "struct" */
+               if (ps.p_l_follow)
+                   break;      /* inside parens: cast */
                /*
                 * Next time around, we may want to know that we have had a
                 * 'struct'



>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101081018.f08AIEV05738>