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

📄 wwwsys.h

📁 firtext搜索引擎源码
💻 H
📖 第 1 页 / 共 3 页
字号:
/* curses.h */#ifdef CURSES#ifdef HAVE_CURSESX_H#include <cursesX.h>#else#ifdef HAVE_CURSES_H#include <curses.h>#endif#endif#endif/* resource.h (some wait.h's require it) */#ifdef HAVE_SYS_RESOURCE_H#include <sys/resource.h>#else#ifdef HAVE_RESOURCE_H#include <resource.h>#endif#endif/* dirent.h / ndir.h / dir.h */#ifdef HAVE_DIRENT_H#include <dirent.h>#define NAMLEN(dirent) strlen((dirent)->d_name)#else#define dirent direct#define NAMLEN(dirent) (dirent)->d_namlen#ifdef HAVE_SYS_NDIR_H#include <sys/ndir.h>#endif#ifdef HAVE_SYS_DIR_H#include <sys/dir.h>#endif#ifdef HAVE_DIR_H#include <dir.h>#endif#ifdef HAVE_NDIR_H#include <ndir.h>#endif#endif#if !defined(HAVE_STRCHR)#define strchr index#define strrchr rindex#endif#if !defined(HAVE_MEMCPY)#define memcpy(d, s, n) bcopy((s), (d), (n))#define memmove(d, s, n) bcopy((s), (d), (n))#endif/* Definition of var args */#if defined(STDC_HEADERS) || defined(__STDC__)#include <stdarg.h>#else#ifndef WWW_MSWINDOWS#include <varargs.h>#endif#endif/* wait.h */#ifdef HAVE_SYS_WAIT_H#include <sys/wait.h>#endif#ifndef WEXITSTATUS#define WEXITSTATUS(stat_val) (((unsigned)(stat_val) >> 8) & 255)#endif#ifndef WIFEXITED#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)#endif#ifdef HT_POSIX_REGEX#ifdef HAVE_RXPOSIX_H#include <rxposix.h>#else#ifdef HAVE_REGEX_H#include <regex.h>#endif#endif#define W3C_DEFAULT_REGEX_FLAGS		(REG_EXTENDED | REG_NEWLINE)#endif/*.  Booleans.*/#ifndef __MINGW32__ /* has a typedef for BOOLEAN */#ifndef BOOLEANtypedef char	BOOLEAN;				    /* Logical value */#endif#endif#ifndef CURSES#ifndef TRUE#define TRUE	(BOOLEAN)1#define	FALSE	(BOOLEAN)0#endif#endif	 /*  CURSES  */#if !defined(BOOL) && !defined(WWW_MSWINDOWS)#define BOOL BOOLEAN#endif#ifndef YES#define YES             (BOOL)1#define NO              (BOOL)0#endif/*.  Integers.If we don't have these (for some mysterious reason) then define them. Thisshould (is?) be handled by the configure script already.*//* Richard Atterer     Disabled - caused problems because mingw32 has typedefs for these.    They seem useless now. */ #ifndef u_short#define u_short unsigned short#endif#ifndef u_long#define u_long unsigned long#endif//*//*.  NULL Definition.*/#ifndef NULL#define NULL ((void *)0)#endif/*.  Sleep System Call.Some systems use milliseconds instead of seconds*/#ifndef SLEEP#define SLEEP(n)	sleep(n)#endif/*.  SOCKS.SOCKS is a package for allowing socket connections to tunnel through firewallsin carefully controlled situations. This package can be optionally compiledwith SOCKS support; these definitions replace the normal socket calls withthe SOCKS ones. Initial modification of the library is credited to Ian Dunkin<imd1707@ggr.co.uk>.*/#ifdef SOCKS#ifdef SOCKS4#define connect	        Rconnect#define getsockname	Rgetsockname#define getpeername	Rgetpeername#define bind		Rbind#define accept		Raccept#define listen		Rlisten#define select		Rselect#define recvfrom	Rrecvfrom#define sendto		Rsendto#define recv		Rrecv#define send		Rsend#define read		Rread#define write		Rwrite#define rresvport	Rrresvport#define shutdown	Rshutdown#define listen		Rlisten#define close		Rclose#define dup		Rdup#define dup2		Rdup2#define fclose		Rfclose#define gethostbyname	Rgethostbyname#else#ifdef SOCKS5#define connect		SOCKSconnect#define getsockname	SOCKSgetsockname#define getpeername	SOCKSgetpeername#define bind		SOCKSbind#define accept		SOCKSaccept#define listen		SOCKSlisten#define select		SOCKSselect#define recvfrom	SOCKSrecvfrom#define sendto		SOCKSsendto#define recv		SOCKSrecv#define send		SOCKSsend#define read		SOCKSread#define write		SOCKSwrite#define rresvport	SOCKSrresvport#define shutdown	SOCKSshutdown#define listen		SOCKSlisten#define close		SOCKSclose#define dup		SOCKSdup#define dup2		SOCKSdup2#define fclose		SOCKSfclose#define gethostbyname	SOCKSgethostbyname#endif /* SOCKS5 */#endif /* SOCKS4 */#endif /* SOCKS *//*.  Network Family.*/#ifdef DECNETtypedef struct sockaddr_dn SockA;  /* See netdnet/dn.h or custom vms.h */#else /* Internet */typedef struct sockaddr_in SockA;  /* See netinet/in.h */#endif/*.  Default Values of Network Access.*/#ifndef NETCLOSE#define NETCLOSE close		/* Routine to close a TCP-IP socket */#endif#ifndef NETREAD#define NETREAD  read		/* Routine to read from a TCP-IP socket	*/#endif#ifndef NETWRITE#define NETWRITE write		/* Routine to write to a TCP-IP socket */#endif#ifndef NETWRITEV#define NETWRITEV writev#endif/*.  Definition of errno and Return Code.This is the definition of error codes and the corresponding string constants.If we do not have the strerror function then try the error listtable.*/#ifndef ERRNO_DONEextern int errno;#define socerrno errno#endif#ifndef HAVE_STRERROR				  /* Otherwise use the table */extern char *sys_errlist[];extern int sys_nerr;#endif/*.  Definition of Socket Desrciptores.This is necessary in order to support Windows NT...*/#ifndef SOCKET#define SOCKET int		/* Unix like socket descriptor */#define INVSOC (-1)		/* Unix invalid socket */#endif#ifdef __svr4__#define HT_BACKLOG 32		 /* Number of pending connect requests (TCP) */#else#define HT_BACKLOG 5		 /* Number of pending connect requests (TCP) */#endif /* __svr4__ *//*.  Additional Network variables for SOCKET, file access bits.*/#if 0#ifndef _WINSOCKAPI_#define FD_READ         0x01#define FD_WRITE        0x02#define FD_OOB          0x04#define FD_ACCEPT       0x08#define FD_CONNECT      0x10#define FD_CLOSE        0x20#endif /* _WINSOCKAPI_ */#endif/*.  Rough estimate of max path length.*/#ifndef HT_MAX_PATH#ifdef MAXPATHLEN#define HT_MAX_PATH MAXPATHLEN#else#ifdef PATH_MAX#define HT_MAX_PATH PATH_MAX#else#define HT_MAX_PATH 1024	 	      	/* Any better ideas? */#endif#endif#endif /* HT_MAX_PATH */#ifndef HT_MAX_TMPNAM#ifdef L_tmpnam#define HT_MAX_TMPNAM	L_tmpnam#else#define HT_MAX_TMPNAM	128#endif#endif/*.  Hash Table Sizes.The size of the hash tables used by the various libwww classes like theHTNet class, the HTHostclass etc. is a speed-size compromize. Here you can set the sizes dependingon whether you have a lot of memory or not. The values must be prime numbers,of course.*/#ifdef LIBWWW_SMALL#define HT_XL_HASH_SIZE		101#define HT_L_HASH_SIZE		67#define HT_M_HASH_SIZE		31#define HT_S_HASH_SIZE		5#else#ifdef LIBWWW_LARGE#define HT_XL_HASH_SIZE		1499#define HT_L_HASH_SIZE		599#define HT_M_HASH_SIZE		101#define HT_S_HASH_SIZE		67#else#ifdef LIBWWW_EXTRA_LARGE#define HT_XL_HASH_SIZE		9973#define HT_L_HASH_SIZE		1499#define HT_M_HASH_SIZE		599#define HT_S_HASH_SIZE		101#else#define HT_XL_HASH_SIZE		599#define HT_L_HASH_SIZE		101#define HT_M_HASH_SIZE		67#define HT_S_HASH_SIZE		11#endif#endif#endif/*.  Definition of NGROUPS.*/#ifdef GETGROUPS_T#ifndef NGROUPS#ifdef NGROUPS_MAX#define NGROUPS		NGROUPS_MAX#else#define NGROUPS		20			/* Any better ideas? */#endif#endif#endif/*.  Definition of Max Domain Name Length.*/#ifndef MAXHOSTNAMELEN#define MAXHOSTNAMELEN 64			/* Any better ideas? */#endif/*.  File/Directory Management.*/#ifndef MKDIR#define MKDIR(a,b)	mkdir((a), (b))#endif#ifndef RMDIR#define RMDIR(a)	rmdir((a))#endif#ifndef REMOVE#define REMOVE(a)	unlink((a))#endif#ifndef DEFAULT_SUFFIXES#define DEFAULT_SUFFIXES	".,_"#endif#ifndef DIR_SEPARATOR#define DIR_SEPARATOR_CHAR	'/'#define DIR_SEPARATOR_STR	"/"#endif#ifndef F_OK#define R_OK    4#define W_OK    2#define X_OK    1#define F_OK    0#endif/*.  Macros for manipulating masks for select().*/#ifndef FD_SET#define FD_SET(fd, m) (*(unsigned*)(m) |=  (1 << (fd)))#endif#ifndef FD_CLR#define FD_CLR(fd, m) (*(unsigned*)(m) &= ~(1 << (fd)))#endif#ifndef FD_ZERO#define FD_ZERO(m)    (*(unsigned*)(m)) = 0#endif#ifndef FD_ISSET#define FD_ISSET(fd, m) (*(unsigned*)(m) & (1 << (fd)))#endif/*.  Macros for converting characters.*/#ifndef TOASCII#define TOASCII(c) (c)#define FROMASCII(c) (c)                                   #endif/*.  Cache file prefix.This is something onto which we tag something meaningful to make a cachefile name. used in HTWSRC.c at least. If it is not defined at all, cachingis turned off.*/#ifndef CACHE_FILE_PREFIX#ifdef unix#define CACHE_FILE_PREFIX  "/usr/wsrc/"#endif#endif/*.  Thread Safe Setup.These are some constants setting the size of buffers used by thread safeversions of some system calls.*/#ifdef HT_REENTRANT#ifdef _POSIX_LOGIN_NAME_MAX#define HT_LOGNAME_MAX  _POSIX_LOGIN_NAME_MAX#else#ifdef LOGNAME_MAX#define HT_LOGNAME_MAX  (LOGNAME_MAX+1)#else#define HT_LOGNAME_MAX  64#endif#endif#define HOSTENT_MAX	1024#define CTIME_MAX	26#endif /* HT_REENTRANT *//*.  Types.We define some types here so we son't have to worry about it later*/typedef unsigned long ms_t;/**/#endif/*    @(#) $Id: wwwsys.html,v 2.127 2002/06/06 10:46:04 kahan Exp $*/

⌨️ 快捷键说明

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