Changeset f0996b778d66cd7c9a43c71f918288bf4580d6b1

Show
Ignore:
Timestamp:
21/03/07 13:34:11 (2 years ago)
Author:
Damien Fouilleul <damienf@videolan.org>
git-committer:
Damien Fouilleul <damienf@videolan.org> 1174480451 +0000
git-parent:

[d56d8c001fd42d9caaa58bed9d4262bef0ce5f16]

git-author:
Damien Fouilleul <damienf@videolan.org> 1174480451 +0000
Message:

- getopt: use optind==0 for reentrency support and misc cleanup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/extras/getopt.c

    r1a4ae56 rf0996b7  
    3030#define _NO_PROTO 
    3131#endif 
    32  
    33 /* Overkill. */ 
    34 #include <vlc/vlc.h> 
    3532 
    3633#ifdef HAVE_CONFIG_H 
  • src/misc/configuration.c

    rfb8aac6 rf0996b7  
    14851485     */ 
    14861486    opterr = 0; 
    1487     optind = 1; 
     1487    optind = 0; // set to 0 to tell GNU getopt to reinitialize 
    14881488    while( ( i_cmd = getopt_long( *pi_argc, ppsz_argv, psz_shortopts, 
    14891489                                  p_longopts, &i_index ) ) != -1 )