chiark / gitweb /
str: New str_matchx function optionally reports possible prefix.
[mLib] / report.h
... / ...
CommitLineData
1/* -*-c-*-
2 *
3 * $Id: report.h,v 1.5 2004/04/08 01:36:13 mdw Exp $
4 *
5 * Reporting errors and things
6 *
7 * (c) 1998 Straylight/Edgeware
8 */
9
10/*----- Licensing notice --------------------------------------------------*
11 *
12 * This file is part of the mLib utilities library.
13 *
14 * mLib is free software; you can redistribute it and/or modify
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 *
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
22 * GNU Library General Public License for more details.
23 *
24 * You should have received a copy of the GNU Library General Public
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.
28 */
29
30#ifndef MLIB_REPORT_H
31#define MLIB_REPORT_H
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