You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/08/03 17:08:17 UTC
cvs commit: xml-xerces/c/samples/SAXCount SAXCount.cpp
tng 01/08/03 08:08:17
Modified: c/samples/DOMCount DOMCount.cpp
c/samples/IDOMCount IDOMCount.cpp
c/samples/SAX2Count SAX2Count.cpp
c/samples/SAXCount SAXCount.cpp
Log:
close the list file.
Revision Changes Path
1.16 +6 -11 xml-xerces/c/samples/DOMCount/DOMCount.cpp
Index: DOMCount.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/DOMCount/DOMCount.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DOMCount.cpp 2001/08/02 17:10:28 1.15
+++ DOMCount.cpp 2001/08/03 15:08:16 1.16
@@ -55,7 +55,7 @@
*/
/*
- * $Id: DOMCount.cpp,v 1.15 2001/08/02 17:10:28 tng Exp $
+ * $Id: DOMCount.cpp,v 1.16 2001/08/03 15:08:16 tng Exp $
*/
// ---------------------------------------------------------------------------
@@ -214,17 +214,9 @@
bool more = true;
ifstream fin;
- if (doList) {
-
- // the input is a list file
+ // the input is a list file
+ if (doList)
fin.open(argV[argInd]);
- if ( fin.is_open() == 0)
- {
- cerr << "Error opening list file: " << argV[argInd] << endl;
- XMLPlatformUtils::Terminate();
- return 1;
- }
- }
while (more)
{
@@ -299,6 +291,9 @@
<< elementCount << " elems)." << endl;
}
}
+
+ if (doList)
+ fin.close();
// And call the termination method
XMLPlatformUtils::Terminate();
1.7 +6 -11 xml-xerces/c/samples/IDOMCount/IDOMCount.cpp
Index: IDOMCount.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/IDOMCount/IDOMCount.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- IDOMCount.cpp 2001/08/02 17:10:29 1.6
+++ IDOMCount.cpp 2001/08/03 15:08:17 1.7
@@ -55,7 +55,7 @@
*/
/*
- * $Id: IDOMCount.cpp,v 1.6 2001/08/02 17:10:29 tng Exp $
+ * $Id: IDOMCount.cpp,v 1.7 2001/08/03 15:08:17 tng Exp $
*/
// ---------------------------------------------------------------------------
@@ -248,17 +248,9 @@
bool more = true;
ifstream fin;
- if (doList) {
-
- // the input is a list file
+ // the input is a list file
+ if (doList)
fin.open(argV[argInd]);
- if ( fin.is_open() == 0)
- {
- cerr << "Error opening list file: " << argV[argInd] << endl;
- XMLPlatformUtils::Terminate();
- return 1;
- }
- }
while (more)
{
@@ -338,6 +330,9 @@
// And call the termination method
XMLPlatformUtils::Terminate();
+
+ if (doList)
+ fin.close();
if (errorOccurred)
return 4;
1.8 +8 -10 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.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SAX2Count.cpp 2001/08/02 17:10:29 1.7
+++ SAX2Count.cpp 2001/08/03 15:08:17 1.8
@@ -56,6 +56,9 @@
/*
* $Log: SAX2Count.cpp,v $
+* Revision 1.8 2001/08/03 15:08:17 tng
+* close the list file.
+*
* Revision 1.7 2001/08/02 17:10:29 tng
* Allow DOMCount/SAXCount/IDOMCount/SAX2Count to take a file that has a list of xml file as input.
*
@@ -255,18 +258,10 @@
bool more = true;
ifstream fin;
-
- if (doList) {
- // the input is a list file
+ // the input is a list file
+ if (doList)
fin.open(argV[argInd]);
- if ( fin.is_open() == 0)
- {
- cerr << "Error opening list file: " << argV[argInd] << endl;
- XMLPlatformUtils::Terminate();
- return 1;
- }
- }
while (more)
{
@@ -327,6 +322,9 @@
<< handler.getCharacterCount() << " chars)" << endl;
}
}
+
+ if (doList)
+ fin.close();
// And call the termination method
XMLPlatformUtils::Terminate();
1.14 +8 -10 xml-xerces/c/samples/SAXCount/SAXCount.cpp
Index: SAXCount.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/SAXCount/SAXCount.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- SAXCount.cpp 2001/08/02 17:10:29 1.13
+++ SAXCount.cpp 2001/08/03 15:08:17 1.14
@@ -56,6 +56,9 @@
/*
* $Log: SAXCount.cpp,v $
+* Revision 1.14 2001/08/03 15:08:17 tng
+* close the list file.
+*
* Revision 1.13 2001/08/02 17:10:29 tng
* Allow DOMCount/SAXCount/IDOMCount/SAX2Count to take a file that has a list of xml file as input.
*
@@ -261,18 +264,10 @@
unsigned long duration;
ifstream fin;
-
- if (doList) {
- // the input is a list file
+ // the input is a list file
+ if (doList)
fin.open(argV[argInd]);
- if ( fin.is_open() == 0)
- {
- cerr << "Error opening list file: " << argV[argInd] << endl;
- XMLPlatformUtils::Terminate();
- return 1;
- }
- }
while (true)
{
@@ -338,6 +333,9 @@
<< handler.getCharacterCount() << " chars)" << endl;
}
}
+
+ if (doList)
+ fin.close();
// And call the termination method
XMLPlatformUtils::Terminate();
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org