summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneal <neal>2008-01-23 23:12:39 +0000
committerneal <neal>2008-01-23 23:12:39 +0000
commit53119ad6d5042194c4653bc718799a8bc653a7da (patch)
tree352fb1b5551144f58619140a674a9bffcc8e39a8
parentb962fefe8733a2fd7911090b3e8565eff3469048 (diff)
hurd/
2008-01-23 Neal H. Walfield <neal@gnu.org> * stddef.h (S_PRINTF): New macro. (debug): Use S_PRINTF rather than printf. * Makefile.am (t_addr_CPPFLAGS): Add -DS_PRINTF=printf. (t_addr_trans_CPPFLAGS): Likewise. (t_rpc_CPPFLAGS): Likewise. libc-parts/ 2008-01-24 Neal H. Walfield <neal@gnu.org> * assert.h: Include <hurd/stddef.h>. (assertx): Use S_PRINTF rather than printf. libhurd-btree/ 2008-01-24 Neal H. Walfield <neal@gnu.org> * Makefile.am (btree_test_CPPFLAGS): New variable. (btree_test_LDADD): Remove. (btree_test_SOURCES): Add btree.c. * btree.c (node_t): Include <stdio.h>. libhurd-ihash/ 2008-01-24 Neal H. Walfield <neal@gnu.org> * Makefile.am (t_ihash_SOURCES): Add ihash.c. (t_ihash_CPPFLAGS): New variable. * t-ihash.c: Include <stdio.h>. libhurd-mm/ 2008-01-24 Neal H. Walfield <neal@gnu.org> * as.c (as_alloced_dump): Use s_printf rather than printf. (as_walk): Likewise. laden/ 2008-01-23 Neal H. Walfield <neal@gnu.org> * Makefile.am (laden_CPPFLAGS): Add -DS_PRINTF=printf. ruth/ 2008-01-24 Neal H. Walfield <neal@gnu.org> * output.h (putchar): Rename from this... (s_putchar): ... to this. (puts): Rename from this... (s_puts): ... to this. (vprintf): Rename from this... (s_vprintf): ... to this. (printf): Rename from this... (s_printf): ... to this. * output.c (putchar): Rename from this... (s_putchar): ... to this. Update users. (puts): Rename from this... (s_puts): ... to this. Update users. (vprintf): Rename from this... (s_vprintf): ... to this. Update users. (printf): Rename from this... (s_printf): ... to this. * Makefile.am (ruth_SOURCES): Add object.h and object.c. * ia32-cmain.c: Include <stddef.h>. (cmain): Use s_printf rather than printf. * panic.c (panic_): Use s_printf and s_vprintf rather than printf and vprintf.
-rw-r--r--hurd/ChangeLog8
-rw-r--r--hurd/Makefile.am6
-rw-r--r--hurd/stddef.h33
-rw-r--r--laden/ChangeLog4
-rw-r--r--laden/Makefile.am3
-rw-r--r--libc-parts/ChangeLog5
-rw-r--r--libc-parts/assert.h31
-rw-r--r--libhurd-btree/ChangeLog8
-rw-r--r--libhurd-btree/Makefile.am5
-rw-r--r--libhurd-btree/btree.c1
-rw-r--r--libhurd-ihash/ChangeLog6
-rw-r--r--libhurd-ihash/Makefile.am4
-rw-r--r--libhurd-ihash/t-ihash.c4
-rw-r--r--libhurd-mm/ChangeLog5
-rw-r--r--libhurd-mm/as.c16
-rw-r--r--ruth/ChangeLog24
-rw-r--r--ruth/Makefile.am1
-rw-r--r--ruth/ia32-cmain.c3
-rw-r--r--ruth/output.c54
-rw-r--r--ruth/output.h8
-rw-r--r--ruth/panic.c6
21 files changed, 164 insertions, 71 deletions
diff --git a/hurd/ChangeLog b/hurd/ChangeLog
index 1b9e509..b130ff9 100644
--- a/hurd/ChangeLog
+++ b/hurd/ChangeLog
@@ -1,5 +1,13 @@
2008-01-23 Neal H. Walfield <neal@gnu.org>
+ * stddef.h (S_PRINTF): New macro.
+ (debug): Use S_PRINTF rather than printf.
+ * Makefile.am (t_addr_CPPFLAGS): Add -DS_PRINTF=printf.
+ (t_addr_trans_CPPFLAGS): Likewise.
+ (t_rpc_CPPFLAGS): Likewise.
+
+2008-01-23 Neal H. Walfield <neal@gnu.org>
+
* mutex.h (ss_mutex_unlock): Correctly test whether there are
waiters.
* rmutex.h (ss_rmutex_lock): Save the value of LOCKP->COUNT before
diff --git a/hurd/Makefile.am b/hurd/Makefile.am
index 10ceb1c..b2ec48c 100644
--- a/hurd/Makefile.am
+++ b/hurd/Makefile.am
@@ -28,12 +28,12 @@ includehurd_HEADERS = rpc.h startup.h stddef.h types.h addr.h \
TESTS = t-addr t-addr-trans t-rpc
check_PROGRAMS = $(TESTS)
-t_addr_CPPFLAGS = $(COMMON_CPPFLAGS)
+t_addr_CPPFLAGS = $(COMMON_CPPFLAGS) -DS_PRINTF=printf
t_addr_SOURCES = t-addr.c
-t_addr_trans_CPPFLAGS = $(COMMON_CPPFLAGS)
+t_addr_trans_CPPFLAGS = $(COMMON_CPPFLAGS) -DS_PRINTF=printf
t_addr_trans_SOURCES = t-addr-trans.c
-t_rpc_CPPFLAGS = $(COMMON_CPPFLAGS)
+t_rpc_CPPFLAGS = $(COMMON_CPPFLAGS) -DS_PRINTF=printf
t_rpc_SOURCES = t-rpc.c
diff --git a/hurd/stddef.h b/hurd/stddef.h
index 31f9828..28e8d86 100644
--- a/hurd/stddef.h
+++ b/hurd/stddef.h
@@ -24,6 +24,19 @@
#include <l4/types.h>
#include <assert.h>
+/* A safe-printf routine. In particular, it doesn't call malloc and
+ works in place. This makes it appropriate for situations in which
+ malloc is not yet working and when the state is suspected to be
+ compromised (e.g., assert or panic). */
+#ifndef S_PRINTF
+# if defined(RM_INTERN) || defined(_L4_TEST_ENVIRONMENT)
+# define S_PRINTF printf
+# else
+# define S_PRINTF s_printf
+# endif
+#endif
+extern int S_PRINTF (const char *fmt, ...);
+
/* Convenient debugging macros. */
#ifdef DEBUG_ELIDE
@@ -44,16 +57,16 @@ extern int output_debug;
#include <l4/thread.h>
/* Print a debug message if DEBUG_COND is true. */
-#define debug(level, fmt, ...) \
- do \
- { \
- extern const char program_name[]; \
- extern int printf (const char *, ...); \
- do_debug (level) \
- printf ("%s (%x):%s:%d: " fmt "\n", \
- program_name, l4_myself (), __func__, __LINE__, \
- ##__VA_ARGS__); \
- } \
+#define debug(level, fmt, ...) \
+ do \
+ { \
+ extern const char program_name[]; \
+ extern int S_PRINTF (const char *, ...); \
+ do_debug (level) \
+ S_PRINTF ("%s (%x):%s:%d: " fmt "\n", \
+ program_name, l4_myself (), __func__, __LINE__, \
+ ##__VA_ARGS__); \
+ } \
while (0)
/* Print an error message and fail. This function must be provided by
diff --git a/laden/ChangeLog b/laden/ChangeLog
index c66f626..7e9d013 100644
--- a/laden/ChangeLog
+++ b/laden/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-23 Neal H. Walfield <neal@gnu.org>
+
+ * Makefile.am (laden_CPPFLAGS): Add -DS_PRINTF=printf.
+
2007-12-24 Neal H. Walfield <neal@gnu.org>
* ia32-cmain.c (cmain): Cast PROGRAM_NAME to elide gcc warning.
diff --git a/laden/Makefile.am b/laden/Makefile.am
index 13dd0b9..b00f0df 100644
--- a/laden/Makefile.am
+++ b/laden/Makefile.am
@@ -27,7 +27,8 @@ bootdir = $(prefix)/boot
boot_PROGRAMS = laden
laden_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include \
- -I$(top_srcdir)/libc-parts $(AM_CPPFLAGS)
+ -I$(top_srcdir)/libc-parts $(AM_CPPFLAGS) \
+ -DS_PRINTF=printf
laden_SOURCES = $(ARCH_SOURCES) \
output.h output.c output-none.c \
diff --git a/libc-parts/ChangeLog b/libc-parts/ChangeLog
index b38c18a..1c1f0b8 100644
--- a/libc-parts/ChangeLog
+++ b/libc-parts/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-24 Neal H. Walfield <neal@gnu.org>
+
+ * assert.h: Include <hurd/stddef.h>.
+ (assertx): Use S_PRINTF rather than printf.
+
2008-01-23 Neal H. Walfield <neal@gnu.org>
* sys/mman.h: New file based on Glibc's <sys/mman.h> and
diff --git a/libc-parts/assert.h b/libc-parts/assert.h
index 0bdb7ec..4aa6d25 100644
--- a/libc-parts/assert.h
+++ b/libc-parts/assert.h
@@ -22,17 +22,19 @@
#ifndef _ASSERT_H
#define _ASSERT_H 1
-int printf (const char *fmt, ...);
+#include <hurd/stddef.h>
#ifdef _L4_TEST_ENVIRONMENT
# include_next <assert.h>
-# define assertx(__ax_expr, __ax_fmt, ...) \
- do \
- { \
- if (! (__ax_expr)) \
- printf (__ax_fmt, ##__VA_ARGS__); \
- assert (__ax_expr); \
- } \
+# define assertx(__ax_expr, __ax_fmt, ...) \
+ do \
+ { \
+ extern int S_PRINTF (const char *fmt, ...); \
+ \
+ if (! (__ax_expr)) \
+ S_PRINTF (__ax_fmt, ##__VA_ARGS__); \
+ assert (__ax_expr); \
+ } \
while (0)
#else
@@ -43,17 +45,19 @@ int printf (const char *fmt, ...);
# define assertx(__ax_expr, __ax_fmt, ...) \
do { \
extern const char program_name[]; \
+ extern int S_PRINTF (const char *fmt, ...); \
+ \
if (! (__ax_expr)) \
{ \
- printf ("%s (%x):%s:%s:%d: %s failed", \
+ S_PRINTF ("%s (%x):%s:%s:%d: %s failed", \
program_name, l4_myself (), \
__FILE__, __func__, __LINE__, \
#__ax_expr); \
if ((__ax_fmt) && *(__ax_fmt)) \
{ \
- printf (": " __ax_fmt, ##__VA_ARGS__); \
+ S_PRINTF (": " __ax_fmt, ##__VA_ARGS__); \
} \
- printf ("\n"); \
+ S_PRINTF ("\n"); \
\
extern int backtrace (void **array, int size); \
\
@@ -61,8 +65,9 @@ int printf (const char *fmt, ...);
int count = backtrace (a, sizeof (a) / sizeof (a[0])); \
int i; \
for (i = 0; i < count; i ++) \
- printf ("Backtrace: %p%s", a[i], i == count - 1 ? "" : " -> "); \
- printf ("\n"); \
+ S_PRINTF ("Backtrace: %p%s", \
+ a[i], i == count - 1 ? "" : " -> "); \
+ S_PRINTF ("\n"); \
\
for (;;); \
} \
diff --git a/libhurd-btree/ChangeLog b/libhurd-btree/ChangeLog
index 377112f..9d3409d 100644
--- a/libhurd-btree/ChangeLog
+++ b/libhurd-btree/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-24 Neal H. Walfield <neal@gnu.org>
+
+ * Makefile.am (btree_test_CPPFLAGS): New variable.
+ (btree_test_LDADD): Remove.
+ (btree_test_SOURCES): Add btree.c.
+
+ * btree.c (node_t): Include <stdio.h>.
+
2007-12-17 Neal H. Walfield <neal@gnu.org>
* btree.h (BTREE_(check_tree_internal)): Take additional
diff --git a/libhurd-btree/Makefile.am b/libhurd-btree/Makefile.am
index 955aa38..db49a8a 100644
--- a/libhurd-btree/Makefile.am
+++ b/libhurd-btree/Makefile.am
@@ -30,5 +30,6 @@ libhurd_btree_a_SOURCES = btree.h btree.c
TESTS = btree-test
check_PROGRAMS = btree-test
-btree_test_SOURCES = btree-test.c btree.h
-btree_test_LDADD = libhurd-btree.a
+btree_test_SOURCES = btree-test.c btree.h btree.c
+btree_test_CPPFLAGS = -DS_PRINTF=printf $(AM_CPPFLAGS)
+
diff --git a/libhurd-btree/btree.c b/libhurd-btree/btree.c
index a2ec3bb..ab4152d 100644
--- a/libhurd-btree/btree.c
+++ b/libhurd-btree/btree.c
@@ -152,6 +152,7 @@ typedef BTREE_(node_t) *node;
/* Routines to check tree invariants. */
+#include <stdio.h>
#include <assert.h>
#define CHECK_TREE(a) check_tree(a)
diff --git a/libhurd-ihash/ChangeLog b/libhurd-ihash/ChangeLog
index 3a80edf..ec148f1 100644
--- a/libhurd-ihash/ChangeLog
+++ b/libhurd-ihash/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-24 Neal H. Walfield <neal@gnu.org>
+
+ * Makefile.am (t_ihash_SOURCES): Add ihash.c.
+ (t_ihash_CPPFLAGS): New variable.
+ * t-ihash.c: Include <stdio.h>.
+
2008-01-23 Neal H. Walfield <neal@gnu.org>
* ihash.h (hurd_ihash_buffer_size): New declaration.
diff --git a/libhurd-ihash/Makefile.am b/libhurd-ihash/Makefile.am
index 60c09aa..d7a3913 100644
--- a/libhurd-ihash/Makefile.am
+++ b/libhurd-ihash/Makefile.am
@@ -38,5 +38,5 @@ libhurd_ihash_nomalloc_a_SOURCES = ihash.h ihash.c
TESTS = t-ihash
check_PROGRAMS = t-ihash
-t_ihash_SOURCES = t-ihash.c ihash.h
-t_ihash_LDADD = libhurd-ihash.a
+t_ihash_SOURCES = t-ihash.c ihash.h ihash.c
+t_ihash_CPPFLAGS = -DS_PRINTF=printf $(AM_CPPFLAGS)
diff --git a/libhurd-ihash/t-ihash.c b/libhurd-ihash/t-ihash.c
index 316e4d5..56cb32e 100644
--- a/libhurd-ihash/t-ihash.c
+++ b/libhurd-ihash/t-ihash.c
@@ -20,7 +20,9 @@
#define _GNU_SOURCE
-extern const char program_name[] = "t-ihash";
+#include <stdio.h>
+
+const char program_name[] = "t-ihash";
#if HAVE_CONFIG_H
#include <config.h>
diff --git a/libhurd-mm/ChangeLog b/libhurd-mm/ChangeLog
index 064ddc4..e8c0caf 100644
--- a/libhurd-mm/ChangeLog
+++ b/libhurd-mm/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-24 Neal H. Walfield <neal@gnu.org>
+
+ * as.c (as_alloced_dump): Use s_printf rather than printf.
+ (as_walk): Likewise.
+
2008-01-23 Neal H. Walfield <neal@gnu.org>
* Makefile.am (COMMON_CPPFLAGS): Add -I$(LIBC)/include.
diff --git a/libhurd-mm/as.c b/libhurd-mm/as.c
index 3618802..1fd6192 100644
--- a/libhurd-mm/as.c
+++ b/libhurd-mm/as.c
@@ -1,5 +1,5 @@
/* as.c - Address space construction utility functions.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008 Free Software Foundation, Inc.
Written by Neal H. Walfield <neal@gnu.org>.
This file is part of the GNU Hurd.
@@ -733,9 +733,9 @@ as_alloced_dump (const char *prefix)
for (free_space = hurd_btree_free_space_first (&free_spaces);
free_space;
free_space = hurd_btree_free_space_next (free_space))
- printf ("%s%s%llx-%llx\n",
- prefix ?: "", prefix ? ": " : "",
- free_space->region.start, free_space->region.end);
+ s_printf ("%s%s%llx-%llx\n",
+ prefix ?: "", prefix ? ": " : "",
+ free_space->region.start, free_space->region.end);
ss_mutex_unlock (&free_spaces_lock);
}
@@ -891,12 +891,12 @@ as_walk (int (*visit) (addr_t addr,
do_debug (5)
{
- printf ("Considering " ADDR_FMT "(%s): ",
- ADDR_PRINTF (addr), cap_type_string (type));
+ s_printf ("Considering " ADDR_FMT "(%s): ",
+ ADDR_PRINTF (addr), cap_type_string (type));
int i;
for (i = 0; i < depth; i ++)
- printf ("%s%d", i == 0 ? "" : " -> ", child[i]);
- printf (", depth: %d\n", depth);
+ s_printf ("%s%d", i == 0 ? "" : " -> ", child[i]);
+ s_printf (", depth: %d\n", depth);
}
if (((1 << type) & types))
diff --git a/ruth/ChangeLog b/ruth/ChangeLog
index 262faaa..97fe9e1 100644
--- a/ruth/ChangeLog
+++ b/ruth/ChangeLog
@@ -1,3 +1,27 @@
+2008-01-24 Neal H. Walfield <neal@gnu.org>
+
+ * output.h (putchar): Rename from this...
+ (s_putchar): ... to this.
+ (puts): Rename from this...
+ (s_puts): ... to this.
+ (vprintf): Rename from this...
+ (s_vprintf): ... to this.
+ (printf): Rename from this...
+ (s_printf): ... to this.
+ * output.c (putchar): Rename from this...
+ (s_putchar): ... to this. Update users.
+ (puts): Rename from this...
+ (s_puts): ... to this. Update users.
+ (vprintf): Rename from this...
+ (s_vprintf): ... to this. Update users.
+ (printf): Rename from this...
+ (s_printf): ... to this.
+ * Makefile.am (ruth_SOURCES): Add object.h and object.c.
+ * ia32-cmain.c: Include <stddef.h>.
+ (cmain): Use s_printf rather than printf.
+ * panic.c (panic_): Use s_printf and s_vprintf rather than printf
+ and vprintf.
+
2008-01-23 Neal H. Walfield <neal@gnu.org>
* Makefile.am (COMMON_CPPFLAGS): Add -I$(LIBC)/include.
diff --git a/ruth/Makefile.am b/ruth/Makefile.am
index 7ac8387..db39ead 100644
--- a/ruth/Makefile.am
+++ b/ruth/Makefile.am
@@ -32,6 +32,7 @@ COMMON_CPPFLAGS = -Wall -g -std=gnu99 -D_GNU_SOURCE -I$(srcdir) \
ruth_CPPFLAGS = $(COMMON_CPPFLAGS)
ruth_SOURCES = $(ARCH_SOURCES) \
panic.h panic.c \
+ output.c output.h \
ruth.h ruth.c
ruth_LDFLAGS = -u_start -e_start -nostdlib
diff --git a/ruth/ia32-cmain.c b/ruth/ia32-cmain.c
index 05e9480..4172c35 100644
--- a/ruth/ia32-cmain.c
+++ b/ruth/ia32-cmain.c
@@ -34,6 +34,7 @@
#include <hurd/startup.h>
#include <hurd/mm.h>
+#include <hurd/stddef.h>
/* Initialized by the machine-specific startup-code. */
@@ -112,7 +113,7 @@ cmain (void)
l4_init ();
l4_init_stubs ();
- printf ("In cmain\n");
+ s_printf ("In cmain\n");
mm_init (__hurd_startup_data->activity);
diff --git a/ruth/output.c b/ruth/output.c
index 9830512..6b5758d 100644
--- a/ruth/output.c
+++ b/ruth/output.c
@@ -45,7 +45,7 @@ shutdown (void)
/* Print the single character CHR on the output device. */
int
-putchar (int chr)
+s_putchar (int chr)
{
rm_putchar (chr);
@@ -54,12 +54,12 @@ putchar (int chr)
int
-puts (const char *str)
+s_puts (const char *str)
{
while (*str != '\0')
- putchar (*(str++));
+ s_putchar (*(str++));
- putchar ('\n');
+ s_putchar ('\n');
return 0;
}
@@ -81,7 +81,7 @@ print_nr (unsigned long long nr, int base)
i--;
while (i >= 0)
- putchar (str[i--]);
+ s_putchar (str[i--]);
}
@@ -92,7 +92,7 @@ print_signed_nr (long long nr, int base)
if (nr < 0)
{
- putchar ('-');
+ s_putchar ('-');
unr = -nr;
}
else
@@ -103,7 +103,7 @@ print_signed_nr (long long nr, int base)
int
-vprintf (const char *fmt, va_list ap)
+s_vprintf (const char *fmt, va_list ap)
{
const char *p = fmt;
@@ -111,7 +111,7 @@ vprintf (const char *fmt, va_list ap)
{
if (*p != '%')
{
- putchar (*(p++));
+ s_putchar (*(p++));
continue;
}
@@ -119,7 +119,7 @@ vprintf (const char *fmt, va_list ap)
switch (*p)
{
case '%':
- putchar ('%');
+ s_putchar ('%');
p++;
break;
@@ -127,9 +127,9 @@ vprintf (const char *fmt, va_list ap)
p++;
if (*p != 'l')
{
- putchar ('%');
- putchar ('l');
- putchar (*(p++));
+ s_putchar ('%');
+ s_putchar ('l');
+ s_putchar (*(p++));
continue;
}
p++;
@@ -158,10 +158,10 @@ vprintf (const char *fmt, va_list ap)
break;
default:
- putchar ('%');
- putchar ('l');
- putchar ('l');
- putchar (*(p++));
+ s_putchar ('%');
+ s_putchar ('l');
+ s_putchar ('l');
+ s_putchar (*(p++));
break;
}
break;
@@ -189,15 +189,23 @@ vprintf (const char *fmt, va_list ap)
break;
case 'c':
- putchar (va_arg (ap, int));
+ s_putchar (va_arg (ap, int));
p++;
break;
case 's':
{
char *str = va_arg (ap, char *);
- while (*str)
- putchar (*(str++));
+ if (str)
+ while (*str)
+ s_putchar (*(str++));
+ else
+ {
+ s_putchar ('N');
+ s_putchar ('U');
+ s_putchar ('L');
+ s_putchar ('L');
+ }
}
p++;
break;
@@ -208,8 +216,8 @@ vprintf (const char *fmt, va_list ap)
break;
default:
- putchar ('%');
- putchar (*p);
+ s_putchar ('%');
+ s_putchar (*p);
p++;
break;
}
@@ -219,12 +227,12 @@ vprintf (const char *fmt, va_list ap)
}
int
-printf (const char *fmt, ...)
+s_printf (const char *fmt, ...)
{
va_list ap;
va_start (ap, fmt);
- int r = vprintf (fmt, ap);
+ int r = s_vprintf (fmt, ap);
va_end (ap);
return r;
}
diff --git a/ruth/output.h b/ruth/output.h
index 7813bef..7610f9f 100644
--- a/ruth/output.h
+++ b/ruth/output.h
@@ -24,12 +24,12 @@
#include <stdarg.h>
/* Print the single character CHR on the output device. */
-int putchar (int chr);
+int s_putchar (int chr);
-int puts (const char *str);
+int s_puts (const char *str);
-int vprintf (const char *fmt, va_list ap);
+int s_vprintf (const char *fmt, va_list ap);
-int printf (const char *fmt, ...);
+int s_printf (const char *fmt, ...);
#endif /* _OUTPUT_H */
diff --git a/ruth/panic.c b/ruth/panic.c
index 7bde1ed..24baff6 100644
--- a/ruth/panic.c
+++ b/ruth/panic.c
@@ -31,9 +31,9 @@ panic_ (const char *func, int line, const char *fmt, ...)
va_start (ap, fmt);
- printf ("%s:%s:%d:%x: error: ", program_name, func, line, l4_myself ());
- vprintf (fmt, ap);
- putchar ('\n');
+ s_printf ("%s:%s:%d:%x: error: ", program_name, func, line, l4_myself ());
+ s_vprintf (fmt, ap);
+ s_printf ("\n");
va_end (ap);
for (;;);