🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #5913

Re: TIN and DEFAULT .tinrc files

#5913
From: (HCST) Earle F. Ake
Date: Mon, 20 Sep 1993 19:31
55 lines
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) {
Technical Details
Message-ID: <CDo3Kp.6nJ@wpdis11.wpafb.af.mil>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!urmel.informatik.rwth-aachen.de!news-rhrz!rrz.uni-koeln.de!unidui!math.fu-berlin.de!xlink.net!howland.reston.ans.net!usc!yeshua.marcam.com!wrdis02.robins.af.mil!wpdis11!akee
References: <274j0g$69r@post.its.mcw.edu>

Show Full Headers
Complete Article Headers
Message-ID: <CDo3Kp.6nJ@wpdis11.wpafb.af.mil>
Subject: Re: TIN and DEFAULT .tinrc files
Date: Mon, 20 Sep 1993 19:31:35 GMT
From: akee@wpdis11.wpafb.af.mil ((HCST) Earle F. Ake)
References: <274j0g$69r@post.its.mcw.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!urmel.informatik.rwth-aachen.de!news-rhrz!rrz.uni-koeln.de!unidui!math.fu-berlin.de!xlink.net!howland.reston.ans.net!usc!yeshua.marcam.com!wrdis02.robins.af.mil!wpdis11!akee
Newsgroups: news.software.readers
Reply-To: akee@wpdis11.wpafb.af.mil
Organization: MSC/SID, Wright-Patterson AFB, Ohio
X-Newsreader: TIN [version 1.2 PL1]
Lines: 55