mirror of
https://github.com/rfivet/uemacs.git
synced 2025-11-23 11:41:15 -05:00
Fix up headers and bogus re-definitions to use <stdlib.h> and <string.h>
Hey, it's already compiling cleaner. Getting proper function declarations will be a bitch, though.
This commit is contained in:
37
eval.c
37
eval.c
@@ -660,43 +660,6 @@ char *value; /* value to set to */
|
||||
return (status);
|
||||
}
|
||||
|
||||
/* atoi: ascii string to integer......This is too
|
||||
inconsistant to use the system's */
|
||||
|
||||
atoi(st)
|
||||
|
||||
char *st;
|
||||
|
||||
{
|
||||
int result; /* resulting number */
|
||||
int sign; /* sign of resulting number */
|
||||
char c; /* current char being examined */
|
||||
|
||||
result = 0;
|
||||
sign = 1;
|
||||
|
||||
/* skip preceding whitespace */
|
||||
while (*st == ' ' || *st == '\t')
|
||||
++st;
|
||||
|
||||
/* check for sign */
|
||||
if (*st == '-') {
|
||||
sign = -1;
|
||||
++st;
|
||||
}
|
||||
if (*st == '+')
|
||||
++st;
|
||||
|
||||
/* scan digits, build value */
|
||||
while ((c = *st++))
|
||||
if (c >= '0' && c <= '9')
|
||||
result = result * 10 + c - '0';
|
||||
else
|
||||
return (0);
|
||||
|
||||
return (result * sign);
|
||||
}
|
||||
|
||||
/* itoa: integer to ascii string.......... This is too
|
||||
inconsistant to use the system's */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user