source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Allow man.conf file to be assignable.
@ 2011-11-24 10:44 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-11-24 10:44 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-24 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-24 10:44 mdocml: Allow man.conf file to be assignable kristaps

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).