add %r format
authorRonald G. Minnich <rminnich@google.com>
Sat, 5 Oct 2013 17:27:28 +0000 (10:27 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 16 Jan 2014 02:20:04 +0000 (18:20 -0800)
Either barret or kevin will kill me for this one.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
user/parlib/debugfmt.c

index 1ecd532..9aa521c 100644 (file)
@@ -120,9 +120,16 @@ void ros_vdebugfmt(void (*putch)(int, void**), void **putdat, const char *fmt, v
                        break;
 
                // string
+/*
+               case 'r':
+                       p = current_errstr();
+                       /* oh, barf. Now we look like glibc. * /
+                       goto putstring;
+*/
                case 's':
                        if ((p = va_arg(ap, char *NT)) == NULL)
                                p = "(null)";
+//putstring:
                        if (width > 0 && padc != '-')
                                for (width -= strnlen(p, precision); width > 0; width--)
                                        putch(padc, putdat);