Changeset 181148 in git


Ignore:
Timestamp:
May 15, 2006, 11:03:07 AM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd25190065115c859833252500a64cfb7b11e3a50')
Children:
f0daaa2ae00a1c211020bcbe4eca9c6fe7947a71
Parents:
1dc6163f5dbd22ee9839decb93a02494ac071aca
Message:
*hannes: ISTREAM, OSTREAM, CERR


git-svn-id: file:///usr/local/Singular/svn/trunk@9135 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
factory
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • factory/bifac.cc

    r1dc616 r181148  
    7979  }
    8080#ifndef NOSTREAMIO
    81   friend ostream & operator<< ( ostream & s, const PolyVector& V ){
     81  friend OSTREAM & operator<< ( OSTREAM & s, const PolyVector& V ){
    8282    for (int i=0;i<=V.m;i++)
    8383    {
  • factory/canonicalform.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: canonicalform.cc,v 1.39 2005-12-12 12:17:35 Singular Exp $ */
     2/* $Id: canonicalform.cc,v 1.40 2006-05-15 09:03:04 Singular Exp $ */
    33
    44#include <config.h>
     
    2121
    2222#ifndef NOSTREAMIO
    23 CanonicalForm readCF( istream& );
     23CanonicalForm readCF( ISTREAM& );
    2424#endif /* NOSTREAMIO */
    2525
     
    16151615#ifndef NOSTREAMIO
    16161616void
    1617 CanonicalForm::print( ostream & os, char * str ) const
     1617CanonicalForm::print( OSTREAM & os, char * str ) const
    16181618{
    16191619    if ( is_imm( value ) )
     
    16241624
    16251625void
    1626 CanonicalForm::print( ostream & os ) const
     1626CanonicalForm::print( OSTREAM & os ) const
    16271627{
    16281628    if ( is_imm( value ) )
     
    16321632}
    16331633
    1634 ostream&
    1635 operator << ( ostream & os, const CanonicalForm & cf )
     1634OSTREAM&
     1635operator << ( OSTREAM & os, const CanonicalForm & cf )
    16361636{
    16371637    cf.print( os, "" );
     
    16391639}
    16401640
    1641 istream&
    1642 operator >> ( istream & is, CanonicalForm & cf )
     1641ISTREAM&
     1642operator >> ( ISTREAM & is, CanonicalForm & cf )
    16431643{
    16441644#ifndef SINGULAR
  • factory/canonicalform.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: canonicalform.h,v 1.31 2006-05-15 08:17:49 Singular Exp $ */
     2/* $Id: canonicalform.h,v 1.32 2006-05-15 09:03:04 Singular Exp $ */
    33
    44#ifndef INCL_CANONICALFORM_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
     13#define ISTREAM std::istream
    1214#elif defined(HAVE_IOSTREAM_H)
    1315#include <iostream.h>
     16#define OSTREAM ostream
     17#define ISTREAM istream
    1418#endif
    1519#endif /* NOSTREAMIO */
     
    158162    // input/output
    159163#ifndef NOSTREAMIO
    160     void print( ostream&, char * ) const;
    161     void print( ostream& ) const;
    162     friend ostream& operator << ( ostream&, const CanonicalForm& );
    163     friend istream& operator >> ( istream&, CanonicalForm& );
     164    void print( OSTREAM&, char * ) const;
     165    void print( OSTREAM& ) const;
     166    friend OSTREAM& operator << ( OSTREAM&, const CanonicalForm& );
     167    friend ISTREAM& operator >> ( ISTREAM&, CanonicalForm& );
    164168#endif /* NOSTREAMIO */
    165169
  • factory/cf_eval.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_eval.cc,v 1.5 2000-05-29 15:05:20 Singular Exp $ */
     2/* $Id: cf_eval.cc,v 1.6 2006-05-15 09:03:04 Singular Exp $ */
    33
    44#include <config.h>
     
    4848
    4949#ifndef NOSTREAMIO
    50 ostream&
    51 operator<< ( ostream& s, const Evaluation &e )
     50OSTREAM&
     51operator<< ( OSTREAM& s, const Evaluation &e )
    5252{
    5353    e.values.print(s);
  • factory/cf_eval.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_eval.h,v 1.4 2006-05-15 08:17:50 Singular Exp $ */
     2/* $Id: cf_eval.h,v 1.5 2006-05-15 09:03:04 Singular Exp $ */
    33
    44#ifndef INCL_CF_EVAL_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    3739    virtual void nextpoint();
    3840#ifndef NOSTREAMIO
    39     friend ostream& operator<< ( ostream& s, const Evaluation &e );
     41    friend OSTREAM& operator<< ( OSTREAM& s, const Evaluation &e );
    4042#endif /* NOSTREAMIO */
    4143};
  • factory/cf_map.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_map.cc,v 1.13 2006-01-31 09:40:48 pohl Exp $ */
     2/* $Id: cf_map.cc,v 1.14 2006-05-15 09:03:04 Singular Exp $ */
    33
    44//{{{ docu
     
    3535
    3636#ifndef NOSTREAMIO
    37 //{{{ ostream & operator << ( ostream & s, const MapPair & p )
     37//{{{ OSTREAM & operator << ( OSTREAM & s, const MapPair & p )
    3838//{{{ docu
    3939//
     
    4141//
    4242//}}}
    43 ostream &
    44 operator << ( ostream & s, const MapPair & p )
     43OSTREAM &
     44operator << ( OSTREAM & s, const MapPair & p )
    4545{
    4646    s << p.var() << " -> " << p.subst();
     
    4949//}}}
    5050
    51 void MapPair::print( ostream&) const
     51void MapPair::print( OSTREAM&) const
    5252{
    5353}
     
    198198
    199199#ifndef NOSTREAMIO
    200 //{{{ ostream & operator << ( ostream & s, const CFMap & m )
     200//{{{ OSTREAM & operator << ( OSTREAM & s, const CFMap & m )
    201201//{{{ docu
    202202//
     
    204204//
    205205//}}}
    206 ostream &
    207 operator << ( ostream & s, const CFMap & m )
     206OSTREAM &
     207operator << ( OSTREAM & s, const CFMap & m )
    208208{
    209209    m.P.print(s);
  • factory/cf_map.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_map.h,v 1.13 2006-05-15 08:17:50 Singular Exp $ */
     2/* $Id: cf_map.h,v 1.14 2006-05-15 09:03:04 Singular Exp $ */
    33
    44#ifndef INCL_CF_MAP_H
     
    1616#ifdef HAVE_IOSTREAM
    1717#include <iostream>
     18#define OSTREAM std::ostream
    1819#elif defined(HAVE_IOSTREAM_H)
    1920#include <iostream.h>
     21#define OSTREAM ostream
    2022#endif
    2123#endif /* NOSTREAMIO */
     
    6062    CanonicalForm subst () const { return S; }
    6163#ifndef NOSTREAMIO
    62     void print( ostream&) const;
    63     friend ostream & operator << ( ostream & s, const MapPair & p );
     64    void print( OSTREAM&) const;
     65    friend OSTREAM & operator << ( OSTREAM & s, const MapPair & p );
    6466#endif /* NOSTREAMIO */
    6567};
     
    99101  CanonicalForm operator () ( const CanonicalForm & f ) const;
    100102#ifndef NOSTREAMIO
    101   friend ostream & operator << ( ostream & s, const CFMap & m );
     103  friend OSTREAM & operator << ( OSTREAM & s, const CFMap & m );
    102104#endif /* NOSTREAMIO */
    103105};
  • factory/fac_iterfor.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_iterfor.cc,v 1.5 1997-12-08 18:24:31 schmidt Exp $ */
     2/* $Id: fac_iterfor.cc,v 1.6 2006-05-15 09:03:04 Singular Exp $ */
    33
    44#include <config.h>
     
    9898
    9999#ifndef NOSTREAMIO
    100 ostream& operator<< ( ostream& os, const IteratedFor & I )
     100OSTREAM& operator<< ( OSTREAM& os, const IteratedFor & I )
    101101{
    102102    os << "( " << I[I.from()];
  • factory/fac_iterfor.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_iterfor.h,v 1.5 2006-05-15 08:17:52 Singular Exp $ */
     2/* $Id: fac_iterfor.h,v 1.6 2006-05-15 09:03:04 Singular Exp $ */
    33
    44#ifndef INCL_FAC_ITERFOR_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    4345
    4446#ifndef NOSTREAMIO
    45 ostream& operator<< ( ostream &, const IteratedFor & );
     47OSTREAM& operator<< ( OSTREAM &, const IteratedFor & );
    4648#endif /* NOSTREAMIO */
    4749
  • factory/factory.template

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: factory.template,v 1.17 2006-01-05 13:38:18 Singular Exp $ */
     2/* $Id: factory.template,v 1.18 2006-05-15 09:03:04 Singular Exp $ */
    33
    44#ifndef INCL_FACTORY_H
     
    2525
    2626#ifndef NOSTREAMIO
     27#ifdef HAVE_IOSTREAM
     28#include <iostream>
     29#define OSTREAM std::ostream
     30#define ISTREAM std::istream
     31#elif defined(HAVE_IOSTREAM_H)
    2732#include <iostream.h>
     33#define OSTREAM ostream
     34#define ISTREAM istream
     35#endif
    2836#endif /* ! NOSTREAMIO */
    2937
  • factory/ftmpl_inst.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_inst.cc,v 1.9 1998-06-30 16:25:47 schmidt Exp $ */
     2/* $Id: ftmpl_inst.cc,v 1.10 2006-05-15 09:03:05 Singular Exp $ */
    33
    44//{{{ docu
     
    5050//{{{ explicit template function instantiations
    5151#ifndef NOSTREAMIO
    52 template ostream & operator << ( ostream &, const List<CanonicalForm> & );
    53 template ostream & operator << ( ostream &, const List<CFFactor> & );
    54 template ostream & operator << ( ostream &, const List<MapPair> & );
    55 template ostream & operator << ( ostream &, const Array<CanonicalForm> & );
    56 template ostream & operator << ( ostream &, const Factor<CanonicalForm> & );
    57 template ostream & operator << ( ostream &, const Matrix<CanonicalForm> & );
    58 template ostream & operator << ( ostream &, const Array<REvaluation> & );
     52template OSTREAM & operator << ( OSTREAM &, const List<CanonicalForm> & );
     53template OSTREAM & operator << ( OSTREAM &, const List<CFFactor> & );
     54template OSTREAM & operator << ( OSTREAM &, const List<MapPair> & );
     55template OSTREAM & operator << ( OSTREAM &, const Array<CanonicalForm> & );
     56template OSTREAM & operator << ( OSTREAM &, const Factor<CanonicalForm> & );
     57template OSTREAM & operator << ( OSTREAM &, const Matrix<CanonicalForm> & );
     58template OSTREAM & operator << ( OSTREAM &, const Array<REvaluation> & );
    5959#endif /* NOSTREAMIO */
    6060
  • factory/ftmpl_list.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_list.h,v 1.1 1998-03-10 14:43:26 schmidt Exp $ */
     2/* $Id: ftmpl_list.h,v 1.2 2006-05-15 09:03:05 Singular Exp $ */
    33
    44#ifndef INCL_LIST_H
     5#define INCL_LIST_H
    56
    6 //{{{ docu
    7 //
    8 // ftmpl_list.h - wrapper for `templates/ftmpl_list.h'.
    9 //
    10 // This file exists for convenience only.
    11 //
    12 // `INCL_LIST_H' is defined in `templates/ftmpl_list.h'.
    13 //
    14 //}}}
     7#include <factoryconf.h>
    158
    16 #ifdef macintosh
    17 #include <:templates:ftmpl_list.h>
    18 #else
    19 #include "templates/ftmpl_list.h"
     9#ifndef NOSTREAMIO
     10#ifdef HAVE_IOSTREAM
     11#include <iostream>
     12#define OSTREAM std::ostream
     13#elif defined(HAVE_IOSTREAM_H)
     14#include <iostream.h>
     15#define OSTREAM ostream
     16#endif
     17#endif /* NOSTREAMIO */
     18
     19template <class T>
     20class ListIterator;
     21
     22template <class T>
     23class List;
     24
     25#ifndef NOSTREAMIO
     26template <class T>
     27OSTREAM& operator<< ( OSTREAM &, const List<T> &);
    2028#endif
    2129
     30template <class T>
     31class ListItem
     32{
     33private:
     34    ListItem * next;
     35    ListItem * prev;
     36    T * item;
     37public:
     38    ListItem( const ListItem<T>& );
     39    ListItem( const T&, ListItem<T>*, ListItem<T>* );
     40    ListItem( T* , ListItem<T>* , ListItem<T>* );
     41    ~ListItem();
     42    ListItem<T>& operator= ( const ListItem<T>& );
     43    ListItem<T>* getNext();
     44    ListItem<T>* getPrev();
     45    T& getItem();
     46#ifndef NOSTREAMIO
     47    void print ( OSTREAM& );
     48#endif /* NOSTREAMIO */
     49    friend class ListIterator<T>;
     50    friend class List<T>;
     51};
     52
     53template <class T>
     54class List
     55{
     56private:
     57    ListItem<T> *first;
     58    ListItem<T> *last;
     59    int _length;
     60public:
     61    List();
     62    List( const List<T>& );
     63    List( const T& );
     64    ~List();
     65    List<T>& operator= ( const List<T>& );
     66    void insert ( const T& );
     67    void insert ( const T&, int (*cmpf)( const T&, const T& ) );
     68    void insert ( const T&, int (*cmpf)( const T&, const T& ), void (*insf)( T&, const T& ) );
     69    void append ( const T& );
     70    int isEmpty() const;
     71    int length() const;
     72    T getFirst() const;
     73    void removeFirst();
     74    T getLast() const;
     75    void removeLast();
     76    void sort ( int (*) ( const T&, const T& ) );
     77#ifndef NOSTREAMIO
     78    void print ( OSTREAM & ) const;
     79    friend OSTREAM& operator<< <T>( OSTREAM & os, const List<T> & l );
     80#endif /* NOSTREAMIO */
     81    friend class ListIterator<T>;
     82};
     83
     84#ifndef NOSTREAMIO
     85template <class T>
     86OSTREAM& operator<< ( OSTREAM & os, const List<T> & l );
     87#endif /* NOSTREAMIO */
     88
     89template <class T>
     90class ListIterator {
     91private:
     92    List<T> *theList;
     93    ListItem<T> *current;
     94public:
     95    ListIterator();
     96    ListIterator( const ListIterator<T>& );
     97    ListIterator( const List<T>& );
     98    ~ListIterator();
     99    ListIterator<T>& operator = ( const ListIterator<T>& );
     100    ListIterator<T>& operator = ( const List<T>& );
     101    T& getItem() const;
     102    int hasItem();
     103    void operator++();
     104    void operator--();
     105    void operator++( int );
     106    void operator--( int );
     107    void firstItem();
     108    void lastItem();
     109    void insert( const T& );
     110    void append( const T& );
     111    void remove( int moveright );
     112};
     113
     114template <class T>
     115List<T> Union ( const List<T>&, const List<T>& );
     116
     117template <class T>
     118List<T> Difference ( const List<T>&, const List<T>& );
     119
     120template <class T>
     121List<T> Union ( const List<T>&, const List<T>&, int (*cmpf)( const T&, const T& ), void (*insf)( T&, const T& ) );
     122
     123template <class T>
     124T prod ( const List<T>& );
     125
    22126#endif /* ! INCL_LIST_H */
  • factory/ftmpl_matrix.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_matrix.h,v 1.3 2006-05-15 08:17:53 Singular Exp $ */
     2/* $Id: ftmpl_matrix.h,v 1.4 2006-05-15 09:03:05 Singular Exp $ */
    33
    44#ifndef INCL_MATRIX_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    2325#ifndef NOSTREAMIO
    2426template <class T>
    25 ostream& operator<< (ostream &, const Matrix<T> &);
     27OSTREAM& operator<< (OSTREAM &, const Matrix<T> &);
    2628#endif
    2729
     
    3335    T ** elems;
    3436#ifndef NOSTREAMIO
    35     void printrow ( ostream & s, int i ) const;
     37    void printrow ( OSTREAM & s, int i ) const;
    3638#endif /* NOSTREAMIO */
    3739    typedef T* T_ptr;
     
    5355    void swapColumn( int i, int j );
    5456#ifndef NOSTREAMIO
    55     void print( ostream& s ) const;
    56     friend ostream & operator<< <T>( ostream & s, const Matrix<T>& M );
     57    void print( OSTREAM& s ) const;
     58    friend OSTREAM & operator<< <T>( OSTREAM & s, const Matrix<T>& M );
    5759#endif /* NOSTREAMIO */
    5860    friend class SubMatrix<T>;
     
    8991#ifndef NOSTREAMIO
    9092template <class T>
    91 ostream & operator<< ( ostream & s, const Matrix<T>& M );
     93OSTREAM & operator<< ( OSTREAM & s, const Matrix<T>& M );
    9294#endif /* NOSTREAMIO */
    9395
  • factory/gfops.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: gfops.h,v 1.7 2006-05-15 08:17:53 Singular Exp $ */
     2/* $Id: gfops.h,v 1.8 2006-05-15 09:03:05 Singular Exp $ */
    33
    44#ifndef INCL_GFOPS_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    159161//{{{ input/output
    160162#ifndef NOSTREAMIO
    161 inline void gf_print ( ostream & os, int a )
     163inline void gf_print ( OSTREAM & os, int a )
    162164{
    163165    if ( a == gf_q )
  • factory/imm.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: imm.h,v 1.21 2006-05-15 08:17:53 Singular Exp $ */
     2/* $Id: imm.h,v 1.22 2006-05-15 09:03:05 Singular Exp $ */
    33
    44#ifndef INCL_IMM_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    424426//{{{ input/output
    425427#ifndef NOSTREAMIO
    426 inline void imm_print ( ostream & os, const InternalCF * const op, const char * const str )
     428inline void imm_print ( OSTREAM & os, const InternalCF * const op, const char * const str )
    427429{
    428430    if ( is_imm( op ) == FFMARK )
  • factory/int_cf.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_cf.h,v 1.11 2006-05-15 08:17:54 Singular Exp $ */
     2/* $Id: int_cf.h,v 1.12 2006-05-15 09:03:05 Singular Exp $ */
    33
    44#ifndef INCL_INT_CF_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    4749    virtual Variable variable() const { return Variable(); }
    4850#ifndef NOSTREAMIO
    49     virtual void print( ostream&, char* ) PVIRT_VOID("print");
     51    virtual void print( OSTREAM&, char* ) PVIRT_VOID("print");
    5052#endif /* NOSTREAMIO */
    5153    virtual bool inBaseDomain() const { return true; }
  • factory/int_int.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_int.cc,v 1.17 2003-10-15 17:19:40 Singular Exp $ */
     2/* $Id: int_int.cc,v 1.18 2006-05-15 09:03:06 Singular Exp $ */
    33
    44#include <config.h>
     
    4545
    4646#ifndef NOSTREAMIO
    47 void InternalInteger::print( ostream & os, char * c )
     47void InternalInteger::print( OSTREAM & os, char * c )
    4848{
    4949    if ( *c == '*' && mpz_cmp_si( &thempi, 1 ) == 0 )
  • factory/int_int.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_int.h,v 1.13 2006-05-15 08:17:54 Singular Exp $ */
     2/* $Id: int_int.h,v 1.14 2006-05-15 09:03:06 Singular Exp $ */
    33
    44#ifndef INCL_INT_INT_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    7375    const char * const classname() const { return "InternalInteger"; }
    7476#ifndef NOSTREAMIO
    75     void print( ostream&, char* );
     77    void print( OSTREAM&, char* );
    7678#endif /* NOSTREAMIO */
    7779    InternalCF* genZero();
  • factory/int_poly.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_poly.cc,v 1.17 2006-04-21 15:37:10 Singular Exp $ */
     2/* $Id: int_poly.cc,v 1.18 2006-05-15 09:03:06 Singular Exp $ */
    33
    44#include <config.h>
     
    169169#ifndef NOSTREAMIO
    170170void
    171 InternalPoly::print(ostream &aStream, char * aString )
     171InternalPoly::print(OSTREAM &aStream, char * aString )
    172172{
    173173    if ( ! firstTerm )
  • factory/int_poly.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_poly.h,v 1.9 2006-05-15 08:17:54 Singular Exp $ */
     2/* $Id: int_poly.h,v 1.10 2006-05-15 09:03:06 Singular Exp $ */
    33
    44#ifndef INCL_INT_POLY_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    9597    CanonicalForm coeff( int i );
    9698#ifndef NOSTREAMIO
    97     void print( ostream&, char* );
     99    void print( OSTREAM&, char* );
    98100#endif /* NOSTREAMIO */
    99101    bool inBaseDomain() const { return false; }
  • factory/int_pp.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_pp.cc,v 1.10 2003-10-15 17:19:41 Singular Exp $ */
     2/* $Id: int_pp.cc,v 1.11 2006-05-15 09:03:06 Singular Exp $ */
    33
    44#include <config.h>
     
    110110
    111111#ifndef NOSTREAMIO
    112 void InternalPrimePower::print( ostream & os, char * c )
     112void InternalPrimePower::print( OSTREAM & os, char * c )
    113113{
    114114    if ( *c == '*' && mpz_cmp_si( &thempi, 1 ) == 0 )
  • factory/int_pp.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_pp.h,v 1.5 2006-05-15 08:17:54 Singular Exp $ */
     2/* $Id: int_pp.h,v 1.6 2006-05-15 09:03:06 Singular Exp $ */
    33
    44#ifndef INCL_INT_PP_H
     
    1212#ifdef HAVE_IOSTREAM
    1313#include <iostream>
     14#define OSTREAM std::ostream
    1415#elif defined(HAVE_IOSTREAM_H)
    1516#include <iostream.h>
     17#define OSTREAM ostream
    1618#endif
    1719#endif /* NOSTREAMIO */
     
    4648    const char * const classname() const { return "InternalPrimePower"; }
    4749#ifndef NOSTREAMIO
    48     void print( ostream&, char* );
     50    void print( OSTREAM&, char* );
    4951#endif /* NOSTREAMIO */
    5052    bool isZero() const;
  • factory/int_rat.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_rat.cc,v 1.12 1999-09-24 08:43:29 Singular Exp $ */
     2/* $Id: int_rat.cc,v 1.13 2006-05-15 09:03:06 Singular Exp $ */
    33
    44#include <config.h>
     
    9595
    9696#ifndef NOSTREAMIO
    97 void InternalRational::print( ostream & os, char * c )
     97void InternalRational::print( OSTREAM & os, char * c )
    9898{
    9999    char * str = new char[mpz_sizeinbase( &_num, 10 ) + 2];
  • factory/int_rat.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: int_rat.h,v 1.7 2006-05-15 08:17:55 Singular Exp $ */
     2/* $Id: int_rat.h,v 1.8 2006-05-15 09:03:06 Singular Exp $ */
    33
    44#ifndef INCL_INT_RAT_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    4749    const char * const classname() const { return "InternalRational"; }
    4850#ifndef NOSTREAMIO
    49     void print( ostream&, char* );
     51    void print( OSTREAM&, char* );
    5052#endif /* NOSTREAMIO */
    5153    InternalCF* genZero();
  • factory/readcf.cc

    r1dc616 r181148  
    1 
    2 /*  A Bison parser, made from readcf.y
    3     by GNU Bison version 1.28  */
    4 
    5 #define YYBISON 1  /* Identify Bison output.  */
    6 
    7 #define NUM     257
    8 #define NEG     258
    9 
     1/* A Bison parser, made by GNU Bison 2.1.  */
     2
     3/* Skeleton parser for Yacc-like parsing with Bison,
     4   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   This program is distributed in the hope that it will be useful,
     12   but WITHOUT ANY WARRANTY; without even the implied warranty of
     13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14   GNU General Public License for more details.
     15
     16   You should have received a copy of the GNU General Public License
     17   along with this program; if not, write to the Free Software
     18   Foundation, Inc., 51 Franklin Street, Fifth Floor,
     19   Boston, MA 02110-1301, USA.  */
     20
     21/* As a special exception, when this file is copied by Bison into a
     22   Bison output file, you may use that output file without restriction.
     23   This special exception was added by the Free Software Foundation
     24   in version 1.24 of Bison.  */
     25
     26/* Written by Richard Stallman by simplifying the original so called
     27   ``semantic'' parser.  */
     28
     29/* All symbols defined below should begin with yy or YY, to avoid
     30   infringing on user name space.  This should be done even for local
     31   variables, as they might otherwise be expanded by user macros.
     32   There are some unavoidable exceptions within include files to
     33   define necessary library symbols; they are noted "INFRINGES ON
     34   USER NAME SPACE" below.  */
     35
     36/* Identify Bison output.  */
     37#define YYBISON 1
     38
     39/* Bison version.  */
     40#define YYBISON_VERSION "2.1"
     41
     42/* Skeleton name.  */
     43#define YYSKELETON_NAME "yacc.c"
     44
     45/* Pure parsers.  */
     46#define YYPURE 0
     47
     48/* Using locations.  */
     49#define YYLSP_NEEDED 0
     50
     51
     52
     53/* Tokens.  */
     54#ifndef YYTOKENTYPE
     55# define YYTOKENTYPE
     56   /* Put the tokens into the symbol table, so that GDB and other debuggers
     57      know about them.  */
     58   enum yytokentype {
     59     NUM = 258,
     60     NEG = 259
     61   };
     62#endif
     63/* Tokens.  */
     64#define NUM 258
     65#define NEG 259
     66
     67
     68
     69
     70/* Copy the first part of user declarations.  */
    1071#line 4 "readcf.y"
    1172
     
    2283#ifdef HAVE_IOSTREAM
    2384#include <iostream>
     85#define ISTREAM std::istream
     86#define CERR std::cerr
    2487#elif defined(HAVE_IOSTREAM_H)
    2588#include <iostream.h>
     89#define ISTREAM istream
     90#define CERR cerr
    2691#endif
    2792
     
    42107#endif
    43108
    44 static char* readString( istream& );
     109static char* readString( ISTREAM& );
    45110
    46111#ifndef BISONPP
     
    49114#endif
    50115
    51 static istream * defaultin = 0;
     116static ISTREAM * defaultin = 0;
    52117
    53118static CanonicalForm * retvalue = 0;
    54119
    55 #ifndef YYSTYPE
    56 #define YYSTYPE int
    57 #endif
    58 #include <stdio.h>
    59 
    60 #ifndef __cplusplus
    61 #ifndef __STDC__
    62 #define const
    63 #endif
    64 #endif
    65 
    66 
    67 
    68 #define YYFINAL         25
    69 #define YYFLAG          -32768
    70 #define YYNTBASE        13
    71 
    72 #define YYTRANSLATE(x) ((unsigned)(x) <= 258 ? yytranslate[x] : 16)
    73 
    74 static const char yytranslate[] = {     0,
    75      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    76      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    77      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    78      2,     2,     2,     2,     2,     2,     2,     2,     2,    11,
    79     12,     6,     5,     2,     4,     2,     7,     2,     2,     2,
    80      2,     2,     2,     2,     2,     2,     2,     2,    10,     2,
    81      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    82      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    83      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    84      2,     2,     2,     9,     2,     2,     2,     2,     2,     2,
    85      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    86      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    87      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    88      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    89      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    90      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    91      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    92      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    93      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    94      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    95      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    96      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    97      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    98      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    99      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    100      2,     2,     2,     2,     2,     1,     3,     8
     120
     121
     122/* Enabling traces.  */
     123#ifndef YYDEBUG
     124# define YYDEBUG 0
     125#endif
     126
     127/* Enabling verbose error messages.  */
     128#ifdef YYERROR_VERBOSE
     129# undef YYERROR_VERBOSE
     130# define YYERROR_VERBOSE 1
     131#else
     132# define YYERROR_VERBOSE 0
     133#endif
     134
     135/* Enabling the token table.  */
     136#ifndef YYTOKEN_TABLE
     137# define YYTOKEN_TABLE 0
     138#endif
     139
     140#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
     141typedef int YYSTYPE;
     142# define yystype YYSTYPE /* obsolescent; will be withdrawn */
     143# define YYSTYPE_IS_DECLARED 1
     144# define YYSTYPE_IS_TRIVIAL 1
     145#endif
     146
     147
     148
     149/* Copy the second part of user declarations.  */
     150
     151
     152/* Line 219 of yacc.c.  */
     153#line 154 "readcf.cc"
     154
     155#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
     156# define YYSIZE_T __SIZE_TYPE__
     157#endif
     158#if ! defined (YYSIZE_T) && defined (size_t)
     159# define YYSIZE_T size_t
     160#endif
     161#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
     162# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
     163# define YYSIZE_T size_t
     164#endif
     165#if ! defined (YYSIZE_T)
     166# define YYSIZE_T unsigned int
     167#endif
     168
     169#ifndef YY_
     170# if YYENABLE_NLS
     171#  if ENABLE_NLS
     172#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
     173#   define YY_(msgid) dgettext ("bison-runtime", msgid)
     174#  endif
     175# endif
     176# ifndef YY_
     177#  define YY_(msgid) msgid
     178# endif
     179#endif
     180
     181#if ! defined (yyoverflow) || YYERROR_VERBOSE
     182
     183/* The parser invokes alloca or malloc; define the necessary symbols.  */
     184
     185# ifdef YYSTACK_USE_ALLOCA
     186#  if YYSTACK_USE_ALLOCA
     187#   ifdef __GNUC__
     188#    define YYSTACK_ALLOC __builtin_alloca
     189#   else
     190#    define YYSTACK_ALLOC alloca
     191#    if defined (__STDC__) || defined (__cplusplus)
     192#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
     193#     define YYINCLUDED_STDLIB_H
     194#    endif
     195#   endif
     196#  endif
     197# endif
     198
     199# ifdef YYSTACK_ALLOC
     200   /* Pacify GCC's `empty if-body' warning. */
     201#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
     202#  ifndef YYSTACK_ALLOC_MAXIMUM
     203    /* The OS might guarantee only one guard page at the bottom of the stack,
     204       and a page size can be as small as 4096 bytes.  So we cannot safely
     205       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
     206       to allow for a few compiler-allocated temporary stack slots.  */
     207#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
     208#  endif
     209# else
     210#  define YYSTACK_ALLOC YYMALLOC
     211#  define YYSTACK_FREE YYFREE
     212#  ifndef YYSTACK_ALLOC_MAXIMUM
     213#   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
     214#  endif
     215#  ifdef __cplusplus
     216extern "C" {
     217#  endif
     218#  ifndef YYMALLOC
     219#   define YYMALLOC malloc
     220#   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
     221        && (defined (__STDC__) || defined (__cplusplus)))
     222void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
     223#   endif
     224#  endif
     225#  ifndef YYFREE
     226#   define YYFREE free
     227#   if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
     228        && (defined (__STDC__) || defined (__cplusplus)))
     229void free (void *); /* INFRINGES ON USER NAME SPACE */
     230#   endif
     231#  endif
     232#  ifdef __cplusplus
     233}
     234#  endif
     235# endif
     236#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
     237
     238
     239#if (! defined (yyoverflow) \
     240     && (! defined (__cplusplus) \
     241         || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
     242
     243/* A type that is properly aligned for any stack member.  */
     244union yyalloc
     245{
     246  short int yyss;
     247  YYSTYPE yyvs;
     248  };
     249
     250/* The size of the maximum gap between one aligned stack and the next.  */
     251# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
     252
     253/* The size of an array large to enough to hold all stacks, each with
     254   N elements.  */
     255# define YYSTACK_BYTES(N) \
     256     ((N) * (sizeof (short int) + sizeof (YYSTYPE))                     \
     257      + YYSTACK_GAP_MAXIMUM)
     258
     259/* Copy COUNT objects from FROM to TO.  The source and destination do
     260   not overlap.  */
     261# ifndef YYCOPY
     262#  if defined (__GNUC__) && 1 < __GNUC__
     263#   define YYCOPY(To, From, Count) \
     264      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
     265#  else
     266#   define YYCOPY(To, From, Count)              \
     267      do                                        \
     268        {                                       \
     269          YYSIZE_T yyi;                         \
     270          for (yyi = 0; yyi < (Count); yyi++)   \
     271            (To)[yyi] = (From)[yyi];            \
     272        }                                       \
     273      while (0)
     274#  endif
     275# endif
     276
     277/* Relocate STACK from its old location to the new one.  The
     278   local variables YYSIZE and YYSTACKSIZE give the old and new number of
     279   elements in the stack, and YYPTR gives the new location of the
     280   stack.  Advance YYPTR to a properly aligned location for the next
     281   stack.  */
     282# define YYSTACK_RELOCATE(Stack)                                        \
     283    do                                                                  \
     284      {                                                                 \
     285        YYSIZE_T yynewbytes;                                            \
     286        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
     287        Stack = &yyptr->Stack;                                          \
     288        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
     289        yyptr += yynewbytes / sizeof (*yyptr);                          \
     290      }                                                                 \
     291    while (0)
     292
     293#endif
     294
     295#if defined (__STDC__) || defined (__cplusplus)
     296   typedef signed char yysigned_char;
     297#else
     298   typedef short int yysigned_char;
     299#endif
     300
     301/* YYFINAL -- State number of the termination state. */
     302#define YYFINAL  2
     303/* YYLAST -- Last index in YYTABLE.  */
     304#define YYLAST   44
     305
     306/* YYNTOKENS -- Number of terminals. */
     307#define YYNTOKENS  13
     308/* YYNNTS -- Number of nonterminals. */
     309#define YYNNTS  4
     310/* YYNRULES -- Number of rules. */
     311#define YYNRULES  14
     312/* YYNRULES -- Number of states. */
     313#define YYNSTATES  25
     314
     315/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
     316#define YYUNDEFTOK  2
     317#define YYMAXUTOK   259
     318
     319#define YYTRANSLATE(YYX)                                                \
     320  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
     321
     322/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
     323static const unsigned char yytranslate[] =
     324{
     325       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     326       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     327       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     328       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     329      11,    12,     6,     5,     2,     4,     2,     7,     2,     2,
     330       2,     2,     2,     2,     2,     2,     2,     2,     2,    10,
     331       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     332       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     333       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     334       2,     2,     2,     2,     9,     2,     2,     2,     2,     2,
     335       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     336       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     337       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     338       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     339       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     340       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     341       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     342       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     343       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     344       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     345       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     346       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     347       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     348       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     349       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     350       2,     2,     2,     2,     2,     2,     1,     2,     3,     8
    101351};
    102352
    103 #if YYDEBUG != 0
    104 static const short yyprhs[] = {     0,
    105      0,     1,     4,     6,     9,    11,    15,    19,    23,    27,
    106     30,    33,    37
     353#if YYDEBUG
     354/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
     355   YYRHS.  */
     356static const unsigned char yyprhs[] =
     357{
     358       0,     0,     3,     4,     7,     9,    12,    14,    18,    22,
     359      26,    30,    33,    36,    40
    107360};
    108361
    109 static const short yyrhs[] = {    -1,
    110     13,    14,     0,    10,     0,    15,    10,     0,     3,     0,
    111     15,     5,    15,     0,    15,     4,    15,     0,    15,     6,
    112     15,     0,    15,     7,    15,     0,     4,    15,     0,     5,
    113     15,     0,    15,     9,     3,     0,    11,    15,    12,     0
     362/* YYRHS -- A `-1'-separated list of the rules' RHS. */
     363static const yysigned_char yyrhs[] =
     364{
     365      14,     0,    -1,    -1,    14,    15,    -1,    10,    -1,    16,
     366      10,    -1,     3,    -1,    16,     5,    16,    -1,    16,     4,
     367      16,    -1,    16,     6,    16,    -1,    16,     7,    16,    -1,
     368       4,    16,    -1,     5,    16,    -1,    16,     9,     3,    -1,
     369      11,    16,    12,    -1
    114370};
    115371
    116 #endif
    117 
    118 #if YYDEBUG != 0
    119 static const short yyrline[] = { 0,
    120     61,    62,    65,    66,    69,    70,    71,    72,    73,    74,
    121     75,    76,    77
     372/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
     373static const unsigned char yyrline[] =
     374{
     375       0,    65,    65,    66,    69,    70,    73,    74,    75,    76,
     376      77,    78,    79,    80,    81
    122377};
    123378#endif
    124379
    125 
    126 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
    127 
    128 static const char * const yytname[] = {   "$","error","$undefined.","NUM","'-'",
    129 "'+'","'*'","'/'","NEG","'^'","';'","'('","')'","input","line","exp", NULL
     380#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
     381/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
     382   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
     383static const char *const yytname[] =
     384{
     385  "$end", "error", "$undefined", "NUM", "'-'", "'+'", "'*'", "'/'", "NEG",
     386  "'^'", "';'", "'('", "')'", "$accept", "input", "line", "exp", 0
    130387};
    131388#endif
    132389
    133 static const short yyr1[] = {     0,
    134     13,    13,    14,    14,    15,    15,    15,    15,    15,    15,
    135     15,    15,    15
     390# ifdef YYPRINT
     391/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
     392   token YYLEX-NUM.  */
     393static const unsigned short int yytoknum[] =
     394{
     395       0,   256,   257,   258,    45,    43,    42,    47,   259,    94,
     396      59,    40,    41
    136397};
    137 
    138 static const short yyr2[] = {     0,
    139      0,     2,     1,     2,     1,     3,     3,     3,     3,     2,
    140      2,     3,     3
     398# endif
     399
     400/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
     401static const unsigned char yyr1[] =
     402{
     403       0,    13,    14,    14,    15,    15,    16,    16,    16,    16,
     404      16,    16,    16,    16,    16
    141405};
    142406
    143 static const short yydefact[] = {     1,
    144      0,     5,     0,     0,     3,     0,     2,     0,    10,    11,
    145      0,     0,     0,     0,     0,     0,     4,    13,     7,     6,
    146      8,     9,    12,     0,     0
     407/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
     408static const unsigned char yyr2[] =
     409{
     410       0,     2,     0,     2,     1,     2,     1,     3,     3,     3,
     411       3,     2,     2,     3,     3
    147412};
    148413
    149 static const short yydefgoto[] = {     1,
    150      7,     8
     414/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
     415   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
     416   means the default is an error.  */
     417static const unsigned char yydefact[] =
     418{
     419       2,     0,     1,     6,     0,     0,     4,     0,     3,     0,
     420      11,    12,     0,     0,     0,     0,     0,     0,     5,    14,
     421       8,     7,     9,    10,    13
    151422};
    152423
    153 static const short yypact[] = {-32768,
    154     13,-32768,     3,     3,-32768,     3,-32768,    30,    -7,    -7,
    155     21,     3,     3,     3,     3,     1,-32768,-32768,    35,    35,
    156     -7,    -7,-32768,     5,-32768
     424/* YYDEFGOTO[NTERM-NUM]. */
     425static const yysigned_char yydefgoto[] =
     426{
     427      -1,     1,     8,     9
    157428};
    158429
    159 static const short yypgoto[] = {-32768,
    160 -32768,    -3
     430/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
     431   STATE-NUM.  */
     432#define YYPACT_NINF -8
     433static const yysigned_char yypact[] =
     434{
     435      -8,    13,    -8,    -8,     3,     3,    -8,     3,    -8,    30,
     436      -7,    -7,    21,     3,     3,     3,     3,     1,    -8,    -8,
     437      35,    35,    -7,    -7,    -8
    161438};
    162439
    163 
    164 #define YYLAST          44
    165 
    166 
    167 static const short yytable[] = {     9,
    168     10,    16,    11,    23,    25,     2,     3,     4,    19,    20,
    169     21,    22,    24,     6,     0,     2,     3,     4,     0,     0,
    170      0,     0,     5,     6,    12,    13,    14,    15,     0,    16,
    171      0,     0,    18,    12,    13,    14,    15,     0,    16,    17,
    172     14,    15,     0,    16
     440/* YYPGOTO[NTERM-NUM].  */
     441static const yysigned_char yypgoto[] =
     442{
     443      -8,    -8,    -8,    -4
    173444};
    174445
    175 static const short yycheck[] = {     3,
    176      4,     9,     6,     3,     0,     3,     4,     5,    12,    13,
    177     14,    15,     0,    11,    -1,     3,     4,     5,    -1,    -1,
    178     -1,    -1,    10,    11,     4,     5,     6,     7,    -1,     9,
    179     -1,    -1,    12,     4,     5,     6,     7,    -1,     9,    10,
    180      6,     7,    -1,     9
     446/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
     447   positive, shift that token.  If negative, reduce the rule which
     448   number is the opposite.  If zero, do what YYDEFACT says.
     449   If YYTABLE_NINF, syntax error.  */
     450#define YYTABLE_NINF -1
     451static const unsigned char yytable[] =
     452{
     453      10,    11,    17,    12,    24,     0,     3,     4,     5,    20,
     454      21,    22,    23,     2,     7,     0,     3,     4,     5,     0,
     455       0,     0,     0,     6,     7,    13,    14,    15,    16,     0,
     456      17,     0,     0,    19,    13,    14,    15,    16,     0,    17,
     457      18,    15,    16,     0,    17
    181458};
    182 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
    183 #line 3 "/usr/lib/bison.simple"
    184 /* This file comes from bison-1.28.  */
    185 
    186 /* Skeleton output parser for bison,
    187    Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
    188 
    189    This program is free software; you can redistribute it and/or modify
    190    it under the terms of the GNU General Public License as published by
    191    the Free Software Foundation; either version 2, or (at your option)
    192    any later version.
    193 
    194    This program is distributed in the hope that it will be useful,
    195    but WITHOUT ANY WARRANTY; without even the implied warranty of
    196    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    197    GNU General Public License for more details.
    198 
    199    You should have received a copy of the GNU General Public License
    200    along with this program; if not, write to the Free Software
    201    Foundation, Inc., 59 Temple Place - Suite 330,
    202    Boston, MA 02111-1307, USA.  */
    203 
    204 /* As a special exception, when this file is copied by Bison into a
    205    Bison output file, you may use that output file without restriction.
    206    This special exception was added by the Free Software Foundation
    207    in version 1.24 of Bison.  */
    208 
    209 /* This is the parser code that is written into each bison parser
    210   when the %semantic_parser declaration is not specified in the grammar.
    211   It was written by Richard Stallman by simplifying the hairy parser
    212   used when %semantic_parser is specified.  */
    213 
    214 #ifndef YYSTACK_USE_ALLOCA
    215 #ifdef alloca
    216 #define YYSTACK_USE_ALLOCA
    217 #else /* alloca not defined */
    218 #ifdef __GNUC__
    219 #define YYSTACK_USE_ALLOCA
    220 #define alloca __builtin_alloca
    221 #else /* not GNU C.  */
    222 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
    223 #define YYSTACK_USE_ALLOCA
    224 #include <alloca.h>
    225 #else /* not sparc */
    226 /* We think this test detects Watcom and Microsoft C.  */
    227 /* This used to test MSDOS, but that is a bad idea
    228    since that symbol is in the user namespace.  */
    229 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
    230 #if 0 /* No need for malloc.h, which pollutes the namespace;
    231          instead, just don't use alloca.  */
    232 #include <malloc.h>
    233 #endif
    234 #else /* not MSDOS, or __TURBOC__ */
    235 #if defined(_AIX)
    236 /* I don't know what this was needed for, but it pollutes the namespace.
    237    So I turned it off.   rms, 2 May 1997.  */
    238 /* #include <malloc.h>  */
    239  #pragma alloca
    240 #define YYSTACK_USE_ALLOCA
    241 #else /* not MSDOS, or __TURBOC__, or _AIX */
    242 #if 0
    243 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
    244                  and on HPUX 10.  Eventually we can turn this on.  */
    245 #define YYSTACK_USE_ALLOCA
    246 #define alloca __builtin_alloca
    247 #endif /* __hpux */
    248 #endif
    249 #endif /* not _AIX */
    250 #endif /* not MSDOS, or __TURBOC__ */
    251 #endif /* not sparc */
    252 #endif /* not GNU C */
    253 #endif /* alloca not defined */
    254 #endif /* YYSTACK_USE_ALLOCA not defined */
    255 
    256 #ifdef YYSTACK_USE_ALLOCA
    257 #define YYSTACK_ALLOC alloca
    258 #else
    259 #define YYSTACK_ALLOC malloc
    260 #endif
    261 
    262 /* Note: there must be only one dollar sign in this file.
    263    It is replaced by the list of actions, each action
    264    as one case of the switch.  */
     459
     460static const yysigned_char yycheck[] =
     461{
     462       4,     5,     9,     7,     3,    -1,     3,     4,     5,    13,
     463      14,    15,    16,     0,    11,    -1,     3,     4,     5,    -1,
     464      -1,    -1,    -1,    10,    11,     4,     5,     6,     7,    -1,
     465       9,    -1,    -1,    12,     4,     5,     6,     7,    -1,     9,
     466      10,     6,     7,    -1,     9
     467};
     468
     469/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
     470   symbol of state STATE-NUM.  */
     471static const unsigned char yystos[] =
     472{
     473       0,    14,     0,     3,     4,     5,    10,    11,    15,    16,
     474      16,    16,    16,     4,     5,     6,     7,     9,    10,    12,
     475      16,    16,    16,    16,     3
     476};
    265477
    266478#define yyerrok         (yyerrstatus = 0)
    267479#define yyclearin       (yychar = YYEMPTY)
    268 #define YYEMPTY         -2
     480#define YYEMPTY         (-2)
    269481#define YYEOF           0
     482
    270483#define YYACCEPT        goto yyacceptlab
    271 #define YYABORT         goto yyabortlab
    272 #define YYERROR         goto yyerrlab1
    273 /* Like YYERROR except do call yyerror.
    274    This remains here temporarily to ease the
    275    transition to the new meaning of YYERROR, for GCC.
     484#define YYABORT         goto yyabortlab
     485#define YYERROR         goto yyerrorlab
     486
     487
     488/* Like YYERROR except do call yyerror.  This remains here temporarily
     489   to ease the transition to the new meaning of YYERROR, for GCC.
    276490   Once GCC version 2 has supplanted version 1, this can go.  */
     491
    277492#define YYFAIL          goto yyerrlab
     493
    278494#define YYRECOVERING()  (!!yyerrstatus)
    279 #define YYBACKUP(token, value) \
     495
     496#define YYBACKUP(Token, Value)                                  \
    280497do                                                              \
    281498  if (yychar == YYEMPTY && yylen == 1)                          \
    282     { yychar = (token), yylval = (value);                       \
    283       yychar1 = YYTRANSLATE (yychar);                           \
     499    {                                                           \
     500      yychar = (Token);                                         \
     501      yylval = (Value);                                         \
     502      yytoken = YYTRANSLATE (yychar);                           \
    284503      YYPOPSTACK;                                               \
    285504      goto yybackup;                                            \
    286505    }                                                           \
    287506  else                                                          \
    288     { yyerror ("syntax error: cannot back up"); YYERROR; }      \
     507    {                                                           \
     508      yyerror (YY_("syntax error: cannot back up")); \
     509      YYERROR;                                                  \
     510    }                                                           \
    289511while (0)
     512
    290513
    291514#define YYTERROR        1
    292515#define YYERRCODE       256
    293516
    294 #ifndef YYPURE
    295 #define YYLEX           yylex()
    296 #endif
    297 
    298 #ifdef YYPURE
    299 #ifdef YYLSP_NEEDED
     517
     518/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
     519   If N is 0, then set CURRENT to the empty location which ends
     520   the previous symbol: RHS[0] (always defined).  */
     521
     522#define YYRHSLOC(Rhs, K) ((Rhs)[K])
     523#ifndef YYLLOC_DEFAULT
     524# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
     525    do                                                                  \
     526      if (N)                                                            \
     527        {                                                               \
     528          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
     529          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
     530          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
     531          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
     532        }                                                               \
     533      else                                                              \
     534        {                                                               \
     535          (Current).first_line   = (Current).last_line   =              \
     536            YYRHSLOC (Rhs, 0).last_line;                                \
     537          (Current).first_column = (Current).last_column =              \
     538            YYRHSLOC (Rhs, 0).last_column;                              \
     539        }                                                               \
     540    while (0)
     541#endif
     542
     543
     544/* YY_LOCATION_PRINT -- Print the location on the stream.
     545   This macro was not mandated originally: define only if we know
     546   we won't break user code: when these are the locations we know.  */
     547
     548#ifndef YY_LOCATION_PRINT
     549# if YYLTYPE_IS_TRIVIAL
     550#  define YY_LOCATION_PRINT(File, Loc)                  \
     551     fprintf (File, "%d.%d-%d.%d",                      \
     552              (Loc).first_line, (Loc).first_column,     \
     553              (Loc).last_line,  (Loc).last_column)
     554# else
     555#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
     556# endif
     557#endif
     558
     559
     560/* YYLEX -- calling `yylex' with the right arguments.  */
     561
    300562#ifdef YYLEX_PARAM
    301 #define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
     563# define YYLEX yylex (YYLEX_PARAM)
    302564#else
    303 #define YYLEX           yylex(&yylval, &yylloc)
    304 #endif
    305 #else /* not YYLSP_NEEDED */
    306 #ifdef YYLEX_PARAM
    307 #define YYLEX           yylex(&yylval, YYLEX_PARAM)
     565# define YYLEX yylex ()
     566#endif
     567
     568/* Enable debugging if requested.  */
     569#if YYDEBUG
     570
     571# ifndef YYFPRINTF
     572#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
     573#  define YYFPRINTF fprintf
     574# endif
     575
     576# define YYDPRINTF(Args)                        \
     577do {                                            \
     578  if (yydebug)                                  \
     579    YYFPRINTF Args;                             \
     580} while (0)
     581
     582# define YY_SYMBOL_PRINT(Title, Type, Value, Location)          \
     583do {                                                            \
     584  if (yydebug)                                                  \
     585    {                                                           \
     586      YYFPRINTF (stderr, "%s ", Title);                         \
     587      yysymprint (stderr,                                       \
     588                  Type, Value); \
     589      YYFPRINTF (stderr, "\n");                                 \
     590    }                                                           \
     591} while (0)
     592
     593/*------------------------------------------------------------------.
     594| yy_stack_print -- Print the state stack from its BOTTOM up to its |
     595| TOP (included).                                                   |
     596`------------------------------------------------------------------*/
     597
     598#if defined (__STDC__) || defined (__cplusplus)
     599static void
     600yy_stack_print (short int *bottom, short int *top)
    308601#else
    309 #define YYLEX           yylex(&yylval)
    310 #endif
    311 #endif /* not YYLSP_NEEDED */
    312 #endif
    313 
    314 /* If nonreentrant, generate the variables here */
    315 
    316 #ifndef YYPURE
    317 
    318 int     yychar;                 /*  the lookahead symbol                */
    319 YYSTYPE yylval;                 /*  the semantic value of the           */
    320                                 /*  lookahead symbol                    */
    321 
    322 #ifdef YYLSP_NEEDED
    323 YYLTYPE yylloc;                 /*  location data for the lookahead     */
    324                                 /*  symbol                              */
    325 #endif
    326 
    327 int yynerrs;                    /*  number of parse errors so far       */
    328 #endif  /* not YYPURE */
    329 
    330 #if YYDEBUG != 0
    331 int yydebug;                    /*  nonzero means print parse trace     */
    332 /* Since this is uninitialized, it does not stop multiple parsers
    333    from coexisting.  */
    334 #endif
    335 
    336 /*  YYINITDEPTH indicates the initial size of the parser's stacks       */
    337 
     602static void
     603yy_stack_print (bottom, top)
     604    short int *bottom;
     605    short int *top;
     606#endif
     607{
     608  YYFPRINTF (stderr, "Stack now");
     609  for (/* Nothing. */; bottom <= top; ++bottom)
     610    YYFPRINTF (stderr, " %d", *bottom);
     611  YYFPRINTF (stderr, "\n");
     612}
     613
     614# define YY_STACK_PRINT(Bottom, Top)                            \
     615do {                                                            \
     616  if (yydebug)                                                  \
     617    yy_stack_print ((Bottom), (Top));                           \
     618} while (0)
     619
     620
     621/*------------------------------------------------.
     622| Report that the YYRULE is going to be reduced.  |
     623`------------------------------------------------*/
     624
     625#if defined (__STDC__) || defined (__cplusplus)
     626static void
     627yy_reduce_print (int yyrule)
     628#else
     629static void
     630yy_reduce_print (yyrule)
     631    int yyrule;
     632#endif
     633{
     634  int yyi;
     635  unsigned long int yylno = yyrline[yyrule];
     636  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
     637             yyrule - 1, yylno);
     638  /* Print the symbols being reduced, and their result.  */
     639  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
     640    YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
     641  YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
     642}
     643
     644# define YY_REDUCE_PRINT(Rule)          \
     645do {                                    \
     646  if (yydebug)                          \
     647    yy_reduce_print (Rule);             \
     648} while (0)
     649
     650/* Nonzero means print parse trace.  It is left uninitialized so that
     651   multiple parsers can coexist.  */
     652int yydebug;
     653#else /* !YYDEBUG */
     654# define YYDPRINTF(Args)
     655# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
     656# define YY_STACK_PRINT(Bottom, Top)
     657# define YY_REDUCE_PRINT(Rule)
     658#endif /* !YYDEBUG */
     659
     660
     661/* YYINITDEPTH -- initial size of the parser's stacks.  */
    338662#ifndef YYINITDEPTH
    339 #define YYINITDEPTH 200
    340 #endif
    341 
    342 /*  YYMAXDEPTH is the maximum size the stacks can grow to
    343     (effective only if the built-in stack extension method is used).  */
    344 
    345 #if YYMAXDEPTH == 0
    346 #undef YYMAXDEPTH
    347 #endif
     663# define YYINITDEPTH 200
     664#endif
     665
     666/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
     667   if the built-in stack extension method is used).
     668
     669   Do not make this value too large; the results are undefined if
     670   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
     671   evaluated with infinite-precision integer arithmetic.  */
    348672
    349673#ifndef YYMAXDEPTH
    350 #define YYMAXDEPTH 10000
    351 #endif
    352 
    353 
    354 /* Define __yy_memcpy.  Note that the size argument
    355    should be passed with type unsigned int, because that is what the non-GCC
    356    definitions require.  With GCC, __builtin_memcpy takes an arg
    357    of type size_t, but it can handle unsigned int.  */
    358 
    359 #if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
    360 #define __yy_memcpy(TO,FROM,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
    361 #else                           /* not GNU C or C++ */
    362 #ifndef __cplusplus
    363 
    364 /* This is the most reliable way to avoid incompatibilities
    365    in available built-in functions on various systems.  */
     674# define YYMAXDEPTH 10000
     675#endif
     676
     677
     678
     679
     680#if YYERROR_VERBOSE
     681
     682# ifndef yystrlen
     683#  if defined (__GLIBC__) && defined (_STRING_H)
     684#   define yystrlen strlen
     685#  else
     686/* Return the length of YYSTR.  */
     687static YYSIZE_T
     688#   if defined (__STDC__) || defined (__cplusplus)
     689yystrlen (const char *yystr)
     690#   else
     691yystrlen (yystr)
     692     const char *yystr;
     693#   endif
     694{
     695  const char *yys = yystr;
     696
     697  while (*yys++ != '\0')
     698    continue;
     699
     700  return yys - yystr - 1;
     701}
     702#  endif
     703# endif
     704
     705# ifndef yystpcpy
     706#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
     707#   define yystpcpy stpcpy
     708#  else
     709/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
     710   YYDEST.  */
     711static char *
     712#   if defined (__STDC__) || defined (__cplusplus)
     713yystpcpy (char *yydest, const char *yysrc)
     714#   else
     715yystpcpy (yydest, yysrc)
     716     char *yydest;
     717     const char *yysrc;
     718#   endif
     719{
     720  char *yyd = yydest;
     721  const char *yys = yysrc;
     722
     723  while ((*yyd++ = *yys++) != '\0')
     724    continue;
     725
     726  return yyd - 1;
     727}
     728#  endif
     729# endif
     730
     731# ifndef yytnamerr
     732/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
     733   quotes and backslashes, so that it's suitable for yyerror.  The
     734   heuristic is that double-quoting is unnecessary unless the string
     735   contains an apostrophe, a comma, or backslash (other than
     736   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
     737   null, do not copy; instead, return the length of what the result
     738   would have been.  */
     739static YYSIZE_T
     740yytnamerr (char *yyres, const char *yystr)
     741{
     742  if (*yystr == '"')
     743    {
     744      size_t yyn = 0;
     745      char const *yyp = yystr;
     746
     747      for (;;)
     748        switch (*++yyp)
     749          {
     750          case '\'':
     751          case ',':
     752            goto do_not_strip_quotes;
     753
     754          case '\\':
     755            if (*++yyp != '\\')
     756              goto do_not_strip_quotes;
     757            /* Fall through.  */
     758          default:
     759            if (yyres)
     760              yyres[yyn] = *yyp;
     761            yyn++;
     762            break;
     763
     764          case '"':
     765            if (yyres)
     766              yyres[yyn] = '\0';
     767            return yyn;
     768          }
     769    do_not_strip_quotes: ;
     770    }
     771
     772  if (! yyres)
     773    return yystrlen (yystr);
     774
     775  return yystpcpy (yyres, yystr) - yyres;
     776}
     777# endif
     778
     779#endif /* YYERROR_VERBOSE */
     780
     781
     782
     783
     784#if YYDEBUG
     785/*--------------------------------.
     786| Print this symbol on YYOUTPUT.  |
     787`--------------------------------*/
     788
     789#if defined (__STDC__) || defined (__cplusplus)
    366790static void
    367 __yy_memcpy (to, from, count)
    368      char *to;
    369      char *from;
    370      unsigned int count;
    371 {
    372   register char *f = from;
    373   register char *t = to;
    374   register int i = count;
    375 
    376   while (i-- > 0)
    377     *t++ = *f++;
     791yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
     792#else
     793static void
     794yysymprint (yyoutput, yytype, yyvaluep)
     795    FILE *yyoutput;
     796    int yytype;
     797    YYSTYPE *yyvaluep;
     798#endif
     799{
     800  /* Pacify ``unused variable'' warnings.  */
     801  (void) yyvaluep;
     802
     803  if (yytype < YYNTOKENS)
     804    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
     805  else
     806    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
     807
     808
     809# ifdef YYPRINT
     810  if (yytype < YYNTOKENS)
     811    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
     812# endif
     813  switch (yytype)
     814    {
     815      default:
     816        break;
     817    }
     818  YYFPRINTF (yyoutput, ")");
    378819}
    379820
    380 #else /* __cplusplus */
    381 
    382 /* This is the most reliable way to avoid incompatibilities
    383    in available built-in functions on various systems.  */
     821#endif /* ! YYDEBUG */
     822/*-----------------------------------------------.
     823| Release the memory associated to this symbol.  |
     824`-----------------------------------------------*/
     825
     826#if defined (__STDC__) || defined (__cplusplus)
    384827static void
    385 __yy_memcpy (char *to, char *from, unsigned int count)
    386 {
    387   register char *t = to;
    388   register char *f = from;
    389   register int i = count;
    390 
    391   while (i-- > 0)
    392     *t++ = *f++;
     828yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
     829#else
     830static void
     831yydestruct (yymsg, yytype, yyvaluep)
     832    const char *yymsg;
     833    int yytype;
     834    YYSTYPE *yyvaluep;
     835#endif
     836{
     837  /* Pacify ``unused variable'' warnings.  */
     838  (void) yyvaluep;
     839
     840  if (!yymsg)
     841    yymsg = "Deleting";
     842  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
     843
     844  switch (yytype)
     845    {
     846
     847      default:
     848        break;
     849    }
    393850}
    394851
    395 #endif
    396 #endif
    397 
    398 
    399 #line 217 "/usr/lib/bison.simple"
    400 
    401 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
    402    into yyparse.  The argument should have type void *.
    403    It should actually point to an object.
    404    Grammar actions can access the variable by casting it
    405    to the proper pointer type.  */
     852
     853
     854/* Prevent warnings from -Wmissing-prototypes.  */
    406855
    407856#ifdef YYPARSE_PARAM
    408 #ifdef __cplusplus
    409 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
    410 #define YYPARSE_PARAM_DECL
    411 #else /* not __cplusplus */
    412 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
    413 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
    414 #endif /* not __cplusplus */
    415 #else /* not YYPARSE_PARAM */
    416 #define YYPARSE_PARAM_ARG
    417 #define YYPARSE_PARAM_DECL
    418 #endif /* not YYPARSE_PARAM */
    419 
    420 /* Prevent warning if -Wstrict-prototypes.  */
    421 #ifdef __GNUC__
     857# if defined (__STDC__) || defined (__cplusplus)
     858int yyparse (void *YYPARSE_PARAM);
     859# else
     860int yyparse ();
     861# endif
     862#else /* ! YYPARSE_PARAM */
     863#if defined (__STDC__) || defined (__cplusplus)
     864int yyparse (void);
     865#else
     866int yyparse ();
     867#endif
     868#endif /* ! YYPARSE_PARAM */
     869
     870
     871
     872/* The look-ahead symbol.  */
     873int yychar;
     874
     875/* The semantic value of the look-ahead symbol.  */
     876YYSTYPE yylval;
     877
     878/* Number of syntax errors so far.  */
     879int yynerrs;
     880
     881
     882
     883/*----------.
     884| yyparse.  |
     885`----------*/
     886
    422887#ifdef YYPARSE_PARAM
    423 int yyparse (void *);
     888# if defined (__STDC__) || defined (__cplusplus)
     889int yyparse (void *YYPARSE_PARAM)
     890# else
     891int yyparse (YYPARSE_PARAM)
     892  void *YYPARSE_PARAM;
     893# endif
     894#else /* ! YYPARSE_PARAM */
     895#if defined (__STDC__) || defined (__cplusplus)
     896int
     897yyparse (void)
    424898#else
    425 int yyparse (void);
    426 #endif
    427 #endif
    428 
    429899int
    430 yyparse(YYPARSE_PARAM_ARG)
    431      YYPARSE_PARAM_DECL
    432 {
    433   register int yystate;
    434   register int yyn;
    435   register short *yyssp;
    436   register YYSTYPE *yyvsp;
    437   int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
    438   int yychar1 = 0;              /*  lookahead token as an internal (translated) token number */
    439 
    440   short yyssa[YYINITDEPTH];     /*  the state stack                     */
    441   YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */
    442 
    443   short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
    444   YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */
    445 
    446 #ifdef YYLSP_NEEDED
    447   YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
    448   YYLTYPE *yyls = yylsa;
    449   YYLTYPE *yylsp;
    450 
    451 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
    452 #else
     900yyparse ()
     901    ;
     902#endif
     903#endif
     904{
     905 
     906  int yystate;
     907  int yyn;
     908  int yyresult;
     909  /* Number of tokens to shift before error messages enabled.  */
     910  int yyerrstatus;
     911  /* Look-ahead token as an internal (translated) token number.  */
     912  int yytoken = 0;
     913
     914  /* Three stacks and their tools:
     915     `yyss': related to states,
     916     `yyvs': related to semantic values,
     917     `yyls': related to locations.
     918
     919     Refer to the stacks thru separate pointers, to allow yyoverflow
     920     to reallocate them elsewhere.  */
     921
     922  /* The state stack.  */
     923  short int yyssa[YYINITDEPTH];
     924  short int *yyss = yyssa;
     925  short int *yyssp;
     926
     927  /* The semantic value stack.  */
     928  YYSTYPE yyvsa[YYINITDEPTH];
     929  YYSTYPE *yyvs = yyvsa;
     930  YYSTYPE *yyvsp;
     931
     932
     933
    453934#define YYPOPSTACK   (yyvsp--, yyssp--)
    454 #endif
    455 
    456   int yystacksize = YYINITDEPTH;
    457   int yyfree_stacks = 0;
    458 
    459 #ifdef YYPURE
    460   int yychar;
    461   YYSTYPE yylval;
    462   int yynerrs;
    463 #ifdef YYLSP_NEEDED
    464   YYLTYPE yylloc;
    465 #endif
    466 #endif
    467 
    468   YYSTYPE yyval;                /*  the variable used to return         */
    469                                 /*  semantic values from the action     */
    470                                 /*  routines                            */
    471 
     935
     936  YYSIZE_T yystacksize = YYINITDEPTH;
     937
     938  /* The variables used to return semantic value and location from the
     939     action routines.  */
     940  YYSTYPE yyval;
     941
     942
     943  /* When reducing, the number of symbols on the RHS of the reduced
     944     rule.  */
    472945  int yylen;
    473946
    474 #if YYDEBUG != 0
    475   if (yydebug)
    476     fprintf(stderr, "Starting parse\n");
    477 #endif
     947  YYDPRINTF ((stderr, "Starting parse\n"));
    478948
    479949  yystate = 0;
     
    487957     The wasted elements are never initialized.  */
    488958
    489   yyssp = yyss - 1;
     959  yyssp = yyss;
    490960  yyvsp = yyvs;
    491 #ifdef YYLSP_NEEDED
    492   yylsp = yyls;
    493 #endif
    494 
    495 /* Push a new state, which is found in  yystate  .  */
    496 /* In all cases, when you get here, the value and location stacks
    497    have just been pushed. so pushing a state here evens the stacks.  */
    498 yynewstate:
    499 
    500   *++yyssp = yystate;
    501 
    502   if (yyssp >= yyss + yystacksize - 1)
     961
     962  goto yysetstate;
     963
     964/*------------------------------------------------------------.
     965| yynewstate -- Push a new state, which is found in yystate.  |
     966`------------------------------------------------------------*/
     967 yynewstate:
     968  /* In all cases, when you get here, the value and location stacks
     969     have just been pushed. so pushing a state here evens the stacks.
     970     */
     971  yyssp++;
     972
     973 yysetstate:
     974  *yyssp = yystate;
     975
     976  if (yyss + yystacksize - 1 <= yyssp)
    503977    {
    504       /* Give user a chance to reallocate the stack */
    505       /* Use copies of these so that the &'s don't force the real ones into memory. */
    506       YYSTYPE *yyvs1 = yyvs;
    507       short *yyss1 = yyss;
    508 #ifdef YYLSP_NEEDED
    509       YYLTYPE *yyls1 = yyls;
    510 #endif
    511 
    512978      /* Get the current used size of the three stacks, in elements.  */
    513       int size = yyssp - yyss + 1;
     979      YYSIZE_T yysize = yyssp - yyss + 1;
    514980
    515981#ifdef yyoverflow
    516       /* Each stack pointer address is followed by the size of
    517          the data in use in that stack, in bytes.  */
    518 #ifdef YYLSP_NEEDED
    519       /* This used to be a conditional around just the two extra args,
    520          but that might be undefined if yyoverflow is a macro.  */
    521       yyoverflow("parser stack overflow",
    522                  &yyss1, size * sizeof (*yyssp),
    523                  &yyvs1, size * sizeof (*yyvsp),
    524                  &yyls1, size * sizeof (*yylsp),
    525                  &yystacksize);
    526 #else
    527       yyoverflow("parser stack overflow",
    528                  &yyss1, size * sizeof (*yyssp),
    529                  &yyvs1, size * sizeof (*yyvsp),
    530                  &yystacksize);
    531 #endif
    532 
    533       yyss = yyss1; yyvs = yyvs1;
    534 #ifdef YYLSP_NEEDED
    535       yyls = yyls1;
    536 #endif
     982      {
     983        /* Give user a chance to reallocate the stack. Use copies of
     984           these so that the &'s don't force the real ones into
     985           memory.  */
     986        YYSTYPE *yyvs1 = yyvs;
     987        short int *yyss1 = yyss;
     988
     989
     990        /* Each stack pointer address is followed by the size of the
     991           data in use in that stack, in bytes.  This used to be a
     992           conditional around just the two extra args, but that might
     993           be undefined if yyoverflow is a macro.  */
     994        yyoverflow (YY_("memory exhausted"),
     995                    &yyss1, yysize * sizeof (*yyssp),
     996                    &yyvs1, yysize * sizeof (*yyvsp),
     997
     998                    &yystacksize);
     999
     1000        yyss = yyss1;
     1001        yyvs = yyvs1;
     1002      }
    5371003#else /* no yyoverflow */
     1004# ifndef YYSTACK_RELOCATE
     1005      goto yyexhaustedlab;
     1006# else
    5381007      /* Extend the stack our own way.  */
    539       if (yystacksize >= YYMAXDEPTH)
    540         {
    541           yyerror("parser stack overflow");
    542           if (yyfree_stacks)
    543             {
    544               free (yyss);
    545               free (yyvs);
    546 #ifdef YYLSP_NEEDED
    547               free (yyls);
    548 #endif
    549             }
    550           return 2;
    551         }
     1008      if (YYMAXDEPTH <= yystacksize)
     1009        goto yyexhaustedlab;
    5521010      yystacksize *= 2;
    553       if (yystacksize > YYMAXDEPTH)
     1011      if (YYMAXDEPTH < yystacksize)
    5541012        yystacksize = YYMAXDEPTH;
    555 #ifndef YYSTACK_USE_ALLOCA
    556       yyfree_stacks = 1;
    557 #endif
    558       yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
    559       __yy_memcpy ((char *)yyss, (char *)yyss1,
    560                    size * (unsigned int) sizeof (*yyssp));
    561       yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
    562       __yy_memcpy ((char *)yyvs, (char *)yyvs1,
    563                    size * (unsigned int) sizeof (*yyvsp));
    564 #ifdef YYLSP_NEEDED
    565       yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
    566       __yy_memcpy ((char *)yyls, (char *)yyls1,
    567                    size * (unsigned int) sizeof (*yylsp));
    568 #endif
     1013
     1014      {
     1015        short int *yyss1 = yyss;
     1016        union yyalloc *yyptr =
     1017          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
     1018        if (! yyptr)
     1019          goto yyexhaustedlab;
     1020        YYSTACK_RELOCATE (yyss);
     1021        YYSTACK_RELOCATE (yyvs);
     1022
     1023#  undef YYSTACK_RELOCATE
     1024        if (yyss1 != yyssa)
     1025          YYSTACK_FREE (yyss1);
     1026      }
     1027# endif
    5691028#endif /* no yyoverflow */
    5701029
    571       yyssp = yyss + size - 1;
    572       yyvsp = yyvs + size - 1;
    573 #ifdef YYLSP_NEEDED
    574       yylsp = yyls + size - 1;
    575 #endif
    576 
    577 #if YYDEBUG != 0
    578       if (yydebug)
    579         fprintf(stderr, "Stack size increased to %d\n", yystacksize);
    580 #endif
    581 
    582       if (yyssp >= yyss + yystacksize - 1)
     1030      yyssp = yyss + yysize - 1;
     1031      yyvsp = yyvs + yysize - 1;
     1032
     1033
     1034      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
     1035                  (unsigned long int) yystacksize));
     1036
     1037      if (yyss + yystacksize - 1 <= yyssp)
    5831038        YYABORT;
    5841039    }
    5851040
    586 #if YYDEBUG != 0
    587   if (yydebug)
    588     fprintf(stderr, "Entering state %d\n", yystate);
    589 #endif
     1041  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
    5901042
    5911043  goto yybackup;
    592  yybackup:
     1044
     1045/*-----------.
     1046| yybackup.  |
     1047`-----------*/
     1048yybackup:
    5931049
    5941050/* Do appropriate processing given the current state.  */
    595 /* Read a lookahead token if we need one and don't already have one.  */
     1051/* Read a look-ahead token if we need one and don't already have one.  */
    5961052/* yyresume: */
    5971053
    598   /* First try to decide what to do without reference to lookahead token.  */
     1054  /* First try to decide what to do without reference to look-ahead token.  */
    5991055
    6001056  yyn = yypact[yystate];
    601   if (yyn == YYFLAG)
     1057  if (yyn == YYPACT_NINF)
    6021058    goto yydefault;
    6031059
    604   /* Not known => get a lookahead token if don't already have one.  */
    605 
    606   /* yychar is either YYEMPTY or YYEOF
    607      or a valid token in external form.  */
    608 
     1060  /* Not known => get a look-ahead token if don't already have one.  */
     1061
     1062  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
    6091063  if (yychar == YYEMPTY)
    6101064    {
    611 #if YYDEBUG != 0
    612       if (yydebug)
    613         fprintf(stderr, "Reading a token: ");
    614 #endif
     1065      YYDPRINTF ((stderr, "Reading a token: "));
    6151066      yychar = YYLEX;
    6161067    }
    6171068
    618   /* Convert token to internal form (in yychar1) for indexing tables with */
    619 
    620   if (yychar <= 0)              /* This means end of input. */
     1069  if (yychar <= YYEOF)
    6211070    {
    622       yychar1 = 0;
    623       yychar = YYEOF;           /* Don't call YYLEX any more */
    624 
    625 #if YYDEBUG != 0
    626       if (yydebug)
    627         fprintf(stderr, "Now at end of input.\n");
    628 #endif
     1071      yychar = yytoken = YYEOF;
     1072      YYDPRINTF ((stderr, "Now at end of input.\n"));
    6291073    }
    6301074  else
    6311075    {
    632       yychar1 = YYTRANSLATE(yychar);
    633 
    634 #if YYDEBUG != 0
    635       if (yydebug)
    636         {
    637           fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
    638           /* Give the individual parser a way to print the precise meaning
    639              of a token, for further debugging info.  */
    640 #ifdef YYPRINT
    641           YYPRINT (stderr, yychar, yylval);
    642 #endif
    643           fprintf (stderr, ")\n");
    644         }
    645 #endif
    646     }
    647 
    648   yyn += yychar1;
    649   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
     1076      yytoken = YYTRANSLATE (yychar);
     1077      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
     1078    }
     1079
     1080  /* If the proper action on seeing token YYTOKEN is to reduce or to
     1081     detect an error, take that action.  */
     1082  yyn += yytoken;
     1083  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    6501084    goto yydefault;
    651 
    6521085  yyn = yytable[yyn];
    653 
    654   /* yyn is what to do for this token type in this state.
    655      Negative => reduce, -yyn is rule number.
    656      Positive => shift, yyn is new state.
    657        New state is final state => don't bother to shift,
    658        just return success.
    659      0, or most negative number => error.  */
    660 
    661   if (yyn < 0)
     1086  if (yyn <= 0)
    6621087    {
    663       if (yyn == YYFLAG)
     1088      if (yyn == 0 || yyn == YYTABLE_NINF)
    6641089        goto yyerrlab;
    6651090      yyn = -yyn;
    6661091      goto yyreduce;
    6671092    }
    668   else if (yyn == 0)
    669     goto yyerrlab;
    6701093
    6711094  if (yyn == YYFINAL)
    6721095    YYACCEPT;
    6731096
    674   /* Shift the lookahead token.  */
    675 
    676 #if YYDEBUG != 0
    677   if (yydebug)
    678     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
    679 #endif
     1097  /* Shift the look-ahead token.  */
     1098  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
    6801099
    6811100  /* Discard the token being shifted unless it is eof.  */
     
    6841103
    6851104  *++yyvsp = yylval;
    686 #ifdef YYLSP_NEEDED
    687   *++yylsp = yylloc;
    688 #endif
    689 
    690   /* count tokens shifted since error; after three, turn off error status.  */
    691   if (yyerrstatus) yyerrstatus--;
     1105
     1106
     1107  /* Count tokens shifted since error; after three, turn off error
     1108     status.  */
     1109  if (yyerrstatus)
     1110    yyerrstatus--;
    6921111
    6931112  yystate = yyn;
    6941113  goto yynewstate;
    6951114
    696 /* Do the default action for the current state.  */
     1115
     1116/*-----------------------------------------------------------.
     1117| yydefault -- do the default action for the current state.  |
     1118`-----------------------------------------------------------*/
    6971119yydefault:
    698 
    6991120  yyn = yydefact[yystate];
    7001121  if (yyn == 0)
    7011122    goto yyerrlab;
    702 
    703 /* Do a reduction.  yyn is the number of a rule to reduce with.  */
     1123  goto yyreduce;
     1124
     1125
     1126/*-----------------------------.
     1127| yyreduce -- Do a reduction.  |
     1128`-----------------------------*/
    7041129yyreduce:
     1130  /* yyn is the number of a rule to reduce with.  */
    7051131  yylen = yyr2[yyn];
    706   if (yylen > 0)
    707     yyval = yyvsp[1-yylen]; /* implement default value of the action */
    708 
    709 #if YYDEBUG != 0
    710   if (yydebug)
     1132
     1133  /* If YYLEN is nonzero, implement the default value of the action:
     1134     `$$ = $1'.
     1135
     1136     Otherwise, the following line sets YYVAL to garbage.
     1137     This behavior is undocumented and Bison
     1138     users should not rely upon it.  Assigning to YYVAL
     1139     unconditionally makes the parser a bit smaller, and it avoids a
     1140     GCC warning that YYVAL may be used uninitialized.  */
     1141  yyval = yyvsp[1-yylen];
     1142
     1143
     1144  YY_REDUCE_PRINT (yyn);
     1145  switch (yyn)
    7111146    {
    712       int i;
    713 
    714       fprintf (stderr, "Reducing via rule %d (line %d), ",
    715                yyn, yyrline[yyn]);
    716 
    717       /* Print the symbols being reduced, and their result.  */
    718       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
    719         fprintf (stderr, "%s ", yytname[yyrhs[i]]);
    720       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    721     }
    722 #endif
    723 
    724 
    725   switch (yyn) {
    726 
    727 case 4:
    728 #line 66 "readcf.y"
    729 { *retvalue = yyvsp[-1].getval(); return 0; ;
    730     break;}
    731 case 5:
    732 #line 69 "readcf.y"
    733 { yyval = yyvsp[0]; ;
    734     break;}
    735 case 6:
     1147        case 5:
    7361148#line 70 "readcf.y"
    737 { yyval = yyvsp[-2].getval() + yyvsp[0].getval(); ;
    738     break;}
    739 case 7:
    740 #line 71 "readcf.y"
    741 { yyval = yyvsp[-2].getval() - yyvsp[0].getval(); ;
    742     break;}
    743 case 8:
    744 #line 72 "readcf.y"
    745 { yyval = yyvsp[-2].getval() * yyvsp[0].getval(); ;
    746     break;}
    747 case 9:
     1149    { *retvalue = (yyvsp[-1]).getval(); return 0; ;}
     1150    break;
     1151
     1152  case 6:
    7481153#line 73 "readcf.y"
    749 { yyval = yyvsp[-2].getval() / yyvsp[0].getval(); ;
    750     break;}
    751 case 10:
     1154    { (yyval) = (yyvsp[0]); ;}
     1155    break;
     1156
     1157  case 7:
    7521158#line 74 "readcf.y"
    753 { yyval = -yyvsp[0].getval(); ;
    754     break;}
    755 case 11:
     1159    { (yyval) = (yyvsp[-2]).getval() + (yyvsp[0]).getval(); ;}
     1160    break;
     1161
     1162  case 8:
    7561163#line 75 "readcf.y"
    757 { yyval = yyvsp[0].getval(); ;
    758     break;}
    759 case 12:
     1164    { (yyval) = (yyvsp[-2]).getval() - (yyvsp[0]).getval(); ;}
     1165    break;
     1166
     1167  case 9:
    7601168#line 76 "readcf.y"
    761 { yyval = power( yyvsp[-2].getval(), yyvsp[0].getintval() ); ;
    762     break;}
    763 case 13:
     1169    { (yyval) = (yyvsp[-2]).getval() * (yyvsp[0]).getval(); ;}
     1170    break;
     1171
     1172  case 10:
    7641173#line 77 "readcf.y"
    765 { yyval = yyvsp[-1].getval(); ;
    766     break;}
    767 }
    768    /* the action file gets copied in in place of this dollarsign */
    769 #line 543 "/usr/lib/bison.simple"
     1174    { (yyval) = (yyvsp[-2]).getval() / (yyvsp[0]).getval(); ;}
     1175    break;
     1176
     1177  case 11:
     1178#line 78 "readcf.y"
     1179    { (yyval) = -(yyvsp[0]).getval(); ;}
     1180    break;
     1181
     1182  case 12:
     1183#line 79 "readcf.y"
     1184    { (yyval) = (yyvsp[0]).getval(); ;}
     1185    break;
     1186
     1187  case 13:
     1188#line 80 "readcf.y"
     1189    { (yyval) = power( (yyvsp[-2]).getval(), (yyvsp[0]).getintval() ); ;}
     1190    break;
     1191
     1192  case 14:
     1193#line 81 "readcf.y"
     1194    { (yyval) = (yyvsp[-1]).getval(); ;}
     1195    break;
     1196
     1197
     1198      default: break;
     1199    }
     1200
     1201/* Line 1126 of yacc.c.  */
     1202#line 1200 "readcf.cc"
    7701203
    7711204
    7721205  yyvsp -= yylen;
    7731206  yyssp -= yylen;
    774 #ifdef YYLSP_NEEDED
    775   yylsp -= yylen;
    776 #endif
    777 
    778 #if YYDEBUG != 0
    779   if (yydebug)
    780     {
    781       short *ssp1 = yyss - 1;
    782       fprintf (stderr, "state stack now");
    783       while (ssp1 != yyssp)
    784         fprintf (stderr, " %d", *++ssp1);
    785       fprintf (stderr, "\n");
    786     }
    787 #endif
     1207
     1208
     1209  YY_STACK_PRINT (yyss, yyssp);
    7881210
    7891211  *++yyvsp = yyval;
    7901212
    791 #ifdef YYLSP_NEEDED
    792   yylsp++;
    793   if (yylen == 0)
    794     {
    795       yylsp->first_line = yylloc.first_line;
    796       yylsp->first_column = yylloc.first_column;
    797       yylsp->last_line = (yylsp-1)->last_line;
    798       yylsp->last_column = (yylsp-1)->last_column;
    799       yylsp->text = 0;
    800     }
    801   else
    802     {
    803       yylsp->last_line = (yylsp+yylen-1)->last_line;
    804       yylsp->last_column = (yylsp+yylen-1)->last_column;
    805     }
    806 #endif
    807 
    808   /* Now "shift" the result of the reduction.
    809      Determine what state that goes to,
    810      based on the state we popped back to
    811      and the rule number reduced by.  */
     1213
     1214  /* Now `shift' the result of the reduction.  Determine what state
     1215     that goes to, based on the state we popped back to and the rule
     1216     number reduced by.  */
    8121217
    8131218  yyn = yyr1[yyn];
    8141219
    815   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
    816   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
     1220  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
     1221  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    8171222    yystate = yytable[yystate];
    8181223  else
    819     yystate = yydefgoto[yyn - YYNTBASE];
     1224    yystate = yydefgoto[yyn - YYNTOKENS];
    8201225
    8211226  goto yynewstate;
    8221227
    823 yyerrlab:   /* here on detecting error */
    824 
    825   if (! yyerrstatus)
    826     /* If not already recovering from an error, report this error.  */
     1228
     1229/*------------------------------------.
     1230| yyerrlab -- here on detecting error |
     1231`------------------------------------*/
     1232yyerrlab:
     1233  /* If not already recovering from an error, report this error.  */
     1234  if (!yyerrstatus)
    8271235    {
    8281236      ++yynerrs;
    829 
    830 #ifdef YYERROR_VERBOSE
     1237#if YYERROR_VERBOSE
    8311238      yyn = yypact[yystate];
    8321239
    833       if (yyn > YYFLAG && yyn < YYLAST)
     1240      if (YYPACT_NINF < yyn && yyn < YYLAST)
    8341241        {
    835           int size = 0;
    836           char *msg;
    837           int x, count;
    838 
    839           count = 0;
    840           /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
    841           for (x = (yyn < 0 ? -yyn : 0);
    842                x < (sizeof(yytname) / sizeof(char *)); x++)
    843             if (yycheck[x + yyn] == x)
    844               size += strlen(yytname[x]) + 15, count++;
    845           msg = (char *) malloc(size + 15);
    846           if (msg != 0)
     1242          int yytype = YYTRANSLATE (yychar);
     1243          YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
     1244          YYSIZE_T yysize = yysize0;
     1245          YYSIZE_T yysize1;
     1246          int yysize_overflow = 0;
     1247          char *yymsg = 0;
     1248#         define YYERROR_VERBOSE_ARGS_MAXIMUM 5
     1249          char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
     1250          int yyx;
     1251
     1252#if 0
     1253          /* This is so xgettext sees the translatable formats that are
     1254             constructed on the fly.  */
     1255          YY_("syntax error, unexpected %s");
     1256          YY_("syntax error, unexpected %s, expecting %s");
     1257          YY_("syntax error, unexpected %s, expecting %s or %s");
     1258          YY_("syntax error, unexpected %s, expecting %s or %s or %s");
     1259          YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
     1260#endif
     1261          char *yyfmt;
     1262          char const *yyf;
     1263          static char const yyunexpected[] = "syntax error, unexpected %s";
     1264          static char const yyexpecting[] = ", expecting %s";
     1265          static char const yyor[] = " or %s";
     1266          char yyformat[sizeof yyunexpected
     1267                        + sizeof yyexpecting - 1
     1268                        + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
     1269                           * (sizeof yyor - 1))];
     1270          char const *yyprefix = yyexpecting;
     1271
     1272          /* Start YYX at -YYN if negative to avoid negative indexes in
     1273             YYCHECK.  */
     1274          int yyxbegin = yyn < 0 ? -yyn : 0;
     1275
     1276          /* Stay within bounds of both yycheck and yytname.  */
     1277          int yychecklim = YYLAST - yyn;
     1278          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
     1279          int yycount = 1;
     1280
     1281          yyarg[0] = yytname[yytype];
     1282          yyfmt = yystpcpy (yyformat, yyunexpected);
     1283
     1284          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
     1285            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
     1286              {
     1287                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
     1288                  {
     1289                    yycount = 1;
     1290                    yysize = yysize0;
     1291                    yyformat[sizeof yyunexpected - 1] = '\0';
     1292                    break;
     1293                  }
     1294                yyarg[yycount++] = yytname[yyx];
     1295                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
     1296                yysize_overflow |= yysize1 < yysize;
     1297                yysize = yysize1;
     1298                yyfmt = yystpcpy (yyfmt, yyprefix);
     1299                yyprefix = yyor;
     1300              }
     1301
     1302          yyf = YY_(yyformat);
     1303          yysize1 = yysize + yystrlen (yyf);
     1304          yysize_overflow |= yysize1 < yysize;
     1305          yysize = yysize1;
     1306
     1307          if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
     1308            yymsg = (char *) YYSTACK_ALLOC (yysize);
     1309          if (yymsg)
    8471310            {
    848               strcpy(msg, "parse error");
    849 
    850               if (count < 5)
     1311              /* Avoid sprintf, as that infringes on the user's name space.
     1312                 Don't have undefined behavior even if the translation
     1313                 produced a string with the wrong number of "%s"s.  */
     1314              char *yyp = yymsg;
     1315              int yyi = 0;
     1316              while ((*yyp = *yyf))
    8511317                {
    852                   count = 0;
    853                   for (x = (yyn < 0 ? -yyn : 0);
    854                        x < (sizeof(yytname) / sizeof(char *)); x++)
    855                     if (yycheck[x + yyn] == x)
    856                       {
    857                         strcat(msg, count == 0 ? ", expecting `" : " or `");
    858                         strcat(msg, yytname[x]);
    859                         strcat(msg, "'");
    860                         count++;
    861                       }
     1318                  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
     1319                    {
     1320                      yyp += yytnamerr (yyp, yyarg[yyi++]);
     1321                      yyf += 2;
     1322                    }
     1323                  else
     1324                    {
     1325                      yyp++;
     1326                      yyf++;
     1327                    }
    8621328                }
    863               yyerror(msg);
    864               free(msg);
     1329              yyerror (yymsg);
     1330              YYSTACK_FREE (yymsg);
    8651331            }
    8661332          else
    867             yyerror ("parse error; also virtual memory exceeded");
     1333            {
     1334              yyerror (YY_("syntax error"));
     1335              goto yyexhaustedlab;
     1336            }
    8681337        }
    8691338      else
    8701339#endif /* YYERROR_VERBOSE */
    871         yyerror("parse error");
    872     }
    873 
    874   goto yyerrlab1;
    875 yyerrlab1:   /* here on error raised explicitly by an action */
     1340        yyerror (YY_("syntax error"));
     1341    }
     1342
     1343
    8761344
    8771345  if (yyerrstatus == 3)
    8781346    {
    879       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
    880 
    881       /* return failure if at end of input */
    882       if (yychar == YYEOF)
     1347      /* If just tried and failed to reuse look-ahead token after an
     1348         error, discard it.  */
     1349
     1350      if (yychar <= YYEOF)
     1351        {
     1352          /* Return failure if at end of input.  */
     1353          if (yychar == YYEOF)
     1354            YYABORT;
     1355        }
     1356      else
     1357        {
     1358          yydestruct ("Error: discarding", yytoken, &yylval);
     1359          yychar = YYEMPTY;
     1360        }
     1361    }
     1362
     1363  /* Else will try to reuse look-ahead token after shifting the error
     1364     token.  */
     1365  goto yyerrlab1;
     1366
     1367
     1368/*---------------------------------------------------.
     1369| yyerrorlab -- error raised explicitly by YYERROR.  |
     1370`---------------------------------------------------*/
     1371yyerrorlab:
     1372
     1373  /* Pacify compilers like GCC when the user code never invokes
     1374     YYERROR and the label yyerrorlab therefore never appears in user
     1375     code.  */
     1376  if (0)
     1377     goto yyerrorlab;
     1378
     1379yyvsp -= yylen;
     1380  yyssp -= yylen;
     1381  yystate = *yyssp;
     1382  goto yyerrlab1;
     1383
     1384
     1385/*-------------------------------------------------------------.
     1386| yyerrlab1 -- common code for both syntax error and YYERROR.  |
     1387`-------------------------------------------------------------*/
     1388yyerrlab1:
     1389  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
     1390
     1391  for (;;)
     1392    {
     1393      yyn = yypact[yystate];
     1394      if (yyn != YYPACT_NINF)
     1395        {
     1396          yyn += YYTERROR;
     1397          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
     1398            {
     1399              yyn = yytable[yyn];
     1400              if (0 < yyn)
     1401                break;
     1402            }
     1403        }
     1404
     1405      /* Pop the current state because it cannot handle the error token.  */
     1406      if (yyssp == yyss)
    8831407        YYABORT;
    8841408
    885 #if YYDEBUG != 0
    886       if (yydebug)
    887         fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
    888 #endif
    889 
    890       yychar = YYEMPTY;
    891     }
    892 
    893   /* Else will try to reuse lookahead token
    894      after shifting the error token.  */
    895 
    896   yyerrstatus = 3;              /* Each real token shifted decrements this */
    897 
    898   goto yyerrhandle;
    899 
    900 yyerrdefault:  /* current state does not do anything special for the error token. */
    901 
    902 #if 0
    903   /* This is wrong; only states that explicitly want error tokens
    904      should shift them.  */
    905   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
    906   if (yyn) goto yydefault;
    907 #endif
    908 
    909 yyerrpop:   /* pop the current state because it cannot handle the error token */
    910 
    911   if (yyssp == yyss) YYABORT;
    912   yyvsp--;
    913   yystate = *--yyssp;
    914 #ifdef YYLSP_NEEDED
    915   yylsp--;
    916 #endif
    917 
    918 #if YYDEBUG != 0
    919   if (yydebug)
    920     {
    921       short *ssp1 = yyss - 1;
    922       fprintf (stderr, "Error: state stack now");
    923       while (ssp1 != yyssp)
    924         fprintf (stderr, " %d", *++ssp1);
    925       fprintf (stderr, "\n");
    926     }
    927 #endif
    928 
    929 yyerrhandle:
    930 
    931   yyn = yypact[yystate];
    932   if (yyn == YYFLAG)
    933     goto yyerrdefault;
    934 
    935   yyn += YYTERROR;
    936   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    937     goto yyerrdefault;
    938 
    939   yyn = yytable[yyn];
    940   if (yyn < 0)
    941     {
    942       if (yyn == YYFLAG)
    943         goto yyerrpop;
    944       yyn = -yyn;
    945       goto yyreduce;
    946     }
    947   else if (yyn == 0)
    948     goto yyerrpop;
     1409
     1410      yydestruct ("Error: popping", yystos[yystate], yyvsp);
     1411      YYPOPSTACK;
     1412      yystate = *yyssp;
     1413      YY_STACK_PRINT (yyss, yyssp);
     1414    }
    9491415
    9501416  if (yyn == YYFINAL)
    9511417    YYACCEPT;
    9521418
    953 #if YYDEBUG != 0
    954   if (yydebug)
    955     fprintf(stderr, "Shifting error token, ");
    956 #endif
    957 
    9581419  *++yyvsp = yylval;
    959 #ifdef YYLSP_NEEDED
    960   *++yylsp = yylloc;
    961 #endif
     1420
     1421
     1422  /* Shift the error token. */
     1423  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
    9621424
    9631425  yystate = yyn;
    9641426  goto yynewstate;
    9651427
    966  yyacceptlab:
    967   /* YYACCEPT comes here.  */
    968   if (yyfree_stacks)
     1428
     1429/*-------------------------------------.
     1430| yyacceptlab -- YYACCEPT comes here.  |
     1431`-------------------------------------*/
     1432yyacceptlab:
     1433  yyresult = 0;
     1434  goto yyreturn;
     1435
     1436/*-----------------------------------.
     1437| yyabortlab -- YYABORT comes here.  |
     1438`-----------------------------------*/
     1439yyabortlab:
     1440  yyresult = 1;
     1441  goto yyreturn;
     1442
     1443#ifndef yyoverflow
     1444/*-------------------------------------------------.
     1445| yyexhaustedlab -- memory exhaustion comes here.  |
     1446`-------------------------------------------------*/
     1447yyexhaustedlab:
     1448  yyerror (YY_("memory exhausted"));
     1449  yyresult = 2;
     1450  /* Fall through.  */
     1451#endif
     1452
     1453yyreturn:
     1454  if (yychar != YYEOF && yychar != YYEMPTY)
     1455     yydestruct ("Cleanup: discarding lookahead",
     1456                 yytoken, &yylval);
     1457  while (yyssp != yyss)
    9691458    {
    970       free (yyss);
    971       free (yyvs);
    972 #ifdef YYLSP_NEEDED
    973       free (yyls);
    974 #endif
    975     }
    976   return 0;
    977 
    978  yyabortlab:
    979   /* YYABORT comes here.  */
    980   if (yyfree_stacks)
    981     {
    982       free (yyss);
    983       free (yyvs);
    984 #ifdef YYLSP_NEEDED
    985       free (yyls);
    986 #endif
    987     }
    988   return 1;
     1459      yydestruct ("Cleanup: popping",
     1460                  yystos[*yyssp], yyvsp);
     1461      YYPOPSTACK;
     1462    }
     1463#ifndef yyoverflow
     1464  if (yyss != yyssa)
     1465    YYSTACK_FREE (yyss);
     1466#endif
     1467  return yyresult;
    9891468}
    990 #line 80 "readcf.y"
     1469
     1470
     1471#line 84 "readcf.y"
    9911472
    9921473
     
    9971478#endif
    9981479{
    999     cerr << s << endl;
     1480    CERR << s << "\n";
    10001481}
    10011482
     
    10551536}
    10561537
    1057 CanonicalForm readCF( istream& str )
     1538CanonicalForm readCF( ISTREAM& str )
    10581539{
    10591540    CanonicalForm theRetvalue;
     
    10851566}
    10861567
    1087 char* readString( istream& s )
     1568char* readString( ISTREAM& s )
    10881569{
    10891570    static char * buffer = 0;
     
    11161597    return buffer;
    11171598}
     1599
     1600
  • factory/readcf.y

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: readcf.y,v 1.9 2006-05-15 08:17:55 Singular Exp $ */
     2/* $Id: readcf.y,v 1.10 2006-05-15 09:03:07 Singular Exp $ */
    33
    44%{
     
    1515#ifdef HAVE_IOSTREAM
    1616#include <iostream>
     17#define ISTREAM std::istream
     18#define CERR std::cerr
    1719#elif defined(HAVE_IOSTREAM_H)
    1820#include <iostream.h>
     21#define ISTREAM istream
     22#define CERR cerr
    1923#endif
    2024
     
    3539#endif
    3640
    37 static char* readString( istream& );
     41static char* readString( ISTREAM& );
    3842
    3943#ifndef BISONPP
     
    4246#endif
    4347
    44 static istream * defaultin = 0;
     48static ISTREAM * defaultin = 0;
    4549
    4650static CanonicalForm * retvalue = 0;
     
    8690#endif
    8791{
    88     cerr << s << endl;
     92    CERR << s << "\n";
    8993}
    9094
     
    144148}
    145149
    146 CanonicalForm readCF( istream& str )
     150CanonicalForm readCF( ISTREAM& str )
    147151{
    148152    CanonicalForm theRetvalue;
     
    174178}
    175179
    176 char* readString( istream& s )
     180char* readString( ISTREAM& s )
    177181{
    178182    static char * buffer = 0;
  • factory/templates/ftmpl_array.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_array.cc,v 1.8 1998-03-10 14:51:21 schmidt Exp $ */
     2/* $Id: ftmpl_array.cc,v 1.9 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#include <factoryconf.h>
     
    143143#ifndef NOSTREAMIO
    144144template <class T>
    145 void Array<T>::print ( ostream & os ) const
     145void Array<T>::print ( OSTREAM & os ) const
    146146{
    147147    if ( _size == 0 )
     
    156156
    157157template <class T>
    158 ostream& operator<< ( ostream & os, const Array<T> & a )
     158OSTREAM& operator<< ( OSTREAM & os, const Array<T> & a )
    159159{
    160160    a.print( os );
  • factory/templates/ftmpl_array.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_array.h,v 1.6 2006-05-15 08:17:56 Singular Exp $ */
     2/* $Id: ftmpl_array.h,v 1.7 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#ifndef INCL_ARRAY_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    3436    int max() const;
    3537#ifndef NOSTREAMIO
    36     void print ( ostream& ) const;
     38    void print ( OSTREAM& ) const;
    3739#endif /* NOSTREAMIO */
    3840};
     
    4042#ifndef NOSTREAMIO
    4143template <class T>
    42 ostream& operator<< ( ostream & os, const Array<T> & a );
     44OSTREAM& operator<< ( OSTREAM & os, const Array<T> & a );
    4345#endif /* NOSTREAMIO */
    4446
  • factory/templates/ftmpl_factor.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_factor.cc,v 1.7 1998-03-10 14:51:26 schmidt Exp $ */
     2/* $Id: ftmpl_factor.cc,v 1.8 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#include <factoryconf.h>
     
    3636#ifndef NOSTREAMIO
    3737template <class T>
    38 void Factor<T>::print ( ostream& s ) const
     38void Factor<T>::print ( OSTREAM& s ) const
    3939{
    4040    if ( exp() == 1 )
     
    4545
    4646template <class T>
    47 ostream& operator<< ( ostream & os, const Factor<T> & f )
     47OSTREAM& operator<< ( OSTREAM & os, const Factor<T> & f )
    4848{
    4949    f.print( os );
  • factory/templates/ftmpl_factor.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_factor.h,v 1.6 2006-05-15 08:17:56 Singular Exp $ */
     2/* $Id: ftmpl_factor.h,v 1.7 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#ifndef INCL_FACTOR_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    3638    Factor<T>& operator*= ( const T & f ) { _factor *= f; return *this; }
    3739#ifndef NOSTREAMIO
    38     void print ( ostream& ) const;
     40    void print ( OSTREAM& ) const;
    3941#endif /* NOSTREAMIO */
    4042};
     
    4547#ifndef NOSTREAMIO
    4648template <class T>
    47 ostream& operator<< ( ostream & os, const Factor<T> & f );
     49OSTREAM& operator<< ( OSTREAM & os, const Factor<T> & f );
    4850#endif /* NOSTREAMIO */
    4951
  • factory/templates/ftmpl_list.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_list.cc,v 1.8 2003-02-11 16:28:51 Singular Exp $ */
     2/* $Id: ftmpl_list.cc,v 1.9 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#include <factoryconf.h>
     
    7878#ifndef NOSTREAMIO
    7979template <class T>
    80 void ListItem<T>::print( ostream & os )
     80void ListItem<T>::print( OSTREAM & os )
    8181{
    8282    if ( item )
     
    331331#ifndef NOSTREAMIO
    332332template <class T>
    333 void List<T>::print ( ostream & os ) const
     333void List<T>::print ( OSTREAM & os ) const
    334334{
    335335    ListItem<T> *cur = first;
     
    510510#ifndef NOSTREAMIO
    511511template <class T>
    512 ostream& operator<<( ostream & os, const List<T> & l )
     512OSTREAM& operator<<( OSTREAM & os, const List<T> & l )
    513513{
    514514    l.print( os );
  • factory/templates/ftmpl_list.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_list.h,v 1.9 2006-05-15 08:17:56 Singular Exp $ */
     2/* $Id: ftmpl_list.h,v 1.10 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#ifndef INCL_LIST_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    2325#ifndef NOSTREAMIO
    2426template <class T>
    25 std::ostream& operator<< ( std::ostream &, const List<T> &);
     27OSTREAM& operator<< ( OSTREAM &, const List<T> &);
    2628#endif
    2729
     
    4345    T& getItem();
    4446#ifndef NOSTREAMIO
    45     void print ( ostream& );
     47    void print ( OSTREAM& );
    4648#endif /* NOSTREAMIO */
    4749    friend class ListIterator<T>;
     
    7476    void sort ( int (*) ( const T&, const T& ) );
    7577#ifndef NOSTREAMIO
    76     void print ( ostream & ) const;
    77     friend ostream& operator<< <T>( ostream & os, const List<T> & l );
     78    void print ( OSTREAM & ) const;
     79    friend OSTREAM& operator<< <T>( OSTREAM & os, const List<T> & l );
    7880#endif /* NOSTREAMIO */
    7981    friend class ListIterator<T>;
     
    8284#ifndef NOSTREAMIO
    8385template <class T>
    84 ostream& operator<< ( ostream & os, const List<T> & l );
     86OSTREAM& operator<< ( OSTREAM & os, const List<T> & l );
    8587#endif /* NOSTREAMIO */
    8688
  • factory/templates/ftmpl_matrix.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_matrix.cc,v 1.10 2001-06-27 13:20:39 Singular Exp $ */
     2/* $Id: ftmpl_matrix.cc,v 1.11 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#include <factoryconf.h>
     
    143143#ifndef NOSTREAMIO
    144144template <class T>
    145 void Matrix<T>::printrow ( ostream & s, int i ) const
     145void Matrix<T>::printrow ( OSTREAM & s, int i ) const
    146146{
    147147    s << "( " << elems[i][0];
     
    152152
    153153template <class T>
    154 void Matrix<T>::print( ostream& s ) const
     154void Matrix<T>::print( OSTREAM& s ) const
    155155{
    156156    if ( NR == 0 )
     
    319319#ifndef NOSTREAMIO
    320320template <class T>
    321 ostream & operator<< ( ostream & s, const Matrix<T>& M )
     321OSTREAM & operator<< ( OSTREAM & s, const Matrix<T>& M )
    322322{
    323323   M.print( s );
  • factory/templates/ftmpl_matrix.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ftmpl_matrix.h,v 1.12 2006-05-15 08:17:57 Singular Exp $ */
     2/* $Id: ftmpl_matrix.h,v 1.13 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#ifndef INCL_MATRIX_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    2325#ifndef NOSTREAMIO
    2426template <class T>
    25 ostream& operator<< (ostream &, const Matrix<T> &);
     27OSTREAM& operator<< (OSTREAM &, const Matrix<T> &);
    2628#endif
    2729
     
    3335    T ** elems;
    3436#ifndef NOSTREAMIO
    35     void printrow ( ostream & s, int i ) const;
     37    void printrow ( OSTREAM & s, int i ) const;
    3638#endif /* NOSTREAMIO */
    3739    typedef T* T_ptr;
     
    5355    void swapColumn( int i, int j );
    5456#ifndef NOSTREAMIO
    55     void print( ostream& s ) const;
    56     friend ostream & operator<< <T>( ostream & s, const Matrix<T>& M );
     57    void print( OSTREAM& s ) const;
     58    friend OSTREAM & operator<< <T>( OSTREAM & s, const Matrix<T>& M );
    5759#endif /* NOSTREAMIO */
    5860    friend class SubMatrix<T>;
     
    8991#ifndef NOSTREAMIO
    9092template <class T>
    91 ostream & operator<< ( ostream & s, const Matrix<T>& M );
     93OSTREAM & operator<< ( OSTREAM & s, const Matrix<T>& M );
    9294#endif /* NOSTREAMIO */
    9395
  • factory/variable.cc

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: variable.cc,v 1.5 2005-04-13 15:01:53 Singular Exp $ */
     2/* $Id: variable.cc,v 1.6 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#include <config.h>
     
    130130
    131131#ifndef NOSTREAMIO
    132 ostream & operator << ( ostream & os, const Variable & v )
     132OSTREAM & operator << ( OSTREAM & os, const Variable & v )
    133133{
    134134    if ( v._level == LEVELBASE )
  • factory/variable.h

    r1dc616 r181148  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: variable.h,v 1.6 2006-05-15 08:17:55 Singular Exp $ */
     2/* $Id: variable.h,v 1.7 2006-05-15 09:03:07 Singular Exp $ */
    33
    44#ifndef INCL_VARIABLE_H
     
    1010#ifdef HAVE_IOSTREAM
    1111#include <iostream>
     12#define OSTREAM std::ostream
    1213#elif defined(HAVE_IOSTREAM_H)
    1314#include <iostream.h>
     15#define OSTREAM ostream
    1416#endif
    1517#endif /* NOSTREAMIO */
     
    6769    }
    6870#ifndef NOSTREAMIO
    69     friend ostream & operator << ( ostream & os, const Variable & v );
     71    friend OSTREAM & operator << ( OSTREAM & os, const Variable & v );
    7072#endif /* NOSTREAMIO */
    7173    friend void swap_levels();
Note: See TracChangeset for help on using the changeset viewer.