notaz.gp2x.de
/
ginge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unset ld env before running command
[ginge.git]
/
loader
/
llibc.c
diff --git
a/loader/llibc.c
b/loader/llibc.c
index
484b52d
..
c19e11d
100644
(file)
--- a/
loader/llibc.c
+++ b/
loader/llibc.c
@@
-165,10
+165,12
@@
void g_fprintf(int fd, const char *fmt, ...)
zeropad = *s == '0';
justify = parse_dec(&s);
zeropad = *s == '0';
justify = parse_dec(&s);
- if (*s == 'l')
+ if (*s == 'l'
|| *s == 'z'
)
s++; // ignore for now
if (*s == 's') {
s++; // ignore for now
if (*s == 's') {
- char *ns = va_arg(ap, char *);
+ const char *ns = va_arg(ap, const char *);
+ if (ns == NULL)
+ ns = "(null)";
int len = strlen(ns);
while (justify > len && left > 1) {
*d++ = ' ';
int len = strlen(ns);
while (justify > len && left > 1) {
*d++ = ' ';
@@
-199,10
+201,4
@@
void g_fprintf(int fd, const char *fmt, ...)
g_write_raw(fd, buf, d - buf);
}
g_write_raw(fd, buf, d - buf);
}
-void g_sleep(unsigned int seconds)
-{
- struct timespec ts = { seconds, 0 };
- g_nanosleep_raw(&ts, NULL);
-}
-
// vim:shiftwidth=2:expandtab
// vim:shiftwidth=2:expandtab