htlocal.h

来自「www工具包」· C头文件 代码 · 共 110 行

H
110
字号
/*    					W3C Sample Code Library libwww Local File Access!  Local File Access!*//***	(c) COPYRIGHT MIT 1995.**	Please first read the full copyright statement in the file COPYRIGH.*//*This module has the common code for opening and closing local files.This module is implemented by HTTCP.c, and it is apart of the  W3C Sample CodeLibrary.*/#ifndef HTLOCAL_H#define HTLOCAL_H#include "HTNet.h"/*.  Mode of File.A file can be opened in variuos modes dependent on whether it is to be openedfor reading or writing or both. We here define a set that is largely equivalentto what we know from ANSI C file modes and Unix file modes:*/#ifndef NO_UNIX_IOtypedef int HTLocalMode;#define HT_FB_RDONLY	O_RDONLY#define HT_FT_RDONLY	HT_FB_RDONLY#define HT_FB_WRONLY	O_WRONLY|O_CREAT#define HT_FT_WRONLY	HT_FB_WRONLY#define HT_FB_RDWR	O_RDWR#define HT_FT_RDWR	HT_FB_RDWR#define HT_FB_APPEND	O_APPEND#define HT_FT_APPEND	HT_FB_APPEND#else typedef const char HTLocalMode[10];#define HT_FB_RDONLY	"rb"#define HT_FT_RDONLY	"r"#define HT_FB_WRONLY	"wb"#define HT_FT_WRONLY	"w"#define HT_FB_RDWR	"r+b"#define HT_FT_RDWR	"r+"#define HT_FB_APPEND	"ab"#define HT_FT_APPEND	"a"#endif/*.  Open a Local File.Opens a local file using whatever means are available on the current platform.If we have unix file descriptors then use that as we can use select on them.On windows we want to use asynchrounous handles - just like we handle thesocket interface as well. On other platforms, we use ANSI C file descriptors.*/extern int HTFileOpen (HTNet * net, char * local, HTLocalMode mode);/*.  Close a Local File.Closes a file descriptor whatever means are available on the current platform.If we have unix file descriptors then use this otherwise use the ANSI C filedescriptors*/extern int HTFileClose (HTNet * net);/**/#endif   /* HTLOCAL_H *//*    @(#) $Id: HTLocal.html,v 2.5 1998/05/14 02:10:40 frystyk Exp $*/

⌨️ 快捷键说明

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