]> git.pld-linux.org Git - packages/flex.git/blame - flex-gcc31.patch
- gcc 3.x fixes (patches stolen from RH).
[packages/flex.git] / flex-gcc31.patch
CommitLineData
ef0bd5ea 1--- flex-2.5.4.orig/FlexLexer.h Sun Jul 27 11:41:38 1997
2+++ flex-2.5.4/FlexLexer.h Wed Apr 17 09:57:22 2002
3@@ -44,7 +44,7 @@
4 #ifndef __FLEX_LEXER_H
5 // Never included before - need to define base class.
6 #define __FLEX_LEXER_H
7-#include <iostream.h>
8+#include <iostream>
9
10 extern "C++" {
11
12@@ -61,14 +61,14 @@
13 virtual void
14 yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
15 virtual struct yy_buffer_state*
16- yy_create_buffer( istream* s, int size ) = 0;
17+ yy_create_buffer( std::istream* s, int size ) = 0;
18 virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
19- virtual void yyrestart( istream* s ) = 0;
20+ virtual void yyrestart( std::istream* s ) = 0;
21
22 virtual int yylex() = 0;
23
24 // Call yylex with new input/output sources.
25- int yylex( istream* new_in, ostream* new_out = 0 )
26+ int yylex( std::istream* new_in, std::ostream* new_out = 0 )
27 {
28 switch_streams( new_in, new_out );
29 return yylex();
30@@ -76,8 +76,8 @@
31
32 // Switch to new input/output streams. A nil stream pointer
33 // indicates "keep the current one".
34- virtual void switch_streams( istream* new_in = 0,
35- ostream* new_out = 0 ) = 0;
36+ virtual void switch_streams( std::istream* new_in = 0,
37+ std::ostream* new_out = 0 ) = 0;
38
39 int lineno() const { return yylineno; }
40
41@@ -104,17 +104,17 @@
42 public:
43 // arg_yyin and arg_yyout default to the cin and cout, but we
44 // only make that assignment when initializing in yylex().
45- yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
46+ yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 );
47
48 virtual ~yyFlexLexer();
49
50 void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
51- struct yy_buffer_state* yy_create_buffer( istream* s, int size );
52+ struct yy_buffer_state* yy_create_buffer( std::istream* s, int size );
53 void yy_delete_buffer( struct yy_buffer_state* b );
54- void yyrestart( istream* s );
55+ void yyrestart( std::istream* s );
56
57 virtual int yylex();
58- virtual void switch_streams( istream* new_in, ostream* new_out );
59+ virtual void switch_streams( std::istream* new_in, std::ostream* new_out );
60
61 protected:
62 virtual int LexerInput( char* buf, int max_size );
63@@ -125,7 +125,7 @@
64 int yyinput();
65
66 void yy_load_buffer_state();
67- void yy_init_buffer( struct yy_buffer_state* b, istream* s );
68+ void yy_init_buffer( struct yy_buffer_state* b, std::istream* s );
69 void yy_flush_buffer( struct yy_buffer_state* b );
70
71 int yy_start_stack_ptr;
72@@ -140,8 +140,8 @@
73 yy_state_type yy_try_NUL_trans( yy_state_type current_state );
74 int yy_get_next_buffer();
75
76- istream* yyin; // input source for default LexerInput
77- ostream* yyout; // output sink for default LexerOutput
78+ std::istream* yyin; // input source for default LexerInput
79+ std::ostream* yyout; // output sink for default LexerOutput
80
81 struct yy_buffer_state* yy_current_buffer;
82
83--- flex-2.5.4.orig/skel.c Wed Apr 17 09:54:49 2002
84+++ flex-2.5.4/skel.c Wed Apr 17 09:56:01 2002
85@@ -31,7 +31,8 @@
86 "",
87 "#include <stdlib.h>",
88 "%+",
89- "#include <iostream.h>",
90+ "#include <iostream>",
91+ "using namespace std;",
92 "%*",
93 "",
94 "/* Use prototypes in function declarations. */",
This page took 0.33321 seconds and 4 git commands to generate.