ofxdump/ofxdump.cpp 1.26: Removing sys/stat.h
ace jones <[email protected]> Fri, 28 Jul 2006 22:09:54 -0700
| Newsgroups | gmane.comp.finance.libofx.devel |
|---|---|
| Message-ID | <[email protected]> |
Benoit, I see you reverted the check for the file existing due to a
"system dependent header", without replacing it with an alternative.
Is there no way to check for the existence of the file in a "system
independent" manner? ofxdump crashes otherwise.
</Ace>
Index: ofxdump.cpp
===================================================================
RCS file: /cvsroot/libofx/libofx/ofxdump/ofxdump.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- ofxdump.cpp 26 Mar 2006 04:49:57 -0000 1.25
+++ ofxdump.cpp 20 Jul 2006 04:41:16 -0000 1.26
@@ -1,7 +1,7 @@
/***************************************************************************
ofxdump.cpp
-------------------
- copyright : (C) 2002 by Benoit Grégoire
+ copyright : (C) 2002 by Benoit Grégoire
email : [email protected]
***************************************************************************/
/**@file
@@ -33,7 +33,6 @@
#include "libofx.h"
#include <stdio.h> /* for printf() */
#include <config.h> /* Include config constants, e.g., VERSION TF */
-#include <sys/stat.h>
#include <errno.h>
#include "cmdline.h" /* Gengetopt generated parser */
@@ -408,18 +407,7 @@
if (args_info.inputs_num > 0)
{
const char* filename = args_info.inputs[0];
- struct stat stat_buf;
- int result = stat(filename,&stat_buf);
- if ( result == -1 )
- {
- cout << "Unable to open " << filename << ": " <<
strerror(errno) << endl;
- return 1;
- }
- if ( ! S_ISREG( stat_buf.st_mode ) )
- {
- cout << "Unable to open " << filename << ": Not a regular
file" << endl;
- return 1;
- }
+
ofx_set_statement_cb(libofx_context, ofx_proc_statement_cb, 0);
ofx_set_account_cb(libofx_context, ofx_proc_account_cb, 0);
--
Ace Jones <[email protected]> GPG Public Key on www.keyserver.net
Fingerprint: 3CA8 1A24 B52F 4FCA C22D 0E2F 0AF0 4EE1 F540 E55B
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libofx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libofx-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBEyu2iCvBO4fVA5VsRAlDYAJoDKh4n2j1OfvjnBa49SqlCRE/8BQCcCkNX nKuDGFBEUpIC0mneksfX4O4= =rGKf -----END PGP SIGNATURE-----