diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2019-08-09 14:22:03 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2019-08-09 14:22:40 +0900 |
commit | 5341f72ee3d82cab6a4e3459f6f19ee3ecbc6f6c (patch) | |
tree | ad4c0ed380d0a41368ef20ba15e272eb981c926b /lib/isc/commandline.c | |
parent | 97014ed0c6db196bca17bcd6c22766f6c27e88bf (diff) | |
download | bind-5341f72ee3d82cab6a4e3459f6f19ee3ecbc6f6c.tar.gz bind-5341f72ee3d82cab6a4e3459f6f19ee3ecbc6f6c.tar.bz2 bind-5341f72ee3d82cab6a4e3459f6f19ee3ecbc6f6c.zip |
Imported Upstream version 9.14.4upstream/9.14.4
Change-Id: I04261b1d3d81ead0a7732834f02fc4219d86f5aa
Diffstat (limited to 'lib/isc/commandline.c')
-rw-r--r-- | lib/isc/commandline.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/lib/isc/commandline.c b/lib/isc/commandline.c index 7ea67913..6f256928 100644 --- a/lib/isc/commandline.c +++ b/lib/isc/commandline.c @@ -1,9 +1,12 @@ /* - * Portions Copyright (C) 1999-2001, 2004, 2005, 2007, 2008, 2014-2016 Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. */ /* @@ -35,7 +38,6 @@ * SUCH DAMAGE. */ -/* $Id: commandline.c,v 1.22 2008/09/25 04:02:39 tbox Exp $ */ /*! \file * This file was adapted from the NetBSD project's source tree, RCS ID: @@ -45,18 +47,13 @@ * and format in the ISC coding style. */ -/* - * \author Principal Authors: Computer Systems Research Group at UC Berkeley - * \author Principal ISC caretaker: DCL - */ - #include <config.h> +#include <stdbool.h> #include <stdio.h> #include <isc/commandline.h> #include <isc/mem.h> -#include <isc/msgs.h> #include <isc/print.h> #include <isc/string.h> #include <isc/util.h> @@ -70,9 +67,9 @@ LIBISC_EXTERNAL_DATA char *isc_commandline_argument; /*% For printing error messages. */ LIBISC_EXTERNAL_DATA char *isc_commandline_progname; /*% Print error messages. */ -LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_errprint = ISC_TRUE; +LIBISC_EXTERNAL_DATA bool isc_commandline_errprint = true; /*% Reset processing. */ -LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_reset = ISC_TRUE; +LIBISC_EXTERNAL_DATA bool isc_commandline_reset = true; static char endopt = '\0'; @@ -98,7 +95,7 @@ isc_commandline_parse(int argc, char * const *argv, const char *options) { if (isc_commandline_reset || *place == '\0') { if (isc_commandline_reset) { isc_commandline_index = 1; - isc_commandline_reset = ISC_FALSE; + isc_commandline_reset = false; } if (isc_commandline_progname == NULL) @@ -137,12 +134,8 @@ isc_commandline_parse(int argc, char * const *argv, const char *options) { isc_commandline_index++; if (isc_commandline_errprint && *options != ':') - fprintf(stderr, "%s: %s -- %c\n", + fprintf(stderr, "%s: illegal option -- %c\n", isc_commandline_progname, - isc_msgcat_get(isc_msgcat, - ISC_MSGSET_COMMANDLINE, - ISC_MSG_ILLEGALOPT, - "illegal option"), isc_commandline_option); return (BADOPT); @@ -190,13 +183,8 @@ isc_commandline_parse(int argc, char * const *argv, const char *options) { return (BADARG); if (isc_commandline_errprint) - fprintf(stderr, "%s: %s -- %c\n", + fprintf(stderr, "%s: option requires an argument -- %c\n", isc_commandline_progname, - isc_msgcat_get(isc_msgcat, - ISC_MSGSET_COMMANDLINE, - ISC_MSG_OPTNEEDARG, - "option requires " - "an argument"), isc_commandline_option); return (BADOPT); |