Revision: 1394
http://svn.sourceforge.net/complement/?rev=1394&view=rev
Author: complement
Date: 2006-11-10 06:36:53 -0800 (Fri, 10 Nov 2006)
Log Message:
-----------
change stringstream to modern syntax
Modified Paths:
--------------
trunk/complement/explore/app/utils/RTF/chars.cc
trunk/complement/explore/app/utils/RTF/rtf.lex
Modified: trunk/complement/explore/app/utils/RTF/chars.cc
===================================================================
--- trunk/complement/explore/app/utils/RTF/chars.cc 2006-11-03 16:25:19 UTC (rev 1393)
+++ trunk/complement/explore/app/utils/RTF/chars.cc 2006-11-10 14:36:53 UTC (rev 1394)
@@ -15,17 +15,9 @@
* in supporting documentation.
*/
-#ifdef __unix
-# ifdef __HP_aCC
-#pragma VERSIONID "@(#)$Id$"
-# else
-#pragma ident "@(#)$Id$"
-# endif
-#endif
+// #include <iostream>
+// #include <sstream>
-#include <iostream>
-#include <strstream>
-
using namespace std;
void parse();
Modified: trunk/complement/explore/app/utils/RTF/rtf.lex
===================================================================
--- trunk/complement/explore/app/utils/RTF/rtf.lex 2006-11-03 16:25:19 UTC (rev 1393)
+++ trunk/complement/explore/app/utils/RTF/rtf.lex 2006-11-10 14:36:53 UTC (rev 1394)
@@ -19,14 +19,6 @@
%option c++
%{
-#ifdef __unix
-# ifdef __HP_aCC
-#pragma VERSIONID "@(#)$Id$"
-# else
-#pragma ident "@(#)$Id$"
-# endif
-#endif
-
#include <iostream>
#include <iomanip>
#include <sstream>
@@ -35,6 +27,8 @@
using namespace std;
+extern "C" int yywrap();
+
struct Lex {
Lex() :
brace( 0 ),
@@ -66,7 +60,7 @@
\{ la.brace++; // cerr << la.brace << endl;
\\\'[0-9a-f][[0-9a-f] {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
// char ch;
i.seekg( 2, ios_base::beg );
@@ -317,7 +311,7 @@
BEGIN(FONT);
la.mode = FONT;
la.brace++;
- istringstream s( YYText(), YYLeng() );
+ istringstream s( string(YYText(), YYLeng()) );
s.seekg( 3, ios_base::beg );
int n;
s >> n;
@@ -592,7 +586,7 @@
}
\\version[0-9]+ {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
i.seekg( 8, ios_base::beg );
i >> c;
@@ -600,7 +594,7 @@
}
\\edmins[0-9]+ {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
i.seekg( 7, ios_base::beg );
i >> c;
@@ -608,7 +602,7 @@
}
\\nofpages[0-9]+ {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
i.seekg( 9, ios_base::beg );
i >> c;
@@ -678,35 +672,35 @@
}
}
\\yr[0-9]{4} {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
i.seekg( 3, ios_base::beg );
i >> c;
cout << c;
}
\\mo[0-9]{1,2} {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
i.seekg( 3, ios_base::beg );
i >> c;
cout << "-" << setw(2) << setfill('0') << c;
}
\\dy[0-9]{1,2} {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
i.seekg( 3, ios_base::beg );
i >> c;
cout << "-" << setw(2) << setfill('0') << c;
}
\\hr[0-9]{1,2} {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
i.seekg( 3, ios_base::beg );
i >> c;
cout << " " << setw(2) << setfill('0') << c;
}
\\min[0-9]{1,2} {
- istringstream i( YYText(), YYLeng() );
+ istringstream i( string(YYText(), YYLeng()) );
unsigned c;
i.seekg( 4, ios_base::beg );
i >> c;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|