⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 internal.h

📁 C标准库源代码
💻 H
📖 第 1 页 / 共 2 页
字号:

/*
 * Variation of FILE type used for the dynamically allocated portion of
 * __piob[]. For single thread, _FILEX is the same as FILE. For multithread
 * models, _FILEX has two fields: the FILE struct and the CRITICAL_SECTION
 * struct used to serialize access to the FILE.
 */
#ifdef _MT

typedef struct {
        FILE f;
        CRITICAL_SECTION lock;
        }   _FILEX;

#else  /* _MT */

typedef FILE    _FILEX;

#endif  /* _MT */

#define _FILEX_DEFINED
#endif  /* !defined (_FILEX_DEFINED) && defined (_WINDOWS_) */

/*
 * Number of entries supported in the array pointed to by __piob[]. That is,
 * the number of stdio-level files which may be open simultaneously. This
 * is normally set to _NSTREAM_ by the stdio initialization code.
 */
extern int _nstream;

/*
 * Pointer to the array of pointers to FILE/_FILEX structures that are used
 * to manage stdio-level files.
 */
extern void **__piob;

#endif  /* _MAC */

#ifdef _MAC
extern FILE * _lastiob;
#endif  /* _MAC */

FILE * __cdecl _getstream(void);
FILE * __cdecl _openfile(const char *, const char *, int, FILE *);
#ifdef _WIN32
FILE * __cdecl _wopenfile(const wchar_t *, const wchar_t *, int, FILE *);
#endif  /* _WIN32 */
void __cdecl _getbuf(FILE *);
int __cdecl _filwbuf (FILE *);
int __cdecl _flswbuf(int, FILE *);
void __cdecl _freebuf(FILE *);
int __cdecl _stbuf(FILE *);
void __cdecl _ftbuf(int, FILE *);
int __cdecl _output(FILE *, const char *, va_list);
#ifdef _WIN32
int __cdecl _woutput(FILE *, const wchar_t *, va_list);
#endif  /* _WIN32 */
int __cdecl _input(FILE *, const unsigned char *, va_list);
#ifdef _WIN32
int __cdecl _winput(FILE *, const wchar_t *, va_list);
#endif  /* _WIN32 */
int __cdecl _flush(FILE *);
void __cdecl _endstdio(void);

#ifdef _WIN32
int __cdecl _fseeki64(FILE *, __int64, int);
int __cdecl _fseeki64_lk(FILE *, __int64, int);
__int64 __cdecl _ftelli64(FILE *);
#ifdef _MT
__int64 __cdecl _ftelli64_lk(FILE *);
#else  /* _MT */
#define _ftelli64_lk    _ftelli64
#endif  /* _MT */
#endif  /* _WIN32 */

#ifndef CRTDLL
extern int _cflush;
#endif  /* CRTDLL */

extern unsigned int _tempoff;

extern unsigned int _old_pfxlen;

extern int _umaskval;       /* the umask value */

extern char _pipech[];      /* pipe lookahead */

extern char _exitflag;      /* callable termination flag */

extern int _C_Termination_Done; /* termination done flag */

char * __cdecl _getpath(const char *, char *, unsigned);
#ifdef _WIN32
wchar_t * __cdecl _wgetpath(const wchar_t *, wchar_t *, unsigned);
#endif  /* _WIN32 */

extern int _dowildcard;     /* flag to enable argv[] wildcard expansion */

#ifndef _PNH_DEFINED
typedef int (__cdecl * _PNH)( size_t );
#define _PNH_DEFINED
#endif  /* _PNH_DEFINED */


/* calls the currently installed new handler */
int _callnewh(size_t);

extern int _newmode;    /* malloc new() handler mode */

#if defined (_DLL) && defined (_M_IX86)
/* pointer to initial environment block that is passed to [w]main */
#define __winitenv  (*__p___winitenv())
_CRTIMP wchar_t *** __cdecl __p___winitenv(void);
#define __initenv  (*__p___initenv())
_CRTIMP char *** __cdecl __p___initenv(void);
#endif  /* defined (_DLL) && defined (_M_IX86) */

/* pointer to initial environment block that is passed to [w]main */
#ifdef _WIN32
extern _CRTIMP wchar_t **__winitenv;
#endif  /* _WIN32 */
extern _CRTIMP char **__initenv;

/* startup set values */
extern char *_aenvptr;      /* environment ptr */
#ifdef _WIN32
extern wchar_t *_wenvptr;   /* wide environment ptr */
#endif  /* _WIN32 */

/* command line */

#if defined (_DLL) && defined (_M_IX86)
/* Retained for compatibility with VC++ 5.0 and earlier versions */
_CRTIMP char ** __cdecl __p__acmdln(void);
_CRTIMP wchar_t ** __cdecl __p__wcmdln(void);
#endif  /* defined (_DLL) && defined (_M_IX86) */
_CRTIMP extern char *_acmdln;
#ifdef _WIN32
_CRTIMP extern wchar_t *_wcmdln;
#endif  /* _WIN32 */


/*
 * prototypes for internal startup functions
 */
int __cdecl _cwild(void);           /* wild.c */
#ifdef _WIN32
int __cdecl _wcwild(void);          /* wwild.c */
#endif  /* _WIN32 */
#ifdef _MT
int __cdecl _mtinit(void);          /* tidtable.asm */
void __cdecl _mtterm(void);         /* tidtable.asm */
void __cdecl _mtinitlocks(void);        /* mlock.asm */
void __cdecl _mtdeletelocks(void);      /* mlock.asm */
#endif  /* _MT */

/*
 * C source build only!!!!
 *
 * more prototypes for internal startup functions
 */
