/*	Copyright 1995 H.Ogasawara (COR.)	*/

#ifndef __MICROSTRING__
#define	__MICROSTRING__

extern unsigned char	__MicroStrBit[];
#define		MbitKanji	1
#define		MbitNum		4
#define		MbitUpr		16
#define		MbitLwr		32
#define		MbitHal		64
#define		Iskanji(a)	(__MicroStrBit[a]&MbitKanji)
#define		Isnum(a)	(__MicroStrBit[a]&MbitNum)
#define		Isupr(a)	(__MicroStrBit[a]&MbitUpr)
#define		Islwr(a)	(__MicroStrBit[a]&MbitLwr)
#define		Isalp(a)	(__MicroStrBit[a]&(MbitUpr|MbitLwr))
#define		Isalnum(a)	(__MicroStrBit[a]&(MbitNum|MbitUpr|MbitLwr))
#define		Ishex(a)	(__MicroStrBit[a]&(MbitHal|MbitNum))

#ifndef	Ctrl
# define	Ctrl(a)		((a)&0x1f)
#endif

#ifndef __MicroStrLIB__

extern char	*s_strnum( int, char* );
extern char	*s_strnumi( int, int, char* );
extern char	*s_strnumiz( int, int, char* );
extern char	*s_strnumil( int, int, char* );
extern char	*s_strhex( int, char* );
extern char	*s_strhexi( int, int, char* );
extern char	*s_strhexiz( int, int, char* );
extern char	*s_strcpy( char*, const char* );
extern char	*s_strcpych( int, char*, const char* );
extern char	*s_strcpyi( int, char*, const char* );
extern char	*s_strcpyil( int, char*, const char* );
extern char	*s_strcat( char*, const char* );
extern char	*s_strncpy( int, char*, const char* );
extern char	*p_strcpy( char*, const char* );
extern char	*p_strcpych( int, char*, const char* );
extern char	*s_format( char*, const char*, ... );
extern char	*s_format_simple( char*, const char*, ... );
extern char	*s_formatv( char*, const char*, const void* );
extern char	*s_formatv_simple( char*, const char*, const void* );
extern char	*s_strchr( int, const char* );
extern char	*s_strpath( char* );
extern char	*s_strdate( int, char* );
extern char	*s_strtime( int, char* );
extern char	*s_strdated( int, char* );
extern char	*s_strtimed( int, char* );
extern char	*s_memset_short( int, int, void* );
extern char	*s_memset( int, int, void* );
extern char	*s_memcpy_simple( int, void*, const void* );
extern char	*s_memcpy( int, void*, const void* );
extern char	*s_memclr_short( int, void* );
extern char	*s_memclr( int, void* );

extern char	*p_numstr( int*, const char* );
extern char	*p_hexstr( int*, const char* );
extern int	n_numstr( const char* );
extern int	n_hexstr( const char* );

extern int	n_strlen( const char* );
extern int	n_strfind( int, const char* );
extern int	n_strcmp( const char*, const char* );
extern int	n_fstrcmpi( const char*, const char* );
extern int	n_fstrcmp( const char*, const char* );

extern void	v_format_put( const char*, ... );
extern void	v_format_put_simple( const char*, ... );

#endif

#endif
