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