On 08/21/2013 10:41 AM, Chris Morley wrote:

>   obabel 10dataset.sdf -onul --count
...
> Note that an output format is not used but something still has to be
> there. Writing the functionality as an output format -ocount as
> suggested by Noel would be clearer but I didn't find it easy to do.

Off-topic, but have you considered using getopt from unistd.h? -- it's
posix so should be available on sane platforms. Then you could e.g.

case 'o' :
 outftype = optarg;
 break;
...
if (!gotOutType)
  {
    if( outftype == "count" ) { ...do the counting & exit... }
    pOutFormat = Conv.FormatFromExt(OutputFileName.c_str());
...

Standard getopt should allow "-o count" as well as "-ocount" IIRC.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to