* top.h (source_file_name): Update.
* cli/cli-script.c (source_cleanup_lines_args): Make old_file
const char *.
(script_from_file): Change `file' arg to const char *.
* cli/cli-script.h (script_from_file): Update.
+2010-04-07 Doug Evans <dje@google.com>
+
+ * top.c (source_file_name): Make const char *.
+ * top.h (source_file_name): Update.
+ * cli/cli-script.c (source_cleanup_lines_args): Make old_file
+ const char *.
+ (script_from_file): Change `file' arg to const char *.
+ * cli/cli-script.h (script_from_file): Update.
+
2010-04-06 Doug Evans <dje@google.com>
* cli/cli-cmds.c (source_command): Run cleanups.
struct source_cleanup_lines_args
{
int old_line;
- char *old_file;
+ const char *old_file;
};
static void
/* Used to implement source_command */
void
-script_from_file (FILE *stream, char *file)
+script_from_file (FILE *stream, const char *file)
{
struct cleanup *old_cleanups;
struct source_cleanup_lines_args old_lines;
/* Exported to cli/cli-cmds.c */
-extern void script_from_file (FILE *stream, char *file);
+extern void script_from_file (FILE *stream, const char *file);
extern void document_command (char *, int);
/* NOTE 1999-04-29: This variable will be static again, once we modify
gdb to use the event loop as the default command loop and we merge
event-top.c into this file, top.c */
-/* static */ char *source_file_name;
+/* static */ const char *source_file_name;
/* Clean up on error during a "source" command (or execution of a
user-defined command). */
/* For use by event-top.c */
/* Variables from top.c. */
extern int source_line_number;
-extern char *source_file_name;
+extern const char *source_file_name;
extern int history_expansion_p;
extern int server_command;
extern char *lim_at_start;