/** * @file base.h * @ingroup common * * Common types, definitions, and header files. * * @author Geoff Davis <geoff@circlemudsquared.org> * * @par Copyright: * Copyright (C) 2006 Geoff Davis <geoff@circlemudsquared.org><br> * Greg Buxton <greg@circlemudsquared.org> * * @par * Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University<br> * CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. * * @par * All rights reserved. See license.doc for complete information. * * @package cs * @version 1.0 */ #ifndef __BASETYPES_H__ #define __BASETYPES_H__ #include "conf.h" #include "sysdep.h" /* * Define Doxygen groups. */ /** * @defgroup common * Common functionality. */ /** * @defgroup collection * Collection */ /** * @defgroup character * Character-related functionality. */ /** * @defgroup mobile * Mobile-related functionality. */ /** * @defgroup dao * Database abstraction objects and functions. */ /** * @defgroup descriptor * Descriptor-related functionality. */ /** * @defgroup db * Database-related functionality. */ /** * @defgroup item * Item-(object)-related functionality. */ /** * @defgroup zone * Zone-related functionality. */ /** * @defgroup room * Room-related functionality. */ /** * @defgroup extradesc * Extra description-related functionality. */ /** * The type of a boolean value. * @ingroup common * @typedef int */ #ifndef __CPLUSPLUS typedef int bool; #endif /* __CPLUSPLUS */ #ifndef NULL #define NULL ((void*)(0)) #endif #if !defined(FALSE) #define FALSE (0) #endif #if !defined(TRUE) #define TRUE (!FALSE) #endif /** * The type of the result of a comparison. * @ingroup collection * @typedef int */ typedef int cmp_t; /** * The type of a comparison function. Functions of this type are used to * compare two objects of the same type. * @ingroup collection * @typedef cmp_t (*)(const void*, const void*) */ typedef cmp_t (*compareFunction_t)(const void *lhs, const void *rhs); /** * The type of a free function. Functions of this type are used to release * ownership of some allocated resource. * @ingroup common * @typedef void (*)(void*) */ typedef void (*freeFunction_t)(void *memory); /** * The type of a unique ID number. * @ingroup common * @typedef int */ typedef int idnum_t; /** * The valid of an invalid ID number. * @ingroup common * @define -1 */ #define INVALID_ID ((idnum_t) -1); /** * An alias for struct _charData_t. * @ingroup character * @typedef struct _charData_t */ typedef struct _charData_t charData_t; /** * An alias for struct _commandData_t. * @ingroup command * @typedef struct _commandData_t */ typedef struct _commandData_t commandData_t; /** * An alias for struct _descriptorData_t. * @ingroup descriptor * @typedef struct _descriptorData_t */ typedef struct _descriptorData_t descriptorData_t; /** * An alias for struct _extraDescData_t. * @ingroup extradesc * @typedef struct _extraDescData_t */ typedef struct _extraDescData_t extraDescData_t; /** * An alias for struct _indexData_t. * @ingroup db * @typedef struct _indexData_t */ typedef struct _indexData_t indexData_t; /** * An alias for struct _itemData_t. * @ingroup item * @typedef struct _itemData_t */ typedef struct _itemData_t itemData_t; /** * An alias for struct _roomData_t. * @ingroup room * @typedef struct _roomData_t */ typedef struct _roomData_t roomData_t; /** * An alias for struct _roomExitData_t. * @ingroup room * @typedef struct _roomExitData_t */ typedef struct _roomExitData_t roomExitData_t; /** * An alias for struct _zoneData_t. * @ingroup zone * @typedef struct _zoneData_t */ typedef struct _zoneData_t zoneData_t; /** * An alias for struct _resetCommand_t. * @typedef struct _resetCommand_t */ typedef struct _resetCommand_t resetCommand_t; /** * An alias for struct _shopData_t. * @typedef struct _shopData_t */ typedef struct _shopData_t shopData_t; /** * An alias for struct _shopBuyData_t. * @typedef struct _shopBuyData_t */ typedef struct _shopBuyData_t shopBuyData_t; /** * An alias for struct _shopItems_t. * @typedef struct _shopItems_t */ typedef struct _shopItems_t shopItems_t; /** * An alias for struct _shopRooms_t. * @typedef struct _shopRooms_t */ typedef struct _shopRooms_t shopRooms_t; /** * An alias for struct _shopInventoryData_t. * @typedef struct _shopInventoryData_t */ typedef struct _shopInventory_t shopInventory_t; #endif /* __BASETYPES_H__ */