source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Allow man.conf file to be assignable.
Date: Thu, 24 Nov 2011 05:44:56 -0500 (EST)	[thread overview]
Message-ID: <201111241044.pAOAiukh026396@krisdoz.my.domain> (raw)

Log Message:
-----------
Allow man.conf file to be assignable.

Modified Files:
--------------
    mdocml:
        manpath.c
        manpath.h

Revision Data
-------------
Index: manpath.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/manpath.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lmanpath.h -Lmanpath.h -u -p -r1.2 -r1.3
--- manpath.h
+++ manpath.h
@@ -29,7 +29,7 @@ struct	manpaths {
 
 __BEGIN_DECLS
 
-void	 manpath_manconf(struct manpaths *);
+void	 manpath_manconf(const char *, struct manpaths *);
 void	 manpath_parse(struct manpaths *, char *, char *);
 void	 manpath_parseconf(struct manpaths *);
 void	 manpath_parseline(struct manpaths *, char *);
Index: manpath.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/manpath.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lmanpath.c -Lmanpath.c -u -p -r1.2 -r1.3
--- manpath.c
+++ manpath.c
@@ -123,7 +123,7 @@ manpath_parseconf(struct manpaths *dirs)
 	free(buf);
 	pclose(stream);
 #else
-	manpath_manconf(dirs);
+	manpath_manconf(MAN_CONF_FILE, dirs);
 #endif
 }
 
@@ -139,7 +139,7 @@ manpath_free(struct manpaths *p)
 }
 
 void
-manpath_manconf(struct manpaths *dirs)
+manpath_manconf(const char *file, struct manpaths *dirs)
 {
 	FILE		*stream;
 	char		*p, *q;
@@ -148,7 +148,7 @@ manpath_manconf(struct manpaths *dirs)
 	keysz = strlen(MAN_CONF_KEY);
 	assert(keysz > 0);
 
-	if (NULL == (stream = fopen(MAN_CONF_FILE, "r")))
+	if (NULL == (stream = fopen(file, "r")))
 		return;
 
 	while (NULL != (p = fgetln(stream, &len))) {
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2011-11-24 10:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201111241044.pAOAiukh026396@krisdoz.my.domain \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).