diff options
author | rcyeske <rcyeske> | 2001-03-02 05:25:02 +0000 |
---|---|---|
committer | rcyeske <rcyeske> | 2001-03-02 05:25:02 +0000 |
commit | 11932954e0122c115be23862aabfacb565a4cbed (patch) | |
tree | 5d624b34129748104728d697a9e24e9b54de892a /src/actions.c | |
parent | 9d783e1994f521940955a29b5a7df33b50fb0c9d (diff) | |
download | ratpoison-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.c | 10 |
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 |