/*
 * This file is part of the Poliqarp suite.
 * 
 * Copyright (C) 2004-2009 by Instytut Podstaw Informatyki Polskiej
 * Akademii Nauk (IPI PAN; Institute of Computer Science, Polish
 * Academy of Sciences; cf. www.ipipan.waw.pl).  All rights reserved.
 * 
 * This file may be distributed and/or modified under the terms of the
 * GNU General Public License version 2 as published by the Free Software
 * Foundation and appearing in the file gpl.txt included in the packaging
 * of this file.  (See http://www.gnu.org/licenses/translations.html for
 * unofficial translations.)
 * 
 * A commercial license is available from IPI PAN (contact
 * Michal.Ciesiolka@ipipan.waw.pl or ipi@ipipan.waw.pl for more
 * information).  Licensees holding a valid commercial license from IPI
 * PAN may use this file in accordance with that license.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE.
 */

/**
 * @brief Command line processing routines.
 *
 * Declaration of some useful macros and a global structure containing 
 * command-line-driven runtime configuration.
 */

#ifndef BPNG_COMMAND_LINE_H
#define BPNG_COMMAND_LINE_H 1

#include <poliqarp-config.h>

#include <bp/ng/list.h>

/**
 * Runtime configuration specified in the command line.
 */
struct command_line_data {
   char *base_name;
   struct list root_dirs;
   bool incremental;
   bool parallel;
};

/**
 * Global command line configuration.
 */
extern struct command_line_data command_line_data;

/** 
 * Parse the command line and fill the variable #command_line_data with
 * appropriate values.
 * @param argc number of arguments, as passed to main()
 * @param argv array of arguments, as passed to main()
 */
void command_line_process(int argc, char *argv[]);

/**
 * Free the #command_line_data values.
 */
void command_line_destroy();

#endif /* BP_CMDLINE_H */
