* ginsh_input(): Modern versions of flex want us to use the macro
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Sat, 6 Sep 2003 01:11:58 +0000 (01:11 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Sat, 6 Sep 2003 01:11:58 +0000 (01:11 +0000)
  YY_CURRENT_BUFFER instead of accessing yy_current_buffer directly.
  (I'm not sure about the preprocessor conditional, but asking whether
  YY_CURRENT_BUFFER is defined appears to be the most natural strategy.)

ginsh/ginsh_lexer.ll

index 973d895..4194f94 100644 (file)
@@ -132,7 +132,11 @@ static char *line_ptr;
 static int ginsh_input(char *buf, int max_size)
 {
        int result;
+#if defined(YY_CURRENT_BUFFER)
+       if (YY_CURRENT_BUFFER->yy_is_interactive) {
+#else
        if (yy_current_buffer->yy_is_interactive) {
+#endif
 #ifdef HAVE_LIBREADLINE
                // Do we need to read a new line?
                int actual;