stdlib.h
1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*---------------------------------------------------------------------*
Copyright (C) 1997-1999 NINTENDO Co.,Ltd.
$RCSfile: stdlib.h,v $
$Revision: 1.1.1.1 $
$Date: 2002/10/30 02:07:09 $
*---------------------------------------------------------------------*/
#ifndef __STDLIB_H__
#define __STDLIB_H__
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#ifndef NULL
#define NULL 0
#endif
/* Maximum value returned by rand */
#define RAND_MAX 0x7fff
#if !defined(_SIZE_T) && !defined(_SIZE_T_) && !defined(_SIZE_T_DEF)
#define _SIZE_T
#define _SIZE_T_DEF /* exeGCC size_t define label */
#if (_MIPS_SZLONG == 32)
typedef unsigned int size_t;
#endif
#if (_MIPS_SZLONG == 64)
typedef unsigned long size_t;
#endif
#endif
typedef struct _div_t {
int quot;
int rem;
} div_t;
typedef struct _ldiv_t {
long quot;
long rem;
} ldiv_t;
double atof(const char *string);
int atoi(const char *s);
long atol(const char *string);
long strtol(const char *string, char **endptr, int base);
double strtod(const char *string, char **endptr);
unsigned long strtoul(const char *string, char **endptr, int base);
void qsort(void *base, size_t num, size_t width, int (*compare)(const void *, const void *));
void mt_qsort(void *base, size_t num, size_t width, int (*compare)(const void *, const void *));
void *bsearch(const void *key, const void *base, size_t num, size_t width, int (*compare)(const void *, const void *));
long labs(long n);
int abs(int n);
void srand(unsigned seed);
int rand(void);
div_t div(int numer, int denom);
ldiv_t _nldiv(long int numer, long int denom);
/* ultra の方に含まれるが、ultra に宣言がないので、ここに宣言を残す */
ldiv_t ldiv(long int numer, long int denom);
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif