summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
authorrcyeske <rcyeske>2001-03-02 05:25:02 +0000
committerrcyeske <rcyeske>2001-03-02 05:25:02 +0000
commit11932954e0122c115be23862aabfacb565a4cbed (patch)
tree5d624b34129748104728d697a9e24e9b54de892a /src/actions.c
parent9d783e1994f521940955a29b5a7df33b50fb0c9d (diff)
downloadratpoison-11932954e0122c115be23862aabfacb565a4cbed.zip
* 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.
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c10
1 files changed, 9 insertions, 1 deletions
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