home *** CD-ROM | disk | FTP | other *** search
- /*********
- *
- * _TR_ATOI.C
- * by Ralph Davis
- *
- * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
- *
- * SYNTAX: _tr_atoi( s );
- * char *s;
- *
- * RETURNS: integer equivalent of s.
- *
- * This function replaces the C library routine atoi();
- *
- *********/
- #include "trlib.h"
-
- _tr_atoi( s )
- char *s;
- {
- int num = 0;
-
- for (; isdigit(*s); s++)
- num = (num * 10) + (*s - '0');
-
- return(num);
- }
-
-
-