[BACK]Return to lex.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / parse

Diff for /OpenXM_contrib2/asir2018/parse/lex.c between version 1.2 and 1.6

version 1.2, 2019/12/13 14:40:50 version 1.6, 2022/09/07 03:17:44
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2018/parse/lex.c,v 1.1 2018/09/19 05:45:08 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2018/parse/lex.c,v 1.5 2020/10/06 06:45:37 noro Exp $
 */  */
 #include <ctype.h>  #include <ctype.h>
 #include "ca.h"  #include "ca.h"
Line 60 
Line 60 
 #include "y.tab.h"  #include "y.tab.h"
 #endif  #endif
 #if FEP  #if FEP
 #include <readline/readline.h>  #include <editline/readline.h>
 #endif  #endif
   
 static int Getc();  static int Getc();
Line 455  int yylex()
Line 455  int yylex()
     }      }
   } else    } else
     return ( c );      return ( c );
     /* XXX */
     return 0;
 }  }
   
   /* for __fpurge() */
   #if defined(linux)
   #include <stdio_ext.h>
   #endif
   
 void purge_stdin()  void purge_stdin()
 {  {
 #if defined(__FreeBSD__) || defined(__DARWIN__) || defined(ANDROID)  #if defined(__FreeBSD__) || defined(__DARWIN__) || defined(ANDROID)
   fpurge(stdin);    fpurge(stdin);
 #elif defined(linux)  #elif defined(linux)
   stdin->_IO_read_end = stdin->_IO_read_base;  //  stdin->_IO_read_end = stdin->_IO_read_base;
   stdin->_IO_read_ptr = stdin->_IO_read_base;  //  stdin->_IO_read_ptr = stdin->_IO_read_base;
     __fpurge(stdin);
 #elif defined(VISUAL_LIB)  #elif defined(VISUAL_LIB)
   void w_purge_stdin();    void w_purge_stdin();
   
Line 519  int afternl() {
Line 527  int afternl() {
         quote = quote ? 0 : 1;          quote = quote ? 0 : 1;
       else if ( quote && (*ptr == ' ') )        else if ( quote && (*ptr == ' ') )
         *ptr = '_';          *ptr = '_';
     stoarg(buf0,&ac,av);      stoarg(buf0,&ac,av);
     if ( ac == 3 )      if ( ac == 3 ) {
       if ( (i = atoi(av[2])) == 1 )        if ( (i = atoi(av[2])) == 1 )
         ilevel++;          ilevel++;
       else if ( i == 2 )        else if ( i == 2 )
         ilevel--;          ilevel--;
       }
     if ( !ilevel )      if ( !ilevel )
       asir_infile->ln = atoi(av[0]);        asir_infile->ln = atoi(av[0]);
   }    }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>