diff options
author | Nikolai Pretzell <np@openoffice.org> | 2001-03-12 18:24:52 +0000 |
---|---|---|
committer | Nikolai Pretzell <np@openoffice.org> | 2001-03-12 18:24:52 +0000 |
commit | 506aea6bd135c3919d3a4cfdb186a11cd0f4fa95 (patch) | |
tree | 2f042e41ac5cd5a5e15413db75a3f96ad678756c /xml2cmp/source/xcd | |
parent | 7f94841d8b915dd9434e296bb37516fb50819cb6 (diff) |
xml-descriptions new dtd, step4
Diffstat (limited to 'xml2cmp/source/xcd')
-rw-r--r-- | xml2cmp/source/xcd/cr_html.cxx | 10 | ||||
-rw-r--r-- | xml2cmp/source/xcd/cr_html.hxx | 4 | ||||
-rw-r--r-- | xml2cmp/source/xcd/cr_index.cxx | 15 | ||||
-rw-r--r-- | xml2cmp/source/xcd/cr_index.hxx | 4 | ||||
-rw-r--r-- | xml2cmp/source/xcd/cr_metho.cxx | 15 | ||||
-rw-r--r-- | xml2cmp/source/xcd/cr_metho.hxx | 4 | ||||
-rw-r--r-- | xml2cmp/source/xcd/filebuff.cxx | 4 | ||||
-rw-r--r-- | xml2cmp/source/xcd/filebuff.hxx | 4 | ||||
-rw-r--r-- | xml2cmp/source/xcd/main.cxx | 36 | ||||
-rw-r--r-- | xml2cmp/source/xcd/makefile.mk | 4 | ||||
-rw-r--r-- | xml2cmp/source/xcd/parse.cxx | 15 | ||||
-rw-r--r-- | xml2cmp/source/xcd/parse.hxx | 2 | ||||
-rw-r--r-- | xml2cmp/source/xcd/xmltree.cxx | 2 | ||||
-rw-r--r-- | xml2cmp/source/xcd/xmltree.hxx | 2 |
14 files changed, 71 insertions, 50 deletions
diff --git a/xml2cmp/source/xcd/cr_html.cxx b/xml2cmp/source/xcd/cr_html.cxx index 3916c170f1b6..5cfeabedc1e0 100644 --- a/xml2cmp/source/xcd/cr_html.cxx +++ b/xml2cmp/source/xcd/cr_html.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cr_html.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,11 +59,13 @@ * ************************************************************************/ -#include <fstream.h> +#include <fstream> #include "cr_html.hxx" #include "xmltree.hxx" #include "../support/syshelp.hxx" +using std::cerr; +using std::ofstream; @@ -97,7 +99,7 @@ HtmlCreator::HtmlCreator( const char * i_pOutputFileName, { if ( !aFile ) { - cerr << "Error: " << i_pOutputFileName << " could not be created." << endl; + cerr << "Error: " << i_pOutputFileName << " could not be created." << std::endl; exit(0); } } diff --git a/xml2cmp/source/xcd/cr_html.hxx b/xml2cmp/source/xcd/cr_html.hxx index e17fc05d35fd..d88e912d927f 100644 --- a/xml2cmp/source/xcd/cr_html.hxx +++ b/xml2cmp/source/xcd/cr_html.hxx @@ -2,9 +2,9 @@ * * $RCSfile: cr_html.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses diff --git a/xml2cmp/source/xcd/cr_index.cxx b/xml2cmp/source/xcd/cr_index.cxx index 93369e6a48eb..0e6f47aed903 100644 --- a/xml2cmp/source/xcd/cr_index.cxx +++ b/xml2cmp/source/xcd/cr_index.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cr_index.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,12 +63,15 @@ #include "cr_index.hxx" #include <string.h> -#include <fstream.h> +#include <fstream> #include "../support/syshelp.hxx" #include "xmltree.hxx" #include "parse.hxx" #include "cr_html.hxx" +using std::cerr; +using std::ofstream; + char C_sLineEnd[] = "\n"; @@ -136,7 +139,7 @@ Index::IndexedTags::IndexedTags( const List<Simstr> & i_rTagList ) cerr << "Warning: It is not possible to create an index for the tag " << i_rTagList[i] << "." - << endl; + << std::endl; } } // end for } @@ -176,7 +179,7 @@ Index::WriteOutput( const char * i_sOuputFile ) cerr << "Error: Indexfile \"" << i_sOuputFile << "\" could not be created." - << endl; + << std::endl; return; } @@ -212,7 +215,7 @@ Index::ReadFile( const char * i_sFilename ) cerr << "Error: File \"" << i_sFilename << "\" could not be parsed." - << endl; + << std::endl; return; } diff --git a/xml2cmp/source/xcd/cr_index.hxx b/xml2cmp/source/xcd/cr_index.hxx index 0a4e5925d2b6..e322c8856710 100644 --- a/xml2cmp/source/xcd/cr_index.hxx +++ b/xml2cmp/source/xcd/cr_index.hxx @@ -2,9 +2,9 @@ * * $RCSfile: cr_index.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses diff --git a/xml2cmp/source/xcd/cr_metho.cxx b/xml2cmp/source/xcd/cr_metho.cxx index 86863b802a84..e1dc3492fda8 100644 --- a/xml2cmp/source/xcd/cr_metho.cxx +++ b/xml2cmp/source/xcd/cr_metho.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cr_metho.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,8 +62,13 @@ #include "cr_metho.hxx" #include <string.h> -#include <iostream.h> -#include <fstream.h> +#include <fstream> +#include <iostream> + + +using std::cerr; +using std::ofstream; +using std::ios; char C_sFileHeader1[] = "/* "; @@ -101,7 +106,7 @@ Create_AccessMethod( const char * i_pOutputFileName, if ( !aFile ) { - cerr << "Error: " << i_pOutputFileName << " could not be created." << endl; + cerr << "Error: " << i_pOutputFileName << " could not be created." << std::endl; return; } diff --git a/xml2cmp/source/xcd/cr_metho.hxx b/xml2cmp/source/xcd/cr_metho.hxx index ba96ad1de102..7beb24e4d457 100644 --- a/xml2cmp/source/xcd/cr_metho.hxx +++ b/xml2cmp/source/xcd/cr_metho.hxx @@ -2,9 +2,9 @@ * * $RCSfile: cr_metho.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses diff --git a/xml2cmp/source/xcd/filebuff.cxx b/xml2cmp/source/xcd/filebuff.cxx index 7487f8f218b7..ebd87335a2fc 100644 --- a/xml2cmp/source/xcd/filebuff.cxx +++ b/xml2cmp/source/xcd/filebuff.cxx @@ -2,9 +2,9 @@ * * $RCSfile: filebuff.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses diff --git a/xml2cmp/source/xcd/filebuff.hxx b/xml2cmp/source/xcd/filebuff.hxx index fa6fe8736828..d5b8ef69bc7d 100644 --- a/xml2cmp/source/xcd/filebuff.hxx +++ b/xml2cmp/source/xcd/filebuff.hxx @@ -2,9 +2,9 @@ * * $RCSfile: filebuff.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses diff --git a/xml2cmp/source/xcd/main.cxx b/xml2cmp/source/xcd/main.cxx index 5de2f1ab1bb7..e03a786f5898 100644 --- a/xml2cmp/source/xcd/main.cxx +++ b/xml2cmp/source/xcd/main.cxx @@ -2,9 +2,9 @@ * * $RCSfile: main.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: np $ $Date: 2001-03-12 17:16:35 $ + * last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,8 +59,10 @@ * ************************************************************************/ +#include <iostream> #include <stdio.h> + #include <string.h> #include "../support/cmdline.hxx" #include "cr_metho.hxx" @@ -78,11 +80,13 @@ #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> +#define stricmp strcasecmp #else #error Must run under unix or windows, please define UNX or WNT. #endif +using std::cerr; int Do_IndexCommandLine( @@ -113,7 +117,7 @@ main( int argc, if (! aCommandLine.IsOk()) { - cerr << aCommandLine.ErrorText() << endl; + cerr << aCommandLine.ErrorText() << std::endl; return 1; } @@ -136,7 +140,7 @@ Do_SingleFileCommandLine(const CommandLine & i_rCommandLine) bool bParseResult = aParser.Parse(i_rCommandLine.XmlSrcFile()); if (! bParseResult) { - cerr << "Error: File %s could not be parsed." << i_rCommandLine.XmlSrcFile() << endl; + cerr << "Error: File %s could not be parsed." << i_rCommandLine.XmlSrcFile() << std::endl; return 1; } @@ -172,14 +176,14 @@ Do_IndexCommandLine(const CommandLine & i_rCommandLine) i_rCommandLine.IdlRootPath(), i_rCommandLine.IndexedTags() ); - cout << "Gather xml-files ..." << endl; + std::cout << "Gather xml-files ..." << std::endl; GatherFileNames( aFiles, i_rCommandLine.XmlSrcDirectory() ); - cout << "Create output ..." << endl; + std::cout << "Create output ..." << std::endl; aIndex.GatherData(aFiles); aIndex.WriteOutput( i_rCommandLine.IndexOutputFile() ); - cout << "... done." << endl; + std::cout << "... done." << std::endl; return 0; }; @@ -223,14 +227,14 @@ GatherFileNames( List<Simstr> & o_sFiles, _findclose(hFile); delete [] sFilter; #elif defined(UNX) - struct DIR * pDir = opendir( i_sSrcDirectory ); - struct dirent * pEntry = 0; + DIR * pDir = opendir( i_sSrcDirectory ); + dirent * pEntry = 0; char * sEnding; - while ( pEntry = readdir(pDir) != 0 ) + while ( (pEntry = readdir(pDir)) != 0 ) { sEnding = strrchr(pEntry->d_name,'.'); - if (sEnding != 0 ? stricmp(sEnding,".xml") == 0 : False ) + if (sEnding != 0 ? stricmp(sEnding,".xml") == 0 : 0 ) { sNew = i_sSrcDirectory; sNew += "/"; @@ -301,12 +305,12 @@ GatherSubDirectories( List<Simstr> & o_sSubDirectories, delete [] sFilter; #elif defined(UNX) - struct DIR * pDir = opendir( i_sParentdDirectory ); - struct dirent * pEntry = 0; + DIR * pDir = opendir( i_sParentdDirectory ); + dirent * pEntry = 0; struct stat aEntryStatus; char * sEnding; - while ( pEntry = readdir(pDir) != 0 ) + while ( ( pEntry = readdir(pDir) ) != 0 ) { stat(pEntry->d_name, &aEntryStatus); if ( ( aEntryStatus.st_mode & S_IFDIR ) == S_IFDIR ) @@ -317,7 +321,7 @@ GatherSubDirectories( List<Simstr> & o_sSubDirectories, && strncmp(pEntry->d_name, "unx", 3) != 0 ) { sNew = pEntry->d_name; - o_sSubDirectories.push_back(pNew); + o_sSubDirectories.push_back(sNew); } } // endif (aEntry.attrib == _A_SUBDIR) } // end while @@ -340,7 +344,7 @@ Create_TypeInfoFile( const char * o_sOutputFile, ); if ( !aOut ) { - cerr << "Error: " << o_sOutputFile << " could not be created." << endl; + cerr << "Error: " << o_sOutputFile << " could not be created." << std::endl; return; } diff --git a/xml2cmp/source/xcd/makefile.mk b/xml2cmp/source/xcd/makefile.mk index d5bbff38ed32..a97edf0a921f 100644 --- a/xml2cmp/source/xcd/makefile.mk +++ b/xml2cmp/source/xcd/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1 $ +# $Revision: 1.2 $ # -# last change: $Author: np $ $Date: 2001-03-09 15:23:00 $ +# last change: $Author: np $ $Date: 2001-03-12 19:24:52 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses diff --git a/xml2cmp/source/xcd/parse.cxx b/xml2cmp/source/xcd/parse.cxx index 63cb2ca6b17e..02ae2ac7716e 100644 --- a/xml2cmp/source/xcd/parse.cxx +++ b/xml2cmp/source/xcd/parse.cxx @@ -2,7 +2,7 @@ * * $RCSfile: parse.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * * last change: $Author: np $Date: $ * @@ -63,9 +63,16 @@ #include <parse.hxx> #include <string.h> -#include <ostream.h> +#include <iostream> #include <xmltree.hxx> +#ifdef UNX +#define strnicmp strncasecmp +#endif + + +using std::cerr; + // NOT FULLY DEFINED SERVICES @@ -88,9 +95,9 @@ char C_sType[] = "type"; #define AssertionOf(x) \ - {if (!(x)) {cerr << "Assertion failed: " << #x << __FILE__ << __LINE__ << endl; exit(3); }} + {if (!(x)) {cerr << "Assertion failed: " << #x << __FILE__ << __LINE__ << std::endl; exit(3); }} #define SyntaxAssertion(x,file) \ - {if (!(x)) {cerr << "Syntax error in file: " << #file << endl; exit(3); }} + {if (!(x)) {cerr << "Syntax error in file: " << #file << std::endl; exit(3); }} diff --git a/xml2cmp/source/xcd/parse.hxx b/xml2cmp/source/xcd/parse.hxx index efc6dc8ef6e2..7716d8abbb60 100644 --- a/xml2cmp/source/xcd/parse.hxx +++ b/xml2cmp/source/xcd/parse.hxx @@ -2,7 +2,7 @@ * * $RCSfile: parse.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * * last change: $Author: np $Date: $ * diff --git a/xml2cmp/source/xcd/xmltree.cxx b/xml2cmp/source/xcd/xmltree.cxx index 06b07513c80c..9df74396385d 100644 --- a/xml2cmp/source/xcd/xmltree.cxx +++ b/xml2cmp/source/xcd/xmltree.cxx @@ -2,7 +2,7 @@ * * $RCSfile: xmltree.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * * last change: $Author: np $Date: $ * diff --git a/xml2cmp/source/xcd/xmltree.hxx b/xml2cmp/source/xcd/xmltree.hxx index 0ea829b63176..6db9eea447b3 100644 --- a/xml2cmp/source/xcd/xmltree.hxx +++ b/xml2cmp/source/xcd/xmltree.hxx @@ -2,7 +2,7 @@ * * $RCSfile: xmltree.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * * last change: $Author: np $Date: $ * |