trying to improve mandoc Solaris support

Ingo Schwarze via buildfarm buildfarm at lists.opencsw.org
Thu Mar 19 20:29:52 CET 2015


Hi Joerg,

Joerg Schilling wrote on Thu, Mar 19, 2015 at 06:54:28PM +0100:

> OK, I am using a file based on:
> 
> 	CSRG/CSRG_Archive_3/4.4/usr/share/tmac/tmac.doc

That would be "@(#)doc 8.1 (Berkeley) 6/8/93"?

That's indeed Cynthia's final version.  A good choice.

> I have no idea how this is related to the svn conversion.

The SCCS ID tag cited above is visible in the source code, hence
it is also contained in file in SVN.  Besides, the SVN version
retains the original SCCS commit messages and Keith mentioned "4.4BSD
snapshot (revision 8.1)" in his commit message.

>> You should probably just follow
>>   https://github.com/n-t-roff/heirloom-doctools/

> I would need to download this as the web interface is not nice
> to compare such things.

Well, it's github, just use git(1).  ;-)

>> I'm not directly involved with Heirloom troff development,
>> so i'm not the ideal person to keep people informed about it.

> So is the development of this decoupled from Gunnar Ritter?

Sadly, yes.  Gunnar is a kind person, and Carsten repeatedly tried
to contact him, but as far as i heard, contact wasn't established.
Consequently, Carsten took over maintenance without authorization.
In any case, as far as i know, Gunnar stopped working on the
Heirloom doctools years ago.

> I create portable software and I assume that my software also works
> on HP-UX and AIX. 

Oh.  I usually ignore such commercial systems because it is hard
to get access.  They are not freely available.  Well, twenty years
ago, i had access to them at CERN, but right now...

Besides, the community using such systems seems almost non-existent.
While i get lots of feedback from FreeBSD, NetBSD and even DragonFly,
and also a bit regarding Solaris, i know of exactly one user on AIX
and no user whatsoever on HP-UX.

> I am sure there are other systems with this restriction.

Maybe, but nobody ever complained, so i'm not sure how relevant
they are.

>> Performance very much depends on the language (mdoc(7) vs. man(7),
>> and possibly tbl(7) and eqn(7)) and the size of the page in
>> question, so giving a single number does not tell me very much.

> As I fixed the Solaris man pages [...]
> and I compared the time. 

Ah.  So that would be a large corpus of almost exclusively man(7)
pages of mixed sizes.  Usually the bulk is small in size.
I would expect a speed factor groff:mandoc of about 2:1 to 4:1
on such a corpus (the big factors of up to 20:1 only occur with
mdoc(7), in particular for small pages).  So your roff indeed
seems a lot faster than groff and closer to mandoc.

>>> [...]
>>> My impression with the mdoc() macro set is that it mainly tries
>>> to provide new macros for use cases that work with classical
>>> man(5) macros if you know that there is \c to innterupt line
>>> processing with [nt]roff.

>> Not at all.  The point of mdoc(7) is semantic markup, while man(7)
>> is purely presentational markup.  So the two languages serve
>> completely different purposes.

> Where/how does this help?

Well, semantic markup is not exactly a new idea, and the advantages
are more or less the same everywhere.  For manuals, specifically,
it helps CSS-driven customizable markup in HTML (and potentially
other markup languages), and it allows semantic searching.

For example:

  # Which POSIX interfaces are related to struct timespec?
  schwarze at isnote $ man -k St=POSIX.1 -a Vt,Ft,Fa=timespec
  clock_getres, clock_gettime, clock_settime(2) -
    get/set/calibrate date and time
  futimens, futimes, utimensat, utimes(2) -
    set file access and modification times
  nanosleep(2) - high resolution sleep
  poll, ppoll(2) - synchronous I/O multiplexing
  S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISREG, S_ISSOCK,
    fstat, fstatat, lstat, stat(2) - get file status
  pthread_cond_timedwait(3) - wait on a condition variable
    for a specific amount of time
  pthread_mutex_lock, pthread_mutex_timedlock, pthread_mutex_trylock(3) -
    lock a mutex
  sem_timedwait, sem_trywait, sem_wait(3) - decrement (lock) a semaphore

  # Which pci-attaching drivers did Jonathan Gray write/port?
  schwarze at isnote $ man -k An=Gray -a Cd=pci               
  an(4) - Aironet Communications 4500/4800 IEEE 802.11FH/b
    wireless network device
  bwi(4) - Broadcom AirForce IEEE 802.11b/g wireless network device
  et(4) - Agere/LSI ET1310 10/100/Gigabit Ethernet device
  jme(4) - JMicron JMC25x/JMC26x 10/100/Gigabit Ethernet device
  nfe(4) - NVIDIA nForce MCP 10/100/Gigabit Ethernet device
  rtw(4) - Realtek RTL8180L IEEE 802.11b wireless network device

  # Did Joerg Schilling write any software?
  schwarze at isnote $ man -k An=Schilling
  schwarze at isnote $ man -k any=Schilling
  schwarze at isnote $
  # Hmm, probably he didn't use mdoc(7), so no semantic searching...

>> [...]
>>> I did not yet check the quality of Heirloom troff.  I know however
>>> that there is not much maintenance for all the projects in Heirloom
>>> that I checked before.

>> Heirloom troff is now maintained seperately from the rest of the
>> Heirloom tools.
 
> Is there a place where I can read something about the background
> for this project?

No big mystery, Carsten simply took over because Gunnar kind of
vanished.  It was discussed a bit on <groff at gnu.org>.

Yours,
  Ingo


More information about the buildfarm mailing list