tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: chdir() in mandocdb
Date: Thu, 8 Dec 2011 02:34:30 +0100	[thread overview]
Message-ID: <20111208013430.GD19643@iris.usta.de> (raw)
In-Reply-To: <4EDF49CE.3040508@bsd.lv>

Hi Kristaps,

Kristaps Dzonsons wrote on Wed, Dec 07, 2011 at 12:11:10PM +0100:

> I notice that the chdir() for mandocdb()'s OP_NEW is into the base
> directory of the manuals (e.g., /usr/share/man).  However, when I
> run mandocdb over OpenBSD 5.0, I see a few inconsistencies:
> 
>  /usr/X11R6/man/man3/XUngrabDevice.3

That was a bug in Xenocara, i fixed it here:

http://www.openbsd.org/cgi-bin/cvsweb/xenocara/lib/libXi/man/ \
  XIUngrabDevice.man

>  /usr/X11R6/man/man3/XTranslateCoordinates.3
>  /usr/X11R6/man/man3/Xaw.3
>  ...

These are not .so on my -current system, not sure whether
there is any problem; it doesn't seem so on first sight.

> All of these have an `so' in the current directory.  Looking at
> roff(7) for `so', this is the correct behaviour.

No; the roff(7) manual muddles the point.
What it says is correct, but only makes sense
when you already know that man(1) does a chdir(2)
to the root of the tree.

> However, this means that the chdir() should be for each file,
> not the current directory

No!

Look for the string "chdir(buf)" in the file

  /usr/src/usr.bin/man/man.c

to understand what's really happening.

> Thoughts?

Please don't break this, it's fragile.

Yours,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2011-12-08  1:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 11:11 Kristaps Dzonsons
2011-12-08  1:34 ` Ingo Schwarze [this message]
2011-12-08  8:07   ` Kristaps Dzonsons
2011-12-10 14:11     ` Ingo Schwarze
2011-12-10 16:08       ` 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=20111208013430.GD19643@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).