Added several functions (to ctype.h, stdlib.h)

"Optimised" some functions in string.h
Added dynamic libraries support based on sysfunction 68.19 (experimental)

git-svn-id: svn://kolibrios.org@215 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
victor
2006-11-21 12:36:25 +00:00
parent 00b8fb388c
commit 1391dd1d1d
28 changed files with 1632 additions and 195 deletions

View File

@@ -0,0 +1,22 @@
#include "stdio.h"
#include "stdlib.h"
#include "ctype.h"
/*
** atoib(s,b) - Convert s to "unsigned" integer in base b.
** NOTE: This is a non-standard function.
*/
int atoib(char *s,int b)
{
int n, digit;
n = 0;
while(isspace(*s)) ++s;
while((digit = (127 & *s++)) >= '0') {
if(digit >= 'a') digit -= 87;
else if(digit >= 'A') digit -= 55;
else digit -= '0';
if(digit >= b) break;
n = b * n + digit;
}
return (n);
}