Recreate manual page using mandoc macros
Re-create the sue.1 manual page from the sue.mdoc source which uses
mandoc to ease maintenance. The build system is changed to prefer
installing the manual page from the mandoc source, with a fallback
to using a prebuilt copy.
Remove "lookbusy" command (^O-B)
Replace wp[1234] macros with a single one
The wp[1234] macros in reality are accomodating for the fact that
the C preprocessor did not use to have vararg macros, so replace
them all with a single wpn() macro which uses __VA_ARGS__.
Make it buildable without -fcommon
Ensure that the WINDOW* variables are defined only once, which allows
build without adding -fcommon to the compiler options.
Add missing <term.h> header
Replace CNTRL_@ with CNTRL_0 to avoid token paste warning
Make xwprintw() a varargs function
While at it, change it to use vsnprintf() to limit the amount of
formatted written text to the size of the used buffer.
Make promptst() a varargs function
Change the promptst() function to receive a variable number of
arguments. This needed rearranging the order of parameters in order
to have the varargs ellipsis (...) at the end of the list. In turn,
prompts() called prompt(), which needed moving the bulk of it into
a reusable promptv() function used both by promptst() and the regular
prompt() functions.
Make prompt() a varargs function
Change the prompt() function to explicitly receive a variable number
of arguments.
Use function attributes to mark printf-style arguments
Make status() a varargs function
Change the status() function to explicitly receive a variable number of
arguments. Those were forwarded to statprint(), so this patch in turn
calls a new statprintv() function which receives a va_list and is used
both by status() and statprint().
Fix compiler conversion and unused variable warnings
Add editorconfig and gitignore files
Avoid nested comment begin/end tokens
Do not define getopt interface externs
Symbols related to getopt() provided by libc should not be defined.
Instead, rely on <unistd.h> contaning them, which is something every
modern Unixish system does these days.
display: Handle missing dnothing case
Convert almost all function to use ANSI prototypes
Because K&R style is a thing of the past. While at it, convert a couple
of functions to use <stdarg.h>, and mark some as "static" because they
are not used outside of their compilation units.
Avoid redefinition of SIGSYS, fix value
Linux system (at least glibc based ones) define SIGSYS. For those which
do not have a definition, change the supplied value to the correct one.
Remove RCS version strings from sources