commandline.c revision dafcb997e390efa4423883dafd100c975c4095d6
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington/*
3523e19da21545ade45394cb64d7462f20b77347Tinderbox User * Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Portions Copyright (C) 1999-2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * copyright notice and this permission notice appear in all copies.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington *
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * PERFORMANCE OF THIS SOFTWARE.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington/*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Copyright (c) 1987, 1993, 1994
7cd594b8427fe742d44295790ba367e1de22a47dEvan Hunt * The Regents of the University of California. All rights reserved.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington *
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Redistribution and use in source and binary forms, with or without
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * modification, are permitted provided that the following conditions
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * are met:
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * 1. Redistributions of source code must retain the above copyright
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * notice, this list of conditions and the following disclaimer.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * 2. Redistributions in binary form must reproduce the above copyright
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * notice, this list of conditions and the following disclaimer in the
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * documentation and/or other materials provided with the distribution.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * 3. All advertising materials mentioning features or use of this software
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * must display the following acknowledgement:
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * This product includes software developed by the University of
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * California, Berkeley and its contributors.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * 4. Neither the name of the University nor the names of its contributors
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * may be used to endorse or promote products derived from this software
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * without specific prior written permission.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington *
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * SUCH DAMAGE.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington/* $Id: commandline.c,v 1.16 2004/03/05 05:10:44 marka Exp $ */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington/*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * This file was adapted from the NetBSD project's source tree, RCS ID:
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * NetBSD: getopt.c,v 1.15 1999/09/20 04:39:37 lukem Exp
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington *
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * The primary change has been to rename items to the ISC namespace
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * and format in the ISC coding style.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
216030f2849b0812910fbc1817ca17208a112663Mark Andrews
216030f2849b0812910fbc1817ca17208a112663Mark Andrews/*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Principal Authors: Computer Systems Research Group at UC Berkeley
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 * Principal ISC caretaker: DCL
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 */
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉#include <config.h>
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉#include <stdio.h>
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉#include <isc/commandline.h>
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉#include <isc/msgs.h>
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉#include <isc/string.h>
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington#include <isc/util.h>
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington/* Index into parent argv vector. */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian WellingtonLIBISC_EXTERNAL_DATA int isc_commandline_index = 1;
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington/* Character checked for validity. */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian WellingtonLIBISC_EXTERNAL_DATA int isc_commandline_option;
ffcbf9ea917725d49be6b006efa02613de5ef242Mark Andrews/* Argument associated with option. */
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉LIBISC_EXTERNAL_DATA char *isc_commandline_argument;
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉/* For printing error messages. */
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉LIBISC_EXTERNAL_DATA char *isc_commandline_progname;
7cd594b8427fe742d44295790ba367e1de22a47dEvan Hunt/* Print error messages. */
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_errprint = ISC_TRUE;
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉/* Reset processing. */
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_reset = ISC_TRUE;
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉static char endopt = '\0';
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉#define BADOPT '?'
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉#define BADARG ':'
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉#define ENDOPT &endopt
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉/*
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 * getopt --
11463c0ac24692e229ec87f307f5e7df3c0a7e10Evan Hunt * Parse argc/argv argument vector.
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 */
11463c0ac24692e229ec87f307f5e7df3c0a7e10Evan Huntint
11463c0ac24692e229ec87f307f5e7df3c0a7e10Evan Huntisc_commandline_parse(int argc, char * const *argv, const char *options) {
1124950b35ae05a12e804e670607fe5ba775cb4aTinderbox User static char *place = ENDOPT;
11463c0ac24692e229ec87f307f5e7df3c0a7e10Evan Hunt char *option; /* Index into *options of option. */
11463c0ac24692e229ec87f307f5e7df3c0a7e10Evan Hunt
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 REQUIRE(argc >= 0 && argv != NULL && options != NULL);
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 /*
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 * Update scanning pointer, either because a reset was requested or
11463c0ac24692e229ec87f307f5e7df3c0a7e10Evan Hunt * the previous argv was finished.
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 */
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 if (isc_commandline_reset || *place == '\0') {
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 isc_commandline_reset = ISC_FALSE;
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 if (isc_commandline_progname == NULL)
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 isc_commandline_progname = argv[0];
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 if (isc_commandline_index >= argc ||
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 *(place = argv[isc_commandline_index]) != '-') {
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 /*
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 * Index out of range or points to non-option.
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 */
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 place = ENDOPT;
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 return (-1);
ec3f1d35170225c74d11c27bb184e250d150b209Tatuya JINMEI 神明達哉 }
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington /*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Found '--' to signal end of options. Advance
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * index to next argv, the first non-option.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington isc_commandline_index++;
c3184b4e2a1f238f4615d36fee79df82b1711344Mark Andrews place = ENDOPT;
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington return (-1);
38ded52dbb4328a8b563449c81070039549e073fMark Andrews }
c3184b4e2a1f238f4615d36fee79df82b1711344Mark Andrews }
38ded52dbb4328a8b563449c81070039549e073fMark Andrews
c3184b4e2a1f238f4615d36fee79df82b1711344Mark Andrews isc_commandline_option = *place++;
0f1938c98281e79faeaffa3c481731e3f8b67c08Brian Wellington option = strchr(options, isc_commandline_option);
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews /*
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews * Ensure valid option has been passed as specified by options string.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * '-:' is never a valid command line option because it could not
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * distinguish ':' from the argument specifier in the options string.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington if (isc_commandline_option == ':' || option == NULL) {
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington if (*place == '\0')
ad430189fb0028e41ae722f6e3c465b4bdd47af1Mark Andrews isc_commandline_index++;
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
2ee2c1be1873d6fb477c085029ecc1dd63e8abb6Mark Andrews if (isc_commandline_errprint && *options != ':')
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington fprintf(stderr, "%s: %s -- %c\n",
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews isc_commandline_progname,
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews isc_msgcat_get(isc_msgcat,
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews ISC_MSGSET_COMMANDLINE,
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews ISC_MSG_ILLEGALOPT,
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews "illegal option"),
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews isc_commandline_option);
d457997b3b3ab1b79059707db89ae1dfb1d3c195Mark Andrews
7dbeb5e7f067585abfb12fac314a0d2a8f0dd040Evan Hunt return (BADOPT);
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington }
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington if (*++option != ':') {
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington /*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Option does not take an argument.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington isc_commandline_argument = NULL;
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington /*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Skip to next argv if at the end of the current argv.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington if (*place == '\0')
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington ++isc_commandline_index;
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington } else {
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington /*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Option needs an argument.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington if (*place != '\0')
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington /*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Option is in this argv, -D1 style.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington isc_commandline_argument = place;
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington else if (argc > ++isc_commandline_index)
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington /*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Option is next argv, -D 1 style.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington isc_commandline_argument = argv[isc_commandline_index];
20c21edadacb58824d0c81505e26213070d6358bAndreas Gustafsson
20c21edadacb58824d0c81505e26213070d6358bAndreas Gustafsson else {
20c21edadacb58824d0c81505e26213070d6358bAndreas Gustafsson /*
20c21edadacb58824d0c81505e26213070d6358bAndreas Gustafsson * Argument needed, but no more argv.
d97255474029990830adfc050b2869726ccc6f6fBrian Wellington */
00c8cf21f0615581952821f66a778162891af842Brian Wellington place = ENDOPT;
20c21edadacb58824d0c81505e26213070d6358bAndreas Gustafsson
20c21edadacb58824d0c81505e26213070d6358bAndreas Gustafsson /*
20c21edadacb58824d0c81505e26213070d6358bAndreas Gustafsson * Silent failure with "missing argument" return
d97255474029990830adfc050b2869726ccc6f6fBrian Wellington * when ':' starts options string, per historical spec.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington if (*options == ':')
db0e722d834cfbb3f83de0a369f654dbc24c12d3Brian Wellington return (BADARG);
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington if (isc_commandline_errprint)
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington fprintf(stderr, "%s: %s -- %c\n",
06364bcf06b5a60844b7ade63a592ca4e46fd34cAndreas Gustafsson isc_commandline_progname,
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington isc_msgcat_get(isc_msgcat,
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington ISC_MSGSET_COMMANDLINE,
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington ISC_MSG_OPTNEEDARG,
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington "option requires "
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington "an argument"),
06364bcf06b5a60844b7ade63a592ca4e46fd34cAndreas Gustafsson isc_commandline_option);
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington return (BADOPT);
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington }
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington place = ENDOPT;
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington /*
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington * Point to argv that follows argument.
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington isc_commandline_index++;
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington }
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington return (isc_commandline_option);
}