Thread View: news.software.readers
6 messages
6 total messages
Started by Kent C. Brodie
Tue, 14 Sep 1993 14:04
TIN and DEFAULT .tinrc files
Author: Kent C. Brodie
Date: Tue, 14 Sep 1993 14:04
Date: Tue, 14 Sep 1993 14:04
11 lines
1036 bytes
1036 bytes
I have noticed that the default .tinrc file is more or less hardcoded into rcfile.c. Is there a way, via external defines (ala MAKEFILE), to re-define what the defaults should be? -- -------------- Kent C. Brodie - Sr. Systems/Network Manager brodie@post.its.mcw.edu Information Technology Systems Medical College of Wisconsin (414) 257-8769
Re: TIN and DEFAULT .tinrc files
Author: Iain Lea
Date: Wed, 15 Sep 1993 06:18
Date: Wed, 15 Sep 1993 06:18
9 lines
923 bytes
923 bytes
Kent C. Brodie (kcb@post.its.mcw.edu) wrote: : : I have noticed that the default .tinrc file is more or less hardcoded : into rcfile.c. I don't get your drift. Please make your point more pointed (ie. details). -- iain.lea@erlm.siemens.de +49-9131-7-43110
Re: TIN and DEFAULT .tinrc files
Author: (HCST) Earle F. Ake
Date: Wed, 15 Sep 1993 13:46
Date: Wed, 15 Sep 1993 13:46
19 lines
1356 bytes
1356 bytes
Kent C. Brodie (kcb@post.its.mcw.edu) wrote: : I have noticed that the default .tinrc file is more or less hardcoded : into rcfile.c. : Is there a way, via external defines (ala MAKEFILE), to re-define what : the defaults should be? As tin uses the "subscriptions" file for default subscriptions, I would like it to check the same directory for a "deftinrc" file. Sound like a do-able option? -Earle -- Earle Ake akee@wpdis11.wpafb.af.mil Hassler Communication Systems Technology MSC/SID WPAFB, Ohio 257-4499/4544 DSN: 787-4499/4544
Re: TIN and DEFAULT .tinrc files
Author: (HCST) Earle F. Ake
Date: Thu, 16 Sep 1993 15:02
Date: Thu, 16 Sep 1993 15:02
20 lines
1489 bytes
1489 bytes
Iain Lea (iain.lea@anl433.erlm.siemens.de) wrote: : Kent C. Brodie (kcb@post.its.mcw.edu) wrote: : : : : I have noticed that the default .tinrc file is more or less hardcoded : : into rcfile.c. : I don't get your drift. Please make your point more pointed (ie. details). I think he means that if the user is new to tin, there is no way currently of controlling what his .tinrc file will be that tin gives him. See my post of maybe having a deftinrc file that is looked for and used if it exists. -Earle -- Earle Ake akee@wpdis11.wpafb.af.mil Hassler Communication Systems Technology MSC/SID WPAFB, Ohio 257-4499/4544 DSN: 787-4499/4544
Re: TIN and DEFAULT .tinrc files
Author: Kent C. Brodie
Date: Mon, 20 Sep 1993 15:15
Date: Mon, 20 Sep 1993 15:15
28 lines
1784 bytes
1784 bytes
(HCST) Earle F. Ake (akee@wpdis11.wpafb.af.mil) wrote: : I think he means that if the user is new to tin, there is no way : currently of controlling what his .tinrc file will be that tin gives him. : See my post of maybe having a deftinrc file that is looked for and used if : it exists. Exactly. Specifically, I want to set up defaults for the entries in a "newly created" .tinrc file, For example, I'd like a "default" entry in (new tin users) tinrc files to say the following: # print program with parameters used to print articles/threads default_printer=/usr/ucb/lpr etc etc... There's SEVERAL settings that I want to change... It *looks* like in tinrc.c, that there might be hooks to DEFINES somewhere (like Makefile), where these can be set at compile-time?? -- -------------- Kent C. Brodie - Sr. Systems/Network Manager brodie@post.its.mcw.edu Information Technology Systems Medical College of Wisconsin (414) 257-8769
Re: TIN and DEFAULT .tinrc files
Author: (HCST) Earle F. Ake
Date: Mon, 20 Sep 1993 19:31
Date: Mon, 20 Sep 1993 19:31
55 lines
2117 bytes
2117 bytes
Kent C. Brodie (kcb@post.its.mcw.edu) wrote:
: I have noticed that the default .tinrc file is more or less hardcoded
: into rcfile.c.
: Is there a way, via external defines (ala MAKEFILE), to re-define what
: the defaults should be?
Here is a quick patch that tries to open LIBDIR/tinrc.default if it
can not open the tinrc file. Just add a LIBDIR/tinrc.default file and make
sure it is at least mode 0444.
-Earle
*** rcfile.c.old Mon Sep 20 14:43:41 1993
--- rcfile.c Mon Sep 20 14:48:17 1993
***************
*** 22,27 ****
--- 22,28 ----
/*
* read_rcfile - read defaults from ~/.tin/tinrc
+ * If this fails, try LIBDIR/tinrc.default instead
*/
int read_rcfile ()
***************
*** 28,37 ****
{
char active_size_info[PATH_LEN];
char buf[LEN];
FILE *fp;
if ((fp = fopen (rcfile, "r")) == NULL) {
! return (FALSE);
}
while (fgets (buf, sizeof (buf), fp) != NULL) {
--- 29,42 ----
{
char active_size_info[PATH_LEN];
char buf[LEN];
+ char nam[LEN];
FILE *fp;
if ((fp = fopen (rcfile, "r")) == NULL) {
! joinpath (nam, LIBDIR, "tinrc.default");
! if ((fp = fopen (nam, "r")) == NULL) {
! return (FALSE);
! }
}
while (fgets (buf, sizeof (buf), fp) != NULL) {
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads