+Thu Jan 18 12:48:04 2001 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (STRCMP): Delete macro.
+
+ * objfiles.c (objfile_relocate): Replace STRCMP with call to
+ strcmp.
+ * symtab.c (lookup_partial_symbol, lookup_block_symbol): Ditto.
+ * symfile.c (compare_symbols): Ditto.
+ * standalone.c (open): Ditto.
+ * remote-es.c (verify_break): Ditto.
+ * cli/cli-decode.c (add_cmd, add_show_from_set): Ditto.
+
+ * symfile.c (compare_psymbols): Delete comment refering to STRCMP.
+
Thu Jan 18 12:25:06 2001 Andrew Cagney <cagney@b1.cygnus.com>
* varobj.c (FREEIF): Delete macro.
delete_cmd (name, list);
- if (*list == NULL || STRCMP ((*list)->name, name) >= 0)
+ if (*list == NULL || strcmp ((*list)->name, name) >= 0)
{
c->next = *list;
*list = c;
else
{
p = *list;
- while (p->next && STRCMP (p->next->name, name) <= 0)
+ while (p->next && strcmp (p->next->name, name) <= 0)
{
p = p->next;
}
else
fprintf_unfiltered (gdb_stderr, "GDB internal error: Bad docstring for set command\n");
- if (*list == NULL || STRCMP ((*list)->name, showcmd->name) >= 0)
+ if (*list == NULL || strcmp ((*list)->name, showcmd->name) >= 0)
{
showcmd->next = *list;
*list = showcmd;
else
{
p = *list;
- while (p->next && STRCMP (p->next->name, showcmd->name) <= 0)
+ while (p->next && strcmp (p->next->name, showcmd->name) <= 0)
{
p = p->next;
}
issue is found that we spend the effort on algorithmic
optimizations than micro-optimizing.'' J.T. */
-#define STRCMP(a,b) (*(a) == *(b) ? strcmp ((a), (b)) : (int)*(a) - (int)*(b))
#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
#define STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0)
else if (SYMBOL_CLASS (sym) == LOC_CONST
&& SYMBOL_NAMESPACE (sym) == LABEL_NAMESPACE
- && STRCMP (SYMBOL_NAME (sym), MIPS_EFI_SYMBOL_NAME) == 0)
+ && strcmp (SYMBOL_NAME (sym), MIPS_EFI_SYMBOL_NAME) == 0)
ecoff_relocate_efi (sym, ANOFFSET (delta,
s->block_line_section));
#endif
{
memory_error (status, memaddress);
}
- return (STRCMP (instr, buf));
+ return (strcmp (instr, buf));
}
return (-1);
}
for (next = files_start; *(int *) next; next += *(int *) next)
{
- if (!STRCMP (next + 4, filename))
+ if (!strcmp (next + 4, filename))
{
sourcebeg = next + 4 + strlen (next + 4) + 1;
sourcebeg = (char *) (((int) sourcebeg + 3) & (-4));
s1 = (struct symbol **) s1p;
s2 = (struct symbol **) s2p;
- return (STRCMP (SYMBOL_SOURCE_NAME (*s1), SYMBOL_SOURCE_NAME (*s2)));
+ return (strcmp (SYMBOL_SOURCE_NAME (*s1), SYMBOL_SOURCE_NAME (*s2)));
}
/*
}
else
{
- /* Note: I replaced the STRCMP line (commented out below)
- * with a simpler "strcmp()" which compares the 2 strings
- * from the beginning. (STRCMP is a macro which first compares
- * the initial characters, then falls back on strcmp).
- * The reason is that the STRCMP line was tickling a C compiler
- * bug on HP-UX 10.30, which is avoided with the simpler
- * code. The performance gain from the more complicated code
- * is negligible, given that we have already checked the
- * initial 2 characters above. I reported the compiler bug,
- * and once it is fixed the original line can be put back. RT
- */
- /* return ( STRCMP (st1 + 2, st2 + 2)); */
return (strcmp (st1, st2));
}
}
{
do_linear_search = 1;
}
- if (STRCMP (SYMBOL_SOURCE_NAME (*center), name) >= 0)
+ if (strcmp (SYMBOL_SOURCE_NAME (*center), name) >= 0)
{
top = center;
}
{
top = inc;
}
- else if (STRCMP (SYMBOL_SOURCE_NAME (sym), name) < 0)
+ else if (strcmp (SYMBOL_SOURCE_NAME (sym), name) < 0)
{
bot = inc;
}