Top   Types   Functions   Classes   Options   Index   Sources 

erwin/vector.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 vectors (= resizable arrays)
  7   *    Theses can also be used as stacks.
  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 vector.h."
 54  #endif
 55  
 56  #ifndef Global_ERWIN_VECTOR_H
 57  #define Global_ERWIN_VECTOR_H
 58  
 59  #ifdef ERWIN_DEBUG_INCLUDE
 60  #warning "First inclusion of vector.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 erwininternalvectorerrno
 71  #COPYNAME erwininternalvectorstrerror
 72  #COPYNAME ERWININTERNALVECTOROK
 73  #COPYNAME ERWININTERNALVECTORISOK
 74  #COPYNAME ERWININTERNALVECTORISERROR
 75  #COPYNAME ERWININTERNALVECTORISWARNING
 76  #COPYNAME ERWININTERNALVECTORERRNOMEM
 77  #COPYNAME ERWININTERNALVECTORERROUTOFRANGE
 78  #COPYNAME ERWININTERNALVECTORERRTOOLARGE
 79  #COPYNAME ERWININTERNALVECTORERRASSERTIONFAILED
 80  #COPYNAME ERWININTERNALVECTORERRNOTCOMPILED
 81  #COPYNAME ERWININTERNALVECTORERRIO
 82  #COPYNAME ERWININTERNALVECTORWARNOUTOFRANGE
 83  #COPYNAME ERWININTERNALVECTORWARNEMPTY
 84  
 85  #else /* !defined(Global_ERWIN_ADAM_NAME) */
 86  
 87  #ifdef __cplusplus
 88  extern "C" {
 89  #endif
 90  
 91  /* must be in sync with vector.c: */
 92  #if !defined(Global_ERWIN_THREAD_SAFE) || Global_ERWIN_USE_THREAD_KEYWORD
 93  extern Global_ERWIN_THREAD_LOCAL int Global_erwininternalvectorerrno;
 94  #elif Global_ERWIN_USE_PTHREAD
 95  extern int *Global_erwininternalvectorerrnoptr(void);
 96  #define Global_erwininternalvectorerrno (*Global_erwininternalvectorerrnoptr())
 97  #endif
 98  
 99  extern char const *Global_erwininternalvectorstrerror (int) ATTR_PURE;
100  
101  #define Global_ERWININTERNALVECTOROK                  1
102  
103  #define Global_ERWININTERNALVECTORISOK(X)             ((X) == Global_ERWININTERNALVECTOROK)
104  #define Global_ERWININTERNALVECTORISERROR(X)          ((X) <  Global_ERWININTERNALVECTOROK)
105  #define Global_ERWININTERNALVECTORISWARNING(X)        ((X) >  Global_ERWININTERNALVECTOROK)
106  
107  #define Global_ERWININTERNALVECTORERRNOMEM            (-2)
108  #define Global_ERWININTERNALVECTORERROUTOFRANGE       (-4)
109  #define Global_ERWININTERNALVECTORERRASSERTIONFAILED  (-5)
110  #define Global_ERWININTERNALVECTORERRNOTCOMPILED      (-6)
111  #define Global_ERWININTERNALVECTORERRIO               (-7)
112  #define Global_ERWININTERNALVECTORERRTOOLARGE         (-8)
113  
114  #define Global_ERWININTERNALVECTORWARNOUTOFRANGE      3
115          /* do not write +3, g++ 2.7.2.3 will not see that that is a constant! */
116  #define Global_ERWININTERNALVECTORWARNEMPTY           5
117  
118  #ifdef __cplusplus
119  }
120  #endif
121  
122  #endif /* defined(Global_ERWIN_ADAM_NAME) */
123  
124  #endif /* AI_ERWIN_VECTOR_H */

Index

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