From a520e25b9c4f928441b292e27225851ce077ab58 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 30 Nov 2022 08:57:30 +0000 Subject: Much better strerr revamp, with __VA_ARGS__ Signed-off-by: Laurent Bercot --- doc/libskarnet.html | 1 - doc/libstddjb/index.html | 1 + doc/libstddjb/strerr.html | 28 ++ doc/libstrerr/index.html | 27 -- package/deps.mak | 60 +--- src/include/skalibs/strerr.h | 577 ++++++++++++++++----------------------- src/libstddjb/strerr_diel.c | 24 ++ src/libstddjb/strerr_dielsys.c | 23 ++ src/libstddjb/strerr_diev.c | 13 + src/libstddjb/strerr_dievsys.c | 13 + src/libstddjb/strerr_warnl.c | 22 ++ src/libstddjb/strerr_warnlsys.c | 22 ++ src/libstddjb/strerr_warnv.c | 17 ++ src/libstddjb/strerr_warnvsys.c | 20 ++ src/libstrerr/strerr_die10sys.c | 11 - src/libstrerr/strerr_die10x.c | 11 - src/libstrerr/strerr_die11sys.c | 11 - src/libstrerr/strerr_die11x.c | 11 - src/libstrerr/strerr_die1sys.c | 10 - src/libstrerr/strerr_die1x.c | 10 - src/libstrerr/strerr_die2sys.c | 11 - src/libstrerr/strerr_die2x.c | 11 - src/libstrerr/strerr_die3sys.c | 11 - src/libstrerr/strerr_die3x.c | 11 - src/libstrerr/strerr_die4sys.c | 11 - src/libstrerr/strerr_die4x.c | 11 - src/libstrerr/strerr_die5sys.c | 11 - src/libstrerr/strerr_die5x.c | 11 - src/libstrerr/strerr_die6sys.c | 11 - src/libstrerr/strerr_die6x.c | 11 - src/libstrerr/strerr_die7sys.c | 11 - src/libstrerr/strerr_die7x.c | 11 - src/libstrerr/strerr_die8sys.c | 11 - src/libstrerr/strerr_die8x.c | 11 - src/libstrerr/strerr_die9sys.c | 11 - src/libstrerr/strerr_die9x.c | 11 - src/libstrerr/strerr_diel.c | 24 -- src/libstrerr/strerr_dielsys.c | 23 -- src/libstrerr/strerr_diev.c | 13 - src/libstrerr/strerr_dievsys.c | 13 - src/libstrerr/strerr_warn10sys.c | 11 - src/libstrerr/strerr_warn10x.c | 11 - src/libstrerr/strerr_warn11sys.c | 11 - src/libstrerr/strerr_warn11x.c | 11 - src/libstrerr/strerr_warn1sys.c | 10 - src/libstrerr/strerr_warn1x.c | 10 - src/libstrerr/strerr_warn2sys.c | 11 - src/libstrerr/strerr_warn2x.c | 11 - src/libstrerr/strerr_warn3sys.c | 11 - src/libstrerr/strerr_warn3x.c | 11 - src/libstrerr/strerr_warn4sys.c | 11 - src/libstrerr/strerr_warn4x.c | 11 - src/libstrerr/strerr_warn5sys.c | 11 - src/libstrerr/strerr_warn5x.c | 11 - src/libstrerr/strerr_warn6sys.c | 11 - src/libstrerr/strerr_warn6x.c | 11 - src/libstrerr/strerr_warn7sys.c | 11 - src/libstrerr/strerr_warn7x.c | 11 - src/libstrerr/strerr_warn8sys.c | 11 - src/libstrerr/strerr_warn8x.c | 11 - src/libstrerr/strerr_warn9sys.c | 11 - src/libstrerr/strerr_warn9x.c | 11 - src/libstrerr/strerr_warnl.c | 22 -- src/libstrerr/strerr_warnlsys.c | 22 -- src/libstrerr/strerr_warnv.c | 17 -- src/libstrerr/strerr_warnvsys.c | 20 -- 66 files changed, 422 insertions(+), 1060 deletions(-) create mode 100644 doc/libstddjb/strerr.html delete mode 100644 doc/libstrerr/index.html create mode 100644 src/libstddjb/strerr_diel.c create mode 100644 src/libstddjb/strerr_dielsys.c create mode 100644 src/libstddjb/strerr_diev.c create mode 100644 src/libstddjb/strerr_dievsys.c create mode 100644 src/libstddjb/strerr_warnl.c create mode 100644 src/libstddjb/strerr_warnlsys.c create mode 100644 src/libstddjb/strerr_warnv.c create mode 100644 src/libstddjb/strerr_warnvsys.c delete mode 100644 src/libstrerr/strerr_die10sys.c delete mode 100644 src/libstrerr/strerr_die10x.c delete mode 100644 src/libstrerr/strerr_die11sys.c delete mode 100644 src/libstrerr/strerr_die11x.c delete mode 100644 src/libstrerr/strerr_die1sys.c delete mode 100644 src/libstrerr/strerr_die1x.c delete mode 100644 src/libstrerr/strerr_die2sys.c delete mode 100644 src/libstrerr/strerr_die2x.c delete mode 100644 src/libstrerr/strerr_die3sys.c delete mode 100644 src/libstrerr/strerr_die3x.c delete mode 100644 src/libstrerr/strerr_die4sys.c delete mode 100644 src/libstrerr/strerr_die4x.c delete mode 100644 src/libstrerr/strerr_die5sys.c delete mode 100644 src/libstrerr/strerr_die5x.c delete mode 100644 src/libstrerr/strerr_die6sys.c delete mode 100644 src/libstrerr/strerr_die6x.c delete mode 100644 src/libstrerr/strerr_die7sys.c delete mode 100644 src/libstrerr/strerr_die7x.c delete mode 100644 src/libstrerr/strerr_die8sys.c delete mode 100644 src/libstrerr/strerr_die8x.c delete mode 100644 src/libstrerr/strerr_die9sys.c delete mode 100644 src/libstrerr/strerr_die9x.c delete mode 100644 src/libstrerr/strerr_diel.c delete mode 100644 src/libstrerr/strerr_dielsys.c delete mode 100644 src/libstrerr/strerr_diev.c delete mode 100644 src/libstrerr/strerr_dievsys.c delete mode 100644 src/libstrerr/strerr_warn10sys.c delete mode 100644 src/libstrerr/strerr_warn10x.c delete mode 100644 src/libstrerr/strerr_warn11sys.c delete mode 100644 src/libstrerr/strerr_warn11x.c delete mode 100644 src/libstrerr/strerr_warn1sys.c delete mode 100644 src/libstrerr/strerr_warn1x.c delete mode 100644 src/libstrerr/strerr_warn2sys.c delete mode 100644 src/libstrerr/strerr_warn2x.c delete mode 100644 src/libstrerr/strerr_warn3sys.c delete mode 100644 src/libstrerr/strerr_warn3x.c delete mode 100644 src/libstrerr/strerr_warn4sys.c delete mode 100644 src/libstrerr/strerr_warn4x.c delete mode 100644 src/libstrerr/strerr_warn5sys.c delete mode 100644 src/libstrerr/strerr_warn5x.c delete mode 100644 src/libstrerr/strerr_warn6sys.c delete mode 100644 src/libstrerr/strerr_warn6x.c delete mode 100644 src/libstrerr/strerr_warn7sys.c delete mode 100644 src/libstrerr/strerr_warn7x.c delete mode 100644 src/libstrerr/strerr_warn8sys.c delete mode 100644 src/libstrerr/strerr_warn8x.c delete mode 100644 src/libstrerr/strerr_warn9sys.c delete mode 100644 src/libstrerr/strerr_warn9x.c delete mode 100644 src/libstrerr/strerr_warnl.c delete mode 100644 src/libstrerr/strerr_warnlsys.c delete mode 100644 src/libstrerr/strerr_warnv.c delete mode 100644 src/libstrerr/strerr_warnvsys.c diff --git a/doc/libskarnet.html b/doc/libskarnet.html index afc5548..0c28ebb 100644 --- a/doc/libskarnet.html +++ b/doc/libskarnet.html @@ -96,7 +96,6 @@ containing a logical unit of code implementing independent functions.
  • libposixplz: workarounds for some POSIX deficiencies and for systems that don't quite implement POSIX
  • libstddjb: basic C API for system programming
  • -
  • libstrerr: error message printing
  • libdatastruct: efficient C implementation of basic data structures like sets or trees
  • libstdcrypto: a few crypto primitives
  • diff --git a/doc/libstddjb/index.html b/doc/libstddjb/index.html index ddaf626..98dc062 100644 --- a/doc/libstddjb/index.html +++ b/doc/libstddjb/index.html @@ -84,6 +84,7 @@ structure
  • skalibs/skamisc.h: general string quoting and parsing; miscellaneous, unclassifiable functions
  • skalibs/socket.h: UNIX, INET and INET6 domain sockets
  • skalibs/stralloc.h: advanced management of dynamically allocated strings
  • +
  • skalibs/strerr.h: print error messages
  • skalibs/tai.h: time, timers and system clock
  • diff --git a/doc/libstddjb/strerr.html b/doc/libstddjb/strerr.html new file mode 100644 index 0000000..f2422eb --- /dev/null +++ b/doc/libstddjb/strerr.html @@ -0,0 +1,28 @@ + + + + + + skalibs: the strerr header + + + + + + +

    +libstddjb
    +libskarnet
    +skalibs
    +Software
    +skarnet.org +

    + +

    The skalibs/strerr.h header

    + +

    + TODO: write this documentation page. (Sorry!) +

    + + + diff --git a/doc/libstrerr/index.html b/doc/libstrerr/index.html deleted file mode 100644 index 59f2b91..0000000 --- a/doc/libstrerr/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - skalibs: the strerr header - - - - - - -

    -libskarnet
    -skalibs
    -Software
    -skarnet.org -

    - -

    The skalibs/strerr.h header

    - -

    - TODO: write this documentation page. (Sorry!) -

    - - - diff --git a/package/deps.mak b/package/deps.mak index 98a038a..e1322cc 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -555,6 +555,14 @@ src/libstddjb/stralloc_reverse.o src/libstddjb/stralloc_reverse.lo: src/libstddj src/libstddjb/stralloc_reverse_blocks.o src/libstddjb/stralloc_reverse_blocks.lo: src/libstddjb/stralloc_reverse_blocks.c src/include/skalibs/stralloc.h src/libstddjb/stralloc_shrink.o src/libstddjb/stralloc_shrink.lo: src/libstddjb/stralloc_shrink.c src/include/skalibs/alloc.h src/include/skalibs/stralloc.h src/libstddjb/stralloc_zero.o src/libstddjb/stralloc_zero.lo: src/libstddjb/stralloc_zero.c src/include/skalibs/stralloc.h +src/libstddjb/strerr_diel.o src/libstddjb/strerr_diel.lo: src/libstddjb/strerr_diel.c src/include/skalibs/strerr.h +src/libstddjb/strerr_dielsys.o src/libstddjb/strerr_dielsys.lo: src/libstddjb/strerr_dielsys.c src/include/skalibs/strerr.h +src/libstddjb/strerr_diev.o src/libstddjb/strerr_diev.lo: src/libstddjb/strerr_diev.c src/include/skalibs/strerr.h +src/libstddjb/strerr_dievsys.o src/libstddjb/strerr_dievsys.lo: src/libstddjb/strerr_dievsys.c src/include/skalibs/strerr.h +src/libstddjb/strerr_warnl.o src/libstddjb/strerr_warnl.lo: src/libstddjb/strerr_warnl.c src/include/skalibs/strerr.h +src/libstddjb/strerr_warnlsys.o src/libstddjb/strerr_warnlsys.lo: src/libstddjb/strerr_warnlsys.c src/include/skalibs/strerr.h +src/libstddjb/strerr_warnv.o src/libstddjb/strerr_warnv.lo: src/libstddjb/strerr_warnv.c src/include/skalibs/buffer.h src/include/skalibs/strerr.h +src/libstddjb/strerr_warnvsys.o src/libstddjb/strerr_warnvsys.lo: src/libstddjb/strerr_warnvsys.c src/include/skalibs/buffer.h src/include/skalibs/strerr.h src/libstddjb/string_format.o src/libstddjb/string_format.lo: src/libstddjb/string_format.c src/include/skalibs/bytestr.h src/include/skalibs/stralloc.h src/libstddjb/string_quote.o src/libstddjb/string_quote.lo: src/libstddjb/string_quote.c src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h src/libstddjb/string_quote_nodelim.o src/libstddjb/string_quote_nodelim.lo: src/libstddjb/string_quote_nodelim.c src/include/skalibs/skamisc.h src/include/skalibs/stralloc.h @@ -696,58 +704,6 @@ src/libstddjb/waitn_reap_posix.o src/libstddjb/waitn_reap_posix.lo: src/libstddj src/libstddjb/waitpid_nointr.o src/libstddjb/waitpid_nointr.lo: src/libstddjb/waitpid_nointr.c src/include/skalibs/djbunix.h src/libstddjb/writenclose_unsafe.o src/libstddjb/writenclose_unsafe.lo: src/libstddjb/writenclose_unsafe.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/libstddjb/writevnclose_unsafe.o src/libstddjb/writevnclose_unsafe.lo: src/libstddjb/writevnclose_unsafe.c src/include/skalibs/allreadwrite.h src/include/skalibs/djbunix.h src/include/skalibs/siovec.h -src/libstrerr/strerr_die10sys.o src/libstrerr/strerr_die10sys.lo: src/libstrerr/strerr_die10sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die10x.o src/libstrerr/strerr_die10x.lo: src/libstrerr/strerr_die10x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die11sys.o src/libstrerr/strerr_die11sys.lo: src/libstrerr/strerr_die11sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die11x.o src/libstrerr/strerr_die11x.lo: src/libstrerr/strerr_die11x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die1sys.o src/libstrerr/strerr_die1sys.lo: src/libstrerr/strerr_die1sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die1x.o src/libstrerr/strerr_die1x.lo: src/libstrerr/strerr_die1x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die2sys.o src/libstrerr/strerr_die2sys.lo: src/libstrerr/strerr_die2sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die2x.o src/libstrerr/strerr_die2x.lo: src/libstrerr/strerr_die2x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die3sys.o src/libstrerr/strerr_die3sys.lo: src/libstrerr/strerr_die3sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die3x.o src/libstrerr/strerr_die3x.lo: src/libstrerr/strerr_die3x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die4sys.o src/libstrerr/strerr_die4sys.lo: src/libstrerr/strerr_die4sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die4x.o src/libstrerr/strerr_die4x.lo: src/libstrerr/strerr_die4x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die5sys.o src/libstrerr/strerr_die5sys.lo: src/libstrerr/strerr_die5sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die5x.o src/libstrerr/strerr_die5x.lo: src/libstrerr/strerr_die5x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die6sys.o src/libstrerr/strerr_die6sys.lo: src/libstrerr/strerr_die6sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die6x.o src/libstrerr/strerr_die6x.lo: src/libstrerr/strerr_die6x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die7sys.o src/libstrerr/strerr_die7sys.lo: src/libstrerr/strerr_die7sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die7x.o src/libstrerr/strerr_die7x.lo: src/libstrerr/strerr_die7x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die8sys.o src/libstrerr/strerr_die8sys.lo: src/libstrerr/strerr_die8sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die8x.o src/libstrerr/strerr_die8x.lo: src/libstrerr/strerr_die8x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die9sys.o src/libstrerr/strerr_die9sys.lo: src/libstrerr/strerr_die9sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_die9x.o src/libstrerr/strerr_die9x.lo: src/libstrerr/strerr_die9x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_diel.o src/libstrerr/strerr_diel.lo: src/libstrerr/strerr_diel.c src/include/skalibs/strerr.h -src/libstrerr/strerr_dielsys.o src/libstrerr/strerr_dielsys.lo: src/libstrerr/strerr_dielsys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_diev.o src/libstrerr/strerr_diev.lo: src/libstrerr/strerr_diev.c src/include/skalibs/strerr.h -src/libstrerr/strerr_dievsys.o src/libstrerr/strerr_dievsys.lo: src/libstrerr/strerr_dievsys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn10sys.o src/libstrerr/strerr_warn10sys.lo: src/libstrerr/strerr_warn10sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn10x.o src/libstrerr/strerr_warn10x.lo: src/libstrerr/strerr_warn10x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn11sys.o src/libstrerr/strerr_warn11sys.lo: src/libstrerr/strerr_warn11sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn11x.o src/libstrerr/strerr_warn11x.lo: src/libstrerr/strerr_warn11x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn1sys.o src/libstrerr/strerr_warn1sys.lo: src/libstrerr/strerr_warn1sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn1x.o src/libstrerr/strerr_warn1x.lo: src/libstrerr/strerr_warn1x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn2sys.o src/libstrerr/strerr_warn2sys.lo: src/libstrerr/strerr_warn2sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn2x.o src/libstrerr/strerr_warn2x.lo: src/libstrerr/strerr_warn2x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn3sys.o src/libstrerr/strerr_warn3sys.lo: src/libstrerr/strerr_warn3sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn3x.o src/libstrerr/strerr_warn3x.lo: src/libstrerr/strerr_warn3x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn4sys.o src/libstrerr/strerr_warn4sys.lo: src/libstrerr/strerr_warn4sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn4x.o src/libstrerr/strerr_warn4x.lo: src/libstrerr/strerr_warn4x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn5sys.o src/libstrerr/strerr_warn5sys.lo: src/libstrerr/strerr_warn5sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn5x.o src/libstrerr/strerr_warn5x.lo: src/libstrerr/strerr_warn5x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn6sys.o src/libstrerr/strerr_warn6sys.lo: src/libstrerr/strerr_warn6sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn6x.o src/libstrerr/strerr_warn6x.lo: src/libstrerr/strerr_warn6x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn7sys.o src/libstrerr/strerr_warn7sys.lo: src/libstrerr/strerr_warn7sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn7x.o src/libstrerr/strerr_warn7x.lo: src/libstrerr/strerr_warn7x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn8sys.o src/libstrerr/strerr_warn8sys.lo: src/libstrerr/strerr_warn8sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn8x.o src/libstrerr/strerr_warn8x.lo: src/libstrerr/strerr_warn8x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn9sys.o src/libstrerr/strerr_warn9sys.lo: src/libstrerr/strerr_warn9sys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warn9x.o src/libstrerr/strerr_warn9x.lo: src/libstrerr/strerr_warn9x.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warnl.o src/libstrerr/strerr_warnl.lo: src/libstrerr/strerr_warnl.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warnlsys.o src/libstrerr/strerr_warnlsys.lo: src/libstrerr/strerr_warnlsys.c src/include/skalibs/strerr.h -src/libstrerr/strerr_warnv.o src/libstrerr/strerr_warnv.lo: src/libstrerr/strerr_warnv.c src/include/skalibs/buffer.h src/include/skalibs/strerr.h -src/libstrerr/strerr_warnvsys.o src/libstrerr/strerr_warnvsys.lo: src/libstrerr/strerr_warnvsys.c src/include/skalibs/buffer.h src/include/skalibs/strerr.h src/libunixonacid/access_at.o src/libunixonacid/access_at.lo: src/libunixonacid/access_at.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h src/include/skalibs/unix-transactional.h src/libunixonacid/ancil_recv_fd.o src/libunixonacid/ancil_recv_fd.lo: src/libunixonacid/ancil_recv_fd.c src/include/skalibs/allreadwrite.h src/include/skalibs/ancil.h src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h src/include/skalibs/sysdeps.h src/libunixonacid/ancil_send_fd.o src/libunixonacid/ancil_send_fd.lo: src/libunixonacid/ancil_send_fd.c src/include/skalibs/ancil.h src/include/skalibs/nonposix.h src/include/skalibs/posixishard.h diff --git a/src/include/skalibs/strerr.h b/src/include/skalibs/strerr.h index de205d5..fa4e16d 100644 --- a/src/include/skalibs/strerr.h +++ b/src/include/skalibs/strerr.h @@ -15,354 +15,239 @@ extern void strerr_warnlsys (unsigned int, ...) ; extern void strerr_diel (int, unsigned int, ...) gccattr_noreturn ; extern void strerr_dielsys (int, unsigned int, ...) gccattr_noreturn ; -extern void strerr_warn1x (char const *) ; -extern void strerr_warn2x (char const *, char const *) ; -extern void strerr_warn3x (char const *, char const *, char const *) ; -extern void strerr_warn4x (char const *, char const *, char const *, char const *) ; -extern void strerr_warn5x (char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn6x (char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn7x (char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn8x (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn9x (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn10x (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn11x (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; - -extern void strerr_warn1sys (char const *) ; -extern void strerr_warn2sys (char const *, char const *) ; -extern void strerr_warn3sys (char const *, char const *, char const *) ; -extern void strerr_warn4sys (char const *, char const *, char const *, char const *) ; -extern void strerr_warn5sys (char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn6sys (char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn7sys (char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn8sys (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn9sys (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn10sys (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; -extern void strerr_warn11sys (char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) ; - -extern void strerr_die1x (int, char const *) gccattr_noreturn ; -extern void strerr_die2x (int, char const *, char const *) gccattr_noreturn ; -extern void strerr_die3x (int, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die4x (int, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die5x (int, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die6x (int, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die7x (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die8x (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die9x (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die10x (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die11x (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; - -extern void strerr_die1sys (int, char const *) gccattr_noreturn ; -extern void strerr_die2sys (int, char const *, char const *) gccattr_noreturn ; -extern void strerr_die3sys (int, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die4sys (int, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die5sys (int, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die6sys (int, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die7sys (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die8sys (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die9sys (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die10sys (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; -extern void strerr_die11sys (int, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *, char const *) gccattr_noreturn ; +#define strerr_array(...) ((char const *const[]){__VA_ARGS__}) +#define strerr_warnn(n, ...) strerr_warnv(strerr_array(__VA_ARGS__), (n)) +#define strerr_warnnsys(n, ...) strerr_warnvsys(strerr_array(__VA_ARGS__), (n)) +#define strerr_dien(e, n, ...) strerr_diev(e, strerr_array(__VA_ARGS__), (n)) +#define strerr_diensys(e, n, ...) strerr_dievsys(e, strerr_array(__VA_ARGS__), (n)) + +#define strerr_warn(...) strerr_warnn(sizeof(strerr_array(__VA_ARGS__))/sizeof(char const *), __VA_ARGS__) +#define strerr_warnsys(...) strerr_warnnsys(sizeof(strerr_array(__VA_ARGS__))/sizeof(char const *), __VA_ARGS__) +#define strerr_die(e, ...) strerr_dien(e, sizeof(strerr_array(__VA_ARGS__))/sizeof(char const *), __VA_ARGS__) +#define strerr_diesys(...) strerr_diensys(e, sizeof(strerr_array(__VA_ARGS__))/sizeof(char const *), __VA_ARGS__) extern char const *PROG ; -#define strerr_warnw1x(x1) \ -strerr_warn3x(PROG, ": warning: ", (x1)) -#define strerr_warnw2x(x1, x2) \ -strerr_warn4x(PROG, ": warning: ", (x1), x2) -#define strerr_warnw3x(x1, x2, x3) \ -strerr_warn5x(PROG, ": warning: ", (x1), x2, x3) -#define strerr_warnw4x(x1, x2, x3, x4) \ -strerr_warn6x(PROG, ": warning: ", (x1), x2, x3, x4) -#define strerr_warnw5x(x1, x2, x3, x4, x5) \ -strerr_warn7x(PROG, ": warning: ", (x1), x2, x3, x4, x5) -#define strerr_warnw6x(x1, x2, x3, x4, x5, x6) \ -strerr_warn8x(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6) -#define strerr_warnw7x(x1, x2, x3, x4, x5, x6, x7) \ -strerr_warn9x(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, x7) -#define strerr_warnw8x(x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_warn10x(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, x7, x8) -#define strerr_warnw9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_warn11x(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, x7, x8, x9) - -#define strerr_warnw1sys(x1) \ -strerr_warn3sys(PROG, ": warning: ", (x1)) -#define strerr_warnw2sys(x1, x2) \ -strerr_warn4sys(PROG, ": warning: ", (x1), x2) -#define strerr_warnw3sys(x1, x2, x3) \ -strerr_warn5sys(PROG, ": warning: ", (x1), x2, x3) -#define strerr_warnw4sys(x1, x2, x3, x4) \ -strerr_warn6sys(PROG, ": warning: ", (x1), x2, x3, x4) -#define strerr_warnw5sys(x1, x2, x3, x4, x5) \ -strerr_warn7sys(PROG, ": warning: ", (x1), x2, x3, x4, x5) -#define strerr_warnw6sys(x1, x2, x3, x4, x5, x6) \ -strerr_warn8sys(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6) -#define strerr_warnw7sys(x1, x2, x3, x4, x5, x6, x7) \ -strerr_warn9sys(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, x7) -#define strerr_warnw8sys(x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_warn10sys(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, x7, x8) -#define strerr_warnw9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_warn11sys(PROG, ": warning: ", (x1), x2, x3, x4, x5, x6, x7, x8, x9) - -#define strerr_diew1x(e, x1) \ -strerr_die3x(e, PROG, ": warning: ", x1) -#define strerr_diew2x(e, x1, x2) \ -strerr_die4x(e, PROG, ": warning: ", x1, x2) -#define strerr_diew3x(e, x1, x2, x3) \ -strerr_die5x(e, PROG, ": warning: ", x1, x2, x3) -#define strerr_diew4x(e, x1, x2, x3, x4) \ -strerr_die6x(e, PROG, ": warning: ", x1, x2, x3, x4) -#define strerr_diew5x(e, x1, x2, x3, x4, x5) \ -strerr_die7x(e, PROG, ": warning: ", x1, x2, x3, x4, x5) -#define strerr_diew6x(e, x1, x2, x3, x4, x5, x6) \ -strerr_die8x(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6) -#define strerr_diew7x(e, x1, x2, x3, x4, x5, x6, x7) \ -strerr_die9x(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, x7) -#define strerr_diew8x(e, x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_die10x(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, x7, x8) -#define strerr_diew9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_die11x(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, x7, x8, x9) - -#define strerr_diew1sys(e, x1) \ -strerr_die3sys(e, PROG, ": warning: ", (x1)) -#define strerr_diew2sys(e, x1, x2) \ -strerr_die4sys(e, PROG, ": warning: ", x1, x2) -#define strerr_diew3sys(e, x1, x2, x3) \ -strerr_die5sys(e, PROG, ": warning: ", x1, x2, x3) -#define strerr_diew4sys(e, x1, x2, x3, x4) \ -strerr_die6sys(e, PROG, ": warning: ", x1, x2, x3, x4) -#define strerr_diew5sys(e, x1, x2, x3, x4, x5) \ -strerr_die7sys(e, PROG, ": warning: ", x1, x2, x3, x4, x5) -#define strerr_diew6sys(e, x1, x2, x3, x4, x5, x6) \ -strerr_die8sys(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6) -#define strerr_diew7sys(e, x1, x2, x3, x4, x5, x6, x7) \ -strerr_die9sys(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, x7) -#define strerr_diew8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_die10sys(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, x7, x8) -#define strerr_diew9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_die11sys(e, PROG, ": warning: ", x1, x2, x3, x4, x5, x6, x7, x8, x9) - -#define strerr_dief1x(e, x1) \ -strerr_die3x(e, PROG, ": fatal: ", x1) -#define strerr_dief2x(e, x1, x2) \ -strerr_die4x(e, PROG, ": fatal: ", x1, x2) -#define strerr_dief3x(e, x1, x2, x3) \ -strerr_die5x(e, PROG, ": fatal: ", x1, x2, x3) -#define strerr_dief4x(e, x1, x2, x3, x4) \ -strerr_die6x(e, PROG, ": fatal: ", x1, x2, x3, x4) -#define strerr_dief5x(e, x1, x2, x3, x4, x5) \ -strerr_die7x(e, PROG, ": fatal: ", x1, x2, x3, x4, x5) -#define strerr_dief6x(e, x1, x2, x3, x4, x5, x6) \ -strerr_die8x(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6) -#define strerr_dief7x(e, x1, x2, x3, x4, x5, x6, x7) \ -strerr_die9x(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6, x7) -#define strerr_dief8x(e, x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_die10x(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6, x7, x8) - -#define strerr_dief1sys(e, x1) \ -strerr_die3sys(e, PROG, ": fatal: ", x1) -#define strerr_dief2sys(e, x1, x2) \ -strerr_die4sys(e, PROG, ": fatal: ", x1, x2) -#define strerr_dief3sys(e, x1, x2, x3) \ -strerr_die5sys(e, PROG, ": fatal: ", x1, x2, x3) -#define strerr_dief4sys(e, x1, x2, x3, x4) \ -strerr_die6sys(e, PROG, ": fatal: ", x1, x2, x3, x4) -#define strerr_dief5sys(e, x1, x2, x3, x4, x5) \ -strerr_die7sys(e, PROG, ": fatal: ", x1, x2, x3, x4, x5) -#define strerr_dief6sys(e, x1, x2, x3, x4, x5, x6) \ -strerr_die8sys(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6) -#define strerr_dief7sys(e, x1, x2, x3, x4, x5, x6, x7) \ -strerr_die9sys(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6, x7) -#define strerr_dief8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_die10sys(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6, x7, x8) -#define strerr_dief9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_die11sys(e, PROG, ": fatal: ", x1, x2, x3, x4, x5, x6, x7, x8, x9) - -#define strerr_diefu1x(e, x1) \ -strerr_die4x(e, PROG, ": fatal: ", "unable to ", x1) -#define strerr_diefu2x(e, x1, x2) \ -strerr_die5x(e, PROG, ": fatal: ", "unable to ", x1, x2) -#define strerr_diefu3x(e, x1, x2, x3) \ -strerr_die6x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3) -#define strerr_diefu4x(e, x1, x2, x3, x4) \ -strerr_die7x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4) -#define strerr_diefu5x(e, x1, x2, x3, x4, x5) \ -strerr_die8x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5) -#define strerr_diefu6x(e, x1, x2, x3, x4, x5, x6) \ -strerr_die9x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, x6) -#define strerr_diefu7x(e, x1, x2, x3, x4, x5, x6, x7) \ -strerr_die10x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, x6, x7) -#define strerr_diefu8x(e, x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_die11x(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, x6, x7, x8) - -#define strerr_diefu1sys(e, x1) \ -strerr_die4sys(e, PROG, ": fatal: ", "unable to ", x1) -#define strerr_diefu2sys(e, x1, x2) \ -strerr_die5sys(e, PROG, ": fatal: ", "unable to ", x1, x2) -#define strerr_diefu3sys(e, x1, x2, x3) \ -strerr_die6sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3) -#define strerr_diefu4sys(e, x1, x2, x3, x4) \ -strerr_die7sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4) -#define strerr_diefu5sys(e, x1, x2, x3, x4, x5) \ -strerr_die8sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5) -#define strerr_diefu6sys(e, x1, x2, x3, x4, x5, x6) \ -strerr_die9sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, x6) -#define strerr_diefu7sys(e, x1, x2, x3, x4, x5, x6, x7) \ -strerr_die10sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, x6, x7) -#define strerr_diefu8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_die11sys(e, PROG, ": fatal: ", "unable to ", x1, x2, x3, x4, x5, x6, x7, x8) - -#define strerr_warnwu1x(x1) \ -strerr_warn4x(PROG, ": warning: ", "unable to ", (x1)) -#define strerr_warnwu2x(x1, x2) \ -strerr_warn5x(PROG, ": warning: ", "unable to ", (x1), x2) -#define strerr_warnwu3x(x1, x2, x3) \ -strerr_warn6x(PROG, ": warning: ", "unable to ", (x1), x2, x3) -#define strerr_warnwu4x(x1, x2, x3, x4) \ -strerr_warn7x(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4) -#define strerr_warnwu5x(x1, x2, x3, x4, x5) \ -strerr_warn8x(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5) -#define strerr_warnwu6x(x1, x2, x3, x4, x5, x6) \ -strerr_warn9x(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5, x6) -#define strerr_warnwu7x(x1, x2, x3, x4, x5, x6, x7) \ -strerr_warn10x(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5, x6, x7) - -#define strerr_warnwu1sys(x1) \ -strerr_warn4sys(PROG, ": warning: ", "unable to ", (x1)) -#define strerr_warnwu2sys(x1, x2) \ -strerr_warn5sys(PROG, ": warning: ", "unable to ", (x1), x2) -#define strerr_warnwu3sys(x1, x2, x3) \ -strerr_warn6sys(PROG, ": warning: ", "unable to ", (x1), x2, x3) -#define strerr_warnwu4sys(x1, x2, x3, x4) \ -strerr_warn7sys(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4) -#define strerr_warnwu5sys(x1, x2, x3, x4, x5) \ -strerr_warn8sys(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5) -#define strerr_warnwu6sys(x1, x2, x3, x4, x5, x6) \ -strerr_warn9sys(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5, x6) -#define strerr_warnwu7sys(x1, x2, x3, x4, x5, x6, x7) \ -strerr_warn10sys(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5, x6, x7) -#define strerr_warnwu8sys(x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_warn11sys(PROG, ": warning: ", "unable to ", (x1), x2, x3, x4, x5, x6, x7, x8) - -#define strerr_diewu1x(e, x1) \ -strerr_die4x(e, PROG, ": warning: ", "unable to ", x1) -#define strerr_diewu2x(e, x1, x2) \ -strerr_die5x(e, PROG, ": warning: ", "unable to ", x1, x2) -#define strerr_diewu3x(e, x1, x2, x3) \ -strerr_die6x(e, PROG, ": warning: ", "unable to ", x1, x2, x3) -#define strerr_diewu4x(e, x1, x2, x3, x4) \ -strerr_die7x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4) -#define strerr_diewu5x(e, x1, x2, x3, x4, x5) \ -strerr_die8x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5) -#define strerr_diewu6x(e, x1, x2, x3, x4, x5, x6) \ -strerr_die9x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, x6) -#define strerr_diewu7x(e, x1, x2, x3, x4, x5, x6, x7) \ -strerr_die10x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, x6, x7) -#define strerr_diewu8x(e, x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_die11x(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, x6, x7, x8) - -#define strerr_diewu1sys(e, x1) \ -strerr_die4sys(e, PROG, ": warning: ", "unable to ", (x1)) -#define strerr_diewu2sys(e, x1, x2) \ -strerr_die5sys(e, PROG, ": warning: ", "unable to ", x1, x2) -#define strerr_diewu3sys(e, x1, x2, x3) \ -strerr_die6sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3) -#define strerr_diewu4sys(e, x1, x2, x3, x4) \ -strerr_die7sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4) -#define strerr_diewu5sys(e, x1, x2, x3, x4, x5) \ -strerr_die8sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5) -#define strerr_diewu6sys(e, x1, x2, x3, x4, x5, x6) \ -strerr_die9sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, x6) -#define strerr_diewu7sys(e, x1, x2, x3, x4, x5, x6, x7) \ -strerr_die10sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, x6, x7) -#define strerr_diewu8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_die11sys(e, PROG, ": warning: ", "unable to ", x1, x2, x3, x4, x5, x6, x7, x8) - -#define strerr_dieusage(e, u) \ -strerr_die3x(e, PROG, ": usage: ", u) - -#define strerr_dienotset(e, x) \ -strerr_dief2x(e, (x), " not set") - -#define strerr_dieinvalid(e, x) \ -strerr_dief2x(e, "invalid $", x) - -#define strerr_dieexec(e, x) \ -strerr_diefu2sys(e, "exec ", x) - -#define strerr_warni1x(x1) \ -strerr_warn3x(PROG, ": info: ", (x1)) -#define strerr_warni2x(x1, x2) \ -strerr_warn4x(PROG, ": info: ", (x1), x2) -#define strerr_warni3x(x1, x2, x3) \ -strerr_warn5x(PROG, ": info: ", (x1), x2, x3) -#define strerr_warni4x(x1, x2, x3, x4) \ -strerr_warn6x(PROG, ": info: ", (x1), x2, x3, x4) -#define strerr_warni5x(x1, x2, x3, x4, x5) \ -strerr_warn7x(PROG, ": info: ", (x1), x2, x3, x4, x5) -#define strerr_warni6x(x1, x2, x3, x4, x5, x6) \ -strerr_warn8x(PROG, ": info: ", (x1), x2, x3, x4, x5, x6) -#define strerr_warni7x(x1, x2, x3, x4, x5, x6, x7) \ -strerr_warn9x(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, x7) -#define strerr_warni8x(x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_warn10x(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, x7, x8) -#define strerr_warni9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_warn11x(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, x7, x8, x9) - -#define strerr_warni1sys(x1) \ -strerr_warn3sys(PROG, ": info: ", (x1)) -#define strerr_warni2sys(x1, x2) \ -strerr_warn4sys(PROG, ": info: ", (x1), x2) -#define strerr_warni3sys(x1, x2, x3) \ -strerr_warn5sys(PROG, ": info: ", (x1), x2, x3) -#define strerr_warni4sys(x1, x2, x3, x4) \ -strerr_warn6sys(PROG, ": info: ", (x1), x2, x3, x4) -#define strerr_warni5sys(x1, x2, x3, x4, x5) \ -strerr_warn7sys(PROG, ": info: ", (x1), x2, x3, x4, x5) -#define strerr_warni6sys(x1, x2, x3, x4, x5, x6) \ -strerr_warn8sys(PROG, ": info: ", (x1), x2, x3, x4, x5, x6) -#define strerr_warni7sys(x1, x2, x3, x4, x5, x6, x7) \ -strerr_warn9sys(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, x7) -#define strerr_warni8sys(x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_warn10sys(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, x7, x8) -#define strerr_warni9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_warn11sys(PROG, ": info: ", (x1), x2, x3, x4, x5, x6, x7, x8, x9) - -#define strerr_warnt1x(x1) \ -strerr_warn3x(PROG, ": tracing: ", (x1)) -#define strerr_warnt2x(x1, x2) \ -strerr_warn4x(PROG, ": tracing: ", (x1), x2) -#define strerr_warnt3x(x1, x2, x3) \ -strerr_warn5x(PROG, ": tracing: ", (x1), x2, x3) -#define strerr_warnt4x(x1, x2, x3, x4) \ -strerr_warn6x(PROG, ": tracing: ", (x1), x2, x3, x4) -#define strerr_warnt5x(x1, x2, x3, x4, x5) \ -strerr_warn7x(PROG, ": tracing: ", (x1), x2, x3, x4, x5) -#define strerr_warnt6x(x1, x2, x3, x4, x5, x6) \ -strerr_warn8x(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6) -#define strerr_warnt7x(x1, x2, x3, x4, x5, x6, x7) \ -strerr_warn9x(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, x7) -#define strerr_warnt8x(x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_warn10x(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, x7, x8) -#define strerr_warnt9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_warn11x(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, x7, x8, x9) - -#define strerr_warnt1sys(x1) \ -strerr_warn3sys(PROG, ": tracing: ", (x1)) -#define strerr_warnt2sys(x1, x2) \ -strerr_warn4sys(PROG, ": tracing: ", (x1), x2) -#define strerr_warnt3sys(x1, x2, x3) \ -strerr_warn5sys(PROG, ": tracing: ", (x1), x2, x3) -#define strerr_warnt4sys(x1, x2, x3, x4) \ -strerr_warn6sys(PROG, ": tracing: ", (x1), x2, x3, x4) -#define strerr_warnt5sys(x1, x2, x3, x4, x5) \ -strerr_warn7sys(PROG, ": tracing: ", (x1), x2, x3, x4, x5) -#define strerr_warnt6sys(x1, x2, x3, x4, x5, x6) \ -strerr_warn8sys(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6) -#define strerr_warnt7sys(x1, x2, x3, x4, x5, x6, x7) \ -strerr_warn9sys(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, x7) -#define strerr_warnt8sys(x1, x2, x3, x4, x5, x6, x7, x8) \ -strerr_warn10sys(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, x7, x8) -#define strerr_warnt9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) \ -strerr_warn11sys(PROG, ": tracing: ", (x1), x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warnwn(n, ...) strerr_warnn((n)+2, PROG, ": warning: ", __VA_ARGS__) +#define strerr_warnwnsys(n, ...) strerr_warnnsys((n)+2, PROG, ": warning: ", __VA_ARGS__) +#define strerr_diewn(e, n, ...) strerr_dien(e, (n)+2, PROG, ": warning: ", __VA_ARGS__) +#define strerr_diewnsys(e, n, ...) strerr_diensys(e, (n)+2, PROG, ": warning: ", __VA_ARGS__) +#define strerr_diefn(e, n, ...) strerr_dien(e, (n)+2, PROG, ": fatal: ", __VA_ARGS__) +#define strerr_diefnsys(e, n, ...) strerr_diensys(e, (n)+2, PROG, ": fatal: ", __VA_ARGS__) + +#define strerr_warnw(...) strerr_warn(PROG, ": warning: ", __VA_ARGS__) +#define strerr_warnwsys(...) strerr_warnsys(PROG, ": warning: ", __VA_ARGS__) +#define strerr_diew(e, ...) strerr_die(e, PROG, ": warning: ", __VA_ARGS__) +#define strerr_diewsys(e, ...) strerr_diesys(e, PROG, ": warning: ", __VA_ARGS__) +#define strerr_dief(e, ...) strerr_die(e, PROG, ": fatal: ", __VA_ARGS__) +#define strerr_diefsys(e, ...) strerr_diesys(e, PROG, ": fatal: ", __VA_ARGS__) + +#define strerr_warnwun(n, ...) strerr_warnwn((n)+1, ": unable to ", __VA_ARGS__) +#define strerr_warnwunsys(n, ...) strerr_warnwnsys((n)+1, ": unable to ", __VA_ARGS__) +#define strerr_diewun(e, n, ...) strerr_diewn(e, (n)+1, ": unable to ", __VA_ARGS__) +#define strerr_diewunsys(e, n, ...) strerr_diewnsys(e, (n)+1, ": unable to ", __VA_ARGS__) +#define strerr_diefun(e, n, ...) strerr_diefn(e, (n)+1, ": unable to ", __VA_ARGS__) +#define strerr_diefunsys(e, n, ...) strerr_diefnsys(e, (n)+1, ": unable to ", __VA_ARGS__) + +#define strerr_warnwu(...) strerr_warnw(": unable to ", __VA_ARGS__) +#define strerr_warnwusys(...) strerr_warnwsys(": unable to ", __VA_ARGS__) +#define strerr_diewu(...) strerr_diew(": unable to ", __VA_ARGS__) +#define strerr_diewusys(...) strerr_diewsys(": unable to ", __VA_ARGS__) +#define strerr_diefu(...) strerr_dief(": unable to ", __VA_ARGS__) +#define strerr_diefusys(...) strerr_diefsys(": unable to ", __VA_ARGS__) + +#define strerr_warnin(n, ...) strerr_warnn((n)+2, PROG, ": info: ", __VA_ARGS__) +#define strerr_warninsys(n, ...) strerr_warnnsys((n)+2, PROG, ": info: ", __VA_ARGS__) +#define strerr_warntn(n, ...) strerr_warnn((n)+2, PROG, ": tracing: ", __VA_ARGS__) +#define strerr_warntnsys(n, ...) strerr_warnnsys((n)+2, PROG, ": tracing: ", __VA_ARGS__) + +#define strerr_warni(...) strerr_warn(PROG, ": info: ", __VA_ARGS__) +#define strerr_warnisys(...) strerr_warnsys(PROG, ": info: ", __VA_ARGS__) +#define strerr_warnt(...) strerr_warn(PROG, ": tracing: ", __VA_ARGS__) +#define strerr_warntsys(...) strerr_warnsys(PROG, ": tracing: ", __VA_ARGS__) + +#define strerr_dieusage(e, u) strerr_dien(e, 3, PROG, ": usage: ", u) +#define strerr_dienotset(e, x) strerr_diefn(e, 2, (x), " not set") +#define strerr_dieinvalid(e, x) strerr_diefn(e, 2, "invalid $", x) +#define strerr_dieexec(e, x) strerr_diefunsys(e, 2, "exec ", x) + + +/* compat */ + +#define strerr_warnw1x(x1) strerr_warnwn(1, x1) +#define strerr_warnw2x(x1, x2) strerr_warnwn(2, x1, x2) +#define strerr_warnw3x(x1, x2, x3) strerr_warnwn(3, x1, x2, x3) +#define strerr_warnw4x(x1, x2, x3, x4) strerr_warnwn(4, x1, x2, x3, x4) +#define strerr_warnw5x(x1, x2, x3, x4, x5) strerr_warnwn(5, x1, x2, x3, x4, x5) +#define strerr_warnw6x(x1, x2, x3, x4, x5, x6) strerr_warnwn(6, x1, x2, x3, x4, x5, x6) +#define strerr_warnw7x(x1, x2, x3, x4, x5, x6, x7) strerr_warnwn(7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_warnw8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnwn(8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_warnw9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnwn(9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warnw10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnwn(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_warnw1sys(x1) strerr_warnwnsys(1, x1) +#define strerr_warnw2sys(x1, x2) strerr_warnwnsys(2, x1, x2) +#define strerr_warnw3sys(x1, x2, x3) strerr_warnwnsys(3, x1, x2, x3) +#define strerr_warnw4sys(x1, x2, x3, x4) strerr_warnwnsys(4, x1, x2, x3, x4) +#define strerr_warnw5sys(x1, x2, x3, x4, x5) strerr_warnwnsys(5, x1, x2, x3, x4, x5) +#define strerr_warnw6sys(x1, x2, x3, x4, x5, x6) strerr_warnwnsys(6, x1, x2, x3, x4, x5, x6) +#define strerr_warnw7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warnwnsys(7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_warnw8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnwnsys(8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_warnw9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnwnsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warnw10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnwnsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_diew1x(e, x1) strerr_diewn(e, 1, x1) +#define strerr_diew2x(e, x1, x2) strerr_diewn(e, 2, x1, x2) +#define strerr_diew3x(e, x1, x2, x3) strerr_diewn(e, 3, x1, x2, x3) +#define strerr_diew4x(e, x1, x2, x3, x4) strerr_diewn(e, 4, x1, x2, x3, x4) +#define strerr_diew5x(e, x1, x2, x3, x4, x5) strerr_diewn(e, 5, x1, x2, x3, x4, x5) +#define strerr_diew6x(e, x1, x2, x3, x4, x5, x6) strerr_diewn(e, 6, x1, x2, x3, x4, x5, x6) +#define strerr_diew7x(e, x1, x2, x3, x4, x5, x6, x7) strerr_diewn(e, 7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_diew8x(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diewn(e, 8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_diew9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diewn(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_diew10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diewn(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_diew1sys(e, x1) strerr_diewnsys(e, 1, x1) +#define strerr_diew2sys(e, x1, x2) strerr_diewnsys(e, 2, x1, x2) +#define strerr_diew3sys(e, x1, x2, x3) strerr_diewnsys(e, 3, x1, x2, x3) +#define strerr_diew4sys(e, x1, x2, x3, x4) strerr_diewnsys(e, 4, x1, x2, x3, x4) +#define strerr_diew5sys(e, x1, x2, x3, x4, x5) strerr_diewnsys(e, 5, x1, x2, x3, x4, x5) +#define strerr_diew6sys(e, x1, x2, x3, x4, x5, x6) strerr_diewnsys(e, 6, x1, x2, x3, x4, x5, x6) +#define strerr_diew7sys(e, x1, x2, x3, x4, x5, x6, x7) strerr_diewnsys(e, 7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_diew8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diewnsys(e, 8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_diew9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diewnsys(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_diew10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diewnsys(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_dief1x(e, x1) strerr_diefn(e, 1, x1) +#define strerr_dief2x(e, x1, x2) strerr_diefn(e, 2, x1, x2) +#define strerr_dief3x(e, x1, x2, x3) strerr_diefn(e, 3, x1, x2, x3) +#define strerr_dief4x(e, x1, x2, x3, x4) strerr_diefn(e, 4, x1, x2, x3, x4) +#define strerr_dief5x(e, x1, x2, x3, x4, x5) strerr_diefn(e, 5, x1, x2, x3, x4, x5) +#define strerr_dief6x(e, x1, x2, x3, x4, x5, x6) strerr_diefn(e, 6, x1, x2, x3, x4, x5, x6) +#define strerr_dief7x(e, x1, x2, x3, x4, x5, x6, x7) strerr_diefn(e, 7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_dief8x(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diefn(e, 8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_dief9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diefn(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_dief10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diefn(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_dief1sys(e, x1) strerr_diefnsys(e, 1, x1) +#define strerr_dief2sys(e, x1, x2) strerr_diefnsys(e, 2, x1, x2) +#define strerr_dief3sys(e, x1, x2, x3) strerr_diefnsys(e, 3, x1, x2, x3) +#define strerr_dief4sys(e, x1, x2, x3, x4) strerr_diefnsys(e, 4, x1, x2, x3, x4) +#define strerr_dief5sys(e, x1, x2, x3, x4, x5) strerr_diefnsys(e, 5, x1, x2, x3, x4, x5) +#define strerr_dief6sys(e, x1, x2, x3, x4, x5, x6) strerr_diefnsys(e, 6, x1, x2, x3, x4, x5, x6) +#define strerr_dief7sys(e, x1, x2, x3, x4, x5, x6, x7) strerr_diefnsys(e, 7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_dief8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diefnsys(e, 8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_dief9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diefnsys(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_dief10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diefnsys(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_warnwu1x(x1) strerr_warnwun(1, x1) +#define strerr_warnwu2x(x1, x2) strerr_warnwun(2, x1, x2) +#define strerr_warnwu3x(x1, x2, x3) strerr_warnwun(3, x1, x2, x3) +#define strerr_warnwu4x(x1, x2, x3, x4) strerr_warnwun(4, x1, x2, x3, x4) +#define strerr_warnwu5x(x1, x2, x3, x4, x5) strerr_warnwun(5, x1, x2, x3, x4, x5) +#define strerr_warnwu6x(x1, x2, x3, x4, x5, x6) strerr_warnwun(6, x1, x2, x3, x4, x5, x6) +#define strerr_warnwu7x(x1, x2, x3, x4, x5, x6, x7) strerr_warnwun(7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_warnwu8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnwun(8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_warnwu9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnwun(9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warnwu10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnwun(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_warnwu1sys(x1) strerr_warnwunsys(1, x1) +#define strerr_warnwu2sys(x1, x2) strerr_warnwunsys(2, x1, x2) +#define strerr_warnwu3sys(x1, x2, x3) strerr_warnwunsys(3, x1, x2, x3) +#define strerr_warnwu4sys(x1, x2, x3, x4) strerr_warnwunsys(4, x1, x2, x3, x4) +#define strerr_warnwu5sys(x1, x2, x3, x4, x5) strerr_warnwunsys(5, x1, x2, x3, x4, x5) +#define strerr_warnwu6sys(x1, x2, x3, x4, x5, x6) strerr_warnwunsys(6, x1, x2, x3, x4, x5, x6) +#define strerr_warnwu7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warnwunsys(7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_warnwu8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnwunsys(8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_warnwu9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnwunsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warnwu10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnwunsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_diewu1x(e, x1) strerr_diewun(e, 1, x1) +#define strerr_diewu2x(e, x1, x2) strerr_diewun(e, 2, x1, x2) +#define strerr_diewu3x(e, x1, x2, x3) strerr_diewun(e, 3, x1, x2, x3) +#define strerr_diewu4x(e, x1, x2, x3, x4) strerr_diewun(e, 4, x1, x2, x3, x4) +#define strerr_diewu5x(e, x1, x2, x3, x4, x5) strerr_diewun(e, 5, x1, x2, x3, x4, x5) +#define strerr_diewu6x(e, x1, x2, x3, x4, x5, x6) strerr_diewun(e, 6, x1, x2, x3, x4, x5, x6) +#define strerr_diewu7x(e, x1, x2, x3, x4, x5, x6, x7) strerr_diewun(e, 7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_diewu8x(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diewun(e, 8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_diewu9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diewun(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_diewu10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diewun(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_diewu1sys(e, x1) strerr_diewunsys(e, 1, x1) +#define strerr_diewu2sys(e, x1, x2) strerr_diewunsys(e, 2, x1, x2) +#define strerr_diewu3sys(e, x1, x2, x3) strerr_diewunsys(e, 3, x1, x2, x3) +#define strerr_diewu4sys(e, x1, x2, x3, x4) strerr_diewunsys(e, 4, x1, x2, x3, x4) +#define strerr_diewu5sys(e, x1, x2, x3, x4, x5) strerr_diewunsys(e, 5, x1, x2, x3, x4, x5) +#define strerr_diewu6sys(e, x1, x2, x3, x4, x5, x6) strerr_diewunsys(e, 6, x1, x2, x3, x4, x5, x6) +#define strerr_diewu7sys(e, x1, x2, x3, x4, x5, x6, x7) strerr_diewunsys(e, 7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_diewu8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diewunsys(e, 8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_diewu9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diewunsys(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_diewu10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diewunsys(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_diefu1x(e, x1) strerr_diefun(e, 1, x1) +#define strerr_diefu2x(e, x1, x2) strerr_diefun(e, 2, x1, x2) +#define strerr_diefu3x(e, x1, x2, x3) strerr_diefun(e, 3, x1, x2, x3) +#define strerr_diefu4x(e, x1, x2, x3, x4) strerr_diefun(e, 4, x1, x2, x3, x4) +#define strerr_diefu5x(e, x1, x2, x3, x4, x5) strerr_diefun(e, 5, x1, x2, x3, x4, x5) +#define strerr_diefu6x(e, x1, x2, x3, x4, x5, x6) strerr_diefun(e, 6, x1, x2, x3, x4, x5, x6) +#define strerr_diefu7x(e, x1, x2, x3, x4, x5, x6, x7) strerr_diefun(e, 7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_diefu8x(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diefun(e, 8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_diefu9x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diefun(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_diefu10x(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diefun(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_diefu1sys(e, x1) strerr_diefunsys(e, 1, x1) +#define strerr_diefu2sys(e, x1, x2) strerr_diefunsys(e, 2, x1, x2) +#define strerr_diefu3sys(e, x1, x2, x3) strerr_diefunsys(e, 3, x1, x2, x3) +#define strerr_diefu4sys(e, x1, x2, x3, x4) strerr_diefunsys(e, 4, x1, x2, x3, x4) +#define strerr_diefu5sys(e, x1, x2, x3, x4, x5) strerr_diefunsys(e, 5, x1, x2, x3, x4, x5) +#define strerr_diefu6sys(e, x1, x2, x3, x4, x5, x6) strerr_diefunsys(e, 6, x1, x2, x3, x4, x5, x6) +#define strerr_diefu7sys(e, x1, x2, x3, x4, x5, x6, x7) strerr_diefunsys(e, 7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_diefu8sys(e, x1, x2, x3, x4, x5, x6, x7, x8) strerr_diefunsys(e, 8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_diefu9sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_diefunsys(e, 9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_diefu10sys(e, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_diefunsys(e, 10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_warni1x(x1) strerr_warnin(1, x1) +#define strerr_warni2x(x1, x2) strerr_warnin(2, x1, x2) +#define strerr_warni3x(x1, x2, x3) strerr_warnin(3, x1, x2, x3) +#define strerr_warni4x(x1, x2, x3, x4) strerr_warnin(4, x1, x2, x3, x4) +#define strerr_warni5x(x1, x2, x3, x4, x5) strerr_warnin(5, x1, x2, x3, x4, x5) +#define strerr_warni6x(x1, x2, x3, x4, x5, x6) strerr_warnin(6, x1, x2, x3, x4, x5, x6) +#define strerr_warni7x(x1, x2, x3, x4, x5, x6, x7) strerr_warnin(7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_warni8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warnin(8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_warni9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warnin(9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warni10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warnin(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_warni1sys(x1) strerr_warninsys(1, x1) +#define strerr_warni2sys(x1, x2) strerr_warninsys(2, x1, x2) +#define strerr_warni3sys(x1, x2, x3) strerr_warninsys(3, x1, x2, x3) +#define strerr_warni4sys(x1, x2, x3, x4) strerr_warninsys(4, x1, x2, x3, x4) +#define strerr_warni5sys(x1, x2, x3, x4, x5) strerr_warninsys(5, x1, x2, x3, x4, x5) +#define strerr_warni6sys(x1, x2, x3, x4, x5, x6) strerr_warninsys(6, x1, x2, x3, x4, x5, x6) +#define strerr_warni7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warninsys(7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_warni8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warninsys(8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_warni9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warninsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warni10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warninsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_warnt1x(x1) strerr_warntn(1, x1) +#define strerr_warnt2x(x1, x2) strerr_warntn(2, x1, x2) +#define strerr_warnt3x(x1, x2, x3) strerr_warntn(3, x1, x2, x3) +#define strerr_warnt4x(x1, x2, x3, x4) strerr_warntn(4, x1, x2, x3, x4) +#define strerr_warnt5x(x1, x2, x3, x4, x5) strerr_warntn(5, x1, x2, x3, x4, x5) +#define strerr_warnt6x(x1, x2, x3, x4, x5, x6) strerr_warntn(6, x1, x2, x3, x4, x5, x6) +#define strerr_warnt7x(x1, x2, x3, x4, x5, x6, x7) strerr_warntn(7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_warnt8x(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warntn(8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_warnt9x(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warntn(9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warnt10x(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warntn(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) + +#define strerr_warnt1sys(x1) strerr_warntnsys(1, x1) +#define strerr_warnt2sys(x1, x2) strerr_warntnsys(2, x1, x2) +#define strerr_warnt3sys(x1, x2, x3) strerr_warntnsys(3, x1, x2, x3) +#define strerr_warnt4sys(x1, x2, x3, x4) strerr_warntnsys(4, x1, x2, x3, x4) +#define strerr_warnt5sys(x1, x2, x3, x4, x5) strerr_warntnsys(5, x1, x2, x3, x4, x5) +#define strerr_warnt6sys(x1, x2, x3, x4, x5, x6) strerr_warntnsys(6, x1, x2, x3, x4, x5, x6) +#define strerr_warnt7sys(x1, x2, x3, x4, x5, x6, x7) strerr_warntnsys(7, x1, x2, x3, x4, x5, x6, x7) +#define strerr_warnt8sys(x1, x2, x3, x4, x5, x6, x7, x8) strerr_warntnsys(8, x1, x2, x3, x4, x5, x6, x7, x8) +#define strerr_warnt9sys(x1, x2, x3, x4, x5, x6, x7, x8, x9) strerr_warntnsys(9, x1, x2, x3, x4, x5, x6, x7, x8, x9) +#define strerr_warnt10sys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) strerr_warntnsys(10, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) #endif diff --git a/src/libstddjb/strerr_diel.c b/src/libstddjb/strerr_diel.c new file mode 100644 index 0000000..d142402 --- /dev/null +++ b/src/libstddjb/strerr_diel.c @@ -0,0 +1,24 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include +#include + +#include + +void strerr_diel (int e, unsigned int n, ...) +{ + if (n) + { + va_list ap ; + char const *v[n] ; + va_start(ap, n) ; + va_arg(ap, unsigned int) ; + for (unsigned int i = 0 ; i < n ; i++) + v[i++] = va_arg(ap, char const *) ; + va_end(ap) ; + strerr_warnv(v, n) ; + } + _exit(e) ; +} diff --git a/src/libstddjb/strerr_dielsys.c b/src/libstddjb/strerr_dielsys.c new file mode 100644 index 0000000..5c0e334 --- /dev/null +++ b/src/libstddjb/strerr_dielsys.c @@ -0,0 +1,23 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include +#include +#include +#include + +#include + +void strerr_dielsys (int e, unsigned int n, ...) +{ + va_list ap ; + char const *v[n+1] ; + va_start(ap, n) ; + va_arg(ap, unsigned int) ; + for (unsigned int i = 0 ; i < n ; i++) + v[i++] = va_arg(ap, char const *) ; + va_end(ap) ; + v[n] = strerror(errno) ; + strerr_diev(e, v, n+1) ; +} diff --git a/src/libstddjb/strerr_diev.c b/src/libstddjb/strerr_diev.c new file mode 100644 index 0000000..bf1e8fc --- /dev/null +++ b/src/libstddjb/strerr_diev.c @@ -0,0 +1,13 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include + +#include + +void strerr_diev (int e, char const *const *v, unsigned int n) +{ + strerr_warnv(v, n) ; + _exit(e) ; +} diff --git a/src/libstddjb/strerr_dievsys.c b/src/libstddjb/strerr_dievsys.c new file mode 100644 index 0000000..10437f9 --- /dev/null +++ b/src/libstddjb/strerr_dievsys.c @@ -0,0 +1,13 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include + +#include + +void strerr_dievsys (int e, char const *const *v, unsigned int n) +{ + strerr_warnvsys(v, n) ; + _exit(e) ; +} diff --git a/src/libstddjb/strerr_warnl.c b/src/libstddjb/strerr_warnl.c new file mode 100644 index 0000000..17c370d --- /dev/null +++ b/src/libstddjb/strerr_warnl.c @@ -0,0 +1,22 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include + +#include + +void strerr_warnl (unsigned int n, ...) +{ + if (n) + { + va_list ap ; + char const *v[n] ; + va_start(ap, n) ; + va_arg(ap, unsigned int) ; + for (unsigned int i = 0 ; i < n ; i++) + v[i++] = va_arg(ap, char const *) ; + va_end(ap) ; + strerr_warnv(v, n) ; + } +} diff --git a/src/libstddjb/strerr_warnlsys.c b/src/libstddjb/strerr_warnlsys.c new file mode 100644 index 0000000..fbd7a6b --- /dev/null +++ b/src/libstddjb/strerr_warnlsys.c @@ -0,0 +1,22 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include +#include +#include + +#include + +void strerr_warnlsys (unsigned int n, ...) +{ + va_list ap ; + char const *v[n+1] ; + va_start(ap, n) ; + va_arg(ap, unsigned int) ; + for (unsigned int i = 0 ; i < n ; i++) + v[i++] = va_arg(ap, char const *) ; + va_end(ap) ; + v[n] = strerror(errno) ; + strerr_warnv(v, n+1) ; +} diff --git a/src/libstddjb/strerr_warnv.c b/src/libstddjb/strerr_warnv.c new file mode 100644 index 0000000..f59cfe9 --- /dev/null +++ b/src/libstddjb/strerr_warnv.c @@ -0,0 +1,17 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include + +#include +#include + +void strerr_warnv (char const *const *v, unsigned int n) +{ + int e = errno ; + for (unsigned int i = 0 ; i < n ; i++) + if (v[i]) buffer_puts(buffer_2, v[i]) ; + buffer_putflush(buffer_2, "\n", 1) ; + errno = e ; +} diff --git a/src/libstddjb/strerr_warnvsys.c b/src/libstddjb/strerr_warnvsys.c new file mode 100644 index 0000000..fcab1b8 --- /dev/null +++ b/src/libstddjb/strerr_warnvsys.c @@ -0,0 +1,20 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include +#include + +#include +#include + +void strerr_warnvsys (char const *const *v, unsigned int n) +{ + int e = errno ; + for (unsigned int i = 0 ; i < n ; i++) + if (v[i]) buffer_puts(buffer_2, v[i]) ; + buffer_put(buffer_2, ": ", 2) ; + buffer_puts(buffer_2, strerror(e)) ; + buffer_putflush(buffer_2, "\n", 1) ; + errno = e ; +} diff --git a/src/libstrerr/strerr_die10sys.c b/src/libstrerr/strerr_die10sys.c deleted file mode 100644 index a4801dd..0000000 --- a/src/libstrerr/strerr_die10sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die10sys (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10) -{ - char const *v[10] = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 } ; - strerr_dievsys(e, v, 10) ; -} diff --git a/src/libstrerr/strerr_die10x.c b/src/libstrerr/strerr_die10x.c deleted file mode 100644 index 6999dfe..0000000 --- a/src/libstrerr/strerr_die10x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die10x (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10) -{ - char const *v[10] = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 } ; - strerr_diev(e, v, 10) ; -} diff --git a/src/libstrerr/strerr_die11sys.c b/src/libstrerr/strerr_die11sys.c deleted file mode 100644 index 71da57d..0000000 --- a/src/libstrerr/strerr_die11sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die11sys (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10, char const *x11) -{ - char const *v[11] = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11 } ; - strerr_dievsys(e, v, 11) ; -} diff --git a/src/libstrerr/strerr_die11x.c b/src/libstrerr/strerr_die11x.c deleted file mode 100644 index a18e0fa..0000000 --- a/src/libstrerr/strerr_die11x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die11x (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10, char const *x11) -{ - char const *v[11] = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11 } ; - strerr_diev(e, v, 11) ; -} diff --git a/src/libstrerr/strerr_die1sys.c b/src/libstrerr/strerr_die1sys.c deleted file mode 100644 index 1ec5ea1..0000000 --- a/src/libstrerr/strerr_die1sys.c +++ /dev/null @@ -1,10 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die1sys (int e, char const *x1) -{ - strerr_dievsys(e, &x1, 1) ; -} diff --git a/src/libstrerr/strerr_die1x.c b/src/libstrerr/strerr_die1x.c deleted file mode 100644 index b56dd53..0000000 --- a/src/libstrerr/strerr_die1x.c +++ /dev/null @@ -1,10 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die1x (int e, char const *x1) -{ - strerr_diev(e, &x1, 1) ; -} diff --git a/src/libstrerr/strerr_die2sys.c b/src/libstrerr/strerr_die2sys.c deleted file mode 100644 index ffe25af..0000000 --- a/src/libstrerr/strerr_die2sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die2sys (int e, char const *x1, char const *x2) -{ - char const *v[2] = { x1, x2 } ; - strerr_dievsys(e, v, 2) ; -} diff --git a/src/libstrerr/strerr_die2x.c b/src/libstrerr/strerr_die2x.c deleted file mode 100644 index 8113818..0000000 --- a/src/libstrerr/strerr_die2x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die2x (int e, char const *x1, char const *x2) -{ - char const *v[2] = { x1, x2 } ; - strerr_diev(e, v, 2) ; -} diff --git a/src/libstrerr/strerr_die3sys.c b/src/libstrerr/strerr_die3sys.c deleted file mode 100644 index 17bae5c..0000000 --- a/src/libstrerr/strerr_die3sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die3sys (int e, char const *x1, char const *x2, char const *x3) -{ - char const *v[3] = { x1, x2, x3 } ; - strerr_dievsys(e, v, 3) ; -} diff --git a/src/libstrerr/strerr_die3x.c b/src/libstrerr/strerr_die3x.c deleted file mode 100644 index 25f5612..0000000 --- a/src/libstrerr/strerr_die3x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die3x (int e, char const *x1, char const *x2, char const *x3) -{ - char const *v[3] = { x1, x2, x3 } ; - strerr_diev(e, v, 3) ; -} diff --git a/src/libstrerr/strerr_die4sys.c b/src/libstrerr/strerr_die4sys.c deleted file mode 100644 index 0f5a3de..0000000 --- a/src/libstrerr/strerr_die4sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die4sys (int e, char const *x1, char const *x2, char const *x3, char const *x4) -{ - char const *v[4] = { x1, x2, x3, x4 } ; - strerr_dievsys(e, v, 4) ; -} diff --git a/src/libstrerr/strerr_die4x.c b/src/libstrerr/strerr_die4x.c deleted file mode 100644 index bd330a3..0000000 --- a/src/libstrerr/strerr_die4x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die4x (int e, char const *x1, char const *x2, char const *x3, char const *x4) -{ - char const *v[4] = { x1, x2, x3, x4 } ; - strerr_diev(e, v, 4) ; -} diff --git a/src/libstrerr/strerr_die5sys.c b/src/libstrerr/strerr_die5sys.c deleted file mode 100644 index a4635ba..0000000 --- a/src/libstrerr/strerr_die5sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die5sys (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5) -{ - char const *v[5] = { x1, x2, x3, x4, x5 } ; - strerr_dievsys(e, v, 5) ; -} diff --git a/src/libstrerr/strerr_die5x.c b/src/libstrerr/strerr_die5x.c deleted file mode 100644 index 30055d7..0000000 --- a/src/libstrerr/strerr_die5x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die5x (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5) -{ - char const *v[5] = { x1, x2, x3, x4, x5 } ; - strerr_diev(e, v, 5) ; -} diff --git a/src/libstrerr/strerr_die6sys.c b/src/libstrerr/strerr_die6sys.c deleted file mode 100644 index bf5ab7d..0000000 --- a/src/libstrerr/strerr_die6sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die6sys (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6) -{ - char const *v[6] = { x1, x2, x3, x4, x5, x6 } ; - strerr_dievsys(e, v, 6) ; -} diff --git a/src/libstrerr/strerr_die6x.c b/src/libstrerr/strerr_die6x.c deleted file mode 100644 index 294d236..0000000 --- a/src/libstrerr/strerr_die6x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die6x (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6) -{ - char const *v[6] = { x1, x2, x3, x4, x5, x6 } ; - strerr_diev(e, v, 6) ; -} diff --git a/src/libstrerr/strerr_die7sys.c b/src/libstrerr/strerr_die7sys.c deleted file mode 100644 index 27c305e..0000000 --- a/src/libstrerr/strerr_die7sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die7sys (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7) -{ - char const *v[7] = { x1, x2, x3, x4, x5, x6, x7 } ; - strerr_dievsys(e, v, 7) ; -} diff --git a/src/libstrerr/strerr_die7x.c b/src/libstrerr/strerr_die7x.c deleted file mode 100644 index e367313..0000000 --- a/src/libstrerr/strerr_die7x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die7x (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7) -{ - char const *v[7] = { x1, x2, x3, x4, x5, x6, x7 } ; - strerr_diev(e, v, 7) ; -} diff --git a/src/libstrerr/strerr_die8sys.c b/src/libstrerr/strerr_die8sys.c deleted file mode 100644 index 2d7971f..0000000 --- a/src/libstrerr/strerr_die8sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die8sys (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8) -{ - char const *v[8] = { x1, x2, x3, x4, x5, x6, x7, x8 } ; - strerr_dievsys(e, v, 8) ; -} diff --git a/src/libstrerr/strerr_die8x.c b/src/libstrerr/strerr_die8x.c deleted file mode 100644 index bf49c5b..0000000 --- a/src/libstrerr/strerr_die8x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die8x (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8) -{ - char const *v[8] = { x1, x2, x3, x4, x5, x6, x7, x8 } ; - strerr_diev(e, v, 8) ; -} diff --git a/src/libstrerr/strerr_die9sys.c b/src/libstrerr/strerr_die9sys.c deleted file mode 100644 index 9dd745f..0000000 --- a/src/libstrerr/strerr_die9sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die9sys (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9) -{ - char const *v[9] = { x1, x2, x3, x4, x5, x6, x7, x8, x9 } ; - strerr_dievsys(e, v, 9) ; -} diff --git a/src/libstrerr/strerr_die9x.c b/src/libstrerr/strerr_die9x.c deleted file mode 100644 index 669723e..0000000 --- a/src/libstrerr/strerr_die9x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_die9x (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9) -{ - char const *v[9] = { x1, x2, x3, x4, x5, x6, x7, x8, x9 } ; - strerr_diev(e, v, 9) ; -} diff --git a/src/libstrerr/strerr_diel.c b/src/libstrerr/strerr_diel.c deleted file mode 100644 index d142402..0000000 --- a/src/libstrerr/strerr_diel.c +++ /dev/null @@ -1,24 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include - -#include - -void strerr_diel (int e, unsigned int n, ...) -{ - if (n) - { - va_list ap ; - char const *v[n] ; - va_start(ap, n) ; - va_arg(ap, unsigned int) ; - for (unsigned int i = 0 ; i < n ; i++) - v[i++] = va_arg(ap, char const *) ; - va_end(ap) ; - strerr_warnv(v, n) ; - } - _exit(e) ; -} diff --git a/src/libstrerr/strerr_dielsys.c b/src/libstrerr/strerr_dielsys.c deleted file mode 100644 index 5c0e334..0000000 --- a/src/libstrerr/strerr_dielsys.c +++ /dev/null @@ -1,23 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include -#include -#include - -#include - -void strerr_dielsys (int e, unsigned int n, ...) -{ - va_list ap ; - char const *v[n+1] ; - va_start(ap, n) ; - va_arg(ap, unsigned int) ; - for (unsigned int i = 0 ; i < n ; i++) - v[i++] = va_arg(ap, char const *) ; - va_end(ap) ; - v[n] = strerror(errno) ; - strerr_diev(e, v, n+1) ; -} diff --git a/src/libstrerr/strerr_diev.c b/src/libstrerr/strerr_diev.c deleted file mode 100644 index bf1e8fc..0000000 --- a/src/libstrerr/strerr_diev.c +++ /dev/null @@ -1,13 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -#include - -void strerr_diev (int e, char const *const *v, unsigned int n) -{ - strerr_warnv(v, n) ; - _exit(e) ; -} diff --git a/src/libstrerr/strerr_dievsys.c b/src/libstrerr/strerr_dievsys.c deleted file mode 100644 index 10437f9..0000000 --- a/src/libstrerr/strerr_dievsys.c +++ /dev/null @@ -1,13 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -#include - -void strerr_dievsys (int e, char const *const *v, unsigned int n) -{ - strerr_warnvsys(v, n) ; - _exit(e) ; -} diff --git a/src/libstrerr/strerr_warn10sys.c b/src/libstrerr/strerr_warn10sys.c deleted file mode 100644 index f9a448e..0000000 --- a/src/libstrerr/strerr_warn10sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn10sys (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10) -{ - char const *v[10] = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 } ; - strerr_warnvsys(v, 10) ; -} diff --git a/src/libstrerr/strerr_warn10x.c b/src/libstrerr/strerr_warn10x.c deleted file mode 100644 index 4139f63..0000000 --- a/src/libstrerr/strerr_warn10x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn10x (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10) -{ - char const *v[10] = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 } ; - strerr_warnv(v, 10) ; -} diff --git a/src/libstrerr/strerr_warn11sys.c b/src/libstrerr/strerr_warn11sys.c deleted file mode 100644 index 588df28..0000000 --- a/src/libstrerr/strerr_warn11sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn11sys (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10, char const *x11) -{ - char const *v[11] = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11 } ; - strerr_warnvsys(v, 11) ; -} diff --git a/src/libstrerr/strerr_warn11x.c b/src/libstrerr/strerr_warn11x.c deleted file mode 100644 index 9b4ba90..0000000 --- a/src/libstrerr/strerr_warn11x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn11x (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10, char const *x11) -{ - char const *v[11] = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11 } ; - strerr_warnv(v, 11) ; -} diff --git a/src/libstrerr/strerr_warn1sys.c b/src/libstrerr/strerr_warn1sys.c deleted file mode 100644 index 211bfb4..0000000 --- a/src/libstrerr/strerr_warn1sys.c +++ /dev/null @@ -1,10 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn1sys (char const *x1) -{ - strerr_warnvsys(&x1, 1) ; -} diff --git a/src/libstrerr/strerr_warn1x.c b/src/libstrerr/strerr_warn1x.c deleted file mode 100644 index dd54048..0000000 --- a/src/libstrerr/strerr_warn1x.c +++ /dev/null @@ -1,10 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn1x (char const *x1) -{ - strerr_warnv(&x1, 1) ; -} diff --git a/src/libstrerr/strerr_warn2sys.c b/src/libstrerr/strerr_warn2sys.c deleted file mode 100644 index 0efb546..0000000 --- a/src/libstrerr/strerr_warn2sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn2sys (char const *x1, char const *x2) -{ - char const *v[2] = { x1, x2 } ; - strerr_warnvsys(v, 2) ; -} diff --git a/src/libstrerr/strerr_warn2x.c b/src/libstrerr/strerr_warn2x.c deleted file mode 100644 index 936c876..0000000 --- a/src/libstrerr/strerr_warn2x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn2x (char const *x1, char const *x2) -{ - char const *v[2] = { x1, x2 } ; - strerr_warnv(v, 2) ; -} diff --git a/src/libstrerr/strerr_warn3sys.c b/src/libstrerr/strerr_warn3sys.c deleted file mode 100644 index b011f2d..0000000 --- a/src/libstrerr/strerr_warn3sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn3sys (char const *x1, char const *x2, char const *x3) -{ - char const *v[3] = { x1, x2, x3 } ; - strerr_warnvsys(v, 3) ; -} diff --git a/src/libstrerr/strerr_warn3x.c b/src/libstrerr/strerr_warn3x.c deleted file mode 100644 index f9b95d7..0000000 --- a/src/libstrerr/strerr_warn3x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn3x (char const *x1, char const *x2, char const *x3) -{ - char const *v[3] = { x1, x2, x3 } ; - strerr_warnv(v, 3) ; -} diff --git a/src/libstrerr/strerr_warn4sys.c b/src/libstrerr/strerr_warn4sys.c deleted file mode 100644 index 2172363..0000000 --- a/src/libstrerr/strerr_warn4sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn4sys (char const *x1, char const *x2, char const *x3, char const *x4) -{ - char const *v[4] = { x1, x2, x3, x4 } ; - strerr_warnvsys(v, 4) ; -} diff --git a/src/libstrerr/strerr_warn4x.c b/src/libstrerr/strerr_warn4x.c deleted file mode 100644 index 20d8b28..0000000 --- a/src/libstrerr/strerr_warn4x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn4x (char const *x1, char const *x2, char const *x3, char const *x4) -{ - char const *v[4] = { x1, x2, x3, x4 } ; - strerr_warnv(v, 4) ; -} diff --git a/src/libstrerr/strerr_warn5sys.c b/src/libstrerr/strerr_warn5sys.c deleted file mode 100644 index 722d4b7..0000000 --- a/src/libstrerr/strerr_warn5sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn5sys (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5) -{ - char const *v[5] = { x1, x2, x3, x4, x5 } ; - strerr_warnvsys(v, 5) ; -} diff --git a/src/libstrerr/strerr_warn5x.c b/src/libstrerr/strerr_warn5x.c deleted file mode 100644 index 79d5402..0000000 --- a/src/libstrerr/strerr_warn5x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn5x (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5) -{ - char const *v[5] = { x1, x2, x3, x4, x5 } ; - strerr_warnv(v, 5) ; -} diff --git a/src/libstrerr/strerr_warn6sys.c b/src/libstrerr/strerr_warn6sys.c deleted file mode 100644 index 4150646..0000000 --- a/src/libstrerr/strerr_warn6sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn6sys (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6) -{ - char const *v[6] = { x1, x2, x3, x4, x5, x6 } ; - strerr_warnvsys(v, 6) ; -} diff --git a/src/libstrerr/strerr_warn6x.c b/src/libstrerr/strerr_warn6x.c deleted file mode 100644 index 5d94d9e..0000000 --- a/src/libstrerr/strerr_warn6x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn6x (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6) -{ - char const *v[6] = { x1, x2, x3, x4, x5, x6 } ; - strerr_warnv(v, 6) ; -} diff --git a/src/libstrerr/strerr_warn7sys.c b/src/libstrerr/strerr_warn7sys.c deleted file mode 100644 index e9da56b..0000000 --- a/src/libstrerr/strerr_warn7sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn7sys (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7) -{ - char const *v[7] = { x1, x2, x3, x4, x5, x6, x7 } ; - strerr_warnvsys(v, 7) ; -} diff --git a/src/libstrerr/strerr_warn7x.c b/src/libstrerr/strerr_warn7x.c deleted file mode 100644 index 39c374b..0000000 --- a/src/libstrerr/strerr_warn7x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn7x (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7) -{ - char const *v[7] = { x1, x2, x3, x4, x5, x6, x7 } ; - strerr_warnv(v, 7) ; -} diff --git a/src/libstrerr/strerr_warn8sys.c b/src/libstrerr/strerr_warn8sys.c deleted file mode 100644 index 33ce86c..0000000 --- a/src/libstrerr/strerr_warn8sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn8sys (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8) -{ - char const *v[8] = { x1, x2, x3, x4, x5, x6, x7, x8 } ; - strerr_warnvsys(v, 8) ; -} diff --git a/src/libstrerr/strerr_warn8x.c b/src/libstrerr/strerr_warn8x.c deleted file mode 100644 index f4519cd..0000000 --- a/src/libstrerr/strerr_warn8x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn8x (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8) -{ - char const *v[8] = { x1, x2, x3, x4, x5, x6, x7, x8 } ; - strerr_warnv(v, 8) ; -} diff --git a/src/libstrerr/strerr_warn9sys.c b/src/libstrerr/strerr_warn9sys.c deleted file mode 100644 index a5920eb..0000000 --- a/src/libstrerr/strerr_warn9sys.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn9sys (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9) -{ - char const *v[9] = { x1, x2, x3, x4, x5, x6, x7, x8, x9 } ; - strerr_warnvsys(v, 9) ; -} diff --git a/src/libstrerr/strerr_warn9x.c b/src/libstrerr/strerr_warn9x.c deleted file mode 100644 index 956bd4e..0000000 --- a/src/libstrerr/strerr_warn9x.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -void strerr_warn9x (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9) -{ - char const *v[9] = { x1, x2, x3, x4, x5, x6, x7, x8, x9 } ; - strerr_warnv(v, 9) ; -} diff --git a/src/libstrerr/strerr_warnl.c b/src/libstrerr/strerr_warnl.c deleted file mode 100644 index 17c370d..0000000 --- a/src/libstrerr/strerr_warnl.c +++ /dev/null @@ -1,22 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -#include - -void strerr_warnl (unsigned int n, ...) -{ - if (n) - { - va_list ap ; - char const *v[n] ; - va_start(ap, n) ; - va_arg(ap, unsigned int) ; - for (unsigned int i = 0 ; i < n ; i++) - v[i++] = va_arg(ap, char const *) ; - va_end(ap) ; - strerr_warnv(v, n) ; - } -} diff --git a/src/libstrerr/strerr_warnlsys.c b/src/libstrerr/strerr_warnlsys.c deleted file mode 100644 index fbd7a6b..0000000 --- a/src/libstrerr/strerr_warnlsys.c +++ /dev/null @@ -1,22 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include -#include - -#include - -void strerr_warnlsys (unsigned int n, ...) -{ - va_list ap ; - char const *v[n+1] ; - va_start(ap, n) ; - va_arg(ap, unsigned int) ; - for (unsigned int i = 0 ; i < n ; i++) - v[i++] = va_arg(ap, char const *) ; - va_end(ap) ; - v[n] = strerror(errno) ; - strerr_warnv(v, n+1) ; -} diff --git a/src/libstrerr/strerr_warnv.c b/src/libstrerr/strerr_warnv.c deleted file mode 100644 index f59cfe9..0000000 --- a/src/libstrerr/strerr_warnv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include - -#include -#include - -void strerr_warnv (char const *const *v, unsigned int n) -{ - int e = errno ; - for (unsigned int i = 0 ; i < n ; i++) - if (v[i]) buffer_puts(buffer_2, v[i]) ; - buffer_putflush(buffer_2, "\n", 1) ; - errno = e ; -} diff --git a/src/libstrerr/strerr_warnvsys.c b/src/libstrerr/strerr_warnvsys.c deleted file mode 100644 index fcab1b8..0000000 --- a/src/libstrerr/strerr_warnvsys.c +++ /dev/null @@ -1,20 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include - -#include -#include - -void strerr_warnvsys (char const *const *v, unsigned int n) -{ - int e = errno ; - for (unsigned int i = 0 ; i < n ; i++) - if (v[i]) buffer_puts(buffer_2, v[i]) ; - buffer_put(buffer_2, ": ", 2) ; - buffer_puts(buffer_2, strerror(e)) ; - buffer_putflush(buffer_2, "\n", 1) ; - errno = e ; -} -- cgit v1.2.3