aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* When the content of a manual page does not specify a section, theIngo Schwarze2016-08-174-16/+12
| | | | | | | | 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-6/+6
| | | | | | 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-2/+2
| | | | | | | | | 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-2/+2
| | | | | | 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-2/+3
|
* If a .Bd display is on the one hand doomed to be deleted becauseIngo Schwarze2016-08-111-4/+5
| | | | | | | 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-5/+8
| | | | | | 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-5/+6
|
* When trying to figure out which C compiler make(1) wants to use,Ingo Schwarze2016-08-101-2/+2
| | | | | | | | | 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-3/+4
| | | | | 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-1/+2
| | | | | 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-62/+52
| | | | | | 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-6/+8
| | | | found while investigating an unrelated bug report from jsg@
* The concept of endianness seems to be somewhat newfangled, so theIngo Schwarze2016-08-059-8/+78
| | | | | | 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-1/+2
|
* fix a typo that prevented names from .Dt from getting priorityIngo Schwarze2016-08-051-2/+2
| | | | over names from .Sh NAME
* Fix an assertion failure that happened when trying to add a pageIngo Schwarze2016-08-041-2/+2
| | | | | 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-5/+52
| | | | | | | 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-3/+4
|
* Adjust MANDOC_DB and bump MANDOCDB_VERSION now thatIngo Schwarze2016-08-011-3/+3
| | | | this was put into production in OpenBSD-current.
* document the new file formatIngo Schwarze2016-08-011-81/+153
|
* Some base system pages, for example perl(1), contain non-ASCIIIngo Schwarze2016-07-311-2/+3
| | | | | | 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-20/+44
| | | | | | | 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-7/+19
|
* Sort pages in the pages table by file names.Ingo Schwarze2016-07-291-8/+27
|
* No need to populate the TYPE_arch and TYPE_sec bits, the informationIngo Schwarze2016-07-292-27/+13
| | | | | | | | | | | | 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-7/+49
| | | | | 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-15/+38
|
* Now that our man.conf(5) format is mature and extremely simple,Ingo Schwarze2016-07-196-108/+20
| | | | | | | | 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-1926-1262/+2299
| | | | | 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-4/+2
| | | | noted by Jan Stary <hans at stare dot cz>.
* Since the mdoc/man parser unification, the parser is always allocatedIngo Schwarze2016-07-191-25/+3
| | | | | | 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-33/+21
| | | | | | | 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.
* cope with -Wmissing-prototypesIngo Schwarze2016-07-182-5/+26
|
* To remove the const qualifier from a pointer to an object - eitherIngo Schwarze2016-07-152-5/+3
| | | | | | | | | because we know it is actually mutable or because we are passing it to a function that doesn't accept a const object but won't actually attempt to modify it - simply casting from (const type *) to (type *) is legal C and clearly expresses the intent. So get rid of the obfuscating UNCONST macro. Basic idea discussed with guenther@.
* Fix previous: the mandocdb() prototype was already there, it justIngo Schwarze2016-07-151-4/+3
| | | | hid among static functions, as noticed by tedu@ (my bad).
* add missing prototypes, no code change;Ingo Schwarze2016-07-157-9/+21
| | | | noticed by Christos Zoulas with -Wmissing-prototypes
* Sanitize the environment when calling make(1) to autodetect ${CC}.Ingo Schwarze2016-07-151-1/+1
| | | | Sevan Janiyan found during testing on AIX that ${CC} could leak in.
* final 1.13.4 release notesVERSION_1_13_4Ingo Schwarze2016-07-143-22/+40
|
* Add support for Mac OS X's sandbox_init(3) sandbox functionality, whichKristaps Dzonsons2016-07-125-3/+38
| | | | | | | is marked as DEPRECATED in OS X after 2011 or so, but has not been removed and has no replacement. ok schwarze@
* Make all components of the URI individually optional,Ingo Schwarze2016-07-112-20/+47
| | | | | | | independent of each other, as in: http://man.openbsd.org[/manpath][/mansec][/arch]/name[.sec] The restrictions in the past kept confusing people. Triggered by a question from RafaelNeves at gmail dot com.
* support LDFLAGS;Ingo Schwarze2016-07-103-8/+17
| | | | suggested by Christian Neukirchen <chneukirchen at gmail dot com>
* On OpenBSD, more(1) is actually less(1) with a small number ofIngo Schwarze2016-07-101-3/+3
| | | | | | | compatibility features - so we can safely use more -T on OpenBSD. But don't do that in the portable version: more -T is unlikely to work elsewhere. Issue reported by Svyatoslav Mishyn <juef at openmailbox dot org>.
* Fix a nasty typo that prevented .so links to gziped manualsIngo Schwarze2016-07-101-2/+2
| | | | | from working in the absence of a mandoc.db(5) database. Found the hard way by Svyatoslav Mishyn on Crux Linux.
* Simplify the code and the server setup by deleting the pseudo-manpathIngo Schwarze2016-07-103-30/+17
| | | | | | | | | | "mandoc" that was used for man.cgi(8) documentation and by assuming that the apropos(1) and man.cgi(8) manuals are simply installed in the default manpath. Even though man.cgi(8) is not installed by default when installing OpenBSD, it is easy to copy it into the default manpath used for man.cgi(8). Idea found when considering a question asked by wrant dot com.
* Do not treat PATH_INFO as a complete path if it doesn't containIngo Schwarze2016-07-091-2/+2
| | | | | | a manpath. For example, this makes http://man.openbsd.org/mandoc work as expected. Bug reported by tb@, reminded by Svyatoslav Mishyn.
* getopt(3) is declared in <unistd.h>, and <getopt.h> is not needed;Ingo Schwarze2016-07-094-8/+4
| | | | from Joerg Sonnenberger via Thomas Klausner, NetBSD.
* ISO C99 7.19.2.5 doesn't like mixing putchar(3) and putwchar(3) onIngo Schwarze2016-07-083-11/+10
| | | | | | the same stream, and actually, it fails spectacularly on glibc. Portability issue pointed out by Svyatoslav Mishyn <juef at openmailbox dot org> after testing on Void Linux.