aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/environ.c2
-rw-r--r--gdb/exec.c4
-rw-r--r--gdb/language.c48
-rw-r--r--gdb/source.c16
5 files changed, 40 insertions, 38 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2b60b2a..04d1516 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2005-08-29 Mark Kettenis <kettenis@gnu.org>
+ * environ.c (unset_in_environ): Use strncmp instead of
+ DEPRECATED_STREQN.
+ * exec.c (exec_file_attach): Remove DEPRECATED_HPUX_TEXT_END.
+ * language.c (set_case_command, language_enum): Use strcmp instead
+ of DEPRECATED_STREQ.
+ * source.c (select_source_symtab): Sprinkle a few consts. Use
+ strcmp instead of DEPRECATED_STREQ.
+
* solib-svr4.c (svr4_current_sos, svr4_fetch_objfile_link_map):
Use XZALLOC and xzalloc instead of xmalloc where appropriate.
diff --git a/gdb/environ.c b/gdb/environ.c
index 3469f88..6cd7476 100644
--- a/gdb/environ.c
+++ b/gdb/environ.c
@@ -170,7 +170,7 @@ unset_in_environ (struct gdb_environ *e, char *var)
for (; (s = *vector) != NULL; vector++)
{
- if (DEPRECATED_STREQN (s, var, len) && s[len] == '=')
+ if (strncmp (s, var, len) == 0 && s[len] == '=')
{
xfree (s);
/* Walk through the vector, shuffling args down by one, including
diff --git a/gdb/exec.c b/gdb/exec.c
index 69d10bf..c946613 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -264,10 +264,6 @@ exec_file_attach (char *filename, int from_tty)
scratch_pathname, bfd_errmsg (bfd_get_error ()));
}
-#ifdef DEPRECATED_HPUX_TEXT_END
- DEPRECATED_HPUX_TEXT_END (&exec_ops);
-#endif
-
validate_files ();
set_gdbarch_from_file (exec_bfd);
diff --git a/gdb/language.c b/gdb/language.c
index 654f0f4..78a72f0 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -324,32 +324,34 @@ show_case_command (struct ui_file *file, int from_tty,
"Warning: the current case sensitivity setting does not match the language.\n");
}
-/* Set command. Change the setting for case sensitivity. */
+/* Set command. Change the setting for case sensitivity. */
+
static void
set_case_command (char *ignore, int from_tty, struct cmd_list_element *c)
{
- if (DEPRECATED_STREQ (case_sensitive, "on"))
- {
- case_sensitivity = case_sensitive_on;
- case_mode = case_mode_manual;
- }
- else if (DEPRECATED_STREQ (case_sensitive, "off"))
- {
- case_sensitivity = case_sensitive_off;
- case_mode = case_mode_manual;
- }
- else if (DEPRECATED_STREQ (case_sensitive, "auto"))
- {
- case_mode = case_mode_auto;
- set_type_range_case ();
- /* Avoid hitting the set_case_str call below. We
- did it in set_type_range_case. */
- return;
- }
+ if (strcmp (case_sensitive, "on") == 0)
+ {
+ case_sensitivity = case_sensitive_on;
+ case_mode = case_mode_manual;
+ }
+ else if (strcmp (case_sensitive, "off") == 0)
+ {
+ case_sensitivity = case_sensitive_off;
+ case_mode = case_mode_manual;
+ }
+ else if (strcmp (case_sensitive, "auto") == 0)
+ {
+ case_mode = case_mode_auto;
+ set_type_range_case ();
+ /* Avoid hitting the set_case_str call below. We did it in
+ set_type_range_case. */
+ return;
+ }
else
- {
- warning (_("Unrecognized case-sensitive setting: \"%s\""), case_sensitive);
- }
+ {
+ warning (_("Unrecognized case-sensitive setting: \"%s\""),
+ case_sensitive);
+ }
set_case_str();
show_case_command (NULL, from_tty, NULL, NULL);
}
@@ -918,7 +920,7 @@ language_enum (char *str)
int i;
for (i = 0; i < languages_size; i++)
- if (DEPRECATED_STREQ (languages[i]->la_name, str))
+ if (strcmp (languages[i]->la_name, str) == 0)
return languages[i]->la_language;
return language_unknown;
diff --git a/gdb/source.c b/gdb/source.c
index e2baddc..14051b7 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -251,12 +251,10 @@ select_source_symtab (struct symtab *s)
{
for (s = ofp->symtabs; s; s = s->next)
{
- char *name = s->filename;
+ const char *name = s->filename;
int len = strlen (name);
- if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h"))))
- {
- current_source_symtab = s;
- }
+ if (!(len > 2 && strcmp(&name[len - 2], ".h") == 0))
+ current_source_symtab = s;
}
}
if (current_source_symtab)
@@ -268,12 +266,10 @@ select_source_symtab (struct symtab *s)
{
for (ps = ofp->psymtabs; ps != NULL; ps = ps->next)
{
- char *name = ps->filename;
+ const char *name = ps->filename;
int len = strlen (name);
- if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h"))))
- {
- cs_pst = ps;
- }
+ if (!(len > 2 && strcmp (&name[len - 2], ".h") == 0))
+ cs_pst = ps;
}
}
if (cs_pst)