1135446Strhodes/* 2193149Sdougb * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") 3135446Strhodes * Copyright (C) 1999-2001 Internet Software Consortium. 4135446Strhodes * 5193149Sdougb * Permission to use, copy, modify, and/or distribute this software for any 6135446Strhodes * purpose with or without fee is hereby granted, provided that the above 7135446Strhodes * copyright notice and this permission notice appear in all copies. 8135446Strhodes * 9135446Strhodes * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10135446Strhodes * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11135446Strhodes * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12135446Strhodes * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13135446Strhodes * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14135446Strhodes * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15135446Strhodes * PERFORMANCE OF THIS SOFTWARE. 16135446Strhodes */ 17135446Strhodes 18234010Sdougb/* $Id: commandline.h,v 1.16 2007/06/19 23:47:18 tbox Exp $ */ 19135446Strhodes 20135446Strhodes#ifndef ISC_COMMANDLINE_H 21135446Strhodes#define ISC_COMMANDLINE_H 1 22135446Strhodes 23193149Sdougb/*! \file isc/commandline.h */ 24170222Sdougb 25135446Strhodes#include <isc/boolean.h> 26135446Strhodes#include <isc/lang.h> 27135446Strhodes#include <isc/platform.h> 28135446Strhodes 29170222Sdougb/*% Index into parent argv vector. */ 30135446StrhodesLIBISC_EXTERNAL_DATA extern int isc_commandline_index; 31170222Sdougb/*% Character checked for validity. */ 32135446StrhodesLIBISC_EXTERNAL_DATA extern int isc_commandline_option; 33170222Sdougb/*% Argument associated with option. */ 34135446StrhodesLIBISC_EXTERNAL_DATA extern char *isc_commandline_argument; 35170222Sdougb/*% For printing error messages. */ 36135446StrhodesLIBISC_EXTERNAL_DATA extern char *isc_commandline_progname; 37170222Sdougb/*% Print error message. */ 38135446StrhodesLIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_errprint; 39170222Sdougb/*% Reset getopt. */ 40135446StrhodesLIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_reset; 41135446Strhodes 42135446StrhodesISC_LANG_BEGINDECLS 43135446Strhodes 44170222Sdougb/*% parse command line */ 45135446Strhodesint 46135446Strhodesisc_commandline_parse(int argc, char * const *argv, const char *options); 47135446Strhodes 48135446StrhodesISC_LANG_ENDDECLS 49135446Strhodes 50135446Strhodes#endif /* ISC_COMMANDLINE_H */ 51