chiark / gitweb /
Add a slew of manual pages.
[mLib] / man / quis.3
diff --git a/man/quis.3 b/man/quis.3
new file mode 100644 (file)
index 0000000..3b2cce8
--- /dev/null
@@ -0,0 +1,40 @@
+.\" -*-nroff-*-
+.TH quis 3mLib "22 May 1999" mLib
+.SH NAME
+quis \- remember the program's name for use in messages
+.SH SYNOPSIS
+.nf
+.B "#include <mLib/quis.h>"
+
+.BI "void ego(const char *" p );
+.B "const char *quis(void);"
+.B "const char *QUIS;"
+.fi
+.SH DESCRIPTION
+The
+.B ego
+function should be called early in your program's initialization
+sequence, with the value of
+.B argv[0]
+as its argument.  It will strip away leading path components, and a
+leading `\-' character (in case the program was called as a login
+shell), and keep the resulting short name for later.
+.PP
+The
+.B quis
+function returns the stored program name.  There is also a macro
+.B QUIS
+which expands to the name of a global variable whose value is the string
+returned by
+.BR quis() .
+.PP
+Don't ask why it's done this way.  There are raisins, but they're mostly
+hysterical.
+.PP
+The program name is used in the messages produced by the
+.BR die (3mLib)
+and
+.BR moan (3mLib)
+functions.
+.SH AUTHOR
+Mark Wooding, <mdw@nsict.org>