1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
+ * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
+ (file_name_nondirectory): New function, doing the same as the macro.
+ (set_typedecl_interface_info): Use it instead of the macro.
+ (check_newline): Likewise.
+ (handle_cp_pragma): Likewise.
+
+ * repo.c (get_base_filename): Cast result of rindex to char*.
+ (open_repo_file): Likewise.
+ * xref.c (open_xref_file): Likewise.
+ * error.c (dump_char): Make its arg int, not char.
+
* except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
remaining use of saved_throw_type with a call to get_eh_type.
/* Given a file name X, return the nondirectory portion.
Keep in mind that X can be computed more than once. */
-#ifndef FILE_NAME_NONDIRECTORY
-#define FILE_NAME_NONDIRECTORY(X) \
- (rindex (X, '/') != 0 ? rindex (X, '/') + 1 : X)
-#endif
+char *
+file_name_nondirectory (x)
+ char *x;
+{
+ char *tmp = (char *) rindex (x, '/');
+ if (tmp)
+ return (char *) (tmp + 1);
+ else
+ return x;
+}
/* This obstack is needed to hold text. It is not safe to use
TOKEN_BUFFER because `check_newline' calls `yylex'. */
tree type = TREE_TYPE (vars);
CLASSTYPE_INTERFACE_ONLY (type) = TREE_INT_CST_LOW (fileinfo)
- = interface_strcmp (FILE_NAME_NONDIRECTORY (DECL_SOURCE_FILE (vars)));
+ = interface_strcmp (file_name_nondirectory (DECL_SOURCE_FILE (vars)));
}
static int
int len;
char *buf;
tree arg;
- struct pending_inline *t;
reinit_parse_for_expr (&inline_text_obstack);
len = obstack_object_size (&inline_text_obstack);
tree defarg_fn = TREE_VALUE (defarg_fns);
if (defarg_parm == NULL_TREE)
{
- tree p;
-
push_nested_class (TREE_PURPOSE (defarg_fns), 1);
pushlevel (0);
if (is_member_template (defarg_fn))
if (TREE_CODE (defarg_fn) == FUNCTION_DECL)
{
#if 0
+ tree p;
for (p = DECL_ARGUMENTS (defarg_fn); p; p = TREE_CHAIN (p))
pushdecl (copy_node (p));
#endif
{
while (ifiles->next)
ifiles = ifiles->next;
- ifiles->filename = FILE_NAME_NONDIRECTORY (input_filename);
+ ifiles->filename = file_name_nondirectory (input_filename);
}
main_input_filename = input_filename;
tree fileinfo = IDENTIFIER_CLASS_VALUE (get_time_identifier (input_filename));
char *main_filename = input_filename;
- main_filename = FILE_NAME_NONDIRECTORY (main_filename);
+ main_filename = file_name_nondirectory (main_filename);
token = real_yylex ();
main_input_filename = input_filename;
#ifdef AUTO_IMPLEMENT
- filename = FILE_NAME_NONDIRECTORY (main_input_filename);
+ filename = file_name_nondirectory (main_input_filename);
fi = get_time_identifier (filename);
fi = IDENTIFIER_CLASS_VALUE (fi);
TREE_INT_CST_LOW (fi) = 0;
tree fileinfo = IDENTIFIER_CLASS_VALUE (get_time_identifier (input_filename));
char *main_filename = main_input_filename ? main_input_filename : input_filename;
- main_filename = FILE_NAME_NONDIRECTORY (main_filename);
+ main_filename = file_name_nondirectory (main_filename);
token = real_yylex ();
if (token != END_OF_LINE)
{
#ifdef XREF_FILE_NAME
XREF_FILE_NAME (xref_name, file);
#else
- s = rindex (file, '/');
+ s = (char *) rindex (file, '/');
if (s == NULL)
sprintf (xref_name, ".%s.gxref", file);
else
{
++s;
strcpy (xref_name, file);
- t = rindex (xref_name, '/');
+ t = (char *) rindex (xref_name, '/');
++t;
*t++ = '.';
strcpy (t, s);