Commit Graph

33 Commits

Author SHA1 Message Date
christos 8896183565 PR/51034: Abhinav Upadhyay: makemandb(8): Close database connection when
failed to commit
2016-03-31 20:17:58 +00:00
christos 8fb426c83c PR/51006: Abhinav Upadhyay: makemandb(8) should parse escape sequences
in the NAME section
2016-03-24 17:28:03 +00:00
christos 91708124b8 Don't crash if we have a missing section. 2016-01-28 03:32:29 +00:00
christos 0f635f7225 Adjust to the new mdocml 2015-12-18 14:30:16 +00:00
plunky 877e528c4e largely apply patch from PR bin/47392 by Abhinav Upadhyay
change some comments to reflect reality, a variable name to enhance
readability, and adds an assert for safety.
2015-04-07 17:47:10 +00:00
joerg a23fab26e8 MDOC_MAX is a valid token if the type is text. Adjust. 2015-03-12 14:57:18 +00:00
christos 704de17457 - handle section numbers that are not single digits
- don't allocate and free needlessly
2015-03-04 02:02:15 +00:00
joerg 5a02bfcb09 Explicitly deal with end of lists. PR 49708. 2015-03-02 13:51:24 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
wiz 82d04f72be Fix a bug that caused an error about a UNIQUE constraint violation.
Patch from Abhinav Upadhyay.
2014-06-03 14:42:41 +00:00
wiz 6dc3f341a8 Replace non-breaking space with hyphen, and call hyphen replacement
from one more place.
Improves 'man -k midi' output.

From Abhinav Upadhyay.
2014-05-24 21:01:58 +00:00
chs 49d6a7c368 in update_db(), extract the full list of files to update from the db
before actually updating anything, since changing the db while the query
that extracts the list of files is still in progress results in
the extraction query failing before it finds everything.
2014-02-10 00:23:36 +00:00
joerg 12f8f2b852 Sync with interface change in mdocml 1.12.3. 2014-01-05 19:26:44 +00:00
wiz 0f54719895 Skip files of size 0 from indexing.
From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2013-11-13 18:46:33 +00:00
christos 9eea140044 avoid stdio assertion, failing later 2013-05-15 00:35:02 +00:00
christos 9d8fe63b1b remove trailing whitespace 2013-02-10 23:24:18 +00:00
christos cc03b84d06 Since mdocml decided to name headers that conflict with system ones (term.h)
move the header inclusion one up.
2013-01-14 18:01:59 +00:00
christos 98f3134321 If you cannot parse .SH NAME, like in the case of the ksh93 man page
where the .SH is followed by a conditional:

.SH NAME
.if \nZ=0 \{\
text text text
.\}

at least don't core-dump.
2012-11-08 19:17:54 +00:00
wiz b1203a9851 Make mandb path configurable. makemandb (and related tools) use
the path from the _mandb variable from man.conf now.

Set _mandb in man.conf to same value as was used before.

From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2012-10-06 15:33:59 +00:00
wiz 43eaa46ea3 Use emalloc in one more place, like the rest of the code does.
From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2012-09-07 11:29:04 +00:00
wiz e93044e5ab Add -Q flag:
Print only fatal error messages (i.e., when the database is left in
an inconsistent state and needs manual intervention).

From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2012-08-29 20:33:01 +00:00
wiz 3450e15562 Sync usage with manpage. 2012-08-25 12:37:12 +00:00
wiz ae90bf6a58 Bug fix for PR 46733:
> makemandb always reports the same number for "Total Number of new or
 > updated pages enountered" and "Total number of (hard or symbolic)
 > links found".

Patch from Abhinav Upadhyay.
2012-08-11 21:07:13 +00:00
uwe 4b084fb4d9 Fix typo in a message. 2012-07-08 23:18:23 +00:00
wiz d099c69274 PR 46419 by Abhinav Upadhyay using his updated patch:
Clean up after removing man page aliases.
2012-05-07 11:18:16 +00:00
wiz 66c3a8d39a The new apropos(1) incorrectly displays hyphens in the first line
of the search results for a few man pages (for man(7) based man
pages).

Use patch from Abhinav Upadhyay in PR 46408 to fix this.
2012-05-04 23:50:26 +00:00
joerg 51bb6fdd57 Fix inverted condition when handling stale entries.
From Abhinav Upadhyay.
2012-03-02 15:09:58 +00:00
joerg e9d4b22f91 Expand workaround for .so usage to do the chdir call just before
starting parsing, not during the tree iteration. This gives it a chance
to work.
2012-02-27 16:51:06 +00:00
joerg bdc4335e48 Add support for compressed man pages in all the usual formats. 2012-02-16 20:58:55 +00:00
joerg c701d37453 Also handle hyphen replacement if it was used as plain input and no
backslash sequence was used at all in the line.
2012-02-15 23:36:10 +00:00
joerg 79cdc1651d Be a bit more friendly to man pages using the roff .so command by
changing the current directory to the parent of the man -p entry, e.g.
/usr/share/man for /usr/share/man1.
2012-02-15 23:35:00 +00:00
joerg 329b37d502 Fix C&P error with $NetBSD$ 2012-02-07 19:17:16 +00:00
joerg 410d0f4380 Import the new apropos/whatis.
This code has been developed by Abhinav Upadhyay as part of Google's Summer
of Code 2011. It uses libmandoc to parse man pages and builds a Full
Text Index in a SQLite database. The combination of indexing the full
manual page, filtering out stop words and ranking individual matches
based on the section gives a much improved user experience.

The old makewhatis and friends are kept under MKMAKEMANDB=no for now.
2012-02-07 19:13:24 +00:00