Stdlib. H Content

Source: Internet
Author: User
Tags define null file info

Stdlib. H Content
/***
* Stdlib. H-declarations/definitions for commonly used library functions
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
* Purpose:
* This include file contains the function declarations for commonly
* Used library functions which either don't fit somewhere else, or,
* Cannot be declared in the normal place for other reasons.
* [ANSI]
*
* [Public]
*
****/
# If _ msc_ver> 1000
# Pragma once
# Endif
# Ifndef _ inc_stdlib
# DEFINE _ inc_stdlib
# If! Defined (_ Win32 )&&! Defined (_ Mac)
# Error error: only Mac or Win32 targets supported!
# Endif
# Ifdef _ msc_ver
/*
* Currently, all ms c compilers for Win32 platforms default to 8 byte
* Alignment.
*/
# Pragma pack (push, 8)
# Endif/* _ msc_ver */
# Ifdef _ cplusplus
Extern "C "{
# Endif
/* DEFINE _ cribd */
# Ifndef _ cribd
# Ifdef _ DLL
# DEFINE _ cribd _ declspec (dllimport)
# Else/* ndef _ DLL */
# DEFINE _ cribd
# Endif/* _ DLL */
# Endif/* _ cribd */
/* DEFINE _ cdecl for non-Microsoft compilers */
# If (! Defined (_ msc_ver )&&! Defined (_ cdecl ))
# DEFINE _ cdecl
# Endif
/* DEFINE _ crtapi1 (for compatibility with the nt sdk )*/
# Ifndef _ crtapi1
# If _ msc_ver >=800 & _ m_ix86> = 300
# DEFINE _ crtapi1 _ cdecl
# Else
# DEFINE _ crtapi1
# Endif
# Endif
# Ifndef _ size_t_defined
Typedef unsigned int size_t;
# DEFINE _ size_t_defined
# Endif
# Ifndef _ wchar_t_defined
Typedef unsigned short wchar_t;
# DEFINE _ wchar_t_defined
# Endif
/* Define NULL pointer value */
# Ifndef null
# Ifdef _ cplusplus
# Define null 0
# Else
# Define null (void *) 0)
# Endif
# Endif
/* Definition of the argument values for the exit () function */
# Define exit_success 0
# Define exit_failure 1
# Ifndef _ onexit_t_defined
Typedef int (_ cdecl * _ onexit_t) (void );
# If! _ Stdc __
/* Non-ANSI name for compatibility */
# Define onexit_t _ onexit_t
# Endif
# DEFINE _ onexit_t_defined
# Endif
/* Data structure definitions for div and ldiv runtimes .*/
# Ifndef _ div_t_defined
Typedef struct _ div_t {
Int quot;
Int REM;
} Div_t;
Typedef struct _ ldiv_t {
Long quot;
Long REM;
} Ldiv_t;
# DEFINE _ div_t_defined
# Endif
/* Maximum value that can be returned by the rand function .*/
# Define rand_max 0x7fff
/*
* Maximum number of bytes in Multi-byte character in the current locale
* (Also defined in ctype. h ).
*/
# Ifndef mb_cur_max
# Define mb_cur_max _ mb_cur_max
_ Cribd extern int _ mb_cur_max;
# Endif/* mb_cur_max */
/* Minimum and Maximum macros */
# DEFINE _ max (A, B) (a)> (B ))? (A): (B ))
# DEFINE _ min (A, B) (a) <(B ))? (A): (B ))
/*
* Sizes for buffers used by the _ makepath () and _ splitpath () functions.
* Note that the sizes include space for 0-Terminator
*/
# Ifndef _ Mac
# DEFINE _ max_path 260/* max. Length of full pathname */
# DEFINE _ max_drive 3/* max. Length of drive component */
# DEFINE _ max_dir 256/* max. Length of path component */
# DEFINE _ max_fname 256/* max. Length of file name component */
# DEFINE _ max_ext 256/* max. Length of extension component */
# Else/* def _ Mac */
# DEFINE _ max_path 256/* max. Length of full pathname */
# DEFINE _ max_dir 32/* max. Length of path component */
# DEFINE _ max_fname 64/* max. Length of file name component */
# Endif/* _ Mac */
/*
* Argument values for _ set_error_mode ().
*/
# DEFINE _ out_to_default 0
# DEFINE _ out_to_stderr 1
# DEFINE _ out_to_msgbox 2
# DEFINE _ report_errmode 3
/* External variable declarations */
# If (defined (_ MT) | defined (_ DLL ))&&! Defined (_ Mac)
_ Cribd int * _ cdecl _ errno (void );
_ Cribd unsigned long * _ cdecl _ doserrno (void );
# Define errno (* _ errno ())
# DEFINE _ doserrno (* _ doserrno ())
# Else/* ndef _ Mt & ndef _ DLL */
_ Cribd extern int errno;/* XENIX style error number */
_ Cribd extern unsigned long _ doserrno;/* OS system error value */
# Endif/* _ Mt | _ DLL */
# Ifdef _ Mac
_ Cribd extern int _ macerrno;/* OS system error value */
# Endif
_ Cribd extern char * _ sys_errlist [];/* perror error message table */
_ Cribd extern int _ sys_nerr;/* # of entries in sys_errlist table */
# If defined (_ DLL) & defined (_ m_ix86)
# DEFINE _ argc (* _ p ___ argc ()/* count of Cmd Line ARGs */
# DEFINE _ argv (* _ p ___ argv ()/* pointer to table of Cmd Line ARGs */
# DEFINE _ wargv (* _ p ___ wargv ()/* pointer to table of wide Cmd Line ARGs */
# DEFINE _ environ (* _ p _ environ ()/* pointer to environment table */
# Ifdef _ POSIX _
Extern char ** environ;/* pointer to environment table */
# Else
# Ifndef _ Mac
# DEFINE _ wenviron (* _ p _ wenviron ()/* pointer to wide environment table */
# Endif/* ndef _ Mac */
# Endif/* _ POSIX _*/
# DEFINE _ pgmptr (* _ p _ pgmptr ()/* points to the module (exe) name */
# Ifndef _ Mac
# DEFINE _ wpgmptr (* _ p _ wpgmptr ()/* points to the module (exe) wide name */
# Endif/* ndef _ Mac */
_ Cribd int * _ cdecl _ p ___ argc (void );
_ Cribd char *** _ cdecl _ p ___ argv (void );
_ Cribd wchar_t *** _ cdecl _ p ___ wargv (void );
_ Cribd char *** _ cdecl _ p _ environ (void );
_ Cribd wchar_t *** _ cdecl _ p _ wenviron (void );
_ Cribd char ** _ cdecl _ p _ pgmptr (void );
_ Cribd wchar_t ** _ cdecl _ p _ wpgmptr (void );
# Else
_ Cribd extern int _ argc;/* count of Cmd Line ARGs */
_ Cribd extern char ** _ argv;/* pointer to table of Cmd Line ARGs */
# Ifndef _ Mac
_ Crqp extern wchar_t ** _ wargv;/* pointer to table of wide Cmd Line ARGs */
# Endif/* ndef _ Mac */
# Ifdef _ POSIX _
Extern char ** environ;/* pointer to environment table */
# Else
_ Cribd extern char ** _ environ;/* pointer to environment table */
# Ifndef _ Mac
_ Cribd extern wchar_t ** _ wenviron;/* pointer to wide environment table */
# Endif/* ndef _ Mac */
# Endif/* _ POSIX _*/
_ Cribd extern char * _ pgmptr;/* points to the module (exe) name */
# Ifndef _ Mac
_ Cribd extern wchar_t * _ wpgmptr;/* points to the module (exe) wide name */
# Endif/* ndef _ Mac */
# Endif
_ Cribd extern int _ fmode;/* default file translation mode */
_ Cribd extern int _ fileinfo;/* Open file info mode (for spawn )*/
/* Windows major/minor and o.s. version numbers */
_ Cribd extern unsigned int _ osver;
_ Cribd extern unsigned int _ winver;
_ Cribd extern unsigned int _ winmajor;
_ Cribd extern unsigned int _ winminor;
/* Function prototypes */
# If _ msc_ver> = 1200
_ Cribd _ declspec (noreturn) void _ cdecl abort (void );
_ Cribd _ declspec (noreturn) void _ cdecl exit (INT );
# Else
_ Cribd void _ cdecl abort (void );
_ Cribd void _ cdecl exit (INT );
# Endif
# If defined (_ m_mrx000)
_ Cribd int _ cdecl ABS (INT );
# Else
Int _ cdecl ABS (INT );
# Endif
Int _ cdecl atexit (void (_ cdecl *) (void ));
_ Cribd double _ cdecl atof (const char *);
_ Cribd int _ cdecl atoi (const char *);
_ Cribd long _ cdecl atol (const char *);
# Ifdef _ m_m68k
_ Cribd long double _ cdecl _ atold (const char *);
# Endif
_ Cribd void * _ cdecl bsearch (const void *, const void *, size_t, size_t,
INT (_ cdecl *) (const void *, const void *));
_ Cribd void * _ cdecl calloc (size_t, size_t );
_ Cribd div_t _ cdecl Div (INT, INT );
_ Cribd void _ cdecl free (void *);
_ Cribd char * _ cdecl getenv (const char *);
_ Cribd char * _ cdecl _ ITOA (INT, char *, INT );
# If _ integral_max_bits> = 64
_ Cribd char * _ cdecl _ i64toa (_ int64, char *, INT );
_ Cribd char * _ cdecl _ ui64toa (unsigned _ int64, char *, INT );
_ Cribd _ int64 _ cdecl _ atoi64 (const char *);
# Endif
# If defined (_ m_mrx000)
_ Cribd long _ cdecl labs (long );
# Else
Long _ cdecl labs (long );
# Endif
_ Cribd ldiv_t _ cdecl ldiv (Long, long );
_ Cribd char * _ cdecl _ ltoa (long, char *, INT );
_ Cribd void * _ cdecl malloc (size_t );
_ Cribd int _ cdecl mblen (const char *, size_t );
_ Cribd size_t _ cdecl _ mbstrlen (const char * s );
_ Cribd int _ cdecl mbtowc (wchar_t *, const char *, size_t );
_ Cribd size_t _ cdecl mbstowcs (wchar_t *, const char *, size_t );
_ Cribd void _ cdecl qsort (void *, size_t, size_t, INT (_ cdecl *)
(Const void *, const void *));
_ Cribd int _ cdecl rand (void );
_ Cribd void * _ cdecl realloc (void *, size_t );
_ Cribd int _ cdecl _ set_error_mode (INT );
_ Cribd void _ cdecl srand (unsigned INT );
_ Cribd double _ cdecl strtodd (const char *, char **);
_ Cribd long _ cdecl strtol (const char *, char **, INT );
# Ifdef _ m_m68k
_ Cribd long double _ cdecl _ strtold (const char *, char **);
# Endif
_ Cribd unsigned long _ cdecl strtoul (const char *, char **, INT );
# Ifndef _ Mac
_ Cribd int _ cdecl System (const char *);
# Endif
_ Cribd char * _ cdecl _ ultoa (unsigned long, char *, INT );
_ Cribd int _ cdecl wctomb (char *, wchar_t );
_ Cribd size_t _ cdecl wcstombs (char *, const wchar_t *, size_t );
# Ifndef _ Mac
# Ifndef _ wstdlib_defined
/* Wide function prototypes, also declared in wchar. H */
_ Cribd wchar_t * _ cdecl _ itow (INT, wchar_t *, INT );
_ Cribd wchar_t * _ cdecl _ ltow (long, wchar_t *, INT );
_ Cribd wchar_t * _ cdecl _ ultow (unsigned long, wchar_t *, INT );
_ Cribd double _ cdecl wcstod (const wchar_t *, wchar_t **);
_ Cribd long _ cdecl wcstol (const wchar_t *, wchar_t **, INT );
_ Cribd unsigned long _ cdecl wcstoul (const wchar_t *, wchar_t **, INT );
_ Cribd wchar_t * _ cdecl _ wgetenv (const wchar_t *);
_ Cribd int _ cdecl _ wsystem (const wchar_t *);
_ Cribd int _ cdecl _ wtoi (const wchar_t *);
_ Cribd long _ cdecl _ wtol (const wchar_t *);
# If _ integral_max_bits> = 64
_ Cribd wchar_t * _ cdecl _ i64tow (_ int64, wchar_t *, INT );
_ Cribd wchar_t * _ cdecl _ ui64tow (unsigned _ int64, wchar_t *, INT );
_ Cribd _ int64 _ cdecl _ wtoi64 (const wchar_t *);
# Endif
# DEFINE _ wstdlib_defined
# Endif
# Endif/* ndef _ Mac */
# Ifndef _ POSIX _
_ Cribd char * _ cdecl _ ECVT (double, Int, int *, int *);
# If _ msc_ver> = 1200
_ Cribd _ declspec (noreturn) void _ cdecl _ exit (INT );
# Else
_ Cribd void _ cdecl _ exit (INT );
# Endif
_ Cribd char * _ cdecl _ fcvt (double, Int, int *, int *);
_ Cribd char * _ cdecl _ fullpath (char *, const char *, size_t );
_ Cribd char * _ cdecl _ gcvt (double, Int, char *);
Unsigned long _ cdecl _ lrotl (unsigned long, INT );
Unsigned long _ cdecl _ lrotr (unsigned long, INT );
# Ifndef _ Mac
_ Cribd void _ cdecl _ makepath (char *, const char *,
Const char *);
# Endif
_ Onexit_t _ cdecl _ onexit (_ onexit_t );
_ Cribd void _ cdecl perror (const char *);
_ Cribd int _ cdecl _ putenv (const char *);
Unsigned int _ cdecl _ rotl (unsigned int, INT );
Unsigned int _ cdecl _ rotr (unsigned int, INT );
_ Cribd void _ cdecl _ searchenv (const char *, const char *, char *);
# Ifndef _ Mac
_ Cribd void _ cdecl _ splitpath (const char *, char *);
# Endif
_ Cribd void _ cdecl _ swab (char *, char *, INT );
# Ifndef _ Mac
# Ifndef _ wstdlibp_defined
/* Wide function prototypes, also declared in wchar. H */
_ Cribd wchar_t * _ cdecl _ wfullpath (wchar_t *, const wchar_t *, size_t );
_ Cribd void _ cdecl _ wmakepath (wchar_t *, const wchar_t *,
Const wchar_t *);
_ Cribd void _ cdecl _ wperror (const wchar_t *);
_ Cribd int _ cdecl _ wputenv (const wchar_t *);
_ Cribd void _ cdecl _ wsearchenv (const wchar_t *, const wchar_t *, wchar_t *);
_ Cribd void _ cdecl _ wsplitpath (const wchar_t *, wchar_t *);
# DEFINE _ wstdlibp_defined
# Endif
# Endif/* ndef _ Mac */
/* --------- The following functions are obsolete ---------*/
/* The Win32 API seterrormode, beep and sleep shoshould be used instead .*/
# Ifndef _ Mac
_ Cribd void _ cdecl _ seterrormode (INT );
_ Cribd void _ cdecl _ BEEP (unsigned, unsigned );
_ Cribd void _ cdecl _ sleep (unsigned long );
# Endif/* ndef _ Mac */
/* --------- The preceding functions are obsolete ---------*/
# Endif/* _ POSIX _*/
# If! _ Stdc __
/* --------- The declarations below shocould not be in stdlib. h ---------*/
/* --------- And will be removed in a future release. Include ---------*/
/* --------- Ctype. h to obtain these declarations .---------*/
# Ifndef tolower/* tolower has been undefined-use function */
_ Cribd int _ cdecl tolower (INT );
# Endif/* tolower */
# Ifndef toupper/* toupper has been undefined-use function */
_ Cribd int _ cdecl toupper (INT );
# Endif/* toupper */
/* --------- The declarations abve will be removed .---------*/
# Endif
# If! _ Stdc __
# Ifndef _ POSIX _
/* Non-ANSI names for compatibility */
# Ifndef _ cplusplus
# Define max (A, B) (a)> (B ))? (A): (B ))
# Define min (A, B) (a) <(B ))? (A): (B ))
# Endif
# Define sys_errlist _ sys_errlist
# Define sys_nerr _ sys_nerr
# Define environ _ environ
_ Cribd char * _ cdecl ECVT (double, Int, int *, int *);
_ Cribd char * _ cdecl fcvt (double, Int, int *, int *);
_ Cribd char * _ cdecl gcvt (double, Int, char *);
_ Cribd char * _ cdecl ITOA (INT, char *, INT );
_ Cribd char * _ cdecl ltoa (long, char *, INT );
Onexit_t _ cdecl onexit (onexit_t );
_ Cribd int _ cdecl putenv (const char *);
_ Cribd void _ cdecl swab (char *, char *, INT );
_ Cribd char * _ cdecl ultoa (unsigned long, char *, INT );
# Endif/* _ POSIX _*/
# Endif/* _ stdc __*/
# Ifdef _ cplusplus
}
# Endif
# Ifdef _ msc_ver
# Pragma pack (POP)
# Endif/* _ msc_ver */
# Endif/* _ inc_stdlib */
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.