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