# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. # # This file is part of GNU gengetopt # # GNU gengetopt 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, or (at your option) # any later version. # # GNU gengetopt 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 gengetopt; see the file COPYING. If not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Specification file format: # # This file consist in lines of sentences with the following format: # # package # version # purpose # option # option flag # option no # ... # ... # # Where: # # = Double quoted string. # = Double quoted string. # = What the program does # Double quoted string (even on more than one line) # = Double quoted string with upper and lower case chars, digits, # '-' and '.'. No spaces allowed. # = A single upper or lower case char, or a digit. # = String with upper and lower case chars, digits, '-', '.' and # spaces. # = string, int, short, long, float, double, longdouble or longlong. # = yes or no. # = on or off. # Comments begins with '#' in any place of the line and ends in the # end of line. # The third form of option is used if the option does not take an argument; # it must not be required. # Name of our program package "gengetopt" # we don't use it: we're using automake # Version of our program #version "1.0.1" # we don't use it: we're using automake purpose "This program generates a C function that uses getopt_long function to parse the command line options, validate them and fill a struct." # options that will be added to command line options of gengetopt args "--no-handle-version --no-handle-help --no-handle-error --string-parser" # Options section "Main options" text "" option "input" i "input file (default std input)" string typestr="filename" optional option "func-name" f "name of generated function" string typestr="name" default="cmdline_parser" optional option "arg-struct-name" a "name of generated args info struct" string typestr="name" default="gengetopt_args_info" optional option "file-name" F "name of generated file" string typestr="name" default="cmdline" optional option "output-dir" - "output directory" string typestr="path" optional option "c-extension" c "extension of c file" string typestr="ext" default="c" optional option "header-extension" H "extension of header file" string typestr="ext" default="h" optional option "long-help" l "long usage line in help" optional option "unamed-opts" u "accept options without names (e.g., file names)" string default="FILES" optional argoptional text "\nThe parser generated is thought to be used to parse the command line arguments. " text "However, you can also generate parsers for configuration files, or strings " text "that contain the arguments to parse, by using the following two options.\n" option "conf-parser" C "generate a config file parser" optional option "string-parser" S "generate a string parser (the string contains the command line)" optional text "" section "Additional options" option "include-getopt" G "adds the code for getopt_long in the generated C file" optional option "no-handle-help" n "do not handle --help|-h automatically" optional option "no-handle-version" N "do not handle --version|-V automatically" optional option "no-handle-error" e "do not exit on errors" optional option "show-required" - "in the output of help will specify which options are mandatory, \ by using the optional passed string" string default="(mandatory)" optional argoptional option "gen-version" g "put gengetopt version in the generated file" flag on option "set-package" - "set the package name (override package defined in the .ggo file)" string optional option "set-version" - "set the version number (override version defined in the .ggo file)" string optional option "show-help" - "show the output of --help instead of generating code" optional option "show-full-help" - "show the output of --help (including hidden options) instead of generating code" optional option "show-version" - "show the output of --version instead of generating code" optional text "\nPlease refer to the manual for further explanations."