OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Daily bump.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
read-md.c
diff --git
a/gcc/read-md.c
b/gcc/read-md.c
index
90707b3
..
4f1933f
100644
(file)
--- a/
gcc/read-md.c
+++ b/
gcc/read-md.c
@@
-847,6
+847,14
@@
handle_enum (int lineno, bool md_p)
}
}
}
}
+/* Try to find the definition of the given enum. Return null on failure. */
+
+struct enum_type *
+lookup_enum_type (const char *name)
+{
+ return (struct enum_type *) htab_find (enum_types, &name);
+}
+
/* For every enum definition, call CALLBACK with two arguments:
a pointer to the constant definition and INFO. Stop when CALLBACK
returns zero. */
/* For every enum definition, call CALLBACK with two arguments:
a pointer to the constant definition and INFO. Stop when CALLBACK
returns zero. */
@@
-977,14
+985,14
@@
handle_file (directive_handler_t handle_directive)
static void
handle_toplevel_file (directive_handler_t handle_directive)
{
static void
handle_toplevel_file (directive_handler_t handle_directive)
{
- c
har *lastsl
;
+ c
onst char *base
;
in_fname = read_md_filename;
in_fname = read_md_filename;
- lastsl = strrchr (in_fname, '/');
- if (lastsl != NULL)
- base_dir = xstrndup (in_fname, lastsl - in_fname + 1);
- else
+ base = lbasename (in_fname);
+ if (base == in_fname)
base_dir = NULL;
base_dir = NULL;
+ else
+ base_dir = xstrndup (in_fname, base - in_fname);
handle_file (handle_directive);
}
handle_file (handle_directive);
}