summaryrefslogtreecommitdiffstats
path: root/Makefile.depend
Commit message (Collapse)AuthorAgeFilesLines
* Test availability of mkstemps(3) and provide a fallback implementationIngo Schwarze2021-09-191-0/+1
| | | | in case it is missing; needed for SUN Solaris 10.
* update Makefile.dependIngo Schwarze2021-09-181-1/+1
|
* Because mandoc_aux.h and mandoc.h use __attribute__, all files thatIngo Schwarze2020-06-221-10/+10
| | | | | | | | include mandoc_aux.h or mandoc.h need to include config.h, too. It is suspected that for example IRIX needs this, or it is likely to throw errors in these files because the system compiler doesn't understand __attribute__. Issue reported by Kazuo Kuroi <kazuo at irixnet dot org>.
* When a .Tg is attached to a paragraph, attach the permalinkIngo Schwarze2020-04-181-5/+5
| | | | to the first word, or the first few words if they are short.
* Separate the place to put the <a href> permalink (now markedIngo Schwarze2020-04-071-2/+2
| | | | | | | with NODE_HREF) from the target element of the link (still marked with NODE_ID). In many cases, use this to move the target to the beginning of the paragraph, such that readers don't get dropped into the middle of a sentence.
* Split tagging into a validation part including prioritizationIngo Schwarze2020-03-131-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in tag.{h,c} and {mdoc,man}_validate.c and into a formatting part including command line argument checking in term_tag.{h,c}, html.c, and {mdoc|man}_{term|html}.c. Immediate functional benefits include: * Improved prioritization of automatic tags for .Em and .Sy. * Avoiding bogus automatic tags when .Em, .Fn, or .Sy are explicitly tagged. * Explicit tagging of .Er and .Fl now works in HTML output. * Automatic tagging of .IP and .TP now works in HTML output. But mainly, this patch provides clean earth to build further improvements on. Technical changes: * Main program: Write a tag file for ASCII and UTF-8 output only. * All formatters: There is no more need to delay writing the tags. * mdoc(7)+man(7) formatters: No more need for elaborate syntax tree inspection. * HTML formatter: If available, use the "string" attribute as the tag. * HTML formatter: New function to write permalinks, to reduce code duplication. Style cleanup in the vicinity while here: * mdoc(7) terminal formatter: To set up bold font for children, defer to termp_bold_pre() rather than calling term_fontpush() manually. * mdoc(7) terminal formatter: Garbage collect some duplicate functions. * mdoc(7) HTML formatter: Unify <code> handling, delete redundant functions. * Where possible, use switch statements rather than if cascades. * Get rid of some more Yoda notation. The necessity for such changes was first discussed with kn@, but i didn't bother him with a request to review the resulting -673/+782 line patch.
* Slowly start implementing tagging support for man(7) pages, evenIngo Schwarze2019-07-221-1/+1
| | | | | | | | | | | | | though it is obvious that this can never become as good as for mdoc(7) pages. As a first step, tag alphabetic arguments of .IP macros, which are often used for lists of options and keywords. Try "man -O tag=g as" to get the point. Thanks to Leah Neukirchen for recently reminding me that exploring how much can be done in this respect may be worthwhile: it is likely to slightly improve usability while adding only small amounts of relatively straightforward code.
* Some time ago, i simplified mandoc_msg() such that it can be usedIngo Schwarze2019-07-101-2/+2
| | | | | | | | | everywhere and not only in the parsers. For more uniform messages, use it at more places instead of err(3), in particular in the main program. While here, integrate a few trivial functions called at exactly one place into the main option parser, and let a few more functions use the normal convention of returning 0 for success and -1 for error.
* The header file "html.h" uses enum roff_tok,Ingo Schwarze2019-03-171-3/+3
| | | | | | so "roff.h" must be included before it. Diff from bcallah@ tweaked by me; he found the bug by compiling with pcc.
* add arch.oIngo Schwarze2019-03-061-0/+1
|
* Cleanup, no functional change:Ingo Schwarze2018-12-301-2/+2
| | | | | | | | | | | | | | The struct roff_man used to be a bad mixture of internal parser state and public parsing results. Move the public results to the parsing result struct roff_meta, which is already public. Move the rest of struct roff_man to the parser-internal header roff_int.h. Since the validators need access to the parser state, call them from the top level parser during mparse_result() rather than from the main programs, also reducing code duplication. This keeps parser internal state out of thee main programs (five in mandoc portable) and out of eight formatters.
* Yet another round of improvements to manual font selection.Ingo Schwarze2018-12-161-4/+4
| | | | | | | | | Unify handling of \f and .ft. Support \f4 (bold+italic). Support ".ft BI" and ".ft CW" for terminal output. Support the .ft request in HTML output. Reject the bogus fonts \f(C1, \f(C2, \f(C3, and \f(CP. In regress.pl, only strip leading whitespace in math mode.
* Major cleanup; may imply minor changes in edge cases of error reporting.Ingo Schwarze2018-12-141-0/+1
| | | | | | | | | | | Finally, drop support for the run-time configurable mandocmsg() callback. It was over-engineered from the start, never used for anything in a decade, and repeatedly caused maintenance headaches. Consolidate reporting infrastructure into two files, mandoc.h and mandoc_msg.c, mopping up the bits and pieces that were scattered around main.c, read.c, mandoc_parse.h, libmandoc.h, the prototypes of four parsing-related functions, and both parser structs.
* Cleanup, no functional change:Ingo Schwarze2018-12-131-17/+17
| | | | | | | | | | Split the top level parser interface out of the utility header mandoc.h, into a new header mandoc_parse.h, for use in the main program and in the main parser only. Move enum mandoc_os into roff.h because struct roff_man is the place where it is stored. This allows removal of mandoc.h from seven files in low-level parsers and in formatters.
* Cleanup, no functional change:Ingo Schwarze2018-12-131-3/+3
| | | | | | | Finally merge the pointless file st.in into st.c. Nobody should do operating systems dependent changes to standards: By definition, standards are the same for every operating system. While here, libmdoc.h no longer requires mdoc.h.
* Cleanup, no functional change:Ingo Schwarze2018-12-131-4/+4
| | | | | | No need to expose the eqn(7) syntax tree data structures everywhere. Move them to their own include file, "eqn.h". While here, delete the unused enum eqn_pilet.
* Cleanup, no functional change:Ingo Schwarze2018-12-131-10/+10
| | | | | | | | In libroff.h, nothing was left except the eqn(7) parser interface, which isn't really part of the roff(7) parser, so rename it to eqn_parse.h. While here, move struct eqn_def to eqn.c because that's the only file using it, and let eqn_box_free() and eqn_free() handle NULL.
* html.c now uses ohash, and new file compat_strndup.cIngo Schwarze2018-07-311-1/+2
|
* syncIngo Schwarze2017-07-201-2/+2
|
* Basic reporting of .Xrs to manual pages that don't existIngo Schwarze2017-07-011-11/+13
| | | | | | | | | | | | in the base system, inspired by mdoclint(1). We are able to do this because (1) the -mdoc parser, the -Tlint validator, and the man(1) manual page lookup code are all in the same program and (2) the mandoc.db(5) database format allows fast lookup. Feedback from, previous versions tested by, and OK jmc@. A few features will be added to this in the tree, step by step.
* Basic implementation of the roff(7) .ta (define tab stops) request.Ingo Schwarze2017-05-071-0/+1
| | | | | | This is the first feature made possible by the parser reorganization. Improves the formatting of the SYNOPSIS in many Xenocara GL manuals. Also important for ports, as reported by many, including naddy@.
* Move handling of the roff(7) .ft request from the man(7)Ingo Schwarze2017-05-051-0/+3
| | | | | modules to the new roff(7) modules. As a side effect, mdoc(7) now handles .ft, too. Of course, do not use that.
* Parser unification: use nice ohashes for all three request and macro tables;Ingo Schwarze2017-04-291-4/+3
| | | | no functional change, minus two source files, minus 200 lines of code.
* Delete the manpage(1) utility.Ingo Schwarze2017-04-241-1/+0
| | | | | | | | It was never enabled in any release, nor was a manual ever written. In general, we want to simplify the user interface rather than succumb to featurism. Consequently, integrating manpage(1) into the main binary would seem like a dubious direction.
* more 1.14.1 release preparationsIngo Schwarze2017-02-081-0/+2
|
* When looking up macro values while the macro tables are being builtIngo Schwarze2017-01-151-1/+1
| | | | | | | | | | | | | | | in makewhatis(8), use ohash rather than linear searches. This was identified as the main makewhatis(8) performance bottleneck by Baptiste Daroussin <bapt at FreeBSD>, who also suggested part of the improved algorithm. This reduces the run time of "makewhatis /usr/share/man" from eleven to five seconds on my notebook. Note that the changed code is not used in apropos(1), so don't expect speedups there. While here, sort macro values asciibetically, to improve reproducibility - which still isn't perfect, but getting better.
* update after rev. 1.5 of dba.cIngo Schwarze2016-10-181-1/+1
|
* Linux compatibility: Work around the lack of EFTYPE and protect <err.h>.Ingo Schwarze2016-07-201-9/+9
|
* Remove the dependency on SQLite without loss of functionality.Ingo Schwarze2016-07-191-8/+12
| | | | | Stop supporting systems that don't have mmap(3). Drop the obsolete names_check() now that we deleted MLINKS.
* add missing prototypes, no code change;Ingo Schwarze2016-07-151-3/+3
| | | | noticed by Christos Zoulas with -Wmissing-prototypes
* provide a simple stand-alone implementation of getline(3)Ingo Schwarze2015-11-071-0/+1
| | | | for systems lacking it
* Modernization, no functional change intended:Ingo Schwarze2015-11-071-1/+1
| | | | | | Use the POSIX function getline(3) rather than the slightly dangerous BSD function fgetln(3). Remove the related compatibility code.
* use the new function man_validate() here, tooIngo Schwarze2015-10-221-1/+1
|
* In order to become able to generate syntax tree nodes on the roff(7)Ingo Schwarze2015-10-201-1/+2
| | | | | | | | level, validation must be separated from parsing and rewinding. This first big step moves calling of the mdoc(7) post_*() functions out of the parser loop into their own mdoc_validate() pass, while using a new mdoc_state() module to make syntax tree state handling available to both the parser loop and the validation pass.
* Major character table cleanup:Ingo Schwarze2015-10-131-1/+1
| | | | | | | | | | | | | * Use ohash(3) rather than a hand-rolled hash table. * Make the character table static in the chars.c module: There is no need to pass a pointer around, we most certainly never want to use two different character tables concurrently. * No need to keep the characters in a separate file chars.in; that merely encourages downstream porters to mess with them. * Sort the characters to agree with the mandoc_chars(7) manual page. * Specify Unicode codepoints in hex, not decimal (that's the detail that originally triggered this patch). No functional change, minus 100 LOC, and i don't see a performance change.
* Reduce the amount of code by moving the three copies of the ohashIngo Schwarze2015-10-131-3/+4
| | | | | callback functions into one common place, preparing for the use of ohash for some additional purposes. No functional change.
* Finally use __progname, err(3) and warn(3).Ingo Schwarze2015-10-111-1/+2
| | | | | | | | | | That's more readable and less error-prone than fumbling around with argv[0], fprintf(3), strerror(3), perror(3), and exit(3). It's a bad idea to boycott good interfaces merely because standards committees ignore them. Instead, let's provide compatibility modules for archaic systems (like commercial Solaris) that still don't have them. The compat module has an UCB Copyright (c) 1993...
* Initial, still somewhat experimental implementation to leverageIngo Schwarze2015-07-171-2/+3
| | | | | | | | | | | | | | | less(1) -T and :t ctags(1)-like functionality to jump to the definitions of various terms inside manual pages. To be polished in the tree, so bear with me and report issues. Technically, if less(1) is used as a pager, information is collected by the mdoc(7) terminal formatter, first stored using the ohash library, then ultimately written to a temporary file which is passed to less via -T. No change intended for other output formatters or when running without a pager. Based on an idea from Kristaps using feedback from many, in particular phessler@ nicm@ millert@ halex@ doug@ kspillner@ deraadt@.
* Fix the "depend" target and regenerate Makefile.depend:Ingo Schwarze2015-07-141-21/+4
| | | | | | | * do not process the test-*.c files, they are not built via make * add the missing compat_stringlist.c and soelim.c * read.c now uses roff_int.h * roff.c no longer uses libmdoc.h
* Unify node handling functions:Ingo Schwarze2015-04-191-8/+8
| | | | | | | | | | | * node_alloc() for mdoc and man_node_alloc() -> roff_node_alloc() * node_append() for mdoc and man_node_append() -> roff_node_append() * mdoc_head_alloc() and man_head_alloc() -> roff_head_alloc() * mdoc_body_alloc() and man_body_alloc() -> roff_body_alloc() * mdoc_node_unlink() and man_node_unlink() -> roff_node_unlink() * mdoc_node_free() and man_node_free() -> roff_node_free() * mdoc_node_delete() and man_node_delete() -> roff_node_delete() Minus 130 lines of code, no functional change.
* First step towards parser unification:Ingo Schwarze2015-04-021-25/+25
| | | | | | Replace enum mdoc_type and enum man_type by a unified enum roff_type. Almost mechanical, no functional change. Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.
* Parse the new man.conf(5) "output" directive.Ingo Schwarze2015-03-271-6/+6
| | | | The next step will be to actually use the parsed data.
* Compat glue needed for Solaris 9 and 10.Ingo Schwarze2015-03-191-0/+6
| | | | | | | Thanks to Sevan Janiyan <venture37 at geeklan dot co dot uk> for reporting the Solaris 10 issues, to Jan Holzhueter <jh at opencsw dot org> for some additional insight, and to OpenCSW in general for providing me with a Solaris 9/10/11 testing environment.
* strtonum(3) compat glueIngo Schwarze2015-02-161-1/+3
|
* header cleanup:Ingo Schwarze2014-12-011-8/+8
| | | | | | * add missing forward declarations * remove needless header inclusions * some style unification
* AT&T is unlikely to release an new version of Research UNIX any time soon.Ingo Schwarze2014-11-281-5/+3
| | | | | So, it's pointless to make adding version strings easy for downstream. One source file less to maintain.
* Fully integrate apropos(1) into mandoc(1).Ingo Schwarze2014-08-171-17/+20
| | | | | | | | | Switch the argmode on the progname, including man(1). Provide -f and -k options to switch the argmode. Store the argmode inside struct search, generalizing the flags. Derive the deftype from the argmode when needed instead of storing it. Store the outkey inside struct search instead of passing it alone. While here, get rid of the trailing blanks in Makefile.depend.
* Provide a fallback version of fts(3) for systems lacking it.Ingo Schwarze2014-08-111-10/+11
| | | | | | I chose the OpenBSD version because it apparently contains various bugfixes that never made it into libnbcompat. To reduce size and complexity, i stripped out the features we don't need.
* sync after adding config.h to mansearch_const.c;Ingo Schwarze2014-08-101-1/+1
| | | | committing on behalf of kristaps@ because i want to release now
* sync after sqlite3_errstr() compat additionIngo Schwarze2014-08-051-0/+2
|