This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch]: Replace DEPRECATED_STREQN
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: deuling at de dot ibm dot com
- Cc: gdb-patches at sourceware dot org, uweigand at de dot ibm dot com
- Date: Fri, 18 Jan 2008 09:55:25 +0100 (CET)
- Subject: Re: [patch]: Replace DEPRECATED_STREQN
- References: <479064C0.9090402@de.ibm.com>
> Date: Fri, 18 Jan 2008 09:35:12 +0100
> From: Markus Deuling <deuling@de.ibm.com>
>
> Hi,
>
> this patch replaces and removes DEPRECATED_STREQN. Testsuite showed
> no regressions.
>
> Is this ok to commit ?
If you fix the issue below:
> diff -urpN src/gdb/m2-exp.y dev/gdb/m2-exp.y
> --- src/gdb/m2-exp.y 2008-01-01 23:53:11.000000000 +0100
> +++ dev/gdb/m2-exp.y 2008-01-18 09:17:20.000000000 +0100
> @@ -845,7 +845,7 @@ yylex ()
>
> /* See if it is a special token of length 2 */
> for( i = 0 ; i < (int) (sizeof tokentab2 / sizeof tokentab2[0]) ; i++)
> - if(DEPRECATED_STREQN(tokentab2[i].name, tokstart, 2))
> + if( strncmp (tokentab2[i].name, tokstart, 2) == 0)
Space before the '(', not after.
> @@ -1076,12 +1077,12 @@ yylex ()
> else
> {
> /* Built-in BOOLEAN type. This is sort of a hack. */
> - if(DEPRECATED_STREQN(tokstart,"TRUE",4))
> + if( strncmp (tokstart, "TRUE", 4) == 0)
Likewise.
> {
> yylval.ulval = 1;
> return M2_TRUE;
> }
> - else if(DEPRECATED_STREQN(tokstart,"FALSE",5))
> + else if( strncmp (tokstart, "FALSE", 5) == 0)
And here too.