summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormillert <>2002-02-19 19:39:38 +0000
committermillert <>2002-02-19 19:39:38 +0000
commit0be1f7d80eff8e3e86b037958be3ab5217ce9b59 (patch)
tree9e6b3b31919b853c473f13c35c4878ac3aef84ab /src
parent97ec74faebf84f0ecbbf3706ec05647d012003c9 (diff)
downloadopenbsd-0be1f7d80eff8e3e86b037958be3ab5217ce9b59.tar.gz
openbsd-0be1f7d80eff8e3e86b037958be3ab5217ce9b59.tar.bz2
openbsd-0be1f7d80eff8e3e86b037958be3ab5217ce9b59.zip
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/crypt/bcrypt.c33
-rw-r--r--src/lib/libc/crypt/blowfish.c86
-rw-r--r--src/lib/libc/net/htons.c7
-rw-r--r--src/lib/libc/net/ntohs.c7
-rw-r--r--src/lib/libc/net/res_comp.c12
-rw-r--r--src/lib/libc/net/res_random.c8
-rw-r--r--src/lib/libc/stdlib/multibyte.c8
-rw-r--r--src/lib/libc/stdlib/strtod.c5
-rw-r--r--src/regress/lib/libc/db/dbtest.c22
9 files changed, 15 insertions, 173 deletions
diff --git a/src/lib/libc/crypt/bcrypt.c b/src/lib/libc/crypt/bcrypt.c
index f3ea849f00..dec0093dd8 100644
--- a/src/lib/libc/crypt/bcrypt.c
+++ b/src/lib/libc/crypt/bcrypt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bcrypt.c,v 1.15 2002/02/16 21:27:21 millert Exp $ */ 1/* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -97,16 +97,8 @@ const static u_int8_t index_64[128] =
97}; 97};
98#define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)]) 98#define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)])
99 99
100#ifdef __STDC__
101static void 100static void
102decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data) 101decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data)
103#else
104static void
105decode_base64(buffer, len, data)
106 u_int8_t *buffer;
107 u_int16_t len;
108 u_int8_t *data;
109#endif
110{ 102{
111 u_int8_t *bp = buffer; 103 u_int8_t *bp = buffer;
112 u_int8_t *p = data; 104 u_int8_t *p = data;
@@ -140,17 +132,8 @@ decode_base64(buffer, len, data)
140 } 132 }
141} 133}
142 134
143#ifdef __STDC__
144static void 135static void
145encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr) 136encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr)
146#else
147static void
148encode_salt(salt, csalt, clen, logr)
149 char *salt;
150 u_int8_t *csalt;
151 u_int16_t clen;
152 u_int8_t logr;
153#endif
154{ 137{
155 salt[0] = '$'; 138 salt[0] = '$';
156 salt[1] = BCRYPT_VERSION; 139 salt[1] = BCRYPT_VERSION;
@@ -166,14 +149,8 @@ encode_salt(salt, csalt, clen, logr)
166 seems sensible. 149 seems sensible.
167 */ 150 */
168 151
169#ifdef __STDC__
170char * 152char *
171bcrypt_gensalt(u_int8_t log_rounds) 153bcrypt_gensalt(u_int8_t log_rounds)
172#else
173char *
174bcrypt_gensalt(log_rounds)
175 u_int8_t log_rounds;
176#endif
177{ 154{
178 u_int8_t csalt[BCRYPT_MAXSALT]; 155 u_int8_t csalt[BCRYPT_MAXSALT];
179 u_int16_t i; 156 u_int16_t i;
@@ -296,16 +273,8 @@ bcrypt(key, salt)
296 return encrypted; 273 return encrypted;
297} 274}
298 275
299#ifdef __STDC__
300static void 276static void
301encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len) 277encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len)
302#else
303static void
304encode_base64(buffer, data, len)
305 u_int8_t *buffer;
306 u_int8_t *data;
307 u_int16_t len;
308#endif
309{ 278{
310 u_int8_t *bp = buffer; 279 u_int8_t *bp = buffer;
311 u_int8_t *p = data; 280 u_int8_t *p = data;
diff --git a/src/lib/libc/crypt/blowfish.c b/src/lib/libc/crypt/blowfish.c
index 695fc00a6a..8be04a6463 100644
--- a/src/lib/libc/crypt/blowfish.c
+++ b/src/lib/libc/crypt/blowfish.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: blowfish.c,v 1.15 2001/01/04 21:45:30 todd Exp $ */ 1/* $OpenBSD: blowfish.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */
2/* 2/*
3 * Blowfish block cipher for OpenBSD 3 * Blowfish block cipher for OpenBSD
4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -402,16 +402,8 @@ Blowfish_initstate(c)
402 402
403} 403}
404 404
405#ifdef __STDC__
406u_int32_t 405u_int32_t
407Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, u_int16_t *current) 406Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, u_int16_t *current)
408#else
409u_int32_t
410Blowfish_stream2word(data, databytes, current)
411 const u_int8_t *data;
412 u_int16_t databytes;
413 u_int16_t *current;
414#endif
415{ 407{
416 u_int8_t i; 408 u_int8_t i;
417 u_int16_t j; 409 u_int16_t j;
@@ -430,16 +422,8 @@ Blowfish_stream2word(data, databytes, current)
430 return temp; 422 return temp;
431} 423}
432 424
433#if __STDC__
434void 425void
435Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes) 426Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes)
436#else
437void
438Blowfish_expand0state(c, key, keybytes)
439 blf_ctx *c;
440 const u_int8_t *key;
441 u_int16_t keybytes;
442#endif
443{ 427{
444 u_int16_t i; 428 u_int16_t i;
445 u_int16_t j; 429 u_int16_t j;
@@ -476,19 +460,9 @@ Blowfish_expand0state(c, key, keybytes)
476} 460}
477 461
478 462
479#if __STDC__
480void 463void
481Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes, 464Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes,
482 const u_int8_t *key, u_int16_t keybytes) 465 const u_int8_t *key, u_int16_t keybytes)
483#else
484void
485Blowfish_expandstate(c, data, databytes, key, keybytes)
486 blf_ctx *c;
487 const u_int8_t *data;
488 u_int16_t databytes;
489 const u_int8_t *key;
490 u_int16_t keybytes;
491#endif
492{ 466{
493 u_int16_t i; 467 u_int16_t i;
494 u_int16_t j; 468 u_int16_t j;
@@ -529,16 +503,8 @@ Blowfish_expandstate(c, data, databytes, key, keybytes)
529 503
530} 504}
531 505
532#if __STDC__
533void 506void
534blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len) 507blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len)
535#else
536void
537blf_key(c, k, len)
538 blf_ctx *c;
539 const u_int8_t *k;
540 u_int16_t len;
541#endif
542{ 508{
543 /* Initialize S-boxes and subkeys with Pi */ 509 /* Initialize S-boxes and subkeys with Pi */
544 Blowfish_initstate(c); 510 Blowfish_initstate(c);
@@ -547,16 +513,8 @@ blf_key(c, k, len)
547 Blowfish_expand0state(c, k, len); 513 Blowfish_expand0state(c, k, len);
548} 514}
549 515
550#if __STDC__
551void 516void
552blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks) 517blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
553#else
554void
555blf_enc(c, data, blocks)
556 blf_ctx *c;
557 u_int32_t *data;
558 u_int16_t blocks;
559#endif
560{ 518{
561 u_int32_t *d; 519 u_int32_t *d;
562 u_int16_t i; 520 u_int16_t i;
@@ -568,16 +526,8 @@ blf_enc(c, data, blocks)
568 } 526 }
569} 527}
570 528
571#if __STDC__
572void 529void
573blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks) 530blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
574#else
575void
576blf_dec(c, data, blocks)
577 blf_ctx *c;
578 u_int32_t *data;
579 u_int16_t blocks;
580#endif
581{ 531{
582 u_int32_t *d; 532 u_int32_t *d;
583 u_int16_t i; 533 u_int16_t i;
@@ -589,16 +539,8 @@ blf_dec(c, data, blocks)
589 } 539 }
590} 540}
591 541
592#if __STDC__
593void 542void
594blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len) 543blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
595#else
596void
597blf_ecb_encrypt(c, data, len)
598 blf_ctx *c;
599 u_int8_t *data;
600 u_int32_t len;
601#endif
602{ 544{
603 u_int32_t l, r; 545 u_int32_t l, r;
604 u_int32_t i; 546 u_int32_t i;
@@ -619,16 +561,8 @@ blf_ecb_encrypt(c, data, len)
619 } 561 }
620} 562}
621 563
622#if __STDC__
623void 564void
624blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len) 565blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
625#else
626void
627blf_ecb_decrypt(c, data, len)
628 blf_ctx *c;
629 u_int8_t *data;
630 u_int32_t len;
631#endif
632{ 566{
633 u_int32_t l, r; 567 u_int32_t l, r;
634 u_int32_t i; 568 u_int32_t i;
@@ -649,17 +583,8 @@ blf_ecb_decrypt(c, data, len)
649 } 583 }
650} 584}
651 585
652#if __STDC__
653void 586void
654blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len) 587blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len)
655#else
656void
657blf_cbc_encrypt(c, iv, data, len)
658 blf_ctx *c;
659 u_int8_t *iv;
660 u_int8_t *data;
661 u_int32_t len;
662#endif
663{ 588{
664 u_int32_t l, r; 589 u_int32_t l, r;
665 u_int32_t i, j; 590 u_int32_t i, j;
@@ -683,17 +608,8 @@ blf_cbc_encrypt(c, iv, data, len)
683 } 608 }
684} 609}
685 610
686#if __STDC__
687void 611void
688blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len) 612blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len)
689#else
690void
691blf_cbc_decrypt(c, iva, data, len)
692 blf_ctx *c;
693 u_int8_t *iva;
694 u_int8_t *data;
695 u_int32_t len;
696#endif
697{ 613{
698 u_int32_t l, r; 614 u_int32_t l, r;
699 u_int8_t *iv; 615 u_int8_t *iv;
diff --git a/src/lib/libc/net/htons.c b/src/lib/libc/net/htons.c
index 47cf25952d..ded70712ea 100644
--- a/src/lib/libc/net/htons.c
+++ b/src/lib/libc/net/htons.c
@@ -4,7 +4,7 @@
4 */ 4 */
5 5
6#if defined(LIBC_SCCS) && !defined(lint) 6#if defined(LIBC_SCCS) && !defined(lint)
7static char *rcsid = "$OpenBSD: htons.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; 7static char *rcsid = "$OpenBSD: htons.c,v 1.7 2002/02/19 19:39:36 millert Exp $";
8#endif /* LIBC_SCCS and not lint */ 8#endif /* LIBC_SCCS and not lint */
9 9
10#include <sys/types.h> 10#include <sys/types.h>
@@ -13,12 +13,7 @@ static char *rcsid = "$OpenBSD: htons.c,v 1.6 1997/07/25 20:30:07 mickey Exp $";
13#undef htons 13#undef htons
14 14
15u_int16_t 15u_int16_t
16#ifdef __STDC__
17htons(u_int16_t x) 16htons(u_int16_t x)
18#else
19htons(x)
20 u_int16_t x;
21#endif
22{ 17{
23#if BYTE_ORDER == LITTLE_ENDIAN 18#if BYTE_ORDER == LITTLE_ENDIAN
24 u_char *s = (u_char *) &x; 19 u_char *s = (u_char *) &x;
diff --git a/src/lib/libc/net/ntohs.c b/src/lib/libc/net/ntohs.c
index cf6414d4a6..4c3ab33f31 100644
--- a/src/lib/libc/net/ntohs.c
+++ b/src/lib/libc/net/ntohs.c
@@ -4,7 +4,7 @@
4 */ 4 */
5 5
6#if defined(LIBC_SCCS) && !defined(lint) 6#if defined(LIBC_SCCS) && !defined(lint)
7static char *rcsid = "$OpenBSD: ntohs.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; 7static char *rcsid = "$OpenBSD: ntohs.c,v 1.7 2002/02/19 19:39:36 millert Exp $";
8#endif /* LIBC_SCCS and not lint */ 8#endif /* LIBC_SCCS and not lint */
9 9
10#include <sys/types.h> 10#include <sys/types.h>
@@ -13,12 +13,7 @@ static char *rcsid = "$OpenBSD: ntohs.c,v 1.6 1997/07/25 20:30:07 mickey Exp $";
13#undef ntohs 13#undef ntohs
14 14
15u_int16_t 15u_int16_t
16#ifdef __STDC__
17ntohs(u_int16_t x) 16ntohs(u_int16_t x)
18#else
19ntohs(x)
20 u_int16_t x;
21#endif
22{ 17{
23#if BYTE_ORDER == LITTLE_ENDIAN 18#if BYTE_ORDER == LITTLE_ENDIAN
24 u_char *s = (u_char *) &x; 19 u_char *s = (u_char *) &x;
diff --git a/src/lib/libc/net/res_comp.c b/src/lib/libc/net/res_comp.c
index 948923cf37..25e196b2cf 100644
--- a/src/lib/libc/net/res_comp.c
+++ b/src/lib/libc/net/res_comp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $ */ 1/* $OpenBSD: res_comp.c,v 1.10 2002/02/19 19:39:36 millert Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1993 4 * ++Copyright++ 1985, 1993
@@ -60,7 +60,7 @@
60static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; 60static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
61static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $"; 61static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $";
62#else 62#else
63static char rcsid[] = "$OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $"; 63static char rcsid[] = "$OpenBSD: res_comp.c,v 1.10 2002/02/19 19:39:36 millert Exp $";
64#endif 64#endif
65#endif /* LIBC_SCCS and not lint */ 65#endif /* LIBC_SCCS and not lint */
66 66
@@ -489,13 +489,7 @@ _getlong(msgp)
489} 489}
490 490
491void 491void
492#if defined(__STDC__) || defined(__cplusplus) 492__putshort(register u_int16_t s, register u_char *msgp)
493__putshort(register u_int16_t s, register u_char *msgp) /* must match proto */
494#else
495__putshort(s, msgp)
496 register u_int16_t s;
497 register u_char *msgp;
498#endif
499{ 493{
500 PUTSHORT(s, msgp); 494 PUTSHORT(s, msgp);
501} 495}
diff --git a/src/lib/libc/net/res_random.c b/src/lib/libc/net/res_random.c
index 6a6a142e96..7a7d0bd677 100644
--- a/src/lib/libc/net/res_random.c
+++ b/src/lib/libc/net/res_random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_random.c,v 1.10 2002/02/16 21:27:23 millert Exp $ */ 1/* $OpenBSD: res_random.c,v 1.11 2002/02/19 19:39:36 millert Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -100,14 +100,8 @@ static void res_initid(void);
100 * of 0 - (mod-1) 100 * of 0 - (mod-1)
101 */ 101 */
102 102
103#ifdef __STDC__
104static u_int16_t 103static u_int16_t
105pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod) 104pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod)
106#else
107static u_int16_t
108pmod(gen, exp, mod)
109 u_int16_t gen, exp, mod;
110#endif
111{ 105{
112 u_int16_t s, t, u; 106 u_int16_t s, t, u;
113 107
diff --git a/src/lib/libc/stdlib/multibyte.c b/src/lib/libc/stdlib/multibyte.c
index 12e70c4a2c..6f08bbe342 100644
--- a/src/lib/libc/stdlib/multibyte.c
+++ b/src/lib/libc/stdlib/multibyte.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char *rcsid = "$OpenBSD: multibyte.c,v 1.2 1996/08/19 08:33:39 tholo Exp $"; 35static char *rcsid = "$OpenBSD: multibyte.c,v 1.3 2002/02/19 19:39:37 millert Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <stdlib.h> 38#include <stdlib.h>
@@ -73,13 +73,7 @@ mbtowc(pwc, s, n)
73 73
74/*ARGSUSED*/ 74/*ARGSUSED*/
75int 75int
76#ifdef __STDC__
77wctomb(char *s, wchar_t wchar) 76wctomb(char *s, wchar_t wchar)
78#else
79wctomb(s, wchar)
80 char *s;
81 wchar_t wchar;
82#endif
83{ 77{
84 if (s == NULL) 78 if (s == NULL)
85 return 0; 79 return 0;
diff --git a/src/lib/libc/stdlib/strtod.c b/src/lib/libc/stdlib/strtod.c
index 44cc369b16..ce7ce9fe56 100644
--- a/src/lib/libc/stdlib/strtod.c
+++ b/src/lib/libc/stdlib/strtod.c
@@ -90,7 +90,7 @@
90 */ 90 */
91 91
92#if defined(LIBC_SCCS) && !defined(lint) 92#if defined(LIBC_SCCS) && !defined(lint)
93static char *rcsid = "$OpenBSD: strtod.c,v 1.14 2001/07/09 06:57:45 deraadt Exp $"; 93static char *rcsid = "$OpenBSD: strtod.c,v 1.15 2002/02/19 19:39:37 millert Exp $";
94#endif /* LIBC_SCCS and not lint */ 94#endif /* LIBC_SCCS and not lint */
95 95
96#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ 96#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
@@ -153,7 +153,6 @@ extern void *MALLOC(size_t);
153#include "errno.h" 153#include "errno.h"
154 154
155#ifdef Bad_float_h 155#ifdef Bad_float_h
156#undef __STDC__
157#ifdef IEEE_BIG_ENDIAN 156#ifdef IEEE_BIG_ENDIAN
158#define IEEE_ARITHMETIC 157#define IEEE_ARITHMETIC
159#endif 158#endif
@@ -1429,7 +1428,7 @@ strtod
1429 if (e1 > DBL_MAX_10_EXP) { 1428 if (e1 > DBL_MAX_10_EXP) {
1430 ovfl: 1429 ovfl:
1431 errno = ERANGE; 1430 errno = ERANGE;
1432#ifdef __STDC__ 1431#ifndef Bad_float_h
1433 value(rv) = HUGE_VAL; 1432 value(rv) = HUGE_VAL;
1434#else 1433#else
1435 /* Can't trust HUGE_VAL */ 1434 /* Can't trust HUGE_VAL */
diff --git a/src/regress/lib/libc/db/dbtest.c b/src/regress/lib/libc/db/dbtest.c
index 53451c5438..a48e19c452 100644
--- a/src/regress/lib/libc/db/dbtest.c
+++ b/src/regress/lib/libc/db/dbtest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dbtest.c,v 1.8 2002/02/18 21:40:46 millert Exp $ */ 1/* $OpenBSD: dbtest.c,v 1.9 2002/02/19 19:39:38 millert Exp $ */
2/* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */ 2/* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */
3 3
4/*- 4/*-
@@ -44,7 +44,7 @@ static char copyright[] =
44#if 0 44#if 0
45static char sccsid[] = "@(#)dbtest.c 8.17 (Berkeley) 9/1/94"; 45static char sccsid[] = "@(#)dbtest.c 8.17 (Berkeley) 9/1/94";
46#else 46#else
47static char rcsid[] = "$OpenBSD: dbtest.c,v 1.8 2002/02/18 21:40:46 millert Exp $"; 47static char rcsid[] = "$OpenBSD: dbtest.c,v 1.9 2002/02/19 19:39:38 millert Exp $";
48#endif 48#endif
49#endif /* not lint */ 49#endif /* not lint */
50 50
@@ -58,6 +58,7 @@ static char rcsid[] = "$OpenBSD: dbtest.c,v 1.8 2002/02/18 21:40:46 millert Exp
58#include <stdio.h> 58#include <stdio.h>
59#include <stdlib.h> 59#include <stdlib.h>
60#include <string.h> 60#include <string.h>
61#include <stdarg.h>
61#include <unistd.h> 62#include <unistd.h>
62 63
63#include <db.h> 64#include <db.h>
@@ -737,27 +738,12 @@ usage()
737 exit(1); 738 exit(1);
738} 739}
739 740
740#ifdef __STDC__
741#include <stdarg.h>
742#else
743#include <varargs.h>
744#endif
745
746void 741void
747#ifdef __STDC__
748dberr(const char *fmt, ...) 742dberr(const char *fmt, ...)
749#else
750dberr(fmt, va_alist)
751 char *fmt;
752 va_dcl
753#endif
754{ 743{
755 va_list ap; 744 va_list ap;
756#ifdef __STDC__ 745
757 va_start(ap, fmt); 746 va_start(ap, fmt);
758#else
759 va_start(ap);
760#endif
761 (void)fprintf(stderr, "dbtest: "); 747 (void)fprintf(stderr, "dbtest: ");
762 (void)vfprintf(stderr, fmt, ap); 748 (void)vfprintf(stderr, fmt, ap);
763 va_end(ap); 749 va_end(ap);