Changeset 3b295e in git for Singular/fegetopt.h


Ignore:
Timestamp:
Sep 22, 1999, 5:42:13 PM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
824241e0feb57039b89a14bd31a86a23e5a87032
Parents:
2bb771a6d877e2842019e777594b5edfacafda1b
Message:
*hannes: simplified getopt


git-svn-id: file:///usr/local/Singular/svn/trunk@3649 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/fegetopt.h

    r2bb771 r3b295e  
    6969   optional_argument         (or 2) if the option takes an optional argument.
    7070
    71    If the field `flag' is not NULL, it points to a variable that is set
    72    to the value given in the field `val' when the option is found, but
    73    left unchanged if the option is not found.
    74 
    7571   To have a long-named option do something other than set an `int' to
    7672   a compiled-in constant, such as set a value from `optarg', set the
    77    option's `flag' field to zero and its `val' field to a nonzero
    78    value (the equivalent single-letter option character, if there is
    79    one).  For long options that have a zero `flag' field, `getopt'
    80    returns the contents of the `val' field.  */
     73   `val' field to a nonzero value (the equivalent single-letter option
     74   character, if there is one).
     75   For long options `getopt' returns the contents of the `val' field.  */
    8176
    8277typedef enum {feOptUntyped, feOptBool, feOptInt, feOptString} feOptType;
     
    9186     type mismatches in all the code that assumes it is an int.  */
    9287  int has_arg;
    93   int *flag;
    9488  int val;
    9589  /* Stuff added for Singular  */
Note: See TracChangeset for help on using the changeset viewer.