Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
cmdarg_err.h
1 /* cmdarg_err.h
2  * Declarations of routines to report command-line argument errors.
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #ifndef __WSUTIL_CMDARG_ERR_H__
12 #define __WSUTIL_CMDARG_ERR_H__
13 
14 #include <stdarg.h>
15 
16 #include <glib.h>
17 
18 #include "ws_symbol_export.h"
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif /* __cplusplus */
23 
24 /*
25  * Set the reporting functions for error messages.
26  */
27 WS_DLL_PUBLIC void
28 cmdarg_err_init(void (*err)(const char *, va_list),
29  void (*err_cont)(const char *, va_list));
30 
31 /*
32  * Report an error in command-line arguments.
33  */
34 WS_DLL_PUBLIC void
35 cmdarg_err(const char *fmt, ...)
36  G_GNUC_PRINTF(1, 2);
37 
38 /*
39  * Report additional information for an error in command-line arguments.
40  */
41 WS_DLL_PUBLIC void
42 cmdarg_err_cont(const char *fmt, ...)
43  G_GNUC_PRINTF(1, 2);
44 
45 #ifdef __cplusplus
46 }
47 #endif /* __cplusplus */
48 
49 #endif /* __WSUTIL_CMDARG_ERR_H__ */