chiark / gitweb /
str: New str_matchx function optionally reports possible prefix.
[mLib] / report.h
CommitLineData
0875b58f 1/* -*-c-*-
2 *
8656dc50 3 * $Id: report.h,v 1.5 2004/04/08 01:36:13 mdw Exp $
0875b58f 4 *
5 * Reporting errors and things
6 *
7 * (c) 1998 Straylight/Edgeware
8 */
9
c846879c 10/*----- Licensing notice --------------------------------------------------*
0875b58f 11 *
12 * This file is part of the mLib utilities library.
13 *
14 * mLib is free software; you can redistribute it and/or modify
c846879c 15 * it under the terms of the GNU Library General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
18 *
0875b58f 19 * mLib is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c846879c 22 * GNU Library General Public License for more details.
23 *
24 * You should have received a copy of the GNU Library General Public
0bd98442 25 * License along with mLib; if not, write to the Free
26 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27 * MA 02111-1307, USA.
0875b58f 28 */
29
c6e0eaf0 30#ifndef MLIB_REPORT_H
31#define MLIB_REPORT_H
0875b58f 32
33#ifdef __cplusplus
34 extern "C" {
35#endif
36
37/*----- Functions provided ------------------------------------------------*/
38
39/* --- @moan@ --- *
40 *
41 * Arguments: @const char *f@ = a @printf@-style format string
42 * @...@ = other arguments
43 *
44 * Returns: ---
45 *
46 * Use: Reports an error.
47 */
48
49extern void moan(const char *f, ...);
50
51/* --- @die@ --- *
52 *
53 * Arguments: @int status@ = exit status to return
54 * @const char *f@ = a @printf@-style format string
55 * @...@ = other arguments
56 *
57 * Returns: Never.
58 *
59 * Use: Reports an error and exits. Like @moan@ above, only more
60 * permanent.
61 */
62
63extern void die(int status, const char *f, ...);
64
65/*----- That's all, folks -------------------------------------------------*/
66
67#ifdef __cplusplus
68 }
69#endif
70
71#endif