- opterr = 0;
- optind = 0; /* set to 0 to tell GNU getopt to reinitialize */
- while( ( i_cmd = vlc_getopt_long( *pi_argc, (char **)ppsz_argv, psz_shortopts,
- p_longopts, &i_index ) ) != -1 )
+ vlc_getopt_t state;
+ state.ind = 0 ; /* set to 0 to tell GNU getopt to reinitialize */
+ while( ( i_cmd = vlc_getopt_long( i_argc, (char **)ppsz_argv,
+ psz_shortopts,
+ p_longopts, &i_index, &state ) ) != -1 )