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

📄 htutils.h

📁 elinks下lynx是最重要的二个文本浏览器, 在linux下非常实用, lynx比elinks早的多, 目前好像停止开发, 这是lynx源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/*                                       Utility macros for the W3 code library                                  MACROS FOR GENERAL USE   See also: the system dependent file "www_tcp.h", which is included here. */#ifndef NO_LYNX_TRACE#define DEBUG   /* Turns on trace; turn off for smaller binary */#endif#ifndef HTUTILS_H#define HTUTILS_H#ifdef HAVE_CONFIG_H#include <lynx_cfg.h>	/* generated by autoconf 'configure' script *//* see AC_FUNC_ALLOCA macro */#ifdef __GNUC__# define alloca __builtin_alloca#else# ifdef _MSC_VER#  include <malloc.h>#  define alloca _alloca# else#  if HAVE_ALLOCA_H#   include <alloca.h>#  else#   ifdef _AIX #pragma alloca#   else#    ifndef alloca /* predefined by HP cc +Olibcalls */char *alloca ();#    endif#   endif#  endif# endif#endif#include <sys/types.h>#include <stdio.h>#else  /* HAVE_CONFIG_H */#ifdef DJGPP#include <sys/config.h>	/* pseudo-autoconf values for DJGPP libc/headers */#define HAVE_TRUNCATE 1#define HAVE_ALLOCA 1#include <limits.h>#endif /* DJGPP */#include <stdio.h>#define DONT_TRACK_INTERNAL_LINKS 1/* Explicit system-configure */#ifdef VMS#define NO_SIZECHANGE#if defined(VAXC) && !defined(__DECC)#define NO_UNISTD_H	/* DEC C has unistd.h, but not VAX C */#endif#define NO_KEYPAD#define NO_UTMP#define NO_FILIO_H#define NOUSERS#define DISP_PARTIAL	/* experimental */#endif#if defined(__STDC__) || defined(VMS) || defined(_WINDOWS)#define ANSI_VARARGS 1#undef HAVE_STDARG_H#define HAVE_STDARG_H 1#endif#if defined(VMS) || defined(_WINDOWS)#define HAVE_STDLIB_H 1#endif/* Accommodate non-autoconf'd Makefile's (VMS, DJGPP, etc) */#ifndef NO_ARPA_INET_H#define HAVE_ARPA_INET_H 1#endif#ifndef NO_CBREAK#define HAVE_CBREAK 1#endif#ifndef NO_CUSERID#define HAVE_CUSERID 1#endif#ifndef NO_FILIO_H#define HAVE_SYS_FILIO_H 1#endif#ifndef NO_GETCWD#define HAVE_GETCWD 1#endif#ifndef USE_SLANG#ifndef NO_KEYPAD#define HAVE_KEYPAD 1#endif#ifndef NO_TTYTYPE#define HAVE_TTYTYPE 1#endif#endif /* USE_SLANG */#ifndef NO_PUTENV#define HAVE_PUTENV 1#endif#ifndef NO_SIZECHANGE#define HAVE_SIZECHANGE 1#endif#ifndef NO_UNISTD_H#undef  HAVE_UNISTD_H#define HAVE_UNISTD_H 1#endif#ifndef NO_UTMP#define HAVE_UTMP 1#endif#endif /* HAVE_CONFIG_H */#ifndef lynx_srand#define lynx_srand srand#endif#ifndef lynx_rand#define lynx_rand rand#endif#if '0' != 48#define NOT_ASCII#endif#if '0' == 240#define EBCDIC#endif#ifndef LY_MAXPATH#define LY_MAXPATH 256#endif#ifndef	GCC_NORETURN#define	GCC_NORETURN /* nothing */#endif#ifndef	GCC_UNUSED#define	GCC_UNUSED /* nothing */#endif/* FIXME: need a configure-test */#if defined(__STDC__) || defined(__DECC) || defined(_WINDOWS) || _WIN_CC#define ANSI_PREPRO 1#endif#if defined(__CYGWIN32__) && ! defined(__CYGWIN__)#define __CYGWIN__ 1#endif#if defined(__CYGWIN__)		/* 1998/12/31 (Thu) 16:13:46 */#include <windows.h>		/* #include "windef.h" */#define BOOLEAN_DEFINED#undef HAVE_POPEN		/* FIXME: does this not work, or is it missing */#undef small			/* see <w32api/rpcndr.h> */#endif/* cygwin, mingw32, etc. */#ifdef FILE_DOES_NOT_EXIST#undef FILE_DOES_NOT_EXIST	/* see <w32api/winnt.h> */#endif#if defined(_WINDOWS) && !defined(__CYGWIN__)	/* SCW */#include <windows.h>		/* #include "windef.h" */#define BOOLEAN_DEFINED#if !_WIN_CC			/* 1999/09/29 (Wed) 22:00:53 */#include <dos.h>#endif#undef sleep			/* 1998/06/23 (Tue) 16:54:53 */extern void sleep(unsigned __seconds);#define popen _popen#define pclose _pclose#if defined(_MSC_VER)typedef unsigned short mode_t;#endif#endif /* _WINDOWS */#ifndef USE_COLOR_STYLE    /* it's useless for such setup */#  define NO_EMPTY_HREFLESS_A#endif#if  defined(__EMX__) || defined(WIN_EX) || defined(HAVE_POPEN)#  define CAN_CUT_AND_PASTE#endif#if defined(USE_SLANG) || (defined(USE_COLOR_STYLE) && defined(__EMX__))#  define USE_BLINK#endif#if defined(DOSPATH) || defined(__EMX__)#  define USE_DOS_DRIVES	/* we allow things like "c:" in paths */#endif#if defined(UNIX)#  if (defined(__BEOS__) || defined(__CYGWIN__) || defined(__DJGPP__) || defined(__EMX__) || defined(__MINGW32__))#    define SINGLE_USER_UNIX	/* well, at least they try */#  else#    define MULTI_USER_UNIX#  endif#endif/*  ERROR TYPE   This is passed back when streams are aborted. It might be nice to have some structure   of error messages, numbers, and recursive pointers to reasons.  Curently this is a   placeholder for something more sophisticated. */typedef void * HTError;                 /* Unused at present -- best definition? *//*Standard C library for malloc() etc */#ifdef HAVE_STDLIB_H#include <stdlib.h>#endif#ifndef EXIT_SUCCESS#define EXIT_SUCCESS 0#endif#ifndef EXIT_FAILURE#define EXIT_FAILURE 1#endif#ifdef __EMX__#include <unistd.h> /* should be re-include protected under EMX */#define getcwd _getcwd2#define chdir _chdir2#endif#ifdef vax#ifdef unix#define ultrix  /* Assume vax+unix=ultrix */#endif /* unix */#endif /* vax */#ifndef VMS#ifndef ultrix#ifdef NeXT#include <libc.h>       /* NeXT */#endif /* NeXT */#else /* ultrix: */#include <malloc.h>#include <memory.h>#endif /* !ultrix */#else   /* VMS: */#include <unixlib.h>#if defined(VAXC) && !defined(__DECC)#define malloc	VAXC$MALLOC_OPT#define calloc	VAXC$CALLOC_OPT#define free	VAXC$FREE_OPT#define cfree	VAXC$CFREE_OPT#define realloc	VAXC$REALLOC_OPT#endif /* VAXC && !__DECC */#endif /* !VMS *//*Macros for declarations */#define PUBLIC                  /* Accessible outside this module     */#define PRIVATE static          /* Accessible only within this module */#if defined(__STDC__) || defined(__BORLANDC__) || defined(_MSC_VER)#define CONST const             /* "const" only exists in STDC */#define NOPARAMS (void)#define PARAMS(parameter_list) parameter_list#define NOARGS (void)#define ARGS1(t,a) \                (t a)#define ARGS2(t,a,u,b) \                (t a, u b)#define ARGS3(t,a,u,b,v,c) \                (t a, u b, v c)#define ARGS4(t,a,u,b,v,c,w,d) \                (t a, u b, v c, w d)#define ARGS5(t,a,u,b,v,c,w,d,x,e) \                (t a, u b, v c, w d, x e)#define ARGS6(t,a,u,b,v,c,w,d,x,e,y,f) \                (t a, u b, v c, w d, x e, y f)#define ARGS7(t,a,u,b,v,c,w,d,x,e,y,f,z,g) \                (t a, u b, v c, w d, x e, y f, z g)#define ARGS8(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h) \                (t a, u b, v c, w d, x e, y f, z g, s h)#define ARGS9(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h,r,i) \                (t a, u b, v c, w d, x e, y f, z g, s h, r i)#define ARGS10(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h,r,i,q,j) \                (t a, u b, v c, w d, x e, y f, z g, s h, r i, q j)#else  /* not ANSI */#ifndef _WINDOWS#define CONST#endif#define NOPARAMS ()#define PARAMS(parameter_list) ()#define NOARGS ()#define ARGS1(t,a) (a) \                t a;#define ARGS2(t,a,u,b) (a,b) \                t a; u b;#define ARGS3(t,a,u,b,v,c) (a,b,c) \                t a; u b; v c;#define ARGS4(t,a,u,b,v,c,w,d) (a,b,c,d) \                t a; u b; v c; w d;#define ARGS5(t,a,u,b,v,c,w,d,x,e) (a,b,c,d,e) \                t a; u b; v c; w d; x e;#define ARGS6(t,a,u,b,v,c,w,d,x,e,y,f) (a,b,c,d,e,f) \                t a; u b; v c; w d; x e; y f;#define ARGS7(t,a,u,b,v,c,w,d,x,e,y,f,z,g) (a,b,c,d,e,f,g) \                t a; u b; v c; w d; x e; y f; z g;#define ARGS8(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h) (a,b,c,d,e,f,g,h) \                t a; u b; v c; w d; x e; y f; z g; s h;#define ARGS9(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h,r,i) (a,b,c,d,e,f,g,h,i) \                t a; u b; v c; w d; x e; y f; z g; s h; r i;#define ARGS10(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h,r,i,q,j) (a,b,c,d,e,f,g,h,i,j) \

⌨️ 快捷键说明

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