📄 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 * * $Id: uemf.h,v 1.8 2003/11/25 21:48:13 hwolff Exp $ */#ifndef _h_UEMF#define _h_UEMF 1/******************************** Description *********************************//* * GoAhead Web Server header. This defines the Web public APIs *//******************************* Per O/S Includes *****************************/#ifdef 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 */#ifdef CE /*#include <errno.h>*/ #include <limits.h> #include <tchar.h> #include <windows.h> #include <winsock.h> #include <winnls.h> #include "CE/wincompat.h" #include <winsock.h>#endif /* CE */#ifdef NW #include <direct.h> #include <io.h> #include <sys/stat.h> #include <time.h> #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <niterror.h> #define EINTR EINUSE #define WEBS 1 #include <limits.h> #include <netdb.h> #include <process.h> #include <tiuser.h> #include <sys/time.h> #include <arpa/inet.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/filio.h> #include <netinet/in.h>#endif /* NW */#ifdef 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 */#ifdef UNIX #include <stdio.h>#endif /* UNIX */#ifdef LINUX #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 */#ifdef 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 */#ifdef MACOSX #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <fcntl.h> #include <errno.h>#endif /* MACOSX */#ifdef UW #include <stdio.h>#endif /* UW */#ifdef 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 */#ifdef sparc# define __NO_PACK#endif /* sparc */#ifdef 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 */#ifdef 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 */#ifdef 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>#ifndef WEBS#include "messages.h"#endif /* ! WEBS *//******************************* Per O/S Defines *****************************/#ifdef UW #define __NO_PACK 1#endif /* UW */#if (defined (SCOV5) || defined (VXWORKS) || defined (LINUX) || defined (LYNX) || defined (MACOSX))#ifndef O_BINARY#define O_BINARY 0#endif /* O_BINARY */#define SOCKET_ERROR -1#endif /* SCOV5 || VXWORKS || LINUX || LYNX || MACOSX */#if (defined (WIN) || defined (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 (defined (LINUX) && !defined (_STRUCT_TIMEVAL))struct timeval{ time_t tv_sec; /* Seconds. */ time_t tv_usec; /* Microseconds. */};#define _STRUCT_TIMEVAL 1#endif /* LINUX && ! _STRUCT_TIMEVAL */#ifdef 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 */#ifdef QNX4 typedef long fd_mask; #define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */#endif /* QNX4 */#ifdef NW #define fd_mask fd_set #define INADDR_NONE -1l #define Sleep delay #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 /* NW *//********************************** 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 */#define FMT_STATIC_MAX 256 /* Maximum for fmtStatic calls */#if (defined (LITTLEFOOT) || defined (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#ifdef 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)#ifdef 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 (defined (LITTLEFOOT) && defined (INMEM)) #include "lf/inmem.h"#endif /* LITTLEFOOT && INMEM *//* * Type for unicode systems */#ifdef 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 gstrspn wcsspn#define gstrcspn wcscspn#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#ifdef 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 */#ifdef VXWORKS#define gchdir vxchdir#define gmkdir vxmkdir#define grmdir vxrmdir#elif (defined (LYNX) || defined (LINUX) || defined (MACOSX) || defined (SOLARIS))#define gchdir chdir#define gmkdir(s) mkdir(s,0755)#define grmdir rmdir#else#define gchdir chdir#define gmkdir mkdir#define grmdir rmdir#endif /* VXWORKS #elif LYNX || LINUX || MACOSX || SOLARIS*/#define gclose close#define gclosedir closedir#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#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 gstrspn strspn#define gstrcspn strcspn#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 */#ifdef VXWORKS#define fcntl(a, b, c)#endif /* VXWORKS */#endif /* ! UNICODE *//* * Include inmem.h here because it redefines many of the file access fucntions.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -