1
Author: Bernhard R. Link <brlink@debian.org>
2
Description: Use $HOME/.xbuffyrc if nothing else is given.
4
Index: xbuffy-3.3.bl.3/boxfile.c
5
===================================================================
6
--- xbuffy-3.3.bl.3.orig/boxfile.c 2006-03-31 18:27:54.000000000 +0200
7
+++ xbuffy-3.3.bl.3/boxfile.c 2006-03-31 18:28:00.000000000 +0200
9
*******************************************************************************/
18
if ((boxes = fopen(boxFile, "r")) == 0)
20
- fprintf(stderr, "Could not open boxfile %s\n", boxFile);
21
+ if( boxFile == data.boxFile || errno != ENOENT )
22
+ fprintf(stderr, "Could not open boxfile %s\n", boxFile);
26
Index: xbuffy-3.3.bl.3/xbuffy.c
27
===================================================================
28
--- xbuffy-3.3.bl.3.orig/xbuffy.c 2006-03-31 18:27:57.000000000 +0200
29
+++ xbuffy-3.3.bl.3/xbuffy.c 2006-03-31 18:28:00.000000000 +0200
30
@@ -1519,6 +1519,15 @@
31
readBoxfile(data.boxFile);
34
+ if ((data.boxFile == 0) && (nBoxes == 0))
36
+ const char *homedir = getenv("HOME");
37
+ char buffer[MAX_STRING];
38
+ if (homedir != NULL)
39
+ snprintf(buffer,MAX_STRING,"%s/.xbuffyrc",homedir);
41
+ readBoxfile(buffer);
46
Index: xbuffy-3.3.bl.3/xbuffy.man
47
===================================================================
48
--- xbuffy-3.3.bl.3.orig/xbuffy.man 2006-03-31 18:27:54.000000000 +0200
49
+++ xbuffy-3.3.bl.3/xbuffy.man 2006-03-31 18:28:00.000000000 +0200
53
Standard X windows options (e.g. \-fn, \-display, etc.)
55
+If nothing to look at is given at the command line, it will
56
+try to open $HOME/.xbuffyrc
58
The names and purpose of the some of the following environment
59
variables were borrowed from Bash, the GNU Shell.
64
-This is a colon separated list of files to check for mail.
65
+This is a colon separated list of files to check for mail,
66
+if nothing to look at was given and no $HOME/.xbuffyrc exists.
69
-This is a colon separated list of newsgroups to monitor.
70
+This is a colon separated list of newsgroups to monitor,
71
+if nothing to look at was given and no $HOME/.xbuffyrc exists.
74
This is the name of the NNTP server to use for news boxes.
77
The following are settable on a per box basis by using
78
the \fIboxfile\fR option (note that the boxfile may also be set in
79
-the Xresources with the resource Xbuffy.boxfile: <filename>).
80
+the Xresources with the resource Xbuffy.boxfile: <filename> and
81
+if nothing it given at the command line, it tries to read $HOME/.xbuffyrc).
83
When using a \fIboxfile\fR, only the \fIbox\fR line is required. All options
84
that are not given in the boxfile will default to the command line