📄 stdlib.h
字号:
#ifndef __STDLIB_H
#define __STDLIB_H
#include <_const.h>
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#ifndef NULL
#define NULL 0
#endif
#include <limits.h>
#define RAND_MAX INT_MAX
#ifndef __SIZE_T
#define __SIZE_T
typedef unsigned int size_t;
#endif
#if defined(_HC12)
#pragma nonpaged_function atof exit
#endif
/* ftoa function */
#define _FTOA_TOO_LARGE -2 /* |input| > 2147483520 */
#define _FTOA_TOO_SMALL -1 /* |input| < 0.0000001 */
/* ftoa returns static buffer of ~15 chars. If the input is out of
* range, *status is set to either of the above #define, and 0 is
* returned. Otherwise, *status is set to 0 and the char buffer is
* returned.
* This version of the ftoa is fast but cannot handle values outside
* of the range listed. Please contact us if you need a (much) larger
* version that handles greater ranges.
* Note that the prototype differs from the earlier version of this
* function.
*/
char *ftoa(float f, int *status);
int abs(int);
double atof(CONST char *);
int atoi(CONST char *);
long atol(CONST char *);
int rand(void);
void srand(unsigned);
long strtol(CONST char *, char **, int);
unsigned long strtoul(CONST char *, char **, int);
// base can be 2 to 36
char *ltoa(char *buf, long i, int base);
char *itoa(char *buf, int i, int base);
char *ultoa(char *buf, unsigned long i, int base);
char *utoa(char *buf, unsigned i, int base);
#if !defined(_M8C)
void abort(void);
void *calloc(size_t, size_t);
void exit(int);
void free(void *);
void *malloc(size_t);
void _NewHeap(void *start, void *end);
void *realloc(void *, size_t);
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -