summaryrefslogtreecommitdiff
path: root/viengoos/cap-lookup.c
diff options
context:
space:
mode:
authortschwinge <tschwinge>2008-05-29 23:01:55 +0000
committertschwinge <tschwinge>2008-05-29 23:01:55 +0000
commitab55c9dda40e73b1042d1a4f5a3ef0b0f1a9facb (patch)
treebaeb98c74b5b694e79127c5eb68812bad864ae98 /viengoos/cap-lookup.c
parent31cc070ebdc9e8dcadeb1d3ef15e1cfb5770868a (diff)
hurd/
2008-05-29 Thomas Schwinge <tschwinge@gnu.org> * Makefile.am (t_addr_CPPFLAGS, t_addr_trans_CPPFLAGS, t_rpc_CPPFLAGS): Remove special `printf' handling. * stddef.h (S_PUTCHAR): Define analogously to `S_PRINTF'. libc-parts/ 2008-05-29 Thomas Schwinge <tschwinge@gnu.org> * Makefile.am (t_setjmp_CPPFLAGS): Remove special `printf' handling. libhurd-btree/ 2008-05-29 Thomas Schwinge <tschwinge@gnu.org> * Makefile.am (btree_test_CPPFLAGS): Remove special `printf' handling. libhurd-ihash/ 2008-05-29 Thomas Schwinge <tschwinge@gnu.org> * Makefile.am (t_ihash_CPPFLAGS, t_ihash64_CPPFLAGS): Remove special `printf' handling. viengoos/ 2008-05-29 Thomas Schwinge <tschwinge@gnu.org> * cap-lookup.c: Unconditionally use `S_PUTCHAR' and `S_PRINTF' instead of `s_putchar' and `s_printf' and remove the latters' prototypes.
Diffstat (limited to 'viengoos/cap-lookup.c')
-rw-r--r--viengoos/cap-lookup.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/viengoos/cap-lookup.c b/viengoos/cap-lookup.c
index 69ea6da..b7c84bd 100644
--- a/viengoos/cap-lookup.c
+++ b/viengoos/cap-lookup.c
@@ -355,14 +355,9 @@ slot_lookup_rel (activity_t activity,
return rt.capp;
}
-extern int s_printf (const char *fmt, ...);
-extern int s_putchar (int chr);
-
static void
print_nr (int width, l4_int64_t nr, bool hex)
{
- extern int putchar (int chr);
-
int base = 10;
if (hex)
base = 16;
@@ -383,12 +378,12 @@ print_nr (int width, l4_int64_t nr, bool hex)
int i;
for (i = w; i < width; i ++)
- s_putchar (' ');
+ S_PUTCHAR (' ');
if (hex)
- s_printf ("0x%llx", nr);
+ S_PRINTF ("0x%llx", nr);
else
- s_printf ("%lld", nr);
+ S_PRINTF ("%lld", nr);
}
static void
@@ -407,41 +402,41 @@ do_walk (activity_t activity, int index,
return;
if (output_prefix)
- s_printf ("%s: ", output_prefix);
+ S_PRINTF ("%s: ", output_prefix);
for (i = 0; i < indent; i ++)
- s_printf (".");
+ S_PRINTF (".");
- s_printf ("[ ");
+ S_PRINTF ("[ ");
if (index != -1)
print_nr (3, index, false);
else
- s_printf ("root");
- s_printf (" ] ");
+ S_PRINTF ("root");
+ S_PRINTF (" ] ");
print_nr (12, addr_prefix (addr), true);
- s_printf ("/%d ", addr_depth (addr));
+ S_PRINTF ("/%d ", addr_depth (addr));
if (CAP_GUARD_BITS (&cap))
- s_printf ("| 0x%llx/%d ", CAP_GUARD (&cap), CAP_GUARD_BITS (&cap));
+ S_PRINTF ("| 0x%llx/%d ", CAP_GUARD (&cap), CAP_GUARD_BITS (&cap));
if (CAP_SUBPAGES (&cap) != 1)
- s_printf ("(%d/%d) ", CAP_SUBPAGE (&cap), CAP_SUBPAGES (&cap));
+ S_PRINTF ("(%d/%d) ", CAP_SUBPAGE (&cap), CAP_SUBPAGES (&cap));
if (CAP_GUARD_BITS (&cap)
&& ADDR_BITS - addr_depth (addr) >= CAP_GUARD_BITS (&cap))
- s_printf ("=> 0x%llx/%d ",
+ S_PRINTF ("=> 0x%llx/%d ",
addr_prefix (addr_extend (addr,
CAP_GUARD (&cap),
CAP_GUARD_BITS (&cap))),
addr_depth (addr) + CAP_GUARD_BITS (&cap));
#ifdef RM_INTERN
- s_printf ("@" OID_FMT " ", OID_PRINTF (cap.oid));
+ S_PRINTF ("@" OID_FMT " ", OID_PRINTF (cap.oid));
#endif
- s_printf ("%s", cap_type_string (cap.type));
+ S_PRINTF ("%s", cap_type_string (cap.type));
if (! descend)
- s_printf ("...");
+ S_PRINTF ("...");
- s_printf ("\n");
+ S_PRINTF ("\n");
if (! descend)
return;