Changeset 2212 for trunk


Ignore:
Timestamp:
Jul 6, 2005, 5:47:23 AM (20 years ago)
Author:
bird
Message:

Added the BSD optreset global to getopt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/lgpl/posix/getopt.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2211 r2212  
    142142
    143143static struct _getopt_data getopt_data;
     144
     145/* BSD interface. When set the state will be reset on the next call. */
     146
     147int optreset = 0;
    144148
    145149
     
    11691173  int result;
    11701174
     1175  /* BSD extention, same as setting optind to 0. */
     1176  if (optreset)
     1177    {
     1178      optreset = 0;
     1179      optind = 0;
     1180    }
     1181
    11711182  getopt_data.optind = optind;
    11721183  getopt_data.opterr = opterr;
Note: See TracChangeset for help on using the changeset viewer.