void AnyOption::addOption ( char opt, int type ) { if ( ! POSIX() ) { printVerbose("Ignoring the option character \""); printVerbose(opt); printVerbose("\" ( POSIX options are turned off )"); printVerbose(); return; } if ( optchar_counter >= max_char_options ) { if ( doubleCharStorage() == false ) { addOptionError(opt); return; } } optionchars[optchar_counter] = opt; optchartype[optchar_counter] = type; optcharindex[optchar_counter] = g_value_counter; optchar_counter ++; }
void AnyOption::addOption (const char *opt, int type) { if (option_counter >= max_options) { if (doubleOptStorage () == false) { addOptionError (opt); return; } } options[option_counter] = opt; optiontype[option_counter] = type; optionindex[option_counter] = g_value_counter; option_counter++; }