tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: put back the chdir(2) in mandocdb(8)
Date: Mon, 28 Nov 2011 11:06:52 +0100	[thread overview]
Message-ID: <20111128100652.GB17736@iris.usta.de> (raw)
In-Reply-To: <4ED348F7.9040805@bsd.lv>

Hi Kristaps,

Kristaps Dzonsons wrote on Mon, Nov 28, 2011 at 09:40:23AM +0100:
> On 28/11/2011 02:09, Ingo Schwarze wrote:

>> Put back the chdir(2) to the right man page tree before parsing manuals;
>> this got lost during the bsd.lv sync in rev. 1.10; oops.
>> This is required for processing .so links: otherwise, several files
>> in Xenocara fail to parse and cause ugly complaints instead.

> Yes, please do.
> However, can you add a little explanation for the chdir()

Yes.

> and check its return value?

No.

OK?
  Ingo


Index: mandocdb.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mandocdb.c,v
retrieving revision 1.14
diff -u -p -r1.14 mandocdb.c
--- mandocdb.c	28 Nov 2011 00:57:28 -0000	1.14
+++ mandocdb.c	28 Nov 2011 10:04:58 -0000
@@ -375,6 +375,12 @@ mandocdb(int argc, char *argv[])
 		index_prune(of, db, fbuf, idx, ibuf,
 				&maxrec, &recs, &recsz);
 
+		/*
+		 * Go to the root of the respective manual tree
+		 * such that .so links work.  In case of failure,
+		 * just prod on, even though .so links won't work.
+		 */
+
 		if (OP_UPDATE == op) {
 			chdir(dir);
 			index_merge(of, mp, &dbuf, &buf, hash,
@@ -448,6 +454,12 @@ mandocdb(int argc, char *argv[])
 			continue;
 
 		of = of->first;
+
+		/*
+		 * Go to the root of the respective manual tree
+		 * such that .so links work.  In case of failure,
+		 * just prod on, even though .so links won't work.
+		 */
 
 		chdir(dirs.paths[i]);
 		index_merge(of, mp, &dbuf, &buf, hash, db, fbuf,
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2011-11-28 10:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28  1:09 Ingo Schwarze
2011-11-28  8:40 ` Kristaps Dzonsons
2011-11-28 10:06   ` Ingo Schwarze [this message]
2011-11-28 21:10     ` Kristaps Dzonsons

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=20111128100652.GB17736@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=tech@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).