Top   Types   Functions   Classes   Options   Index   Sources 

erwin/list.h


  1  /*-*- Mode: C -*-*/
  2  /*
  3   * Time-stamp: <Fri, 24 Aug 2007 18:00:21 +0200 theiling>
  4   * Author: Henrik Theiling
  5   * Description:
  6   *    Templates for doubly linked lists.
  7   *    Theses can also be used as stacks and queues.
  8   *
  9   * @@Begin: Licencing and Copying@@
 10   * 
 11   * Copyright (c) Henrik Theiling
 12   * Licence Version 2, Special Version for Erwin.
 13   * 
 14   * The term 'this software' used in the following, additional to its
 15   * usual usage, also includes the instantiated source files generated by
 16   * tools of this package.
 17   * 
 18   * This software is provided 'as-is', without warranty of any kind,
 19   * express or implied.  In no event will the authors or copyright holders
 20   * be held liable for any damages arising from the use of this software.
 21   * 
 22   * Permission is granted to anyone to use this software for any purpose,
 23   * including commercial applications, and to alter it and redistribute it
 24   * freely, subject to the following restrictions:
 25   * 
 26   * 1. The origin of this software must not be misrepresented; you must
 27   * not claim that you wrote the original software. If you use this
 28   * software in a product, an acknowledgment in the product documentation
 29   * would be appreciated.
 30   * 
 31   * 2. Altered source versions must be plainly marked as such, and must
 32   * not be misrepresented as being the original software.
 33   * 
 34   * 3. You must not use any of the names of the authors or copyright
 35   * holders of the original software for advertising or publicity
 36   * pertaining to distribution without specific, written prior permission.
 37   * 
 38   * 4. If you change this software and redistribute parts or all of it in
 39   * any form, you must make the source code of the altered version of this
 40   * software available.  As an exception, files that were generated by
 41   * tools of this package may be used freely, including modification.
 42   * 
 43   * 5. This notice must not be removed or altered from any source
 44   * distribution.
 45   * 
 46   * This licence is governed by the Laws of Germany.  Disputes shall be
 47   * settled by Saarbruecken City Court.
 48   * 
 49   * @@End: Licencing and Copying@@
 50   *
 51   * ---------------------------------------------------------------------- */
 52  #ifdef ERWIN_DEBUG_INCLUDE
 53  #warning "Including list.h."
 54  #endif
 55  
 56  #ifndef Global_ERWIN_LIST_H
 57  #define Global_ERWIN_LIST_H
 58  
 59  #ifdef ERWIN_DEBUG_INCLUDE
 60  #warning "First inclusion of list.h."
 61  #endif
 62  #ifdef Global_ERWIN_COMPILING
 63  #  include "--INCPREF2B--erwin/defs.h"
 64  #else
 65  #  include <--INCPREF2B--erwin/defs.h>
 66  #endif
 67  
 68  #ifdef Global_ERWIN_ADAM_NAME
 69  
 70  #COPYNAME erwininternallisterrno
 71  #COPYNAME erwininternalliststrerror
 72  #COPYNAME ERWININTERNALLISTOK
 73  #COPYNAME ERWININTERNALLISTISOK
 74  #COPYNAME ERWININTERNALLISTISERROR
 75  #COPYNAME ERWININTERNALLISTISWARNING
 76  #COPYNAME ERWININTERNALLISTERRNOMEM
 77  #COPYNAME ERWININTERNALLISTERROUTOFRANGE
 78  #COPYNAME ERWININTERNALLISTERRASSERTIONFAILED
 79  #COPYNAME ERWININTERNALLISTERRNOTCOMPILED
 80  #COPYNAME ERWININTERNALLISTWARNOUTOFRANGE
 81  #COPYNAME ERWININTERNALLISTWARNEMPTY
 82  
 83  #else /* !defined(Global_ERWIN_ADAM_NAME) */
 84  
 85  #ifdef __cplusplus
 86  extern "C" {
 87  #endif
 88  
 89  /* must be in sync with list.c: */
 90  #if !defined(Global_ERWIN_THREAD_SAFE) || Global_ERWIN_USE_THREAD_KEYWORD
 91  extern Global_ERWIN_THREAD_LOCAL int Global_erwininternallisterrno;
 92  #elif Global_ERWIN_USE_PTHREAD
 93  extern int *Global_erwininternallisterrnoptr(void);
 94  #define Global_erwininternallisterrno (*Global_erwininternallisterrnoptr())
 95  #endif
 96  
 97  extern char const *Global_erwininternalliststrerror (int) ATTR_PURE;
 98  
 99  #define Global_ERWININTERNALLISTOK                  1
100  
101  #define Global_ERWININTERNALLISTISOK(X)             ((X) == Global_ERWININTERNALLISTOK)
102  #define Global_ERWININTERNALLISTISERROR(X)          ((X) <  Global_ERWININTERNALLISTOK)
103  #define Global_ERWININTERNALLISTISWARNING(X)        ((X) >  Global_ERWININTERNALLISTOK)
104  
105  #define Global_ERWININTERNALLISTERRNOMEM            (-2)
106  #define Global_ERWININTERNALLISTERROUTOFRANGE       (-4)
107  #define Global_ERWININTERNALLISTERRASSERTIONFAILED  (-5)
108  #define Global_ERWININTERNALLISTERRNOTCOMPILED      (-6)
109  
110  #define Global_ERWININTERNALLISTWARNOUTOFRANGE      3
111          /* do not write +3, g++ 2.7.2.3 will not see that that is a constant! */
112  #define Global_ERWININTERNALLISTWARNEMPTY           5
113  
114  #ifdef __cplusplus
115  }
116  #endif
117  
118  #endif /* defined(Global_ERWIN_ADAM_NAME) */
119  
120  #endif /* AI_ERWIN_LIST_H */

Index

Stoppt die Vorratsdatenspeicherung
November 26th, 2007
Comments? Suggestions? Corrections? You can drop me a line.
zpentrabvagiktu@theiling.de
Schwerpunktpraxis