forked from KolibriOS/kolibrios
bugfixing
git-svn-id: svn://kolibrios.org@6412 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "ctype.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
** itoa(n,s) - Convert n to characters in s
|
||||
*/
|
||||
void itoa(int n,char* s)
|
||||
char* itoa(int n,char* s)
|
||||
{
|
||||
int sign;
|
||||
char *ptr;
|
||||
@@ -16,6 +17,6 @@ void itoa(int n,char* s)
|
||||
} while ((n = n / 10) > 0);
|
||||
if (sign < 0) *ptr++ = '-';
|
||||
*ptr = '\0';
|
||||
reverse(s);
|
||||
return strrev(s);
|
||||
}
|
||||
|
||||
|
@@ -1,12 +1,13 @@
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "ctype.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
** itoab(n,s,b) - Convert "unsigned" n to characters in s using base b.
|
||||
** NOTE: This is a non-standard function.
|
||||
*/
|
||||
void itoab(int n,char* s,int b)
|
||||
char* itoab(int n,char* s,int b)
|
||||
{
|
||||
char *ptr;
|
||||
int lowbit;
|
||||
@@ -20,5 +21,5 @@ void itoab(int n,char* s,int b)
|
||||
++ptr;
|
||||
} while(n /= b);
|
||||
*ptr = 0;
|
||||
reverse (s);
|
||||
return strrev(s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user