summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* minor tbl(7) column spacing and wrapping issues in lftp(1)Ingo Schwarze2016-09-131-0/+7
|
* use the proper HTML escape for double quote ("): " not &quote;Ingo Schwarze2016-09-121-1/+1
| | | | patch from bentley@
* move zaurus down to the discontinued architecturesIngo Schwarze2016-09-031-3/+3
|
* When "makewhatis -d" tries to add to a database that doesn't (yet) exist,Ingo Schwarze2016-09-021-3/+3
| | | | | | | silently create it from scratch instead of printing a warning. The annoying warning message was reported by ajacoutot@, and espie@ convincingly argues that a non-existing database can be considered equivalent to an empty one.
* remove "sparc" from a commentIngo Schwarze2016-09-011-1/+1
|
* move "sparc" down to discontinued architecturesIngo Schwarze2016-09-011-3/+3
|
* When the database is corrupt in the sense of containing invalidIngo Schwarze2016-08-301-1/+15
| | | | | | | | | pointers in the pages table, do not access NULL pointers, but gracefully handle the errors. Similar patches will be needed for the macro tables, too. <attila at stalphonsos dot com> audited the code and pointed out to me that dbm_get() can return NULL for corrupted databases, but that isn't handled properly at various places.
* less confusing warning message about negative offsetsIngo Schwarze2016-08-301-1/+5
|
* If a line inside .Bl -column starts with a tab characterIngo Schwarze2016-08-281-1/+1
| | | | | | and there was no preceding .It macro, do not read the byte before the beginning of the line buffer. Found by tb@ with afl@.
* When trying to edit an existing database with makewhatis(8) -d or -uIngo Schwarze2016-08-221-4/+4
| | | | | | | but reading the database fails, report the full path to the database on standard error, and mention that the database is automatically recreated from scratch. Suggested by espie@.
* When running into a mandoc.db(5) file still using the obsoleteIngo Schwarze2016-08-221-2/+8
| | | | | | format based on SQLite 3, say so in words that mortals can understand rather than babbling about hex magic. Suggested by espie@.
* When a mismatching end macro occurs while at least two nested blocksIngo Schwarze2016-08-201-13/+22
| | | | | | | | are open, all except the innermost open block got a bogus MDOC_ENDED marker, in some situations triggering segfaults down the road which tb@ found with afl(1). Fix the logic error by figuring out up front whether an end macro has a matching body, and if it hasn't, don't mark any blocks as broken.
* When scanning upwards for a column list to put a .Ta macro in,Ingo Schwarze2016-08-201-1/+1
| | | | | ignore body end markers of lists breaking other blocks. Fixing a logical error that caused a NULL deref found by tb@ with afl(1).
* If a column list starts with implicit rows (that is, rows without .It)Ingo Schwarze2016-08-202-47/+52
| | | | | | and roff-level nodes (e.g. tbl or eqn) follow, don't run into an assertion. Instead, wrap the roff-level nodes in their own row. Issue found by tb@ with afl(1).
* fix an fd leak; patch from jsg@Ingo Schwarze2016-08-181-0/+1
|
* When the content of a manual page does not specify a section, theIngo Schwarze2016-08-174-12/+8
| | | | | | | | empty string got added to the list of sections, breaking the database format slightly and causing the page to not be considered part of any section, not even if a section could be deduced from the directory or from the file name. Bug found due to the bogus pcredemo(3) "manual" in the pcre-8.38p0 package.
* When reading back a mandoc.db(5) file in order to apply incrementalIngo Schwarze2016-08-172-4/+4
| | | | | | changes, do not prepend a stray NAME_FILE (0x10) byte to the first names of pages. Bug found while investigating another issue reported by sthen@.
* Make sure manuals in architecture-independent directories are treatedIngo Schwarze2016-08-171-1/+1
| | | | | | | | | as architecture-independent even if they abuse the third (architecture) argument of the .Dt macro for random stuff like "freetds reference manual". While the .Dt syntax is not the same as the .TH syntax in man(7), punishing offenders by treating them as architecture-dependent and hence completely excluding them from searches is too severe. Problem reported by sthen@.
* Even after switching from a pending head to the body, we have toIngo Schwarze2016-08-111-1/+1
| | | | | | continue scanning upwards, because the enclosing block might already be pending as well, e.g. .Bl .Bl .It Bo .El .It. Tree corruption leading to a later NULL deref found by tb@ with afl(1).
* oops, fix stupid typo in previousIngo Schwarze2016-08-111-1/+2
|
* If a .Bd display is on the one hand doomed to be deleted becauseIngo Schwarze2016-08-111-3/+4
| | | | | | | it has no type, but is on the other hand breaking another block, delete its end marker as well, or the end marker may remain behind as an orphan, triggering an assertion in the terminal formatter. Problem found by tb@ with afl(1).
* Don't deref NULL if the only child of the first .Sh is an emptyIngo Schwarze2016-08-101-4/+7
| | | | | | in-line macro, and don't printf("%s", NULL) if the first child of the first .Sh is a macro; again found by tb@ with afl(1). (No, you should never use macros in any .Sh at all, please.)
* move armish and hppa64 down in the dropdown box; reminded by jmc@Ingo Schwarze2016-08-101-4/+5
|
* When trying to figure out which C compiler make(1) wants to use,Ingo Schwarze2016-08-101-1/+1
| | | | | | | | | pass it the POSIX -s option. On most systems, this won't make a difference, but Bdale Garbee reported that the make(1) on his Debian system, most likely some version of gmake, breaks Makefile.local by printing some 'entering directory' messages. I failed to reproduce and Bdale didn't report back, but judging from gmake source code, this is likely to help and unlikely to do harm elsewhere.
* Don't printf("%s", NULL) if .It has a macro as an argumentIngo Schwarze2016-08-101-2/+3
| | | | | in a list of a type where items don't takes arguments. Issue found by tb@ with afl(1).
* When validating a .Bl list that defaults to -item for want of a type,Ingo Schwarze2016-08-101-0/+1
| | | | | don't let a subsequent -width access mdoc_argnames[] out of bounds. Found by tb@ with afl(1).
* Fix assertion failures caused by whitespace inside \o'' (overstrike)Ingo Schwarze2016-08-102-60/+50
| | | | | | sequences that jsg@ found with afl(1): * Avoid writing \t\b in term.c. * Handle trailing \b in term_ps.c.
* fix printf("%s", NULL);Ingo Schwarze2016-08-092-4/+6
| | | | found while investigating an unrelated bug report from jsg@
* The concept of endianness seems to be somewhat newfangled, so theIngo Schwarze2016-08-059-1/+71
| | | | | | respective conversion functions are not yet properly standardized. Rumour has it that POSIX is working on it, though. For now, sprinkle some configuration glue.
* Really protect <err.h> as already promised in the previous commit message.Ingo Schwarze2016-08-051-0/+2
|
* missing <endian.h> reported by Bapt@iste Daroussin, found on FreeBSDIngo Schwarze2016-08-051-0/+1
|
* fix a typo that prevented names from .Dt from getting priorityIngo Schwarze2016-08-051-1/+1
| | | | over names from .Sh NAME
* Fix an assertion failure that happened when trying to add a pageIngo Schwarze2016-08-041-1/+1
| | | | | with makewhatis -d to a completely empty database. Reported by Mark Patruck <mark at wrapped dot cx>, thanks!
* POSIX allows PATH_MAX to not be defined, meaning "unlimited".Ingo Schwarze2016-08-026-0/+47
| | | | | | | Found by Aaron M. Ucko <amu at alum dot mit dot edu> on the GNU Hurd, via Bdale Garbee, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829624 Also add EFTYPE at two places where it was forgotten.
* Repair makewhatis -t, regression in rev. 1.221 reported by naddy@.Ingo Schwarze2016-08-011-2/+3
|
* Adjust MANDOC_DB and bump MANDOCDB_VERSION now thatIngo Schwarze2016-08-011-2/+2
| | | | this was put into production in OpenBSD-current.
* document the new file formatIngo Schwarze2016-08-011-79/+151
|
* Some base system pages, for example perl(1), contain non-ASCIIIngo Schwarze2016-07-311-1/+2
| | | | | | characters in their source code, so switch on charset autodetection in the same way as in man(1) itself. Issue reported by Pavan Maddamsetti at gmail dot com on bugs@.
* Autodetect a suitable locale for -Tutf8 mode,Ingo Schwarze2016-07-315-15/+39
| | | | | | | and allow overriding it manually. Based on a patch from Svyatoslav Mishyn <juef at openmailbox dot org> tweaked by me. The idea originally came up in a conversation with Markus Waldeck.
* Sort sections and architectures in the pages table.Ingo Schwarze2016-07-291-6/+18
|
* Sort pages in the pages table by file names.Ingo Schwarze2016-07-291-7/+26
|
* No need to populate the TYPE_arch and TYPE_sec bits, the informationIngo Schwarze2016-07-292-25/+11
| | | | | | | | | | | | is provided directly to dba_page_add() in dbadd_mlink() and to dba_page_new() in dbadd(). No need for a dedicated loop for NAME_FILE. It's done in dbadd_mlink() anyway. In this context, also record section numbers taken from filenames and from .Dt and .TH macros, architectures taken from .Dt macros, and fix the filtering of duplicate filename entries.
* Autodetect if -lrt is needed for nanosleep(3).Ingo Schwarze2016-07-204-5/+47
| | | | | Helpful for Solaris 9 and 10. Reminded by Thomas Klausner.
* tag_signal() is dead; from LLVM via Christos ZoulasIngo Schwarze2016-07-201-2/+2
|
* Linux compatibility: Work around the lack of EFTYPE and protect <err.h>.Ingo Schwarze2016-07-208-11/+34
|
* Now that our man.conf(5) format is mature and extremely simple,Ingo Schwarze2016-07-196-102/+14
| | | | | | | | delete manpath(1) support. With the mandoc-based man(1), manpath(1) is utterly useless. Just set MANPATH_DEFAULT in configure.local for sane operating system defaults, use man.conf(5) for machine- specific modifications, and use ${MANPATH}, -m, and -M for user preferences.
* Remove the dependency on SQLite without loss of functionality.Ingo Schwarze2016-07-1925-1238/+2275
| | | | | Stop supporting systems that don't have mmap(3). Drop the obsolete names_check() now that we deleted MLINKS.
* Remove one outdated comment and fix one typoIngo Schwarze2016-07-191-3/+1
| | | | noted by Jan Stary <hans at stare dot cz>.
* Since the mdoc/man parser unification, the parser is always allocatedIngo Schwarze2016-07-191-24/+2
| | | | | | in mparse_alloc(), so delete all the curp->man == NULL checks. Triggered by a patch from Christos Zoulas suggesting to add yet another such check.
* Use __attribute__((__format__ throughout.Ingo Schwarze2016-07-197-27/+15
| | | | | | | Triggered by a smaller patch from Christos Zoulas. While here, unify style, move several config tests to config.h, and delete the useless MANDOC_CONFIG_H.