📄 monet_utils.mx
字号:
@' The contents of this file are subject to the MonetDB Public License@' Version 1.1 (the "License"); you may not use this file except in@' compliance with the License. You may obtain a copy of the License at@' http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html@'@' Software distributed under the License is distributed on an "AS IS"@' basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the@' License for the specific language governing rights and limitations@' under the License.@'@' The Original Code is the MonetDB Database System.@'@' The Initial Developer of the Original Code is CWI.@' Portions created by CWI are Copyright (C) 1997-2007 CWI.@' All Rights Reserved.@f monet_utils@a N.J. Nes@* utils @TThe monet utils contains all general functionality needed by both clients andserver. @h#ifndef _MU_H_#define _MU_H_#ifdef WIN32#ifndef LIBMUTILS#define mutils_export extern __declspec(dllimport)#else#define mutils_export extern __declspec(dllexport)#endif#else#define mutils_export extern#endif#define SLASH_2_DIR_SEP(s) {char *t; for(t=strchr(s, '/' ); t; t=strchr(t+1, '/' )) *t=DIR_SEP;}#define DIR_SEP_2_SLASH(s) {char *t; for(t=strchr(s, DIR_SEP); t; t=strchr(t+1, DIR_SEP)) *t='/' ;}#ifdef HAVE_SYS_TYPES_H# include <sys/types.h>#endif#ifdef HAVE_NETDB_H# include <netinet/in.h># include <netdb.h>#endif#include <stdio.h> /* NULL, printf etc. */#include <stdlib.h>#include <errno.h>#include <stdarg.h> /* va_alist.. *//* AIX requires this to be the first thing in the file. */#if HAVE_ALLOCA_H# include <alloca.h>#else# ifdef _AIX#pragma alloca# else# ifndef alloca /* predefined by HP cc +Olibcalls */void *alloca(size_t);# endif# endif#endif#include <assert.h>/* Backward compatibility: configure figures out whether it needs to define "inline" as something else for the architecture it is testing. All uses in the source use "INLINE", so until all occurances of "INLINE" have been replaced by "inline", we just define the latter as the former. */#define INLINE inline#define REGISTER register#ifdef HAVE_LONG_LONGtypedef long long lng;#define SIZEOF_LNG SIZEOF_LONG_LONG#else#ifdef HAVE___INT64typedef __int64 lng;#define SIZEOF_LNG SIZEOF___INT64#endif#endif#ifndef HAVE_SSIZE_T#if SIZEOF_SIZE_T == SIZEOF_INTtypedef int ssize_t;#elsetypedef lng ssize_t;#endif#define HAVE_SSIZE_T 1#endif#ifndef HAVE_PTRDIFF_T#if SIZEOF_SIZE_T == SIZEOF_INTtypedef int ptrdiff_t;#elsetypedef lng ptrdiff_t;#endif#define HAVE_PTRDIFF_T 1#endif#ifdef HAVE_LONG_LONG#ifdef __MINGW32__#define LLFMT "%I64d" /* format to print a long long */#define ULLFMT "%I64u" /* format to print a unsigned long long */#else#define LLFMT "%lld" /* format to print a long long */#define ULLFMT "%llu" /* format to print a unsigned long long */#endif#else#ifdef HAVE___INT64typedef unsigned __int64 gdk_uint64;typedef __int64 gdk_int64;#define LLFMT "%I64d" /* format to print a __int64 */#define ULLFMT "%I64u" /* format to print a unsigned __int64 */#endif#endif/* define printf formats for printing size_t and ssize_t variables */#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901 && !defined(__svr4__) && !defined(WIN32) && !defined(__sgi) && (!defined(__APPLE_CC__) || __GNUC__ > 3)#define SZFMT "%zu"#define SSZFMT "%zd"#elif defined(__MINGW32__)#define SZFMT "%u"#define SSZFMT "%ld"#elif defined(__APPLE_CC__) /* && __GNUC__ <= 3 */#define SZFMT "%zu" #if SIZEOF_SIZE_T == SIZEOF_INT #define SSZFMT "%d" #else #define SSZFMT "%ld" #endif#elif SIZEOF_SIZE_T == SIZEOF_INT#define SZFMT "%u"#define SSZFMT "%d"#elif SIZEOF_SIZE_T == SIZEOF_LONG#define SZFMT "%lu"#define SSZFMT "%ld"#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG || SIZEOF_SIZE_T == SIZEOF___INT64#define SZFMT ULLFMT#define SSZFMT LLFMT#else#error no definition for SZFMT/SSZFMT#endif/* prompts for MAPI protocol */#define PROMPTBEG '\001' /* start prompt bracket */#define PROMPT1 "\001\001\n" /* prompt: ready for new query */#define PROMPT2 "\001\002\n" /* prompt: more data needed */#endif /* _MU_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -