qse/ase/stx/misc.h

59 lines
1.2 KiB
C
Raw Normal View History

2005-05-15 18:37:00 +00:00
/*
2005-07-05 11:15:51 +00:00
* $Id: misc.h,v 1.11 2005-07-05 11:15:51 bacon Exp $
2005-05-15 18:37:00 +00:00
*/
#ifndef _XP_STX_MISC_H_
#define _XP_STX_MISC_H_
#include <xp/stx/stx.h>
2005-05-19 16:41:10 +00:00
#ifdef _DOS
#include <stdlib.h>
#include <assert.h>
#include <stdarg.h>
2005-05-21 07:27:32 +00:00
#include <stdio.h>
2005-06-05 05:27:02 +00:00
#include <ctype.h>
2005-05-19 16:41:10 +00:00
2005-06-08 16:00:51 +00:00
#define xp_assert assert
#define xp_malloc malloc
#define xp_realloc realloc
#define xp_free free
#define xp_va_list va_list
#define xp_va_start va_start
#define xp_va_end va_end
#define xp_va_arg va_arg
#define xp_isspace isspace
#define xp_isdigit isdigit
#define xp_isalpha isalpha
#define xp_isalnum isalnum
2005-05-19 16:41:10 +00:00
#else
#include <xp/bas/memory.h>
#include <xp/bas/assert.h>
#include <xp/bas/stdarg.h>
2005-06-05 05:27:02 +00:00
#include <xp/bas/ctype.h>
2005-06-08 16:14:52 +00:00
#include <xp/bas/string.h>
2005-05-19 16:41:10 +00:00
#endif
2005-07-03 16:37:01 +00:00
#if defined(__BORLANDC__) || defined(_MSC_VER)
#define INLINE
#else
#define INLINE inline
#endif
2005-05-15 18:37:00 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2005-07-05 11:15:51 +00:00
xp_word_t xp_stx_hash (const void* data, xp_word_t len);
2005-06-08 16:00:51 +00:00
xp_word_t xp_stx_strhash (const xp_char_t* str);
xp_word_t xp_stx_strxhash (const xp_char_t* str, xp_word_t len);
2005-05-15 18:37:00 +00:00
2005-06-30 12:07:02 +00:00
xp_char_t* xp_stx_strword (
2005-06-30 15:11:00 +00:00
const xp_char_t* str, const xp_char_t* word, xp_word_t* word_index);
2005-06-30 12:07:02 +00:00
2005-05-15 18:37:00 +00:00
#ifdef __cplusplus
}
#endif
#endif