3 .\" Manual for program name
5 .\" (c) 1999, 2001, 2005, 2009, 2024 Straylight/Edgeware
8 .\"----- Licensing notice ---------------------------------------------------
10 .\" This file is part of the mLib utilities library.
12 .\" mLib is free software: you can redistribute it and/or modify it under
13 .\" the terms of the GNU Library General Public License as published by
14 .\" the Free Software Foundation; either version 2 of the License, or (at
15 .\" your option) any later version.
17 .\" mLib is distributed in the hope that it will be useful, but WITHOUT
18 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
20 .\" License for more details.
22 .\" You should have received a copy of the GNU Library General Public
23 .\" License along with mLib. If not, write to the Free Software
24 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
27 .\"--------------------------------------------------------------------------
28 .so ../defs.man \" @@@PRE@@@
30 .\"--------------------------------------------------------------------------
31 .TH quis 3mLib "22 May 1999" "Straylight/Edgeware" "mLib utilities library"
37 .\"--------------------------------------------------------------------------
39 quis \- remember the program's name for use in messages
41 .\"--------------------------------------------------------------------------
45 .B "#include <mLib/quis.h>"
47 .BI "void ego(const char *" p );
48 .B "const char *quis(void);"
49 .B "const char *QUIS;"
50 .BI "int pquis(FILE *" fp ", const char *" p );
53 .\"--------------------------------------------------------------------------
58 function should be called early in your program's initialization
59 sequence, with the value of
61 as its argument. It will strip away leading path components, and a
62 leading `\-' character (in case the program was called as a login
63 shell), and keep the resulting short name for later.
67 function returns the stored program name. There is also a macro
69 which expands to the name of a global variable whose value is the string
73 Don't ask why it's done this way. There are raisins, but they're mostly
78 is passed a file pointer
82 it writes the string to the file, replacing every lone occurrence of the
85 by the program name. Pairs
87 are written as single dollar signs. The return value is zero if
88 everything went OK, or the constant
90 if there was an error.
92 The program name is used in the messages produced by the
98 .\"--------------------------------------------------------------------------
104 .\"--------------------------------------------------------------------------
107 Mark Wooding, <mdw@distorted.org.uk>
109 .\"----- That's all, folks --------------------------------------------------