qse/ase/stx/misc.h

64 lines
1.3 KiB
C
Raw Normal View History

2005-05-15 18:37:00 +00:00
/*
2007-03-22 11:19:28 +00:00
* $Id: misc.h,v 1.16 2007-03-22 11:19:28 bacon Exp $
2005-05-15 18:37:00 +00:00
*/
2007-03-22 11:19:28 +00:00
#ifndef _ASE_STX_MISC_H_
#define _ASE_STX_MISC_H_
2005-05-15 18:37:00 +00:00
2007-03-22 11:19:28 +00:00
#include <ase/stx/stx.h>
2005-05-15 18:37:00 +00:00
2005-07-07 16:32:37 +00:00
/* TODO: remove this header later */
2007-03-22 11:19:28 +00:00
#include <ase/bas/stdio.h>
2005-07-07 16:32:37 +00:00
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-07-07 07:45:05 +00:00
#include <stdlib.h>
2005-05-19 16:41:10 +00:00
2007-03-22 11:19:28 +00:00
#define ase_assert assert
#define ase_malloc malloc
#define ase_realloc realloc
#define ase_free free
#define ase_va_list va_list
#define ase_va_start va_start
#define ase_va_end va_end
#define ase_va_arg va_arg
#define ase_isspace isspace
#define ase_isdigit isdigit
#define ase_isalpha isalpha
#define ase_isalnum isalnum
2005-05-19 16:41:10 +00:00
#else
2007-03-22 11:19:28 +00:00
#include <ase/bas/memory.h>
#include <ase/bas/assert.h>
#include <ase/bas/stdarg.h>
#include <ase/bas/ctype.h>
#include <ase/bas/string.h>
#include <ase/bas/stdlib.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
2007-03-22 11:19:28 +00:00
ase_word_t ase_stx_hash (const void* data, ase_word_t len);
ase_word_t ase_stx_strhash (const ase_char_t* str);
ase_word_t ase_stx_strxhash (const ase_char_t* str, ase_word_t len);
2005-05-15 18:37:00 +00:00
2007-03-22 11:19:28 +00:00
ase_char_t* ase_stx_strword (
const ase_char_t* str, const ase_char_t* word, ase_word_t* word_index);
2005-06-30 12:07:02 +00:00
2005-05-15 18:37:00 +00:00
#ifdef __cplusplus
}
#endif
#endif