📄 plxclib.h
字号:
/***************************************************************************
*
* Pollex Mobile Platform
*
* Copyright (c) 2004 by Pollex Mobile Software Co., Ltd.
* All Rights Reserved
*
* Module : Pollex OS Adaptation Layer
*
* Purpose : Pollex OS Adaptation Layer C function Header File.
*
\**************************************************************************/
#ifndef __PLXCLIB_H
#define __PLXCLIB_H
#ifdef __cplusplus
extern "C" {
#endif
#if (defined _MSC_VER) && (!defined _VA_LIST_DEFINED)
typedef char * va_list;
#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) )
#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) )
#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
#define va_end(ap) ( ap = (va_list)0 )
#elif defined __ARM__
typedef int *va_list[1];
#define va_start(ap, parmN) (void)(*(ap) = __va_start(parmN))
#define va_arg(ap, type) __va_arg(*(ap), type)
#define va_copy(dest, src) ((void)(*(dest) = *(src)))
#define va_end(ap) ((void)(*(ap) = 0))
#endif
#define LONG_MAX 2147483647L
#define LONG_MIN (-LONG_MAX - 1L)
#ifndef NULL
#define NULL ((void*)0)
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifdef memcpy
#undef memcpy
#endif
#ifdef memmove
#undef memmove
#endif
#ifdef memcmp
#undef memcmp
#endif
#ifdef memchr
#undef memchr
#endif
#ifdef memset
#undef memset
#endif
#ifdef strcpy
#undef strcpy
#endif
#ifdef strcat
#undef strcat
#endif
#ifdef strncat
#undef strncat
#endif
#ifdef strcmp
#undef strcmp
#endif
#ifdef strnicmp
#undef strnicmp
#endif
#ifdef strncmp
#undef strncmp
#endif
#ifdef strchr
#undef strchr
#endif
#ifdef strtok
#undef strtok
#endif
#ifdef strlen
#undef strlen
#endif
#ifdef strupr
#undef strupr
#endif
#ifdef toupper
#undef toupper
#endif
#ifdef islower
#undef islower
#endif
#ifdef strdup
#undef strdup
#endif
#ifdef isupper
#undef isupper
#endif
#ifdef tolower
#undef tolower
#endif
#ifdef rand
#undef rand
#endif
#ifdef srand
#undef srand
#endif
#ifdef sprintf
#undef sprintf
#endif
#ifdef vsprintf
#undef vsprintf
#endif
#ifdef isdigit
#undef isdigit
#endif
#ifdef isspace
#undef isspace
#endif
#ifdef isalpha
#undef isalpha
#endif
#ifdef strtol
#undef strtol
#endif
#ifdef atoi
#undef atoi
#endif
#ifdef atof
#undef atof
#endif
#ifdef sqrt
#undef sqrt
#endif
#ifdef pow
#undef pow
#endif
#ifdef atol
#undef atol
#endif
#ifdef strtod
#undef strtod
#endif
#ifdef malloc
#undef malloc
#endif
#ifdef free
#undef free
#endif
#ifdef realloc
#undef realloc
#endif
#define malloc plx_malloc
#define free plx_free
#define realloc plx_realloc
#define memcpy plx_memcpy
#define memmove plx_memmove
#define memcmp plx_memcmp
#define memchr plx_memchr
#define memset plx_memset
#define strcpy plx_strcpy
#define strncpy plx_strncpy
#define strcat plx_strcat
#define strncat plx_strncat
#define strcmp plx_strcmp
#define stricmp plx_strcasecmp
#define strnicmp plx_strncasecmp
#define strncmp plx_strncmp
#define strchr plx_strchr
#define strcspn plx_strcspn
#define strstr plx_strstr
#define strtok plx_strtok
#define strlen plx_strlen
#define strupr plx_strupr
#define toupper plx_toupper
#define islower plx_islower
#define strdup plx_strdup
#define isupper plx_isupper
#define tolower plx_tolower
#define rand plx_rand
#define srand plx_srand
#define sprintf plx_sprintf
#define vsprintf plx_vsprintf
#define isdigit plx_isdigit
#define isspace plx_isspace
#define isalpha plx_isalpha
#define strtol plx_strtol
#define atoi plx_atoi
#define itoa plx_itoa
#define atof plx_atof
#define sqrt plx_sqrt
#define pow plx_pow
#define atol plx_atol
#define strtod plx_strtod
extern const unsigned char _uctype_[];
#define _U 0x01
#define _L 0x02
#define _N 0x04
#define _S 0x08
#define _P 0x10
#define _C 0x20
#define _B 0x40
#define _X 0x80
void * memcpy(void *dst0, const void *src0, unsigned int len0);
void * memmove(void *dst_void, const void *src_void, unsigned int length);
int memcmp(const void *m1, const void *m2, unsigned int n);
void * memchr(const void *src_void, int _c, unsigned int length);
void * memset(void *m, int c, unsigned int n);
char * strcpy(char *dst0, const char *src0);
void * strncpy(char *dst0, const char *src0, unsigned int count);
char* strcat(char* dst, const char* src);
char * strncat(char *s1, const char *s2, unsigned int n);
int strcmp(const char* src, const char* dst);
int stricmp(const char *s1, const char *s2);
int strnicmp(const char *s1, const char *s2, unsigned int n);
int strncmp(const char* first, const char* last, unsigned int count);
char* strchr(const char* str, int c);
unsigned int strcspn(const char* str, const char* strCharSet);
char* strpbrk(const char* str, const char* strCharSet);
char* strrchr(const char* str, int c);
unsigned int strspn(const char* str, const char* strCharSet);
char* strstr(const char* str, const char* strCharSet);
char* strtok(char* strToken, const char* strDelimit);
unsigned int strlen(const char* str);
char* strupr(char *string);
int toupper(int c);
int islower(int c);
char * strdup (const char *s);
int isupper(int c);
int tolower(int c);
char *strtok_r(char *s, const char *delim, char **lasts);
void srand( unsigned int seed );
int rand( void );
int sprintf( char * pStr, const char *fmt, ... );
int vsprintf(char * where, const char *fmt, va_list varg);
int isdigit(int c);
int isspace(int c);
int isalpha(int c);
long strtol(const char *nptr, char **endptr, int base);
int atoi(const char *s);
char * itoa (int val, char *buf, int radix );
double atof(const char *s);
double sqrt( double x );
double pow( double x, double y );
long atol(const char *string);
double strtod (const char *nptr, char **endptr );
void* plx_malloc(size_t dwSize);
void plx_free(void* pMem);
void* plx_realloc(void* pMem, size_t size);
long plx_get_max_alloc_size(void);
long plx_get_total_left_size(void);
#ifdef __cplusplus
}
#endif
#endif // __PLXOSAL_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -