chiark / gitweb /
Add a slew of manual pages.
[mLib] / man / quis.3
... / ...
CommitLineData
1.\" -*-nroff-*-
2.TH quis 3mLib "22 May 1999" mLib
3.SH NAME
4quis \- remember the program's name for use in messages
5.SH SYNOPSIS
6.nf
7.B "#include <mLib/quis.h>"
8
9.BI "void ego(const char *" p );
10.B "const char *quis(void);"
11.B "const char *QUIS;"
12.fi
13.SH DESCRIPTION
14The
15.B ego
16function should be called early in your program's initialization
17sequence, with the value of
18.B argv[0]
19as its argument. It will strip away leading path components, and a
20leading `\-' character (in case the program was called as a login
21shell), and keep the resulting short name for later.
22.PP
23The
24.B quis
25function returns the stored program name. There is also a macro
26.B QUIS
27which expands to the name of a global variable whose value is the string
28returned by
29.BR quis() .
30.PP
31Don't ask why it's done this way. There are raisins, but they're mostly
32hysterical.
33.PP
34The program name is used in the messages produced by the
35.BR die (3mLib)
36and
37.BR moan (3mLib)
38functions.
39.SH AUTHOR
40Mark Wooding, <mdw@nsict.org>