/* stdlib.h * Copyright (c) 1990 Intel Corporation, ALL RIGHTS RESERVED. * * stdlib.h - general utility functions */ #ifndef _stdlibh #define _stdlibh #pragma varparams(abs, labs, atoi, atol, atof, qsort, bsearch, srand, rand) #ifndef NULL #define NULL ((void *)0) #endif #ifndef _size_t #define _size_t typedef unsigned size_t; /* result of sizeof operator */ #endif #define RAND_MAX 0x7FFF int abs(int); /* Absolute number of an int */ long int labs(long int); /* Absolute number of a long int */ int atoi(const char *); /* Convert Ascii string to int */ long int atol(const char *); /* Convert Ascii string to long int */ double atof(const char *); /* Convert Ascii string to floating-point */ void srand(unsigned int); /* sets seed for a new sequence of pseudo- random numbers, should be called before calling rand() */ int rand(void); /* generates pseudo-random numbers */ /* Sort an array using quick-sort */ void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); /* Find an element in a sorted array */ void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); #endif /* _stdlibh */