## modules/up/src/gnug++/NormalTermPtr.defs.h

/* [<][>][^][v][top][bottom][index][help] */

## FUNCTIONS

This source file includes following functions.

1. NormalTermPtrEQ
2. NormalTermPtrLE
3. NormalTermPtrCMP
4. NormalTermPtrHASH
5. HASHTABLE_TOO_CROWDED

       1 // This may look like C code, but it is really -*- C++ -*-
       2 /*
       3 Copyright (C) 1988 Free Software Foundation
       4     written by Doug Lea (dl@rocky.oswego.edu)
       5
       6 This file is part of the GNU C++ Library.  This library is free
       7 software; you can redistribute it and/or modify it under the terms of
       8 the GNU Library General Public License as published by the Free
       9 Software Foundation; either version 2 of the License, or (at your
      10 option) any later version.  This library is distributed in the hope
      11 that it will be useful, but WITHOUT ANY WARRANTY; without even the
      12 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
      13 PURPOSE.  See the GNU Library General Public License for more details.
      14 You should have received a copy of the GNU Library General Public
      15 License along with this library; if not, write to the Free Software
      16 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
      17 */
      18
      19
      20 #ifndef _NormalTermPtrdefs_h
      21 #define _NormalTermPtrdefs_h 1
      22
      23 #include "config.h"
      24 #include "normalform/NT.hh"
      25
      26 // equality operator
      27 #ifndef NormalTermPtrEQ
      28 #define NormalTermPtrEQ(a, b)  ((*a) == (*b))
         /* [<][>][^][v][top][bottom][index][help] */
      29 #endif
      30
      31 // less-than-or-equal
      32 #ifndef NormalTermPtrLE
      33 #define NormalTermPtrLE(a, b)  ((*a) <= (*b))
         /* [<][>][^][v][top][bottom][index][help] */
      34 #endif
      35
      36 // comparison : less-than -> < 0; equal -> 0; greater-than -> > 0
      37 #ifndef NormalTermPtrCMP
      38 #define NormalTermPtrCMP(a, b) ( ((*a) <= (*b))? (((*a) == (*b))? 0 : -1) : 1 )
         /* [<][>][^][v][top][bottom][index][help] */
      39 #endif
      40
      41 // hash function
      42 #ifndef NormalTermPtrHASH
      43 extern unsigned int hash(NormalTermPtr );
      44 #define NormalTermPtrHASH(x)  hash(x)
         /* [<][>][^][v][top][bottom][index][help] */
      45 #endif
      46
      47 // initial capacity for structures requiring one
      48
      49 #ifndef DEFAULT_INITIAL_CAPACITY
      50 #define DEFAULT_INITIAL_CAPACITY 100
      51 #endif
      52
      53 // HASHTABLE_TOO_CROWDED(COUNT, SIZE) is true iff a hash table with COUNT
      54 // elements and SIZE slots is too full, and should be resized.
      55 // This is so if available space is less than 1/8.
      56
      57 #define HASHTABLE_TOO_CROWDED(COUNT, SIZE) ((SIZE) - ((SIZE) >> 3) <= (COUNT))
         /* [<][>][^][v][top][bottom][index][help] */
      58
      59 #endif

/* [<][>][^][v][top][bottom][index][help] */