bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-indent] more on k&r mode, v2.2.6 & v2.2.7


From: Carlo Wood
Subject: Re: [Bug-indent] more on k&r mode, v2.2.6 & v2.2.7
Date: Mon, 24 Dec 2001 02:27:57 +0100
User-agent: Mutt/1.2.5i

Also works fine:

~/c/indent>./indent -kr -st -TLinkedList LinkedList.h
// -*- C++ -*-

/**
 * WordInfo.h
 *
 * Description: declaration of a class which preserves information about
 * words recognized by the speech engine.
 *
 * Copyright (c) 2001, Deborah Kaplan and Jessica Perry Hekman
 * See the LICENSE file. All rights not granted therein are reserved.
 *
 * @author Deborah Kaplan
 * @author Jessica Perry Hekman
 * $Revision: 1.1 $
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

/*
 * LinkedList is a class for maintaining a doubly-linked list.
*/

#include <stddef.h>

class LinkedList
{
  public:

    // constructor
    LinkedList ();

    // destructor
    ~LinkedList ();

    LinkedList *getNext()
    {
        return (_next);
    }

    LinkedList *getPrev()
    {
        return (_prev);
    }

    void setNext(LinkedList *next)
    {
        _next = next;
    }

    void setPrev(LinkedList *prev)
    {
        _prev = prev;
    }

    void remove();

    /* Adds a new item along the "next" axis: it is a newer thing */
    void append(LinkedList *newList)
    {
        setNext(newList);
        newList->setPrev(this);
    }

    /* Remove all objects after this one along the "prev" axis */
    int deleteOlderObjects();

  private:

    LinkedList *_next;
    LinkedList *_prev;

};

-- 
Carlo Wood <address@hidden>

PS  Please note that GNU indent does not support C++.
PS2 Note that I am NOT the maintainer anymore, I just can help
    being sarcastic sometimes here (now I don't have
    responsibility anymore heheh).  My real point is that
    your bug report is meaningless / not useful when you
    don't provide the command line parameters (and .indent.pro).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]