From 11932954e0122c115be23862aabfacb565a4cbed Mon Sep 17 00:00:00 2001 From: rcyeske Date: Fri, 2 Mar 2001 05:25:02 +0000 Subject: * actions.c (cmd_source): Open the file. Error report as appropriate. * main.c (read_rc_file): Take a file pointer rather than a filename. (read_startup_files): If ~/.ratpoisonrc is not readable try /etc/ratpoisonrc. * actions.c: Use PRINT_DEBUG instead of fprintf. Put useful error text in calls to message(). (cmd_select): Show the window list if there is no such window number. --- src/actions.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/actions.c') diff --git a/src/actions.c b/src/actions.c index eacb481..f3ebef8 100644 --- a/src/actions.c +++ b/src/actions.c @@ -267,7 +267,15 @@ cmd_unimplemented (void *data) void cmd_source (void *data) { - read_rc_file ((char*)data); + FILE *fileptr; + + if ((fileptr = fopen ((char*) data, "r")) == NULL) + message (" source: error opening file "); + else + { + read_rc_file (fileptr); + fclose (fileptr); + } } void -- cgit v1.2.3