diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-11-17 05:59:21 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-11-17 05:59:21 +0000 |
commit | e7ba0884e59883b499504873bc092d8fd6b5e8a8 (patch) | |
tree | 9e6da69ba8d3c7b296f4f2d93963fe0a43cbead6 /cmdarg_err.h | |
parent | 93966e7f2ff32ac1f2b5f9bcb64ccd87579f4c1f (diff) |
Handle "-G" only in Tethereal - it doesn't work in Ethereal, and isn't
necessary there.
Add a "cmdarg_err()" routine to report command-line option errors; it
creates a console if necessary, and prints the command name and the
trailing newline. Also add "cmdarg_err_cont()", which also creates a
console if necessary, and prints a trailing newline but no command name;
it's used to continue the message. Use those, rather than
"g_warning()", for errors.
That means that we no longer need to pass the command name to various
command-line argument parsing routines.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16526 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'cmdarg_err.h')
-rw-r--r-- | cmdarg_err.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/cmdarg_err.h b/cmdarg_err.h new file mode 100644 index 0000000000..e50b89a8a5 --- /dev/null +++ b/cmdarg_err.h @@ -0,0 +1,46 @@ +/* cmdarg_err.h + * Declarations of routines to report command-line errors. + * + * $Id$ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@ethereal.com> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __CMDARG_ERR_H__ +#define __CMDARG_ERR_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * Report an error in command-line arguments. + */ +extern void cmdarg_err(const char *fmt, ...); + +/* + * Report additional information for an error in command-line arguments. + */ +extern void cmdarg_err_cont(const char *fmt, ...); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __CMDARG_ERR_H__ */ |