1/* 2 * Copyright 2002-2007, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Author: 6 * Daniel Reinhold, danielre@users.sf.net 7 */ 8 9 10#include <stdlib.h> 11 12 13int 14atoi(const char* num) 15{ 16 return (int) strtol(num, NULL, 10); 17} 18 19 20unsigned int 21atoui(const char* num) 22{ 23 return (unsigned int) strtoul(num, NULL, 10); 24} 25 26 27long 28atol(const char* num) 29{ 30 return strtol(num, NULL, 10); 31} 32 33 34unsigned long 35atoul(const char* num) 36{ 37 return strtoul(num, NULL, 10); 38} 39 40 41long long int 42atoll(const char* num) 43{ 44 return strtoll(num, NULL, 10); 45} 46