summaryrefslogtreecommitdiff
path: root/sed/utils.c
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2009-04-27 10:29:02 +0200
committerPaolo Bonzini <bonzini@gnu.org>2009-04-27 10:41:56 +0200
commit81721849897d4285de9f34e98cd447c091e44e3d (patch)
tree8fcaa7b3e9138f06b29d5084a30dbe591923cdd5 /sed/utils.c
parent9e971bab122eb52eb74382e3ce86e9e6ad6e5cbc (diff)
downloadsed-81721849897d4285de9f34e98cd447c091e44e3d.tar.gz
fixes after Bruno's testing
2009-04-27 Paolo Bonzini <bonzini@gnu.org> * configure.ac: Link readin.in2 into builddir. * configure: Regenerate. * doc/Makefile.am: Do not distribute sed.html. Do not update sed.texi if the output does not change. * sed/Makefile.am: Order libraries according to their dependencies. * sed/compile.c (get_openfile): Declare FAIL as int. * sed/sed.c: Avoid printf ("") if REG_PERL is not defined. * testsuite/eval.in2: Do not include in the repository. * testsuite/Makefile.am: Clean always eval.in2 and never readin.in2. * testsuite/Makefile.tests: Provide a default empty definition of TIME and remove rules for readin.in2.
Diffstat (limited to 'sed/utils.c')
-rw-r--r--sed/utils.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/sed/utils.c b/sed/utils.c
index 78ae01c..94c4644 100644
--- a/sed/utils.c
+++ b/sed/utils.c
@@ -19,7 +19,7 @@
#include "config.h"
#include <stdio.h>
-
+#include <stdarg.h>
#include <errno.h>
#ifndef errno
extern int errno;
@@ -61,34 +61,24 @@ static struct open_file *open_files = NULL;
static void do_ck_fclose P_((FILE *fp));
/* Print an error message and exit */
-#if !defined __STDC__ || !(__STDC__-0)
-# include <varargs.h>
-# define VSTART(l,a) va_start(l)
-void
-panic(str, va_alist)
- char *str;
- va_dcl
-#else /*__STDC__*/
-# include <stdarg.h>
-# define VSTART(l,a) va_start(l, a)
+
void
panic(const char *str, ...)
-#endif /* __STDC__ */
{
- va_list iggy;
+ va_list ap;
fprintf(stderr, "%s: ", myname);
- VSTART(iggy, str);
+ va_start(ap, str);
#ifndef HAVE_VPRINTF
# ifndef HAVE_DOPRNT
fputs(str, stderr); /* not great, but perhaps better than nothing... */
# else /* HAVE_DOPRNT */
- _doprnt(str, &iggy, stderr);
+ _doprnt(str, &ap, stderr);
# endif /* HAVE_DOPRNT */
#else /* HAVE_VFPRINTF */
- vfprintf(stderr, str, iggy);
+ vfprintf(stderr, str, ap);
#endif /* HAVE_VFPRINTF */
- va_end(iggy);
+ va_end(ap);
putc('\n', stderr);
/* Unlink the temporary files. */