tng 2002/11/01 14:05:58
Modified: c/samples/SAX2Count SAX2Count.cpp
Log:
Samples/Test update: Issue error if the list file failed to open.
Revision Changes Path
1.20 +10 -2 xml-xerces/c/samples/SAX2Count/SAX2Count.cpp
Index: SAX2Count.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/SAX2Count/SAX2Count.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- SAX2Count.cpp 27 Sep 2002 19:24:57 -0000 1.19
+++ SAX2Count.cpp 1 Nov 2002 22:05:57 -0000 1.20
@@ -56,6 +56,9 @@
/*
* $Log$
+* Revision 1.20 2002/11/01 22:05:57 tng
+* Samples/Test update: Issue error if the list file failed to open.
+*
* Revision 1.19 2002/09/27 19:24:57 tng
* Samples Fix: wrong length in memset
*
@@ -315,13 +318,18 @@
// the input is a list file
if (doList)
- fin.open(argV[argInd]);
+ fin.open(argV[argInd],ios::nocreate);
+
+ if (fin.fail()) {
+ cerr <<"Cannot open the list file: " << argV[argInd] << endl;
+ return 2;
+ }
while (more)
{
char fURI[1000];
//initialize the array to zeros
- memset(fURI,0,strlen(fURI));
+ memset(fURI,0,sizeof(fURI));
if (doList) {
if (! fin.eof() ) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]