home *** CD-ROM | disk | FTP | other *** search
- /* As suggested by Harbison & Steele */
-
- #include <stddef.h>
- #include <stdlib.h>
- #include <assert.h>
-
- #ifdef __STDC__
- long strtol(const char *, char **, int);
- #else
- extern long strtol();
- #endif
-
- int atoi(str)
- const char *str;
- {
- assert ((str != NULL));
- return (int) strtol(str, (char **)0, 10);
- }
-
- long atol(str)
- const char *str;
- {
- assert ((str != NULL));
- return strtol(str, (char **)0, 10);
- }
-