📄 htlocal.h
字号:
/* 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;#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.6 2000/02/29 14:32:15 kahan Exp $*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -