opcodes tidy: PR 33384 invalid disassembler option message
Commit Message
Once both the gdb and opcodes fix for this PR are committed, these are
unused.
include/
* dis-asm.h (disassembler_options_cmp, next_disassembler_option),
(FOR_EACH_DISASSEMBLER_OPTION): Delete.
opcodes/
* disassemble.c (disassembler_options_cmp): Delete.
@@ -434,27 +434,6 @@ extern void disassembler_usage (FILE *);
/* Remove whitespace and consecutive commas. */
extern char *remove_whitespace_and_extra_commas (char *);
-
-/* Like STRCMP, but treat ',' the same as '\0' so that we match
- strings like "foobar" against "foobar,xxyyzz,...". */
-extern int disassembler_options_cmp (const char *, const char *);
-
-/* A helper function for FOR_EACH_DISASSEMBLER_OPTION. */
-static inline const char *
-next_disassembler_option (const char *options)
-{
- const char *opt = strchr (options, ',');
- if (opt != NULL)
- opt++;
- return opt;
-}
-
-/* A macro for iterating over each comma separated option in OPTIONS. */
-#define FOR_EACH_DISASSEMBLER_OPTION(OPT, OPTIONS) \
- for ((OPT) = (OPTIONS); \
- (OPT) != NULL; \
- (OPT) = next_disassembler_option (OPT))
-
/* This block of definitions is for particular callers who read instructions
into a buffer before calling the instruction decoder. */
@@ -824,30 +824,6 @@ remove_whitespace_and_extra_commas (char *options)
return (strlen (options) != 0) ? options : NULL;
}
-/* Like STRCMP, but treat ',' the same as '\0' so that we match
- strings like "foobar" against "foobar,xxyyzz,...". */
-
-int
-disassembler_options_cmp (const char *s1, const char *s2)
-{
- unsigned char c1, c2;
-
- do
- {
- c1 = (unsigned char) *s1++;
- if (c1 == ',')
- c1 = '\0';
- c2 = (unsigned char) *s2++;
- if (c2 == ',')
- c2 = '\0';
- if (c1 == '\0')
- return c1 - c2;
- }
- while (c1 == c2);
-
- return c1 - c2;
-}
-
void
opcodes_assert (const char *file, int line)
{