On Sun, 11 Sep 2016 16:46:29 -0400 Russ <rrois...@gmail.com> wrote: Hey Russ,
> I agree it does some, but using strcmp allows matching the flags > exactly, and prevents things like "xssstate -v" being equivilant to > "xssstate -vxyz". And since you would only ever use one flag at a > time, arg.h seemed like it was excessive, but perhaps I was thinking > about simplify the wrong way. I also like being able to use only one > switch statement, but that's mostly a personal preference. Thanks > for the input! if you really have _exclusive_ flags "v x y z", you do the exclusivity-check afterwards, something along if (vflag + xflag + yflag + zflag > 1) usage(); but usually, you only have two exclusive flags, so you do if (aflag && bflag) usage(); after the switch. The arg.h-switch really is not made for doing exclusivity checks at this point. For "early-terminators" like -v it is fine though for multiple roads leading to Rome. Cheers FRIGN -- FRIGN <d...@frign.de>