DragonFly BSD
DragonFly submit List (threaded) for 2005-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Bring usr.bin/lex up to c++ standards


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Thu, 18 Aug 2005 01:25:17 +0200
Mail-followup-to: submit@crater.dragonflybsd.org

On Wed, Aug 17, 2005 at 07:11:23PM -0000, Andreas Hauser wrote:
> Index: usr.bin/lex/flex.skl
> ===================================================================
> RCS file: /home/dcvs/src/usr.bin/lex/flex.skl,v
> retrieving revision 1.4
> diff -u -p -r1.4 flex.skl
> --- usr.bin/lex/flex.skl	2 Mar 2005 07:09:38 -0000	1.4
> +++ usr.bin/lex/flex.skl	17 Aug 2005 20:28:22 -0000
> @@ -1170,6 +1171,12 @@ void yyFlexLexer::yy_delete_buffer( YY_B
>  
>  
>  %-
> +#ifndef YY_ALWAYS_INTERACTIVE
> +#ifndef YY_NEVER_INTERACTIVE
> +extern int isatty YY_PROTO(( int ));
> +#endif
> +#endif
> +
>  #ifdef YY_USE_PROTOS
>  void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
>  #else

This looks wrong and unnecessary to me. We include unistd.h already for
exactly this reason.

> Index: usr.bin/lex/yylex.c
> ===================================================================
> RCS file: /home/dcvs/src/usr.bin/lex/yylex.c,v
> retrieving revision 1.3
> diff -u -p -r1.3 yylex.c
> --- usr.bin/lex/yylex.c	4 Oct 2003 20:36:47 -0000	1.3
> +++ usr.bin/lex/yylex.c	17 Aug 2005 20:29:01 -0000
> @@ -37,7 +37,7 @@
>  
>  /* yylex - scan for a regular expression token */
>  
> -int yylex(void)
> +int yylex()
>  	{
>  	int toktype;
>  	static int beglin = false;

This is just wrong too. Rest will go in sometimes tomorrow.

Joerg



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]