📄 global.h
字号:
#if defined(OS400) && (__OS400_TGTVRM__ >= 510)
#pragma datamodel(P128)
#endif
/*********************************************************************/
/* */
/* Licensed Materials - Property of IBM */
/* */
/* L-GHUS-5VMPGW, L-GHUS-5S3PEE */
/* (C) Copyright IBM Corp. 1989, 2005 All Rights Reserved */
/* */
/* US Government Users Restricted Rights - Use, duplication or */
/* disclosure restricted by GSA ADP Schedule Contract with */
/* IBM Corp. */
/* */
/*********************************************************************/
/* Global Definitions */
#ifndef GLOBAL_DEFS
#define GLOBAL_DEFS
/* Define the specific operating system products we run on:
* Currently defined as:
*
* - OS2_1x = IBM OS/2 16-bit V1.x (NOW DESUPPORTED)
* - OS2_2x = IBM OS/2 32-bit V2.x
* - NT = Microsoft NT operating system.
* - DOSW16 = Microsoft (DOS-based) Windows/16 V3.x (and NOT UNIX-based Win16)
* - MAC_68K = Apple Macintosh on Motorola 680x0 processors
* - MAC_POWERPC = Apple Macintosh on PowerMac 60x processors
* - SUN = Sun OS (Solaris 1.0) Unix
* - SOLARIS = Sun Solaris 2.0 Unix
* - SOLX86 = Sun Solaris 2.x Unix on Intel processors
* - OS400 = i5/OS for IBM iSeries
* - AIX = IBM AIX Unix
* - OS390 = IBM OS/390
* - HPUX = HP-UX
* - ODT = SCO OpenDeskTop
* - UNIXWARE = Novell UnixWare
* - OSF = Digital Unix
* - NLM = Novell Netware Loadable Module
*
* Define the operating system API (may be used on multiple operating systems)
*
* - W = Microsoft Windows API
* - W16 = Microsoft 16-bit Windows API
* - W32 = Microsoft 32-bit Windows API
* - MIRAGE = Uses UNIX Mirage product which emulates Windows/16 API
* - UNIX = UNIX API (common to all UNIX platforms)
* - OS2 = OS/2 Base Kernel Services API (either V1.x or V2.x)
* - PM = OS/2 Presentation Manager API (either V1.x or V2.x)
* - DOS = DOS INT21 API
* - MAC = Macintosh Toolbox API
*
* Define OS architecture
*
* - "PREEMPTIVE" - OS supports preemptive multitasking
* - "SEMAPHORES" - OS supports semaphores protecting critical regions,
* as opposed to simply using Yields as critical
* region protection mechanism
* - "SEGMENTATION" - Memory addresses stay same across reallocations
* - "THREADS" - OS supported "threads" of execution that implicitly
* share DS, allocated data and code.
* - "SINGLE_INSTANCE_DLL_DS" - DS in DLLs is shared system-wide
* (as opposed to each process having its own copy)
* - "LOCAL" - Addressing of "Local" memory (NEAR or FAR)
* - "NOGUI" - OS has no graphical interface (e.g., NLM or VMS)
* - "ENABLE_TRANSACTIONS" - OS supports Transaction Tracking
* - "UNICODE" - OS API requires UNICODE strings, not single-byte strings
*
* Define the ways our executables are linked together:
*
* - "LINKED_WITH_STATIC_DRIVERS"
* The network,database,ix drivers are statically linked
* into the base executables (either single executable or
* single shared library), and are NOT dynamically loaded
* into memory when configured by the user.
* If not defined, then the drivers are dynamically loaded
* into memory when needed via OSLoadLibrary.
* This symbol is tested to determine whether to load
* the library or simply call the statically linked driver
* directly.
* - "LINKED_UI_TOGETHER"
* The user interface portion of the client product (nem,
* desk, view, edit) are statically linked into a single
* executable, rather than in separate shared library DLLs.
* This symbol is tested if the various subprograms need
* to share copies of variables such as "gi" rather than
* each having their own copy of the same variable of the
* same name (which would be necessary if each subprogram
* is in its own DLL).
* - "LINKED_EVERYTHING_TOGETHER"
* The user interface portion is statically linked with
* the back end portion into a gigantic single executable.
* Used on platforms where import/export shared libraries
* do not exist.
* - "RUNTIME_LOAD_LIBRARY_SUPPORTED"
* TRUE if OSLoadLibrary supports the ability to dynamically
* load a library at runtime, and return its main entry point.
* If FALSE, OSLoadLibrary will at least support connecting
* to statically linked pseudo-libraries within our own
* executable, but not to customer-written addin DLLs.
*
* Define the byte ordering scheme:
*
* - "BIG_ENDIAN_ORDER" - Bytes are ordered MSB to LSB (e.g. 68000)
* - "LITTLE_ENDIAN_ORDER" - Bytes are ordered LSB to MSB (e.g. 8086, VAX)
*
* Define the machine limitations:
*
* - ODS_NEEDED = Machine cannot support byte-aligned references
* and requires struct padding and aligned read/reads
* - REQUIRED_ALIGNMENT = Alignment required by processor to store largest data type to avoid a bus trap (usually DWORD)
* - NATURAL_ALIGNMENT = Natural compiler alignment of the largest data type (usually a pointer)
* - MEMALLOC_ALIGNMENT = Memory Allocation alignment: same as NATURAL_ALIGNMENT except for OS400 with 64 bit pointers
* - COMPILER_DWORD_ALIGNMENT = Compiler's alignment of a DWORD within a struct
* - COMPILER_NUMBER_ALIGNMENT = Compiler's alignment of NUMBER (usually a double)
* This is the alignment the compiler will use for the "Alignment_do_not_use"
* field of the ALIGNED_NUMBER union.
*
* Define the type/capabilities of the compiler we are using.
* Currently defined as:
*
* - "MSC" = Microsoft C
* - "GCC" = Gnu C
* - "SYMANTEC_C" = Symantec C/C++ running under MPW on the Mac. (No longer supported in V5)
* - "MWERKS_C" = Metrowerks C/C++ running under MPW on the Mac.
* - "MR_C" = Apple MrC running under MPW on the Mac. (obsolete)
* - "PPC_C" = PPC C on the Mac or PowerMac. (obsolete)
* - "IBM_C" = IBM Cset/2 on OS2 2.0
* - "WATCOM_C" = WATCOM C/386 in any env, such as OS/2 2 or Netware
* - "SUN_C" = Sun native C compiler
* - "HP_C" = HP native C compiler
* - "XLC_C" = IBM AIX native C compiler (obsolete)
* - "OS390_C" = IBM MVS/ESA C/C++ compiler
* - "UW_C" = UnixWare native C compiler
* - "ZORTECH_CPP" = Zortech C++ compiler for OS/2
* - "ILEC400" = OS/400 ILE C cross-compiler for AIX
*
* Define the configuration's official name, used in the undocumented
* @Platform function for some our templates such as NAMES.NSF.
*
* - PLATFORM_NAME
*
* Define some datatypes which are considered standard by all modules:
*
* BYTE = unsigned 8 bit integer
* SBYTE = signed 8 bit integer
* WORD = unsigned 16 bit integer
* SWORD = signed 16 bit integer
* DWORD = unsigned 32 bit integer
* LONG = signed 32 bit integer
* BOOLBYTE= boolean value which occupies exactly 1 byte
* STATUS = Notes-specific 16-bit error code and string resource identifier
* NUMBER = A platform-independent IEEE-64 floating point number
* char = A byte which is part of a LMBCS character string
*
* BOOL = boolean value (used in arguments, arbitrary size)
* (DO NOT USE IN ON-DISK STRUCTURES - MACHINE DEPENDENT SIZE)
* FLAG = boolean value, ONLY used in bit fields in structs (arbitrary size)
* (DO NOT USE IN ON-DISK STRUCTURES - MACHINE DEPENDENT POSITION)
* short = signed integer at least 8 bits wide
* (DO NOT USE IN ON-DISK STRUCTURES - MACHINE DEPENDENT SIZE)
* int = signed integer at least 16 bits wide
* (DO NOT USE IN ON-DISK STRUCTURES - MACHINE DEPENDENT SIZE)
* long = signed integer at least 32 bits wide
* (DO NOT USE IN ON-DISK STRUCTURES - MACHINE DEPENDENT SIZE)
* NCHAR = A platform-specific character (1 or 2 bytes depending if UNICODE is enabled)
* (DO NOT USE IN ON-DISK STRUCTURES - MACHINE DEPENDENT SIZE)
*/
#if defined(DOSW16) || defined(DOS)
#ifdef _MSC_VER
#define MSC
#endif
#define LITTLE_ENDIAN_ORDER
#if defined(W) || defined(W16) || defined(DOSW16)
#ifndef W16
#define W16
#endif
#ifndef W
#define W
#endif
#ifndef DOSW16
#define DOSW16
#endif
#define SEGMENTATION
#define SEMAPHORES
#define SEMSPIN
#define PLATFORM_NAME "Windows/16"
#else
#define PLATFORM_NAME "MS-DOS"
#define NOGUI
#endif
#ifndef DOS
#define DOS
#endif
#define SINGLE_INSTANCE_DLL_DS
#define ODS_NEEDED FALSE
#define COMPILER_INT_SIZE 2
#define REQUIRED_ALIGNMENT 1
#define COMPILER_DWORD_ALIGNMENT 1
#define COMPILER_NUMBER_ALIGNMENT 1
#define VIM_USE_MSWIN
#elif defined(OS400) /* This should appear before the OS2 test below, because that section tests for __IBMCPP__,
which our C++ compiler also generates */
#define PLATFORM_NAME "OS/400"
#ifndef UNIX
#define UNIX
#endif
#ifndef W32
#define W32 /* Compile for Windows 32 API - its emulated */
#endif
#ifndef W
#define W /* Compile for Windows 32 API - its emulated */
#endif
#if !defined(MIRAGE) && !defined(INTERNOTES)
#define MIRAGE
#endif
#ifndef HANDLE_IS_32BITS
#define HANDLE_IS_32BITS
#endif
#define BIG_ENDIAN_ORDER
#define PREEMPTIVE
#define SEMAPHORES
#define SEMALLOC
#define ODS_NEEDED TRUE
#define COMPILER_INT_SIZE 4
#ifdef OS400_64 /* OS400 with 64 bit pointers */
#define REQUIRED_ALIGNMENT 8
#define NATURAL_ALIGNMENT 8
#define MEMALLOC_ALIGNMENT 16 /* some pointers will still be 128 bits */
#else /* OS400 with 128 bit pointers */
#define REQUIRED_ALIGNMENT 16
#define NATURAL_ALIGNMENT 16
#endif
#define PTRISNOT32BIT
#define COMPILER_DWORD_ALIGNMENT 4
#define COMPILER_NUMBER_ALIGNMENT 8
#define VIM_USE_UNIX
#define THREADS
#ifndef NOGUI
#define NOGUI
#endif
#if defined(__ILEC400__) || defined(__AIXxiCC__) || defined(__AIXxxlC400__)
#define ILEC400
#endif
#elif defined(OS2) || defined(OS2_2x) || defined(PM)
#ifndef OS2
#define OS2
#endif
#ifndef OS2_2x
#define OS2_2x
#endif
#ifndef PM
#define PM
#endif
#if defined(__IBMC__) || defined(__IBMCPP__)
#define IBM_C
#endif
#ifdef __WATCOMC__
#define WATCOM_C
#endif
#define PLATFORM_NAME "OS/2v2"
#define LITTLE_ENDIAN_ORDER
#define PREEMPTIVE
#define SEMAPHORES
#define SEMALLOC
#define THREADS
#define ODS_NEEDED FALSE
#define COMPILER_INT_SIZE 4
#define REQUIRED_ALIGNMENT 1
#define COMPILER_DWORD_ALIGNMENT 1
#define COMPILER_NUMBER_ALIGNMENT 1
#define VIM_USE_OS2_32
#elif defined(OS2_1x)
#ifndef OS2
#define OS2
#endif
#ifndef OS2_1x
#define OS2_1x
#endif
#ifndef PM
#define PM
#endif
#define PLATFORM_NAME "OS/2v1"
#ifdef __ZTC__
#define ZORTECH_CPP
#endif
#define MSC
#define LITTLE_ENDIAN_ORDER
#define PREEMPTIVE
#define SEMAPHORES
#define SEGMENTATION
#define THREADS
#define ODS_NEEDED FALSE
#define COMPILER_INT_SIZE 2
#define REQUIRED_ALIGNMENT 1
#define COMPILER_DWORD_ALIGNMENT 1
#define COMPILER_NUMBER_ALIGNMENT 1
#define VIM_USE_OS2_16
#elif defined(NT) || (defined(W32) && !defined(UNIX))
#ifndef W32
#define W32
#endif
#ifndef W
#define W
#endif
#ifndef NT
#define NT
#endif
#define PLATFORM_NAME "Windows/32"
#ifdef _MSC_VER
#define MSC
#endif
#if defined(__IBMC__) || defined(__IBMCPP__)
#define IBM_C
#endif
#define THREADS
#define LITTLE_ENDIAN_ORDER
#define PREEMPTIVE
#define SEMAPHORES
#define SEMALLOC
#ifdef _X86_
#define ODS_NEEDED FALSE
/* Suppress "used #pragma pack to change alignment" */
#pragma warning(disable:4103)
/* Note: If you change the packing, you must also change inc\globpack.h */
#pragma pack(1)
#define REQUIRED_ALIGNMENT 1
#define COMPILER_DWORD_ALIGNMENT 1
#define COMPILER_NUMBER_ALIGNMENT 1
#else
#define ODS_NEEDED TRUE
#define REQUIRED_ALIGNMENT 4
#define COMPILER_DWORD_ALIGNMENT 4
#define COMPILER_NUMBER_ALIGNMENT 4
#endif
#define COMPILER_INT_SIZE 4
#define VIM_USE_MSWIN_NT
#define OLEW32
/* Enable some OLE definitions which are only available for NT 4.0 and
above. The programmer must be careful not to use them on other
Win32 platforms.
*/
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#elif defined(MAC) || defined(applec) || defined(__PPCC__) || defined(__MWERKS__) || defined(__SC__) || defined(__MRC__) || defined(THINK_C)
#ifndef MAC
#define MAC
#endif
/* We have dropped support for System 6. Turning on this switch causes
Apple's headers to explicitly generate inline traps into the MacOS
rather than statically linking glue code into our executable. This
does 2 things: A) reduces size of our app slightly, and B) makes it
possible for Apple to fix a bug in the code (since the code resides
in the MacOS itself rather than statically linked into our app). */
#ifndef SystemSevenOrLater
#define SystemSevenOrLater TRUE
#endif
#if defined(__MWERKS__) /* Metrowerks MPW compiler */
#ifdef __powerc
#ifndef MAC_POWERPC
#define MAC_POWERPC
#endif
#else
#ifndef MAC_68K
#define MAC_68K
#endif
#endif
#ifndef MWERKS_C
#define MWERKS_C
#endif
#elif defined(__PPCC__) /* Apple "Macintosh on RISC" PPC cross-dev MPW compiler */
#ifndef MAC_POWERPC
#define MAC_POWERPC
#endif
#ifndef PPC_C
#define PPC_C
#endif
#elif defined(__xlc) || defined(__xlC) /* IBM "XLC" PPC native AIX-based compiler */
#ifndef MAC_POWERPC
#define MAC_POWERPC
#endif
#ifndef XLC_C
#define XLC_C
#endif
#elif defined(_MSC_VER) /* Microsoft Visual C++ 2.0 cross-dev compiler */
#ifndef MAC_68K
#define MAC_68K
#endif
#ifndef MSC
#define MSC
#endif
#elif defined(__MRC__) /* Apple/Symantec MrC MPW compiler */
#ifndef MAC_POWERPC
#define MAC_POWERPC
#endif
#ifndef MR_C
#define MR_C
#endif
#elif defined(applec) /* 68K MPW compiler */
#if defined(__SC__)
#ifndef MAC_68K
#define MAC_68K
#endif
#ifndef SYMANTEC_C
#define SYMANTEC_C
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -