Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

ast_common.h

Go to the documentation of this file.
00001 /* $Id: ast_common.h,v 1.1 2005/04/09 03:38:19 roxo Exp $ $Revision: 1.1 $ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /**********************************************************
00005 *      This software is part of the graphviz package      *
00006 *                http://www.graphviz.org/                 *
00007 *                                                         *
00008 *            Copyright (c) 1994-2004 AT&T Corp.           *
00009 *                and is licensed under the                *
00010 *            Common Public License, Version 1.0           *
00011 *                      by AT&T Corp.                      *
00012 *                                                         *
00013 *        Information and Software Systems Research        *
00014 *              AT&T Research, Florham Park NJ             *
00015 **********************************************************/
00016 
00017 /* : : generated from features/common by iffe version 1999-08-11 : : */
00018 #ifndef _AST_COMMON_H
00019 #define _AST_COMMON_H   1
00020 #define _hdr_pthread    1       /* #include <pthread.h> ok */
00021 #define _hdr_stddef     1       /* #include <stddef.h> ok */
00022 #define _sys_types      1       /* #include <sys/types.h> ok */
00023 #define _hdr_time       1       /* #include <time.h> ok */
00024 #define _sys_time       1       /* #include <sys/time.h> ok */
00025 #define _sys_times      1       /* #include <sys/times.h> ok */
00026 #define _hdr_stdlib     1       /* #include <stdlib.h> ok */
00027 #define _typ_size_t     1       /* size_t is a type */
00028 #define _typ_ssize_t    1       /* ssize_t is a type */
00029 #define _typ_long_double        1       /* long double is a type */
00030 #define _proto_stdc     1       /* Standard-C prototypes ok */
00031 
00032 /* __STD_C indicates that the language is ANSI-C or C++ */
00033 #if !defined(__STD_C) && __STDC__
00034 #define __STD_C         1
00035 #endif
00036 #if !defined(__STD_C) && (__cplusplus || c_plusplus)
00037 #define __STD_C         1
00038 #endif
00039 #if !defined(__STD_C) && _proto_stdc
00040 #define __STD_C         1
00041 #endif
00042 #if !defined(__STD_C)
00043 #define __STD_C         0
00044 #endif
00045 
00046 /* extern symbols must be protected against C++ name mangling */
00047 #ifndef _BEGIN_EXTERNS_
00048 #if __cplusplus || c_plusplus
00049 #define _BEGIN_EXTERNS_ extern "C" {
00050 #define _END_EXTERNS_   }
00051 #else
00052 #define _BEGIN_EXTERNS_
00053 #define _END_EXTERNS_
00054 #endif
00055 #endif /*_BEGIN_EXTERNS_*/
00056 
00057 /* _ARG_ simplifies function prototyping among flavors of C */
00058 #ifndef _ARG_
00059 #if __STD_C
00060 #define _ARG_(x)        x
00061 #else
00062 #define _ARG_(x)        ()
00063 #endif
00064 #endif /*_ARG_*/
00065 
00066 /* __INLINE__ is the inline keyword */
00067 #if !defined(__INLINE__) && defined(__cplusplus)
00068 #define __INLINE__      inline
00069 #endif
00070 #if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
00071 #define __INLINE__      __inline
00072 #endif
00073 
00074 /* Void_t is defined so that Void_t* can address any type */
00075 #ifndef Void_t
00076 #if __STD_C
00077 #define Void_t          void
00078 #else
00079 #define Void_t          char
00080 #endif
00081 #endif                          /*Void_t */
00082 
00083 /* dynamic linked library external scope handling */
00084 #undef extern
00085 #if _dll_import && !defined(__EXPORT__) && _DLL_BLD
00086 #define __EXPORT__      __declspec(dllexport)
00087 #endif
00088 #if _dll_import && !defined(__IMPORT__)
00089 #define __IMPORT__      __declspec(dllimport)
00090 #endif
00091 #if !defined(_astimport)
00092 #if defined(__IMPORT__) && _DLL_BLD
00093 #define _astimport      __IMPORT__
00094 #else
00095 #define _astimport      extern
00096 #endif
00097 #endif /*_astimport*/
00098 #if !_DLL_BLD && _dll_import
00099 #define __EXTERN__(T,obj)       extern T obj; T* _imp__ ## obj = &obj
00100 #define __DEFINE__(T,obj,val)   T obj = val; T* _imp__ ## obj = &obj
00101 #else
00102 #define __EXTERN__(T,obj)       extern T obj
00103 #define __DEFINE__(T,obj,val)   T obj = val
00104 #endif
00105 #ifndef _AST_STD_H
00106 #       if _hdr_stddef
00107 #       include <stddef.h>
00108 #       endif
00109 #       if _sys_types
00110 #       include <sys/types.h>
00111 #       endif
00112 #endif
00113 #if !_typ_size_t
00114 #       define _typ_size_t      1
00115 typedef int size_t;
00116 #endif
00117 #if !_typ_ssize_t
00118 #       define _typ_ssize_t     1
00119 typedef int ssize_t;
00120 #endif
00121 #define _ast_int1_t             char
00122 #define _ast_int2_t             short
00123 #define _ast_int4_t             int
00124 #define _ast_int8_t             long long
00125 #define _ast_intmax_t           _ast_int8_t
00126 #define _ast_intswap            7
00127 
00128 #define _ast_flt4_t             float
00129 #define _ast_flt8_t             double
00130 #define _ast_flt12_t            long double
00131 #define _ast_fltmax_t           _ast_flt12_t
00132 
00133 #ifndef va_listref
00134 #define va_listref(p) (p)       /* pass va_list to varargs function */
00135 #define va_listval(p) (p)       /* retrieve va_list from va_arg(ap,va_listarg) */
00136 #define va_listarg va_list      /* va_arg() va_list type */
00137 #ifndef va_copy
00138 #define va_copy(to,fr) ((to)=(fr))      /* copy va_list fr -> to */
00139 #endif
00140 #undef  _ast_va_list
00141 #ifdef  va_start
00142 #define _ast_va_list va_list
00143 #else
00144 #define _ast_va_list void*      /* va_list that avoids #include */
00145 #endif
00146 
00147 #endif
00148 #endif
Untitled Document Pesquisa Psi SourceForge.net Logo