Rishi wrote:
suppose i have a program in which there are two arguements 'a' and 'b'
the program is such that i will work iff
-either 'a' or 'b' is present as an option to it
-both 'a' and 'b' cant be present sameltaneously
-either of the two should be there
I want to know is there any way in the function getopt or getopt_long
that can help me in doing this
Well, I'm not sure this is on topic here (comp.unix.programmer might be
better), but AFAIK getopt can set a boolean flag on encountering an
option; just do this, and check afterwards your conditions against the
two flag-variables and take appropriate action.
Daniel
--
Done: Bar-Sam-Val-Wiz, Dwa-Elf-Hum-Orc, Cha-Law, Fem-Mal
Underway: Ran-Gno-Neu-Fem
To go: Arc-Cav-Hea-Kni-Mon-Pri-Rog-Tou