/* Multiple source language support for GDB.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
/* Search the list of languages for a match. */
for (i = 0; i < languages_size; i++)
{
- if (STREQ (languages[i]->la_name, language))
+ if (strcmp (languages[i]->la_name, language) == 0)
{
/* Found it! Go into manual mode, and use this language. */
if (languages[i]->la_language == language_auto)
static void
set_type_command (char *ignore, int from_tty)
{
- if (STREQ (type, "on"))
+ if (strcmp (type, "on") == 0)
{
type_check = type_check_on;
type_mode = type_mode_manual;
}
- else if (STREQ (type, "warn"))
+ else if (strcmp (type, "warn") == 0)
{
type_check = type_check_warn;
type_mode = type_mode_manual;
}
- else if (STREQ (type, "off"))
+ else if (strcmp (type, "off") == 0)
{
type_check = type_check_off;
type_mode = type_mode_manual;
}
- else if (STREQ (type, "auto"))
+ else if (strcmp (type, "auto") == 0)
{
type_mode = type_mode_auto;
set_type_range_case ();
static void
set_range_command (char *ignore, int from_tty)
{
- if (STREQ (range, "on"))
+ if (strcmp (range, "on") == 0)
{
range_check = range_check_on;
range_mode = range_mode_manual;
}
- else if (STREQ (range, "warn"))
+ else if (strcmp (range, "warn") == 0)
{
range_check = range_check_warn;
range_mode = range_mode_manual;
}
- else if (STREQ (range, "off"))
+ else if (strcmp (range, "off") == 0)
{
range_check = range_check_off;
range_mode = range_mode_manual;
}
- else if (STREQ (range, "auto"))
+ else if (strcmp (range, "auto") == 0)
{
range_mode = range_mode_auto;
set_type_range_case ();
static void
set_case_command (char *ignore, int from_tty)
{
- if (STREQ (case_sensitive, "on"))
+ if (DEPRECATED_STREQ (case_sensitive, "on"))
{
case_sensitivity = case_sensitive_on;
case_mode = case_mode_manual;
}
- else if (STREQ (case_sensitive, "off"))
+ else if (DEPRECATED_STREQ (case_sensitive, "off"))
{
case_sensitivity = case_sensitive_off;
case_mode = case_mode_manual;
}
- else if (STREQ (case_sensitive, "auto"))
+ else if (DEPRECATED_STREQ (case_sensitive, "auto"))
{
case_mode = case_mode_auto;
set_type_range_case ();
int i;
for (i = 0; i < languages_size; i++)
- if (STREQ (languages[i]->la_name, str))
+ if (DEPRECATED_STREQ (languages[i]->la_name, str))
return languages[i]->la_language;
return language_unknown;
return NULL;
}
+/* Return the default string containing the list of characters
+ delimiting words. This is a reasonable default value that
+ most languages should be able to use. */
+
+char *
+default_word_break_characters (void)
+{
+ return " \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,-";
+}
/* Define the language that is no language. */
unk_lang_trampoline, /* Language specific skip_trampoline */
value_of_this, /* value_of_this */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
+ basic_lookup_transparent_type,/* lookup_transparent_type */
unk_lang_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
unk_lang_trampoline, /* Language specific skip_trampoline */
value_of_this, /* value_of_this */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
+ basic_lookup_transparent_type,/* lookup_transparent_type */
unk_lang_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
unk_lang_trampoline, /* Language specific skip_trampoline */
value_of_this, /* value_of_this */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
+ basic_lookup_transparent_type,/* lookup_transparent_type */
unk_lang_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
\f