jeśli nie ma pola podanego w opcji input-field, process_seg zwraca false

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@40 e293616e-ec6a-49c2-aa92-f4a8b91c5d16
This commit is contained in:
obrebski 2008-05-07 17:30:43 +00:00
parent 756213194a
commit a7b254ce77

View File

@ -200,13 +200,20 @@ bool process_seg(char* seg, gengetopt_args_info& args)
break; break;
} }
} }
if(ret==false) return false;
for(int i=0; i<args.select_given; ++i) for(int i=0; i<args.select_given; ++i)
if(! getfield(seg,args.select_arg[i],buf)) if(! getfield(seg,args.select_arg[i],buf))
ret=false; return false;
for(int i=0; i<args.ignore_given; ++i) for(int i=0; i<args.ignore_given; ++i)
if(getfield(seg,args.ignore_arg[i],buf)) if(getfield(seg,args.ignore_arg[i],buf))
ret=false; return false;
return ret;
if(args.input_field_given & !getfield(seg,input_field_prefix,buf))
return false;
return true;
} }