NetBSD Problem Report #16451

Received: (qmail 27877 invoked from network); 22 Apr 2002 20:17:31 -0000
Message-Id: <20020422201754.0BF7C1112D@www.netbsd.org>
Date: Mon, 22 Apr 2002 13:17:54 -0700 (PDT)
From: wrstuden@netbsd.org
Sender: nobody@netbsd.org
Reply-To: wrstuden@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: indent doesn't grok // comments
X-Send-Pr-Version: www-1.0

>Number:         16451
>Category:       misc
>Synopsis:       indent doesn't grok // comments
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 22 20:18:00 +0000 2002
>Closed-Date:    
>Last-Modified:  Sun Nov 15 01:38:43 +0000 2009
>Originator:     Bill Studenmund
>Release:        -current, 1.5ZC
>Organization:
>Environment:
Athlon 1600 running -current w/ nathanw_sa installed
>Description:
Start with code like:

        // Now itterate

        if ( x < 100000000 ) {
                x++;
                if ((x % 10000000) == 0)
                        printf("Iteration %d\n", x);
                ret = setcontext(&u);
                if (ret) /* Or we wouldn't be here! */
                        perror("setcontext");
        }

run indent, and get:

        //Now itterate

            if (x < 100000000) {
                x++;
                if ((x % 10000000) == 0)
                        printf("Iteration %d\n", x);
                ret = setcontext(&u);
                if (ret)        /* Or we wouldn't be here! */
                        perror("setcontext");
        }

>How-To-Repeat:
See above
>Fix:
gindent is a workaround. Not sure of how to fix or I would have. :-)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: mschuett@NetBSD.org
State-Changed-When: Sun, 18 Jan 2009 12:33:12 +0000
State-Changed-Why:
Is this still a problem. It seems to work on 4.0-stable and -current.


State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 15 Nov 2009 01:38:43 +0000
State-Changed-Why:
yes, it's still a problem; read the code in -current and find it doesn't
know anything about // comments.

also, try asking it to format something like

    // suck :-(
    suck();


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.