135102Sbostic /* 235102Sbostic * Copyright (c) 1988 Regents of the University of California. 335102Sbostic * All rights reserved. 435102Sbostic * 535102Sbostic * Redistribution and use in source and binary forms are permitted 635102Sbostic * provided that the above copyright notice and this paragraph are 735102Sbostic * duplicated in all such forms and that any documentation, 835102Sbostic * advertising materials, and other materials related to such 935102Sbostic * distribution and use acknowledge that the software was developed 1035102Sbostic * by the University of California, Berkeley. The name of the 1135102Sbostic * University may not be used to endorse or promote products derived 1235102Sbostic * from this software without specific prior written permission. 1335102Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1435102Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1535102Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1635102Sbostic */ 1735102Sbostic 1826542Sdonn #if defined(LIBC_SCCS) && !defined(lint) 19*42135Sbostic static char sccsid[] = "@(#)atoi.c 5.5 (Berkeley) 05/16/90"; 2035102Sbostic #endif /* LIBC_SCCS and not lint */ 2122080Smckusick 22*42135Sbostic #include <stdlib.h> 23*42135Sbostic #include <stddef.h> 2435102Sbostic 2539476Sbostic atoi(str) 2639476Sbostic char *str; 271954Swnj { 2839476Sbostic return((int)strtol(str, (char **)NULL, 10)); 291954Swnj } 30