include/types.h

Sat, 19 Feb 2000 23:23:29 +0100

author
tuomov
date
Sat, 19 Feb 2000 23:23:29 +0100
changeset 1
6e704fc09528
parent 0
86b7f6f9c5c0
permissions
-rw-r--r--

trunk: changeset 4
- Added include support in config file parser

- Added scatn()

- Fixed remalloczero()

- Fixed is_end() in numparser2.h -- EOF case was missing

/*
 * libtu/types.h
 *
 * Copyright (c) Tuomo Valkonen 1999-2000.
 * 
 * This file is distributed under the terms of the "Artistic License".
 * See the included file LICENSE for details.
 */

#ifndef __LIBTU_TYPES_H
#define __LIBTU_TYPES_H

#include <sys/types.h>

#ifndef TRUE
 #define TRUE 1
#endif

#ifndef FALSE
 #define FALSE 0
#endif

#ifndef NULL
 #define NULL ((void*)0)
#endif

#ifndef LIBTU_TYPEDEF_UXXX

 /* All systems seem to define these whichever way they want to
  * despite -D_*_SOURCE etc. so there is no easy way to know whether
  * they can be typedef'd or not. Unless you want to go through using
  * autoconf or similar methods. ==> Just stick to #define. :-(
  */
  
 #ifndef uchar
  #define uchar	unsigned char
 #endif
 #ifndef ushort
  #define ushort unsigned short
 #endif
 #ifndef uint
  #define uint unsigned int
 #endif
 #ifndef ulong
  #define ulong	unsigned long
 #endif

#else /* LIBTU_TYPEDEF_UXXX */

 #ifndef uchar
  typedef unsigned char uchar;
 #endif
 #ifndef ushort
  typedef unsigned short ushort;
 #endif
 #ifndef uint
  typedef unsigned int uint;
 #endif
 #ifndef ulong
  typedef unsigned long ulong;
 #endif
 
#endif /* LIBTU_TYPEDEF_UXXX */


#ifndef LIBTU_TYPEDEF_BOOL

 #ifndef bool
  #define bool int
 #endif
 
#else /* LIBTU_TYPEDEF_BOOL */

 #ifndef bool
  typedef int bool;
 #endif
 
#endif /* LIBTU_TYPEDEF_BOOL */

#endif /* __LIBTU_TYPES_H */

mercurial