2005-05-15 18:37:00 +00:00
|
|
|
/*
|
2005-06-05 05:27:02 +00:00
|
|
|
* $Id: misc.h,v 1.4 2005-06-05 05:26:24 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
|
|
|
|
|
|
|
#define xp_stx_assert assert
|
|
|
|
#define xp_stx_malloc malloc
|
|
|
|
#define xp_stx_realloc realloc
|
|
|
|
#define xp_stx_free free
|
|
|
|
#define xp_stx_va_list va_list
|
|
|
|
#define xp_stx_va_start va_start
|
|
|
|
#define xp_stx_va_end va_end
|
|
|
|
#define xp_stx_va_arg va_arg
|
2005-06-05 05:27:02 +00:00
|
|
|
#define xp_stx_isspace isspace
|
|
|
|
#define xp_stx_isdigit isdigit
|
|
|
|
#define xp_stx_isalpha isalpha
|
|
|
|
#define xp_stx_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-05-19 16:41:10 +00:00
|
|
|
|
|
|
|
#define xp_stx_assert xp_assert
|
|
|
|
#define xp_stx_malloc xp_malloc
|
|
|
|
#define xp_stx_realloc xp_realloc
|
|
|
|
#define xp_stx_free xp_free
|
|
|
|
#define xp_stx_va_list xp_va_list
|
|
|
|
#define xp_stx_va_start xp_va_start
|
|
|
|
#define xp_stx_va_end xp_va_end
|
|
|
|
#define xp_stx_va_arg xp_va_arg
|
2005-06-05 05:27:02 +00:00
|
|
|
#define xp_stx_isspace xp_isspace
|
|
|
|
#define xp_stx_isdigit xp_isdigit
|
|
|
|
#define xp_stx_isalpha xp_isalpha
|
|
|
|
#define xp_stx_isalnum xp_isalnum
|
2005-05-19 16:41:10 +00:00
|
|
|
#endif
|
|
|
|
|
2005-05-15 18:37:00 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
xp_stx_word_t xp_stx_strlen (const xp_stx_char_t* str);
|
|
|
|
|
|
|
|
int xp_stx_strcmp (
|
|
|
|
const xp_stx_char_t* s1, const xp_stx_char_t* s2);
|
|
|
|
int xp_stx_strxcmp (
|
|
|
|
const xp_stx_char_t* s1, xp_stx_word_t len, const xp_stx_char_t* s2);
|
|
|
|
|
|
|
|
xp_stx_word_t xp_stx_strhash (const xp_stx_char_t* str);
|
|
|
|
xp_stx_word_t xp_stx_strxhash (const xp_stx_char_t* str, xp_stx_word_t len);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|