2021-11-30 08:01:36 -05:00
|
|
|
/** @file
|
|
|
|
*
|
2014-06-29 14:37:21 -07:00
|
|
|
* Declarations of routines to report command-line argument errors.
|
2005-11-17 05:59:21 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2005-11-17 05:59:21 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-07 12:26:45 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2005-11-17 05:59:21 +00:00
|
|
|
*/
|
|
|
|
|
2023-02-06 22:46:45 +00:00
|
|
|
#ifndef __CMDARG_ERR_H__
|
|
|
|
#define __CMDARG_ERR_H__
|
2014-06-29 14:37:21 -07:00
|
|
|
|
2023-02-06 22:46:45 +00:00
|
|
|
#include <wireshark.h>
|
2014-06-29 14:37:21 -07:00
|
|
|
#include <stdarg.h>
|
2005-11-17 05:59:21 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2014-06-29 14:37:21 -07:00
|
|
|
/*
|
|
|
|
* Set the reporting functions for error messages.
|
|
|
|
*/
|
2023-02-06 22:46:45 +00:00
|
|
|
WS_DLL_PUBLIC void
|
2014-06-29 14:37:21 -07:00
|
|
|
cmdarg_err_init(void (*err)(const char *, va_list),
|
|
|
|
void (*err_cont)(const char *, va_list));
|
|
|
|
|
2005-11-17 05:59:21 +00:00
|
|
|
/*
|
|
|
|
* Report an error in command-line arguments.
|
|
|
|
*/
|
2023-02-06 22:46:45 +00:00
|
|
|
WS_DLL_PUBLIC void
|
2021-03-15 11:29:43 -07:00
|
|
|
vcmdarg_err(const char *fmt, va_list ap)
|
|
|
|
G_GNUC_PRINTF(1, 0);
|
|
|
|
|
2023-02-06 22:46:45 +00:00
|
|
|
WS_DLL_PUBLIC void
|
2014-06-29 14:37:21 -07:00
|
|
|
cmdarg_err(const char *fmt, ...)
|
2010-01-25 13:20:53 +00:00
|
|
|
G_GNUC_PRINTF(1, 2);
|
2005-11-17 05:59:21 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Report additional information for an error in command-line arguments.
|
|
|
|
*/
|
2023-02-06 22:46:45 +00:00
|
|
|
WS_DLL_PUBLIC void
|
2014-06-29 14:37:21 -07:00
|
|
|
cmdarg_err_cont(const char *fmt, ...)
|
2010-01-25 13:20:53 +00:00
|
|
|
G_GNUC_PRINTF(1, 2);
|
2005-11-17 05:59:21 +00:00
|
|
|
|
2024-11-28 14:04:14 -08:00
|
|
|
/*
|
|
|
|
* Error printing routines that report to the standard error.
|
|
|
|
*/
|
|
|
|
WS_DLL_PUBLIC void
|
|
|
|
stderr_cmdarg_err(const char *msg_format, va_list ap);
|
|
|
|
|
|
|
|
WS_DLL_PUBLIC void
|
|
|
|
stderr_cmdarg_err_cont(const char *msg_format, va_list ap);
|
|
|
|
|
2005-11-17 05:59:21 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2023-02-06 22:46:45 +00:00
|
|
|
#endif /* __CMDARG_ERR_H__ */
|