📄 stdlib.h
字号:
/* * OSV * Copyright (C) 2002 Ciprian DOSOFTEI <rocksoul@mail.com> * All rights reserved. * * http://backster.free.fr/osv * * This file is part of the OSV project. OSV is free software, also known as * "open source"; you can redistribute it and/or modify it under the terms * of the GNU General Public License (GPL), version 2, as published by the Free * Software Foundation (FSF). To explore alternate licensing terms, contact * the author at rocksoul@mail.com or +40740649907. * * OSV is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GPL for more details. You should have * received a copy of the GPL along with OSV; see the file COPYING. If * not, write to the FSF, 59 Temple Place #330, Boston, MA 02111-1307, USA. */#ifndef INCSTDLIB#define INCSTDLIB#include <types.h>#ifdef __cplusplusextern "C" {#endif#define EXIT_SUCCESS 0#define EXIT_FAILURE 1#ifndef NULL#define NULL 0#endif#define RAND_MAX 2147483647#define abs(X) ((X)< 0 ? (-(X)) : (X))/* these two aren't ANSI (but they should be!) */#define max(X,Y) ((X)>(Y) ? (X) : (Y))#define min(X,Y) ((X)>(Y) ? (Y) : (X))int atoi(const char *num);uint atoui(const char *num);long atol(const char *num);ulong atoul(const char *num);int atexit(void (*_func)(void));void* malloc(size_t size);void free(void* ptr);void exit(int status) __attribute__((noreturn));void srand(unsigned long new_seed);int rand(void);void qsort(void *base0, size_t n, size_t size, int (*compare_func)(const void *, const void*));void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, int (*compare_func)(const void *, const void *));#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -