mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 18:44:20 +08:00
2000-12-01 Fernando Nasser <fnasser@redhat.com>
* p-exp.y: Define strncasecmp as strnicmp for MSVC. (yylex): Use strncasecmp, not strnicmp.
This commit is contained in:
parent
4372b67322
commit
9c21ccdc34
@ -1,3 +1,8 @@
|
|||||||
|
2000-12-01 Fernando Nasser <fnasser@redhat.com>
|
||||||
|
|
||||||
|
* p-exp.y: Define strncasecmp as strnicmp for MSVC.
|
||||||
|
(yylex): Use strncasecmp, not strnicmp.
|
||||||
|
|
||||||
2000-12-01 Fernando Nasser <fnasser@redhat.com>
|
2000-12-01 Fernando Nasser <fnasser@redhat.com>
|
||||||
|
|
||||||
* cli/cli-decode.c: New file. Handle lists of commands, their decoding
|
* cli/cli-decode.c: New file. Handle lists of commands, their decoding
|
||||||
|
@ -58,6 +58,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#include "symfile.h" /* Required by objfiles.h. */
|
#include "symfile.h" /* Required by objfiles.h. */
|
||||||
#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
|
#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
|
||||||
|
|
||||||
|
/* MSVC uses strnicmp instead of strncasecmp */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define strncasecmp strnicmp
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
|
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
|
||||||
as well as gratuitiously global symbol names, so we can have multiple
|
as well as gratuitiously global symbol names, so we can have multiple
|
||||||
yacc generated parsers in gdb. Note that these are only the variables
|
yacc generated parsers in gdb. Note that these are only the variables
|
||||||
@ -953,7 +958,7 @@ yylex ()
|
|||||||
/* See if it is a special token of length 3. */
|
/* See if it is a special token of length 3. */
|
||||||
if (explen > 2)
|
if (explen > 2)
|
||||||
for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++)
|
for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++)
|
||||||
if (strnicmp (tokstart, tokentab3[i].operator, 3) == 0
|
if (strncasecmp (tokstart, tokentab3[i].operator, 3) == 0
|
||||||
&& (!isalpha (tokentab3[i].operator[0]) || explen == 3
|
&& (!isalpha (tokentab3[i].operator[0]) || explen == 3
|
||||||
|| (!isalpha (tokstart[3]) && !isdigit (tokstart[3]) && tokstart[3] != '_')))
|
|| (!isalpha (tokstart[3]) && !isdigit (tokstart[3]) && tokstart[3] != '_')))
|
||||||
{
|
{
|
||||||
@ -965,7 +970,7 @@ yylex ()
|
|||||||
/* See if it is a special token of length 2. */
|
/* See if it is a special token of length 2. */
|
||||||
if (explen > 1)
|
if (explen > 1)
|
||||||
for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
|
for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
|
||||||
if (strnicmp (tokstart, tokentab2[i].operator, 2) == 0
|
if (strncasecmp (tokstart, tokentab2[i].operator, 2) == 0
|
||||||
&& (!isalpha (tokentab2[i].operator[0]) || explen == 2
|
&& (!isalpha (tokentab2[i].operator[0]) || explen == 2
|
||||||
|| (!isalpha (tokstart[2]) && !isdigit (tokstart[2]) && tokstart[2] != '_')))
|
|| (!isalpha (tokstart[2]) && !isdigit (tokstart[2]) && tokstart[2] != '_')))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user