git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix dependency check logic cause config always disabled
[lunaix-os.git]
/
lunaix-os
/
libs
/
klibc
/
ksprintf.c
diff --git
a/lunaix-os/libs/klibc/ksprintf.c
b/lunaix-os/libs/klibc/ksprintf.c
index 69c9253540d289f1b3850483f657dd871a0614f6..856e55f61b192f91791c8f222dcd77ccf94aedef 100644
(file)
--- a/
lunaix-os/libs/klibc/ksprintf.c
+++ b/
lunaix-os/libs/klibc/ksprintf.c
@@
-1,5
+1,5
@@
#define __LUNAIX_LIBC
#define __LUNAIX_LIBC
-#include <klibc/
stdlib
.h>
+#include <klibc/
ia_utils
.h>
#include <klibc/strfmt.h>
#include <klibc/string.h>
#include <lunaix/types.h>
#include <klibc/strfmt.h>
#include <klibc/string.h>
#include <lunaix/types.h>
@@
-19,8
+19,8
@@
static const char flag_chars[] = "#0- +";
#define FLAG_ALT2 (1 << 8)
#define FLAG_CAPS (1 << 9)
#define FLAG_ALT2 (1 << 8)
#define FLAG_CAPS (1 << 9)
-size_t
-ksnprintfv(char* buffer, const char* fmt,
size_t
max_len, va_list vargs)
+unsigned long
+ksnprintfv(char* buffer, const char* fmt,
unsigned long
max_len, va_list vargs)
{
// This sprintf just a random implementation I found it on Internet . lol.
// Of course, with some modifications for porting to LunaixOS :)
{
// This sprintf just a random implementation I found it on Internet . lol.
// Of course, with some modifications for porting to LunaixOS :)
@@
-198,22
+198,22
@@
ksnprintfv(char* buffer, const char* fmt, size_t max_len, va_list vargs)
return ptr;
}
return ptr;
}
-size_t
+unsigned long
ksprintf(char* buffer, char* fmt, ...)
{
va_list args;
va_start(args, fmt);
ksprintf(char* buffer, char* fmt, ...)
{
va_list args;
va_start(args, fmt);
-
size_t
len = ksnprintfv(buffer, fmt, 0, args);
+
unsigned long
len = ksnprintfv(buffer, fmt, 0, args);
va_end(args);
return len;
}
va_end(args);
return len;
}
-size_t
-ksnprintf(char* buffer,
size_t
n, char* fmt, ...)
+unsigned long
+ksnprintf(char* buffer,
unsigned long
n, char* fmt, ...)
{
va_list args;
va_start(args, fmt);
{
va_list args;
va_start(args, fmt);
-
size_t
len = ksnprintfv(buffer, fmt, n, args);
+
unsigned long
len = ksnprintfv(buffer, fmt, n, args);
va_end(args);
return len;
}
\ No newline at end of file
va_end(args);
return len;
}
\ No newline at end of file