Hi,
i discovered a small bug in obgrep. The -i parameter to specify the
input format is not used, because its overwritten e few lines below.
Please find attached a small patch to fix that.
Kind regards,
Bjoern
--
Björn Grüning
Albert-Ludwigs-Universität Freiburg
Institute of Pharmaceutical Sciences
Pharmaceutical Bioinformatics
Hermann-Herder-Strasse 9
D-79104 Freiburg i. Br.
Tel.: +49 761 203-4872
Fax.: +49 761 203-97769
E-Mail: bjoern.gruen...@pharmazie.uni-freiburg.de
Web: http://www.pharmaceutical-bioinformatics.org/
--- obgrep_ori.cpp 2012-07-10 15:16:05.593265874 +0200
+++ obgrep.cpp 2012-07-10 15:12:12.753906805 +0200
@@ -80,7 +80,7 @@
// the identifying file extension. This is a slight
// reduction in flexibility (which is not currently used)
pFormat = conv.FindFormat(iext);
-
+
if(pFormat==NULL)
{
cerr << program_name << ": cannot read input format!" << endl;
@@ -156,12 +156,14 @@
// Find Input filetype
- pFormat = conv.FormatFromExt(FileIn);
- if (pFormat == NULL)
- {
- cerr << program_name << ": cannot read input format!" << endl;
- return (-1);
- }
+ if (pFormat == NULL) {
+ pFormat = conv.FormatFromExt(FileIn);
+ if (pFormat == NULL)
+ {
+ cerr << program_name << ": cannot read input format!" << endl;
+ return (-1);
+ }
+ }
}
if (! conv.SetInAndOutFormats(pFormat, pFormat))
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel