From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pAOAiuPU001453 for ; Thu, 24 Nov 2011 05:44:56 -0500 (EST) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id pAOAiukh026396; Thu, 24 Nov 2011 05:44:56 -0500 (EST) Date: Thu, 24 Nov 2011 05:44:56 -0500 (EST) Message-Id: <201111241044.pAOAiukh026396@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Allow man.conf file to be assignable. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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