diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/picviz/files/patch-src-libpicviz-parser-lexer.l | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/graphics/picviz/files/patch-src-libpicviz-parser-lexer.l b/graphics/picviz/files/patch-src-libpicviz-parser-lexer.l deleted file mode 100644 index 0a185ad0af63..000000000000 --- a/graphics/picviz/files/patch-src-libpicviz-parser-lexer.l +++ /dev/null @@ -1,51 +0,0 @@ ---- src/libpicviz/parser/lexer.l.orig 2008-10-27 12:39:31.000000000 +0100 -+++ src/libpicviz/parser/lexer.l 2008-11-08 17:11:55.000000000 +0100 -@@ -19,7 +19,27 @@ - static char *realfile; - - void yyerror (char *s); -+ -+#ifdef __FreeBSD__ -+char* strndup(const char* string, size_t n) -+{ -+ char* copy_string = 0; -+ -+ if(0 == string || 0 == n) -+ return 0; -+ -+ copy_string = (char*) malloc(n + 1); -+ if(0 == copy_string) -+ return 0; -+ -+ memcpy(copy_string, string, n); -+ *(copy_string + n) = '\0'; -+ -+ return copy_string; -+} -+#else - char * strndup (const char *s, size_t n); -+#endif - - #define MAX_INCLUDE_DEPTH 10 - YY_BUFFER_STATE includes[MAX_INCLUDE_DEPTH]; -@@ -48,7 +68,20 @@ - return str; - } - -+void yyset_lineno(int line_number) { -+ yylineno = line_number; -+} -+ -+int yyget_lineno() { -+ return yylineno; -+} -+ -+char * yyget_text() { -+ return yytext; -+} -+ - %} -+%option yylineno - %option noyywrap - - SECTION (header|engine|axes|data) |