⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fnames.h

📁 ppc860平台上移植uc OS的实例
💻 H
字号:
#include <sys/types.h>

#if TEST
#define _X(a)	test_##a
#define _Y(a)	a
#else
#define _X(a)	__##a
#define _Y(a)	a
#endif


#define OPEN	_X(open)
#define CLOSE	_X(close)
#define READ	_X(read)
#define WRITE	_X(write)
#define CREAT	_X(creat)
#define FCNTL	_X(fcntl)
#define SBRK	_X(sbrk)
#define GETPID	_X(getpid)
#define KILL	_X(kill)
#define _EXIT	_X(_exit)
#define ISATTY	_X(isatty)
#define LSEEK	_X(lseek)
#define LINK	_X(link)
#define UNLINK	_X(unlink)
#define ACCESS	_X(access)
#define STAT	_X(stat)
#define FSTAT	_X(fstat)

#define MALLOC	_Y(malloc)
#define FREE	_Y(free)
#define STRCMP	_Y(strcmp)
#define STRDUP	_Y(strdup)
#define EXIT	_Y(exit)
#define SIGNAL	_Y(signal)
#define CLOCK	_Y(clock)
#define TIME	_Y(time)

extern void *MALLOC();
extern void FREE();
extern int STRCMP();
extern char *STRDUP();
void (*SIGNAL(int sig, void (*func)(int))) (int) ;

int OPEN(const char *path, int oflag, ...) ;
int CLOSE(int fildes) ;
int READ(int fildes, char *buf, unsigned nbyte) ;
int WRITE(int fildes, char *buf, unsigned nbyte) ;
int __diab_lib_error(int fildes, char *buf, unsigned nbyte) ;
int CREAT(const char *path, mode_t mode) ;
int FCNTL(int fildes, int cmd, ...) ;
void *SBRK(int incr) ;
pid_t GETPID(void) ;
int KILL(int pid, int sig) ;
void _EXIT(int status) ;
int ISATTY(int fildes) ;
int LSEEK(int fildes, int offset, int whence) ;
int LINK(char *path1, char *path2) ;
int UNLINK(char *path) ;
int ACCESS(const char *path, int amode) ;
int STAT(const char *path, struct stat *buf) ;
int FSTAT(int fildes, struct stat *buf) ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -