📄 uemf.h
字号:
/* * uemf.h -- GoAhead Micro Embedded Management Framework Header * * Copyright (c) GoAhead Software Inc., 1995-2000. All Rights Reserved. * * See the file "license.txt" for usage and redistribution license requirements */#ifndef _h_UEMF#define _h_UEMF 1/******************************** Description *********************************//* * GoAhead Web Server header. This defines the Web public APIs *//******************************* Per O/S Includes *****************************/#if WIN #include <direct.h> #include <io.h> #include <sys/stat.h> #include <limits.h> #include <tchar.h> #include <windows.h> #include <winnls.h> #include <time.h> #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h>#endif /* WIN */#if CE #include <limits.h> #include <tchar.h> #include <windows.h> #include <winnls.h> #include "CE/wincompat.h" #include <winsock.h>#endif /* CE */#if NW #include <stdio.h>#endif /* NW */#if SCOV5 #include <sys/types.h> #include <stdio.h> #include "sys/socket.h" #include "sys/select.h" #include "netinet/in.h" #include "arpa/inet.h" #include "netdb.h"#endif /* SCOV5 */#if UNIX #include <stdio.h>#endif /* UNIX */#if LINUX || __rtems__ #include <sys/types.h> #include <sys/stat.h> #include <sys/param.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/socket.h> #include <sys/select.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <time.h> #include <fcntl.h> #include <errno.h>#endif /* LINUX */#if LYNX #include <limits.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <time.h> #include <fcntl.h> #include <errno.h>#endif /* LYNX */#if UW #include <stdio.h>#endif /* UW */#if VXWORKS #include <vxWorks.h> #include <sockLib.h> #include <selectLib.h> #include <inetLib.h> #include <ioLib.h> #include <stdio.h> #include <stat.h> #include <time.h> #include <usrLib.h> #include <fcntl.h> #include <errno.h>#endif /* VXWORKS */#if SOLARIS #include <sys/types.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <socket.h> #include <sys/select.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <time.h> #include <fcntl.h> #include <errno.h>#endif /* SOLARIS */#if QNX4 #include <sys/types.h> #include <stdio.h> #include <sys/socket.h> #include <sys/select.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <stdlib.h> #include <unistd.h> #include <sys/uio.h> #include <sys/wait.h>#endif /* QNX4 */#if ECOS #include <limits.h> #include <cyg/infra/cyg_type.h> #include <cyg/kernel/kapi.h> #include <time.h> #include <network.h> #include <errno.h>#endif /* ECOS *//********************************** Includes **********************************/#include <ctype.h>#include <stdarg.h>#include <string.h>#if ! WEBS#include "messages.h"#endif /* ! WEBS *//******************************* Per O/S Defines *****************************/#if defined(__rtems__)#define __NO_PACK 1#endif#if UW #define __NO_PACK 1#endif /* UW */#if SCOV5 || VXWORKS || LINUX || LYNX || __rtems__#ifndef O_BINARY#define O_BINARY 0#endif /* O_BINARY */#define SOCKET_ERROR -1#endif /* SCOV5 || VXWORKS || LINUX || LYNX */#if WIN || CE/* * __NO_FCNTL means can't access fcntl function. Fcntl.h is still available. */#define __NO_FCNTL 1#undef R_OK#define R_OK 4#undef W_OK#define W_OK 2#undef X_OK#define X_OK 1#undef F_OK#define F_OK 0#endif /* WIN || CE */#if LINUX && !__rtems__ && ! _STRUCT_TIMEVALstruct timeval{ time_t tv_sec; /* Seconds. */ time_t tv_usec; /* Microseconds. */};#define _STRUCT_TIMEVAL 1#endif /* LINUX && ! _STRUCT_TIMEVAL */#if ECOS #define O_RDONLY 1 #define O_BINARY 2 #define __NO_PACK 1 #define __NO_EJ_FILE 1 #define __NO_CGI_BIN 1 #define __NO_FCNTL 1/* * #define LIBKERN_INLINE to avoid kernel inline functions */ #define LIBKERN_INLINE#endif /* ECOS */#if QNX4 typedef long fd_mask; #define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */#endif /* QNX4 *//********************************** Unicode ***********************************//* * Constants and limits. Also FNAMESIZE and PATHSIZE are currently defined * in param.h to be 128 and 512 */#define TRACE_MAX (4096 - 48)#define VALUE_MAX_STRING (4096 - 48)#define SYM_MAX (512)#define XML_MAX 4096 /* Maximum size for tags/tokens */#define BUF_MAX 4096 /* General sanity check for bufs */#if LITTLEFOOT || WEBS#define LF_BUF_MAX (510)#define LF_PATHSIZE LF_BUF_MAX#else#define LF_BUF_MAX BUF_MAX#define LF_PATHSIZE PATHSIZE#define UPPATHSIZE PATHSIZE#endif /* LITTLEFOOT || WEBS */#ifndef CHAR_T_DEFINED#define CHAR_T_DEFINED 1#if UNICODE/* * To convert strings to UNICODE. We have a level of indirection so things * like T(__FILE__) will expand properly. */#define T(x) __TXT(x)#define __TXT(s) L ## stypedef unsigned short char_t;typedef unsigned short uchar_t;/* * Text size of buffer macro. A buffer bytes will hold (size / char size) * characters. */#define TSZ(x) (sizeof(x) / sizeof(char_t))/* * How many ASCII bytes are required to represent this UNICODE string? */#define TASTRL(x) ((wcslen(x) + 1) * sizeof(char_t))#else#define T(s) stypedef char char_t;#define TSZ(x) (sizeof(x))#define TASTRL(x) (strlen(x) + 1)#if WINtypedef unsigned char uchar_t;#endif /* WIN */#endif /* UNICODE */#endif /* ! CHAR_T_DEFINED *//* * "Boolean" constants */#ifndef TRUE#define TRUE 1#endif#ifndef FALSE#define FALSE 0#endif/* * GoAhead Copyright. */#define GOAHEAD_COPYRIGHT \ T("Copyright (c) GoAhead Software Inc., 1995-2000. All Rights Reserved.")/* * The following include has to be after the unicode defines. By putting it * here, many modules in various parts of the tree are cleaner. */#if LITTLEFOOT && INMEM #include "lf/inmem.h"#endif /* LITTLEFOOT && INMEM *//* * Type for unicode systems */#if UNICODE#define gmain wmain#define gasctime _wasctime#define gsprintf swprintf#define gprintf wprintf#define gfprintf fwprintf#define gsscanf swscanf#define gvsprintf vswprintf#define gstrcpy wcscpy#define gstrncpy wcsncpy#define gstrncat wcsncat#define gstrlen wcslen#define gstrcat wcscat#define gstrcmp wcscmp#define gstrncmp wcsncmp#define gstricmp wcsicmp#define gstrchr wcschr#define gstrrchr wcsrchr#define gstrtok wcstok#define gstrnset wcsnset#define gstrrchr wcsrchr#define gstrstr wcsstr#define gstrtol wcstol#define gfopen _wfopen#define gopen _wopen#define gclose close#define gcreat _wcreat#define gfgets fgetws#define gfputs fputws#define gfscanf fwscanf#define ggets _getws#define glseek lseek#define gunlink _wunlink#define gread read#define grename _wrename#define gwrite write#define gtmpnam _wtmpnam#define gtempnam _wtempnam#define gfindfirst _wfindfirst#define gfinddata_t _wfinddata_t#define gfindnext _wfindnext#define gfindclose _findclose#define gstat _wstat#define gaccess _waccess#define gchmod _wchmodtypedef struct _stat gstat_t;#define gmkdir _wmkdir#define gchdir _wchdir#define grmdir _wrmdir#define ggetcwd _wgetcwd#define gtolower towlower#define gtoupper towupper#if CE#define gisspace isspace#define gisdigit isdigit#define gisxdigit isxdigit#define gisupper isupper#define gislower islower#define gisprint isprint#else#define gremove _wremove#define gisspace iswspace#define gisdigit iswdigit#define gisxdigit iswxdigit#define gisupper iswupper#define gislower iswlower#endif /* if CE */#define gisalnum iswalnum#define gisalpha iswalpha#define gatoi(s) wcstol(s, NULL, 10)#define gctime _wctime#define ggetenv _wgetenv#define gexecvp _wexecvp#else /* ! UNICODE */#ifndef gopen#if INMEM#define gclose imClose#define gclosedir imClosedir#define gchdir imChdir#define gchmod imChmod#define ggetcwd imGetcwd#define glseek imLseek#define gloadModule imLoadModule#define gmkdir imMkdir#define gopen imOpen#define gopendir imOpendir#define gread imRead#define greaddir imReaddir#define grename imRename#define grmdir imRmdir#define gstat imStat#define gunlink imUnlink#define gwrite imWrite#else#define gclose close#define gclosedir closedir#if VXWORKS#define gchdir vxchdir#define gmkdir vxmkdir#define grmdir vxrmdir#else#if LYNX || LINUX || SOLARIS#define gmkdir(s) mkdir(s,0755)#else#define gmkdir mkdir#endif /* LYNX || LINUX || SOLARIS */#define grmdir rmdir#define gchdir chdir#endif /* VXWORKS */#define gchmod chmod#define ggetcwd getcwd#define glseek lseek#define gloadModule loadModule#define gopen open#define gopendir opendir#define gread read#define greaddir readdir#define grename rename#define gstat stat#define gunlink unlink#define gwrite write#endif /* INMEM */#endif /* ! gopen */#define gasctime asctime#define gsprintf sprintf#define gprintf printf#define gfprintf fprintf#define gsscanf sscanf#define gvsprintf vsprintf#define gstrcpy strcpy#define gstrncpy strncpy#define gstrncat strncat#define gstrlen strlen#define gstrcat strcat#define gstrcmp strcmp#define gstrncmp strncmp#define gstricmp strcmpci#define gstrchr strchr#define gstrrchr strrchr#define gstrtok strtok#define gstrnset strnset#define gstrrchr strrchr#define gstrstr strstr#define gstrtol strtol#define gfopen fopen#define gcreat creat#define gfgets fgets#define gfputs fputs#define gfscanf fscanf#define ggets gets#define gtmpnam tmpnam#define gtempnam tempnam#define gfindfirst _findfirst#define gfinddata_t _finddata_t#define gfindnext _findnext#define gfindclose _findclose#define gaccess accesstypedef struct stat gstat_t;#define gremove remove#define gtolower tolower#define gtoupper toupper#define gisspace isspace#define gisdigit isdigit#define gisxdigit isxdigit#define gisalnum isalnum#define gisalpha isalpha#define gisupper isupper#define gislower islower#define gatoi atoi#define gctime ctime#define ggetenv getenv#define gexecvp execvp#ifndef VXWORKS#define gmain main#endif /* ! VXWORKS */#if VXWORKS#define fcntl(a, b, c)#endif /* VXWORKS */#endif /* ! UNICODE *//********************************** Defines ***********************************/#ifndef FNAMESIZE#define FNAMESIZE 254 /* Max length of file names */#endif /* FNAMESIZE */#define E_MAX_ERROR 4096#define URL_MAX 4096/* * Error types */#define E_ASSERT 0x1 /* Assertion error */#define E_LOG 0x2 /* Log error to log file */#define E_USER 0x3 /* Error that must be displayed */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -