mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
Merge branch 'master' into cpu&memory
This commit is contained in:
commit
85132db7a9
@ -71,7 +71,7 @@ size_t snprintf(char *str, size_t n, const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Size of the buffer is for convertions
|
// Size of the buffer is for convertions
|
||||||
#define CONVBUF 4096
|
#define CONVBUF 64
|
||||||
|
|
||||||
size_t vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
|
size_t vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
@ -82,10 +82,13 @@ size_t vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
|
|||||||
char mod;
|
char mod;
|
||||||
char convbuf[CONVBUF] = { 0 };
|
char convbuf[CONVBUF] = { 0 };
|
||||||
|
|
||||||
char c;
|
char c, *s;
|
||||||
int d;
|
int d;
|
||||||
uint u;
|
uint u;
|
||||||
char *s;
|
|
||||||
|
assert(str && fmt);
|
||||||
|
|
||||||
|
if (n == 0) return 0;
|
||||||
|
|
||||||
// For aesthetic reasons...
|
// For aesthetic reasons...
|
||||||
n--;
|
n--;
|
||||||
@ -235,6 +238,7 @@ size_t vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We fallthrough here from the "while (1)"
|
// We fallthrough here from the "while (1)"
|
||||||
|
lflag = hflag = hhflag = altflag = 0;
|
||||||
fmt++;
|
fmt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user