From e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:34:10 +0200 Subject: Adding upstream version 4.2.2. Signed-off-by: Daniel Baumann --- wsutil/cmdarg_err.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 wsutil/cmdarg_err.h (limited to 'wsutil/cmdarg_err.h') diff --git a/wsutil/cmdarg_err.h b/wsutil/cmdarg_err.h new file mode 100644 index 0000000..daa5052 --- /dev/null +++ b/wsutil/cmdarg_err.h @@ -0,0 +1,51 @@ +/** @file + * + * Declarations of routines to report command-line argument errors. + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef __CMDARG_ERR_H__ +#define __CMDARG_ERR_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * Set the reporting functions for error messages. + */ +WS_DLL_PUBLIC void +cmdarg_err_init(void (*err)(const char *, va_list), + void (*err_cont)(const char *, va_list)); + +/* + * Report an error in command-line arguments. + */ +WS_DLL_PUBLIC void +vcmdarg_err(const char *fmt, va_list ap) + G_GNUC_PRINTF(1, 0); + +WS_DLL_PUBLIC void +cmdarg_err(const char *fmt, ...) + G_GNUC_PRINTF(1, 2); + +/* + * Report additional information for an error in command-line arguments. + */ +WS_DLL_PUBLIC void +cmdarg_err_cont(const char *fmt, ...) + G_GNUC_PRINTF(1, 2); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __CMDARG_ERR_H__ */ -- cgit v1.2.3