void __cdecl _amsg_exit(int);           /* crt0.c */
#ifdef _MAC
int __cdecl __cinit(void);              /* crt0dat.c */
#else  /* _MAC */
void __cdecl _cinit(void);              /* crt0dat.c */
#endif  /* _MAC */
void __cdecl __doinits(void);           /* astart.asm */
void __cdecl __doterms(void);           /* astart.asm */
void __cdecl __dopreterms(void);        /* astart.asm */
void __cdecl _FF_MSGBANNER(void);
void __cdecl _fptrap(void);             /* crt0fp.c */
#ifdef _MAC
void __cdecl _heap_init(void);
#else  /* _MAC */
int __cdecl _heap_init(int);
#endif  /* _MAC */
void __cdecl _heap_term(void);
void __cdecl _heap_abort(void);
#ifdef _WIN32
void __cdecl __initconin(void);         /* initcon.c */
void __cdecl __initconout(void);        /* initcon.c */
#endif  /* _WIN32 */
void __cdecl _ioinit(void);             /* crt0.c, crtlib.c */
void __cdecl _ioterm(void);             /* crt0.c, crtlib.c */
char * __cdecl _GET_RTERRMSG(int);
void __cdecl _NMSG_WRITE(int);
void __cdecl _setargv(void);            /* setargv.c, stdargv.c */
void __cdecl __setargv(void);           /* stdargv.c */
#ifdef _WIN32
void __cdecl _wsetargv(void);           /* wsetargv.c, wstdargv.c */
void __cdecl __wsetargv(void);          /* wstdargv.c */
#endif  /* _WIN32 */
void __cdecl _setenvp(void);            /* stdenvp.c */
#ifdef _WIN32
void __cdecl _wsetenvp(void);           /* wstdenvp.c */
#endif  /* _WIN32 */
void __cdecl __setmbctable(unsigned int);   /* mbctype.c */

#ifdef _MAC
void __cdecl _envinit(void);            /* intcon.c */
int __cdecl __dupx(int, int);           /* dupx.c */
#define SystemSevenOrLater  1
#include <macos\types.h>
void _ShellReturn(void);                /* astart.a */
extern int _shellStack;                 /* astart.a */
int __GestaltAvailable(void);           /* gestalt.c */
int __TrapFromGestalt(OSType selector, long bitNum); /* gestalt.c */
int SzPathNameFromDirID(long lDirID, char * szPath, int cbLen);
void __cdecl _endlowio(void);           /* endlow.c */
void __cdecl _initcon(void);            /* intcon.c */
void __cdecl _inittime(void);           /* clock.c */
void __cdecl _onexitinit (void);        /* onexit.c */
#endif  /* _MAC */

#ifdef _MBCS
void __cdecl __initmbctable(void);      /* mbctype.c */
#endif  /* _MBCS */

int __cdecl main(int, char **, char **);
#ifdef _WIN32
int __cdecl wmain(int, wchar_t **, wchar_t **);
#endif  /* _WIN32 */

#ifdef _WIN32
/* helper functions for wide/multibyte environment conversion */
int __cdecl __mbtow_environ (void);
int __cdecl __wtomb_environ (void);
int __cdecl __crtsetenv (const char *, const int);
int __cdecl __crtwsetenv (const wchar_t *, const int);
#endif  /* _WIN32 */

_CRTIMP extern void (__cdecl * _aexit_rtn)(int);

#if defined (_DLL) || defined (CRTDLL)

#ifndef _STARTUP_INFO_DEFINED
typedef struct
{
        int newmode;
} _startupinfo;
#define _STARTUP_INFO_DEFINED
#endif  /* _STARTUP_INFO_DEFINED */

_CRTIMP void __cdecl __getmainargs(int *, char ***, char ***, int, _startupinfo *);

#ifdef _WIN32
_CRTIMP void __cdecl __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, _startupinfo *);
#endif  /* _WIN32 */

#endif  /* defined (_DLL) || defined (CRTDLL) */

/*
 * Prototype, variables and constants which determine how error messages are
 * written out.
 */
#define _UNKNOWN_APP    0
#define _CONSOLE_APP    1
#define _GUI_APP        2

extern int __app_type;

extern int __error_mode;

_CRTIMP void __cdecl __set_app_type(int);

/*
 * C source build only!!!!
 *
 * map Win32 errors into Xenix errno values -- for modules written in C
 */
#ifdef _WIN32
extern void __cdecl _dosmaperr(unsigned long);
#else  /* _WIN32 */
extern void __cdecl _dosmaperr(short);
#endif  /* _WIN32 */

/*
 * internal routines used by the exec/spawn functions
 */

extern int __cdecl _dospawn(int, const char *, char *, char *);
#ifdef _WIN32
extern int __cdecl _wdospawn(int, const wchar_t *, wchar_t *, wchar_t *);
#endif  /* _WIN32 */
extern int __cdecl _cenvarg(const char * const *, const char * const *,
        char **, char **, const char *);
#ifdef _WIN32
extern int __cdecl _wcenvarg(const wchar_t * const *, const wchar_t * const *,
        wchar_t **, wchar_t **, const wchar_t *);
#endif  /* _WIN32 */
#ifndef _M_IX86
extern char ** _capture_argv(va_list *, const char *, char **, size_t);
#ifdef _WIN32
extern wchar_t ** _wcapture_argv(va_list *, const wchar_t *, wchar_t **, size_t);
#endif  /* _WIN32 */
#endif  /* _M_IX86 */

#ifdef __cplusplus
}
#endif  /* __cplusplus */

#endif  /* _INC_INTERNAL */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -