# This file is licensed to you under the license specified in the included file
# `COPYING'. Look there for further details.

# Specification file format:
#
# This file consist in lines of sentences with the following format:
#
#         package <packname>
#         version <version>
#         purpose <string>
#         option <long> <short> <desc> <argtype> <required>
#         option <long> <short> <desc> flag      <onoff>
#         option <long> <short> <desc> no
#         ... # ...
#
# Where:
#
# <packname> = Double quoted string with upper and lower case chars, digits,
#              '-' and '.'.  No spaces allowed.
# <version>  = Double quoted string with upper and lower case chars, digits,
#              '-' and '.'.  No spaces allowed.
# <purpose>  = What the program does
#              Double quoted string (even on more than one line)
# <long>     = Double quoted string with upper and lower case chars, digits,
#              '-' and '.'.  No spaces allowed.
# <short>    = A single upper or lower case char, or a digit.
# <desc>     = String with upper and lower case chars, digits, '-', '.' and
#              spaces. First character must be no space.
# <argtype>  = string, int, short, long, float, double, longdouble or longlong.
# <required> = yes or no.
# <onoff>    = 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 your program
package "sample1"       # don't use package if you're using automake
# Version of your program
version "2.0"                  # don't use version if you're using automake

# Options
option  "str-opt"         s "A string option"      string     no
option  "my-opt"          m "Another integer option"      int     no
option  "int-opt"         i "A int option"         int        yes
option  "flag-opt"        - "A flag option"        flag       off
option  "funct-opt"       F "A function option"    no 
option  "long-opt"        - "A long option"        long       no

# This option turn on or off a flag, last column is the state of the flag when
# program start. If user specify it, flag toggles.

# COMMENTS
#
# Long options names can't be the same in two different options. The same
# apply to short options.
#
# Options created by default: `--version' ('-V') and `--help' ('h').
#
# The name of the vars generated where to store arguments are long options
# canonized. It means, '.' and '-' are both changed by '_'. And '_arg' are
# appended, or '_flag' if they are a flag.
#
# gengetopt doesn't guess if `long double' and `long long' types really
# exists in the system. That is your responsability, you can use `autoconf'
# for that task.
#
# If you use `autoconf' with the generated output, you should check for
# `getopt_long' function, if not found define `HAVE_GETOPT_LONG' and include
# `getopt.o' and `getopt1.o' in the compiled and linked objects. In any case,
# you should copy `getopt.c', `getopt1.c' and `getopt.h' files in your 
# proyect.
#
# If you use `automake' with the generated output, you don't need to use
# the sentences `package' and `version' in the input.
#
# The output that `gengetopt' program generate is not under any license.
# You can do whatever you want with the output and distribute it under the
# license that you want. But you should note that `getopt.c', `getopt1.c'
# and `getopt.h' files itself are licensed under the
# `GNU GENERAL PUBLIC LICENSE' (`GPL'), so if you use that files your proyect
# must be licensed under a `GPL' compatible license.
#
# `gengetopt' source code and included files are licensed to you under the
# license specified in the included file `COPYING'.
