aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Explain where .so paths are rooted, and why, and discourage its use;Ingo Schwarze2011-12-111-2/+18
| | | | feedback and ok jmc@, suggested by and ok kristaps@.
* Ugh, environmental variables are Ev, not Er. Fix typos.Kristaps Dzonsons2011-12-111-2/+2
|
* Note CSS_DIR in man.cgi.7.Kristaps Dzonsons2011-12-111-1/+3
|
* When 303'ing a search directly to a page, remember to specify its manroot.Kristaps Dzonsons2011-12-111-57/+54
| | | | | | Also allow for a CSS_DIR to specify alternate CSS locations. Finally, some clutter as I assume that "css" and "progname" are already HTML-safe.
* Begin working on release notes. Also whitespace-fix man.cgi.7.Kristaps Dzonsons2011-12-102-8/+36
|
* Update man.cgi.7 to note compatibility and running with multiple roots.Kristaps Dzonsons2011-12-101-16/+64
|
* Slip in a fix to allow for empty cache directories.Kristaps Dzonsons2011-12-101-2/+2
|
* Finishing touches on multi-manroot man.cgi. If more than one root isKristaps Dzonsons2011-12-101-5/+24
| | | | | specified, write them out using a SELECT box. Else write nothing (the manroot will still be checked if it's specified).
* Switch on "manpath=" handling, which I call the "manroot" (as "manpath" isKristaps Dzonsons2011-12-101-29/+46
| | | | | | | | reserved for paths within a manroot). This functionality is bare-bones: right now, the default manroot is the first one scanned from the cache directory. At some point this will be sexy and smooth, but it's easy to upgrade functionality by modifying pathgen() and so forth. If a manroot isn't parsed from the "manpath=", results are always empty.
* Encode "manroot" into file URL and parse it properly. Right now thisKristaps Dzonsons2011-12-101-14/+27
| | | | just uses the first manroot by default.
* Avoid leaking index records:Ingo Schwarze2011-12-101-21/+25
| | | | | Before allocating a record for a file, first make sure we actually want to use the file.
* Big upgrade and polish for cgi.c.Kristaps Dzonsons2011-12-101-163/+284
| | | | | | | | | | | | | | | | | | | - Deprecate kvals (key/value pairs for QUERY_STRING values). Since there's only one place that uses this, kval_parse (now http_parse()) dumps directly into struct query, which is more high-level. - Put query values directly into struct req. - The biggest difference is dynamic support for multiple "manroots". A "manroot" is a path with an "etc/catman.conf" file. When the cgi starts, it (prefix) recurses through its CACHE_DIR searching for "etc" directories. When one's found, it sees if a catman.conf file exists. This is marked as a manroot and appended to a list. The name of a manroot is the path without slashes (e.g., OpenBSD/4.9 -> "OpenBSD 4.9"). Right now "manroot" isn't enabled. The first manroot is chosen as the real one. I'll add the interface to it in the next checkins, but it'll be quite simple.
* Plug a memory leak in single_search().Kristaps Dzonsons2011-12-101-2/+3
|
* Fix selection of arch-specific manuals:Ingo Schwarze2011-12-101-3/+7
| | | | | | (1) Correctly compare cat vs. man paths. (2) Compare arch (and section) names case-insensitively. Problem noticed by kristaps@.
* Adding some missing "install" bits to Makefile.Kristaps Dzonsons2011-12-101-8/+20
|
* FreeBSD's man.cgi uses a "default" value for no arch.Kristaps Dzonsons2011-12-101-4/+11
|
* Add some periods (just to see if mlmmj is working again...).Kristaps Dzonsons2011-12-101-3/+3
|
* Forgot to make whatis the default during abstraction. Do it again.Kristaps Dzonsons2011-12-091-3/+5
|
* Abstract query extraction code. Perform some readability fixes while here.Kristaps Dzonsons2011-12-091-138/+154
|
* When specifying an architecture to whatis(1)/apropos(1)/man.cgi(7), do aKristaps Dzonsons2011-12-091-3/+5
| | | | | | comparison only if the manual specifies an architecture, otherwise let it through. Looked over by schwarze@. This brings us much more in line with OpenBSD's behaviour.
* Tweak pformatted():Ingo Schwarze2011-12-091-13/+14
| | | | | | | * If the first section is empty, use the file name as .Nd. * No need to check (len > 0) after successful fgetln(3). * Improve some comments and strip trailing whitespace. ok kristaps@
* Considerably tidy mandocdb(8) catman descriptions by skipping to the firstKristaps Dzonsons2011-12-091-3/+3
| | | | hyphen-space combo, not the last hyphen as done previously.
* Strip backspace encoding from preformatted manuals. This cleans up a lotKristaps Dzonsons2011-12-091-1/+13
| | | | of catpage entries in the mandoc databases.
* If no man.cgi `whatis' results are found, offer a quick link to the aproposKristaps Dzonsons2011-12-081-4/+42
| | | | query mode.
* Fix stupid typo: strlcpy() instead of strlcat().Kristaps Dzonsons2011-12-081-2/+2
|
* Clean up grok of preformatted manual description.Kristaps Dzonsons2011-12-081-29/+36
| | | | | | (1) put fclose() at the end, as line isn't valid afterward (see fgetln()) (2) clean up loops to be more readable to my old eyes (3) mandate trailing newline, nul-terminate, and use strrchr
* index_prune always counted the free slots,Ingo Schwarze2011-12-081-10/+10
| | | | but didn't tell anybody about them, so they weren't reused
* If arguments are passed to mandocdb(8) in "default" mode, then useKristaps Dzonsons2011-12-081-5/+12
| | | | | realpath() to convert them into absolute paths before putting the traversed subdirectory filenames into the index.
* Look for man.cgi files in the cache, not under the volume path.Kristaps Dzonsons2011-12-081-3/+3
|
* First, remove the catman(8) jobstart() stuff. It only copies files.Kristaps Dzonsons2011-12-081-114/+34
| | | | | | Second, when creating the destination filename, append the index's file (which is an absolute path) to the cache directory, not to the index's directory name.
* Tweak to make man.cgi's search results validate properly.Kristaps Dzonsons2011-12-071-1/+4
|
* Apropos and man.cgi should strcasecmp their output sorting.Kristaps Dzonsons2011-12-072-7/+17
| | | | | man.cgi should sort in the first place -- it wasn't before. Revert uppercasing of man.cgi title.
* Add skeleton man.cgi.css file. I don't think this should become moreKristaps Dzonsons2011-12-072-21/+34
| | | | | complicated than this. Also make the title be printed out in caps as it is in apropos(1) and whatis(1).
* Accept old-school man.cgi parameters like "sektion" and "query". This stillKristaps Dzonsons2011-12-071-1/+18
| | | | | | needs work because specifying an arch with "arch=i386" will return results that don't have an arch specified. I think this is weird, but it will need to be supported if we want backwards compatibility.
* Have a whatis/apropos mode, with the default (hitting enter within theKristaps Dzonsons2011-12-073-48/+74
| | | | | | | expression text) be whatis. This is a much nicer default than apropos, which can be scary. While here, fix the cat.css location (erroneously put in the response page instead of the catman page) and add bits for a default style-sheet.
* Make installing CGI a bit easier.Kristaps Dzonsons2011-12-071-0/+9
|
* By default, man.cgi should compile with -static (this was unset by mistake).Kristaps Dzonsons2011-12-072-5/+19
| | | | Also, set a custom CSS for man.cgi catman files.
* Implement search support for 24 additional macros, extract more informationIngo Schwarze2011-12-071-300/+253
| | | | | | from Fn, and lift section restrictions from An Cd Er Ev Fn Fo In Pa St Va Vt by removing 4 handler functions and 50 lines of code. ok kristaps@
* Add cat2html functionality. This keeps track of italic/bold mode per lineKristaps Dzonsons2011-12-071-57/+184
| | | | | | | | | | | | and properly handles some funny troff-isms we've exposed. I originally wanted to use man2html.c (found on W3's website with no known author) but the code is dodgy. This will need some more work (links, etc.) but does a decent job thusfar. Note: I think it's better style NOT to use <pre>, and instead have each line employ <BR> afterward. This allows browsers to break the lines if necessary. This can be changed trivially (replacing the newline and pre tags with the <BR> and new tag).
* must ignore \h with quoted argumentIngo Schwarze2011-12-051-1/+6
|
* Implement mdoc(7)-like output style variant for man(7) documents:Ingo Schwarze2011-12-043-23/+52
| | | | | | | | | | | * one instead of three blank lines after the page header; * one instead of three blank lines before the page footer; * source instead of title(section) in the lower right corner. Select this style variant with the undocumented command line option -Omdoc. In the long run, we hope to unify the ouput of both languages and to pull this out again, but that requires coordination with groff. Grudgingly ok and, (as usual,-) more comments requested by kristaps@
* Make catman and man.cgi understand the index type-field.Kristaps Dzonsons2011-12-044-41/+99
| | | | | | | Also make catman's man.conf be generated as catman.conf to avoid clobbering a real man.conf file. Finally, add a placeholder catman() function to man.cgi for preformatted manuals in the cache.
* Fix parsing of file names given on the command line; i broke itIngo Schwarze2011-12-041-5/+4
| | | | when adding support for formatted manual pages.
* Jumping out of man_unscope() for the root node is a bad ideaIngo Schwarze2011-12-043-15/+19
| | | | | | | | because that will skip root node validation, potentially entering rendering modules will NULL pointers lurking in the meta data. Instead, always validate the root node and (as suggested by joerg@) assert validity of the meta data before using it in the renderers. ok joerg@
* Remove an OpenBSD-specific tweak regarding .Xr spacing and make itIngo Schwarze2011-12-031-17/+1
| | | | | | | compatible with groff-1.21. This tweak was originally added for compatibility with groff-1.15, which is no longer needed. ok jmc@ kristaps@
* Back out lorder, which doesn't seem necessary (?). I think this means allKristaps Dzonsons2011-12-032-4/+2
| | | | fields are endian-neutral, although the recno(3) key is unknown.
* When processing .Sh HEAD, as soon as we know which section this is,Ingo Schwarze2011-12-031-1/+16
| | | | | | | | | | | fix up the section attributes of the HEAD, it's parent BLOCK, and all its (text) children. This is required because the section attributes get set when each node is allocated, i.e. before processing the content of the node itself. Thus, the listed nodes got the section attribute of the preceding section. No need to fix up the BODY, all is fine there already. Found while implementing TYPE_Sh for mandocdb(8). OK and comment requested by kristaps@.
* ISO style "%Y-%m-%d" dates are common in man(7) .TH.Ingo Schwarze2011-12-031-3/+4
| | | | | | | | | | | They have been considered valid in the past, but were reformatted to the mdoc(7) "Month day, year" style. To make page footers more similar to groff, no longer reformat them, just print them as they are. This doesn't change anything with respect to what's considered valid or what is warned about. ok kristaps@
* Make sure the btree(3) goop is also BE. This covers both the DB metadataKristaps Dzonsons2011-12-032-2/+4
| | | | and prior commits handle the contained binary fields.
* In man(7), when no explicit volume name is given, use the defaultIngo Schwarze2011-12-027-14/+30
| | | | | | | | | | | | volume name for the respective manual section, just like in mdoc(7). This gives us nicer page headers for cvs(1), lynx(1), tic(1), mkhybrid(8), and many curses(3) manuals. ok kristaps@ To not break compatibility, i wrote a corresponding patch for GNU troff which Werner Lemberg accepted upstream at rev. 1.65 of: http://cvs.savannah.gnu.org/viewvc/groff/tmac/an-old.tmac?root=groff