?? uclib.h
字號:
#ifndef __UCLIB_H__
#define __UCLIB_H__
extern "C"
{
unsigned int alloc(unsigned int nbytes);
unsigned int Drv_realloc(unsigned int address,unsigned int nbytes);
void deAlloc(unsigned int address);
unsigned int Drv_calloc(unsigned int size,unsigned int n);
}
typedef struct
{
int quot; /* Quotient. */
int rem; /* Remainder. */
} div_t;
/* */
#define div(a, b) \
({ \
div_t result; \
result.quot = a / b; \
result.rem = a - (result.quot * b); \
result; \
})
#define abs(a) (((a) < 0) ? -(a) : (a))
/*
#define malloc(x) (void *)alloc(x)
#define free(x) deAlloc((unsigned int)x)
#define calloc(x,n) (void *)Drv_calloc(x,n)
#define realloc(x,size) ((void *)Drv_realloc((unsigned int)x,(unsigned int)size))
*/
#define LocalAlloc(x,size) (void *)alloc(size)
#define LocalFree(x) deAlloc(()unsigned int)x)
#ifdef __cplusplus
/*
void * operator new(unsigned int size)
{
//printf("image new...\n");
void *p = malloc(size);
return (p);
}
void operator delete(void *p)
{
free(p);
}
void *operator new[](unsigned int size)
{
//printf("image new[]...\n");
void *p = malloc(size);
return (p);
}
void operator delete[](void *p)
{
free(p);
}
*/
#endif
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -