xfile.h

来自「国外网站上的一些精典的C程序」· C头文件 代码 · 共 42 行

H
42
字号
/***  xfile.h -- definitions for fast line buffered files*/#ifndef __XFILE_H__#define __XFILE_H__struct _xfile {    int   fd;    int   bufSize;    char *buf;    char *nextChar;    char *lastChar;};typedef struct _xfile XFILE;#include <dos.h>#if defined(__ZTC__) #include <io.h> #define DOS_OPEN dos_open #define READ     read #define CLOSE    close#elif defined(__TURBOC__) #include <io.h> #include <fcntl.h> #define DOS_OPEN _open #define READ     _read #define CLOSE    _close#else /* MSC */ #include <stdlib.h> #include <fcntl.h> #define CLOSE    _dos_close#endifXFILE *xopen(char const *);void   xclose(XFILE *);char  *xgetline(XFILE *);#endif  /* __XFILE_H__ */

⌨️ 快捷键说明

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