diff options
author | Simon Stelling <blubb@gentoo.org> | 2006-01-30 13:22:24 +0000 |
---|---|---|
committer | Simon Stelling <blubb@gentoo.org> | 2006-01-30 13:22:24 +0000 |
commit | 12e21513fd6eb010ae0a5ff486c69141b8c5920f (patch) | |
tree | a1c1db086920b4e13731e8904ad2e8918b24489f /dev-util/re2c/files | |
parent | new upstream release (diff) | |
download | historical-12e21513fd6eb010ae0a5ff486c69141b8c5920f.tar.gz historical-12e21513fd6eb010ae0a5ff486c69141b8c5920f.tar.bz2 historical-12e21513fd6eb010ae0a5ff486c69141b8c5920f.zip |
no need to gzip smallish patches
Package-Manager: portage-2.1_pre3-r1
Diffstat (limited to 'dev-util/re2c/files')
-rw-r--r-- | dev-util/re2c/files/0.9.1-patch | 217 | ||||
-rw-r--r-- | dev-util/re2c/files/0.9.1-patch.gz | bin | 1466 -> 0 bytes |
2 files changed, 217 insertions, 0 deletions
diff --git a/dev-util/re2c/files/0.9.1-patch b/dev-util/re2c/files/0.9.1-patch new file mode 100644 index 000000000000..045f20f1f2cc --- /dev/null +++ b/dev-util/re2c/files/0.9.1-patch @@ -0,0 +1,217 @@ +diff -rNd -U 7 re2c-0.9.1-orig/Makefile re2c-0.9.1/Makefile +--- re2c-0.9.1-orig/Makefile 2003-06-03 10:54:04.000000000 -0700 ++++ re2c-0.9.1/Makefile 2003-06-03 10:56:13.000000000 -0700 +@@ -1,19 +1,19 @@ + # $Log: not supported by cvs2svn $ + #Revision 1.1 1994/04/08 16:30:37 peter + #Initial revision + # + +-BIN = /usr/local/bin +-MAN = /usr/local/man ++BIN = /usr/bin ++MAN = /usr/share/man + +-%.o : %.cc ; $(CC) -o $@ $(CFLAGS) -c $< ++%.o : %.cc ; $(CXX) -o $@ $(CXXFLAGS) -c $< ++%.o : %.c ; $(CC) -o $@ $(CFLAGS) -c $< + %.cc : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@ + %.cc : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@ +- + %.cc: %.re + re2c -s $< >$@ + + SOURCES = code.cc dfa.cc main.cc parser.y actions.cc scanner.re substr.cc\ + translate.cc + OBJS = code.o dfa.o main.o parser.o actions.o scanner.o substr.o\ + translate.o +diff -rNd -U 7 re2c-0.9.1-orig/scanner.cc re2c-0.9.1/scanner.cc +--- re2c-0.9.1-orig/scanner.cc 2003-06-03 10:54:04.000000000 -0700 ++++ re2c-0.9.1/scanner.cc 2003-06-03 10:54:21.000000000 -0700 +@@ -8,42 +8,42 @@ + #include "parser.h" + #include "y.tab.h" + + extern YYSTYPE yylval; + + #define BSIZE 8192 + +-#define YYCTYPE uchar ++#define YYCTYPE char + #define YYCURSOR cursor + #define YYLIMIT lim + #define YYMARKER ptr + #define YYFILL(n) {cursor = fill(cursor);} + + #define RETURN(i) {cur = cursor; return i;} + + + Scanner::Scanner(int i) : in(i), + bot(NULL), tok(NULL), ptr(NULL), cur(NULL), pos(NULL), lim(NULL), + top(NULL), eof(NULL), tchar(0), tline(0), cline(1) { + ; + } + +-uchar *Scanner::fill(uchar *cursor){ ++char *Scanner::fill(char *cursor){ + if(!eof){ + uint cnt = tok - bot; + if(cnt){ + memcpy(bot, tok, lim - tok); + tok = bot; + ptr -= cnt; + cursor -= cnt; + pos -= cnt; + lim -= cnt; + } + if((top - lim) < BSIZE){ +- uchar *buf = new uchar[(lim - bot) + BSIZE]; ++ char *buf = new char[(lim - bot) + BSIZE]; + memcpy(buf, tok, lim - tok); + tok = buf; + ptr = &buf[ptr - bot]; + cursor = &buf[cursor - bot]; + pos = &buf[pos - bot]; + lim = &buf[lim - bot]; + top = &lim[BSIZE]; +@@ -58,15 +58,15 @@ + return cursor; + } + + #line 68 + + + int Scanner::echo(ostream &out){ +- uchar *cursor = cur; ++ char *cursor = cur; + tok = cursor; + echo: + { + YYCTYPE yych; + unsigned int yyaccept; + goto yy0; + yy1: ++YYCURSOR; +@@ -113,15 +113,15 @@ + } + #line 83 + + } + + + int Scanner::scan(){ +- uchar *cursor = cur; ++ char *cursor = cur; + uint depth; + + scan: + tchar = cursor - pos; + tline = cline; + tok = cursor; + { +diff -rNd -U 7 re2c-0.9.1-orig/scanner.h re2c-0.9.1/scanner.h +--- re2c-0.9.1-orig/scanner.h 2003-06-03 10:54:04.000000000 -0700 ++++ re2c-0.9.1/scanner.h 2003-06-03 10:54:22.000000000 -0700 +@@ -2,18 +2,18 @@ + #define _scanner_h + + #include "token.h" + + class Scanner { + private: + int in; +- uchar *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof; ++ char *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof; + uint tchar, tline, cline; + private: +- uchar *fill(uchar*); ++ char *fill(char*); + public: + Scanner(int); + int echo(ostream&); + int scan(); + void fatal(char*); + SubStr token(); + uint line(); +diff -rNd -U 7 re2c-0.9.1-orig/scanner.re re2c-0.9.1/scanner.re +--- re2c-0.9.1-orig/scanner.re 2003-06-03 10:54:04.000000000 -0700 ++++ re2c-0.9.1/scanner.re 2003-06-03 10:54:23.000000000 -0700 +@@ -6,42 +6,42 @@ + #include "parser.h" + #include "y.tab.h" + + extern YYSTYPE yylval; + + #define BSIZE 8192 + +-#define YYCTYPE uchar ++#define YYCTYPE char + #define YYCURSOR cursor + #define YYLIMIT lim + #define YYMARKER ptr + #define YYFILL(n) {cursor = fill(cursor);} + + #define RETURN(i) {cur = cursor; return i;} + + + Scanner::Scanner(int i) : in(i), + bot(NULL), tok(NULL), ptr(NULL), cur(NULL), pos(NULL), lim(NULL), + top(NULL), eof(NULL), tchar(0), tline(0), cline(1) { + ; + } + +-uchar *Scanner::fill(uchar *cursor){ ++char *Scanner::fill(char *cursor){ + if(!eof){ + uint cnt = tok - bot; + if(cnt){ + memcpy(bot, tok, lim - tok); + tok = bot; + ptr -= cnt; + cursor -= cnt; + pos -= cnt; + lim -= cnt; + } + if((top - lim) < BSIZE){ +- uchar *buf = new uchar[(lim - bot) + BSIZE]; ++ char *buf = new char[(lim - bot) + BSIZE]; + memcpy(buf, tok, lim - tok); + tok = buf; + ptr = &buf[ptr - bot]; + cursor = &buf[cursor - bot]; + pos = &buf[pos - bot]; + lim = &buf[lim - bot]; + top = &lim[BSIZE]; +@@ -64,15 +64,15 @@ + dstring = "\"" ((esc \ ["] ) | "\\" dot)* "\""; + sstring = "'" ((esc \ ['] ) | "\\" dot)* "'" ; + letter = [a-zA-Z]; + digit = [0-9]; + */ + + int Scanner::echo(ostream &out){ +- uchar *cursor = cur; ++ char *cursor = cur; + tok = cursor; + echo: + /*!re2c + "/*!re2c" { out.write(tok, &cursor[-7] - tok); + tok = cursor; + RETURN(1); } + "\n" { if(cursor == eof) RETURN(0); +@@ -81,15 +81,15 @@ + goto echo; } + any { goto echo; } + */ + } + + + int Scanner::scan(){ +- uchar *cursor = cur; ++ char *cursor = cur; + uint depth; + + scan: + tchar = cursor - pos; + tline = cline; + tok = cursor; + /*!re2c diff --git a/dev-util/re2c/files/0.9.1-patch.gz b/dev-util/re2c/files/0.9.1-patch.gz Binary files differdeleted file mode 100644 index a6a8f076caee..000000000000 --- a/dev-util/re2c/files/0.9.1-patch.gz +++ /dev/null |