📄 internal.h
字号:
/***
*internal.h - contains declarations of internal routines and variables
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Declares routines and variables used internally by the C run-time.
*
* [Internal]
*
****/
#if _MSC_VER > 1000
#pragma once
#endif /* _MSC_VER > 1000 */
#ifndef _INC_INTERNAL
#define _INC_INTERNAL
#ifndef _CRTBLD
/*
* This is an internal C runtime header file. It is used when building
* the C runtimes only. It is not to be used as a public header file.
*/
#error ERROR: Use of C runtime library internal header file.
#endif /* _CRTBLD */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <cruntime.h>
/*
* Conditionally include windows.h to pick up the definition of
* CRITICAL_SECTION.
*/
#ifdef _MT
#include <windows.h>
#endif /* _MT */
/* Define _CRTIMP */
#ifndef _CRTIMP
#ifdef CRTDLL
#define _CRTIMP __declspec(dllexport)
#else /* CRTDLL */
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* CRTDLL */
#endif /* _CRTIMP */
/* Define _CRTIMP1 */
#ifndef _CRTIMP1
#ifdef CRTDLL1
#define _CRTIMP1 __declspec(dllexport)
#else /* CRTDLL1 */
#define _CRTIMP1 _CRTIMP
#endif /* CRTDLL1 */
#endif /* _CRTIMP1 */
/* Define _CRTIMP2 */
#ifndef _CRTIMP2
#ifdef CRTDLL2
#define _CRTIMP2 __declspec(dllexport)
#else /* CRTDLL2 */
#ifdef _DLL
#define _CRTIMP2 __declspec(dllimport)
#else /* _DLL */
#define _CRTIMP2
#endif /* _DLL */
#endif /* CRTDLL2 */
#endif /* _CRTIMP2 */
/* Define __cdecl for non-Microsoft compilers */
#if (!defined (_MSC_VER) && !defined (__cdecl))
#define __cdecl
#endif /* (!defined (_MSC_VER) && !defined (__cdecl)) */
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif /* _WCHAR_T_DEFINED */
/* Define function type used in several startup sources */
typedef void (__cdecl *_PVFV)(void);
#if defined (_DLL) && defined (_M_IX86)
/* Retained for compatibility with VC++ 5.0 and earlier versions */
_CRTIMP int * __p__commode(void);
#endif /* defined (_DLL) && defined (_M_IX86) */
#if defined (SPECIAL_CRTEXE) && defined (_DLL)
extern int _commode;
#else /* defined (SPECIAL_CRTEXE) && defined (_DLL) */
_CRTIMP extern int _commode;
#endif /* defined (SPECIAL_CRTEXE) && defined (_DLL) */
#ifdef _WIN32
/*
* Control structure for lowio file handles
*/
typedef struct {
long osfhnd; /* underlying OS file HANDLE */
char osfile; /* attributes of file (e.g., open in text mode?) */
char pipech; /* one char buffer for handles opened on pipes */
#ifdef _MT
int lockinitflag;
CRITICAL_SECTION lock;
#endif /* _MT */
} ioinfo;
/*
* Definition of IOINFO_L2E, the log base 2 of the number of elements in each
* array of ioinfo structs.
*/
#define IOINFO_L2E 5
/*
* Definition of IOINFO_ARRAY_ELTS, the number of elements in ioinfo array
*/
#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E)
/*
* Definition of IOINFO_ARRAYS, maximum number of supported ioinfo arrays.
*/
#define IOINFO_ARRAYS 64
#define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS)
/*
* Access macros for getting at an ioinfo struct and its fields from a
* file handle
*/
#define _pioinfo(i) ( __pioinfo[(i) >> IOINFO_L2E] + ((i) & (IOINFO_ARRAY_ELTS - \
1)) )
#define _osfhnd(i) ( _pioinfo(i)->osfhnd )
#define _osfile(i) ( _pioinfo(i)->osfile )
#define _pipech(i) ( _pioinfo(i)->pipech )
/*
* Safer versions of the above macros. Currently, only _osfile_safe is
* used.
*/
#define _pioinfo_safe(i) ( ((i) != -1) ? _pioinfo(i) : &__badioinfo )
#define _osfhnd_safe(i) ( _pioinfo_safe(i)->osfhnd )
#define _osfile_safe(i) ( _pioinfo_safe(i)->osfile )
#define _pipech_safe(i) ( _pioinfo_safe(i)->pipech )
/*
* Special, static ioinfo structure used only for more graceful handling
* of a C file handle value of -1 (results from common errors at the stdio
* level).
*/
extern _CRTIMP ioinfo __badioinfo;
/*
* Array of arrays of control structures for lowio files.
*/
extern _CRTIMP ioinfo * __pioinfo[];
/*
* Current number of allocated ioinfo structures (_NHANDLE_ is the upper
* limit).
*/
extern int _nhandle;
#else /* _WIN32 */
/*
* Define the number of supported handles. This definition must exactly match
* the one in mtdll.h.
*/
#ifdef CRTDLL
#define _NHANDLE_ 512 /* *MUST* match the value under ifdef _DLL! */
#else /* CRTDLL */
#ifdef _DLL
#define _NHANDLE_ 512
#else /* _DLL */
#ifdef _MT
#define _NHANDLE_ 256
#else /* _MT */
#define _NHANDLE_ 64
#endif /* _MT */
#endif /* _DLL */
#endif /* CRTDLL */
extern int _nhandle; /* == _NHANDLE_, set in ioinit.c */
extern char _osfile[];
extern int _osfhnd[];
#ifdef _MAC
extern unsigned char _osperm[];
extern short _osVRefNum[];
extern int _nfile; /*old -- check sources */
extern unsigned int _tmpoff; /*old -- check source */
extern unsigned char _osfileflags[];
#define FTEMP 0x01
#endif /* _MAC */
#endif /* _WIN32 */
int __cdecl _alloc_osfhnd(void);
int __cdecl _free_osfhnd(int);
int __cdecl _set_osfhnd(int,long);
extern const char __dnames[];
extern const char __mnames[];
extern int _days[];
extern int _lpdays[];
#ifndef _TIME_T_DEFINED
typedef long time_t; /* time value */
#define _TIME_T_DEFINED /* avoid multiple def's of time_t */
#endif /* _TIME_T_DEFINED */
#ifdef _MAC
extern time_t __cdecl _gmtotime_t (int, int, int, int, int, int);
#endif /* _MAC */
extern time_t __cdecl __loctotime_t(int, int, int, int, int, int, int);
#ifdef _TM_DEFINED
extern int __cdecl _isindst(struct tm *);
#endif /* _TM_DEFINED */
extern void __cdecl __tzset(void);
extern int __cdecl _validdrive(unsigned);
/*
* This variable is in the C start-up; the length must be kept synchronized
* It is used by the *cenvarg.c modules
*/
extern char _acfinfo[]; /* "_C_FILE_INFO=" */
#define CFI_LENGTH 12 /* "_C_FILE_INFO" is 12 bytes long */
/* typedefs needed for subsequent prototypes */
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif /* _SIZE_T_DEFINED */
#ifndef _VA_LIST_DEFINED
#ifdef _M_ALPHA
typedef struct {
char *a0; /* pointer to first homed integer argument */
int offset; /* byte offset of next parameter */
} va_list;
#else /* _M_ALPHA */
typedef char * va_list;
#endif /* _M_ALPHA */
#define _VA_LIST_DEFINED
#endif /* _VA_LIST_DEFINED */
/*
* stdio internals
*/
#ifndef _FILE_DEFINED
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
#define _FILE_DEFINED
#endif /* _FILE_DEFINED */
#ifndef _MAC
#if !defined (_FILEX_DEFINED) && defined (_WINDOWS_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -