X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Fatoi.c;fp=functions%2Fstdlib%2Fatoi.c;h=75987e0a33d8d2d1c9d8d8daa5e8a44420b0332e;hb=bb7adccc31cb145b671afe75c432da3fc494ad48;hp=0000000000000000000000000000000000000000;hpb=6d45909b9d6109c54bd0b79e508662fdd17b26d6;p=pdclib diff --git a/functions/stdlib/atoi.c b/functions/stdlib/atoi.c new file mode 100644 index 0000000..75987e0 --- /dev/null +++ b/functions/stdlib/atoi.c @@ -0,0 +1,28 @@ +/* $Id$ */ + +/* Release $Name$ */ + +/* atoi( const char * ) + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include <_PDCLIB_int.h> + +int atoi( const char * s ) +{ + return (int) _PDCLIB_atomax( s ); +} + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main() +{ + BEGIN_TESTS; + /* no tests for a simple wrapper */ + return TEST_RESULTS; +} + +#endif