tng 2002/11/01 14:05:22
Modified: c/tests/DOM/DeprecatedDOMCount DeprecatedDOMCount.cpp
Log:
Samples/Test update: Issue error if the list file failed to open.
Revision Changes Path
1.4 +8 -3 xml-xerces/c/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.cpp
Index: DeprecatedDOMCount.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DeprecatedDOMCount.cpp 27 Sep 2002 19:31:12 -0000 1.3
+++ DeprecatedDOMCount.cpp 1 Nov 2002 22:05:22 -0000 1.4
@@ -226,13 +226,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]