/
nerfur
/
openbsd-src
ОбзорДокументацияВойти
/
nerfur
/
openbsd-src
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©
openbsd-src/
usr.bin/mandoc/
..
Makefile

Repair "make man.cgi" which got accidentally broken in the previous commit to the Makefile. The man.cgi binary now uses roff_escape.o, too.

4 года назад
apropos.1

add a missing .Pp

6 лет назад
arch.c

Retire OpenBSD/sgi.

5 лет назад
att.c

mdoc(7): improve output of .At 32v

5 лет назад
cgi.c

spelling fixes; from paul tagliamonte amendments to his diff are noted on tech

4 года назад
cgi.h.example

Simplify: write HTTP 303 redirects with relative locations. Suggested by bentley@.

9 лет назад
chars.c

In groff commit 78e66624 on May 7 20:15:33 2021 +1000, G. Branden Robinson changed the -T ascii rendering of \(sd, the "second" symbol, U+2033 DOUBLE PRIME, from '' to ". Follow suit in mandoc.

4 года назад
dba.c

Improve clarity of some casts; from Christos Zoulas <christos at NetBSD>.

10 лет назад
dba.h

When the content of a manual page does not specify a section, the 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.

10 лет назад
dba_array.c

Remove the dependency on SQLite without loss of functionality. Drop the obsolete names_check() now that we deleted MLINKS. Run "doas makewhatis" after compiling and installing this.

10 лет назад
dba_array.h

Remove the dependency on SQLite without loss of functionality. Drop the obsolete names_check() now that we deleted MLINKS. Run "doas makewhatis" after compiling and installing this.

10 лет назад
dba_read.c

spelling fixes; from paul tagliamonte amendments to his diff are noted on tech

4 года назад
dba_write.c

Remove the dependency on SQLite without loss of functionality. Drop the obsolete names_check() now that we deleted MLINKS. Run "doas makewhatis" after compiling and installing this.

10 лет назад
dba_write.h

Remove the dependency on SQLite without loss of functionality. Drop the obsolete names_check() now that we deleted MLINKS. Run "doas makewhatis" after compiling and installing this.

10 лет назад
dbm.c

delete trailing whitespace and space-tab sequences; no code change; patch from Michal Nowak <mnowak at startmail dot com> who found these with git pbchk in the illumos tree

7 лет назад
dbm.h

Remove the dependency on SQLite without loss of functionality. Drop the obsolete names_check() now that we deleted MLINKS. Run "doas makewhatis" after compiling and installing this.

10 лет назад
dbm_map.c

Improve clarity of some casts; from Christos Zoulas <christos at NetBSD>.

10 лет назад
dbm_map.h

delete trailing whitespace and space-tab sequences; no code change; patch from Michal Nowak <mnowak at startmail dot com> who found these with git pbchk in the illumos tree

7 лет назад
eqn.c

spelling fixes; from paul tagliamonte amendments to his diff are noted on tech

4 года назад
eqn.h

Cleanup, no functional change: 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.

8 лет назад
eqn_html.c

The header file "html.h" uses enum roff_tok, so "roff.h" must be included before it. Diff from bcallah@ tweaked by me; he found the bug by compiling with pcc.

7 лет назад
eqn_parse.h

To prevent infinite recursion while expanding eqn(7) definitions, we must not reset the recursion counter when moving beyond the end of the *previous* expansion, but we may only do so when moving beyond the rightmost position reached by *any* expansion in the current equation. This matters because definitions can nest; consider:

4 года назад
eqn_term.c

Cleanup, no functional change: 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.

8 лет назад
html.c

prevent breakable hyphens in segment identifiers from being turned into underscores; bug reported by <Eldred dot fr> Habert

4 года назад
html.h

While the HTML standard allows multiple <h1> elements in the same document, <h1> is intended for top level headers, and most of the sections in a manual page can hardly be considered top-level. It is more usual to use <h1> only for the main title of the document of for the site name.

4 года назад
libman.h

Cleanup, no functional change: Since the man(7) and roff(7) validators no longer use the parser state flag ROFF_NOFILL, we can finally get rid of the function man_state(), resulting in a better separation of parsing and validation.

8 лет назад
libmandoc.h

Add an additional argument to the functions implementing the roff(7) numerical parser to select the default scaling unit for numbers not followed by a scaling unit, rather than always using basic units ('u').

2 года назад
libmdoc.h

remove prototypes with no matching function and externs with no var partly checked by millert@

2 года назад
main.c

Back out tzset(3) change, it is not effective.

2 года назад
main.h

Reset HTML formatter state, in particular the id_unique hash, after processing each manual page, such that the next page starts from a clean state and doesn't continue suffix numbering.

7 лет назад
makewhatis.8

Just say that the databases are intended for use by apropos(1), whatis(1), and man(1), without restricting that statement to "man -k". Suggested by and patch OK'ed by jmc@.

4 года назад
man.1

In the opening paragraph, mention search expressions and jumping to terms because those are the two most important features that set our man(1) apart from older implementations. Also, add one example for each of them to the EXAMPLES section.

2 года назад
man.c

Restore the traditional behaviour of the man(7) single-font macros .B, .I, .SM, and .SB that the next-line scope extends to the end of the next logical input line and is not extended if that line ends with a \c (no-space) escape sequence.

4 года назад
man.cgi.8

improve the description of header.html and footer.html

4 года назад
man.conf.5

Finally delete support for the "_whatdb" configuration directive, which has a misleading syntax. It was declared obsolete and superseded by the "manpath" directive five years ago.

7 лет назад
man.h

The upcoming .while request will have to re-execute roff(7) lines parsed earlier, so they will have to be saved for reuse - but the read.c preparser does not know yet whether a line contains a .while request before passing it to the roff parser. To cope with that, save all parsed lines for now. Even shortens the code by 20 lines.

8 лет назад
man_html.c

Implement the man(7) .MR macro, a 2023 GNU extension. The syntax and semantics is almost identical to mdoc(7) .Xr.

3 года назад
man_macro.c

Reduce the man(7) default global indentation from 7n, which was an oddity in groff-1.01 to groff-1.22.4, to 5n for compatibility with Version 7 AT&T UNIX, 4.3BSD-Reno, groff-1.23.0, and all versions of mdoc(7). OK jmc@ millert@

3 года назад
man_term.c

Reduce the man(7) default global indentation from 7n, which was an oddity in groff-1.01 to groff-1.22.4, to 5n for compatibility with Version 7 AT&T UNIX, 4.3BSD-Reno, groff-1.23.0, and all versions of mdoc(7). OK jmc@ millert@

3 года назад
man_validate.c

Implement the man(7) .MR macro, a 2023 GNU extension. The syntax and semantics is almost identical to mdoc(7) .Xr.

3 года назад
manconf.h

undocumented options -O outfilename and -O tagfilename to support regression testing without a tty; no user visible change intended

6 лет назад
mandoc.1

Fix a documentation bug in the description of MANDOCERR_DATE_LEGACY. Found by Nick Briggs, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268616 and forwarded by Alexander Ziaee <concussious at runbox dot com>.

год назад
mandoc.c

Make roff_expand() parse left-to-right rather than right-to-left. Some escape sequences have side effects on global state, implying that the order of evaluation matters. For example, this fixes the long-standing bug that "\n+x\n+x\n+x" after ".nr x 0 1" used to print "321"; now it correctly prints "123".

4 года назад
mandoc.css

After mandoc_html.c now encloses the titles of parts of larger publications (like journal articles) in quotation marks, we have to explicitly specify that we want the default font, because otherwise we get the browser default font, which is usually italic for <cite>.

2 года назад
mandoc.h

In the tbl(7) layout parser, use the roff(7) numerical expression parser to support arithmetic operations in column width modifiers.

2 года назад
mandoc_aux.c

Fix the mandoc_strndup() utility function. All existing callers seem safe so far, but implementing it with an unchecked memcpy(3) is just wrong and quite dangerous.

9 лет назад
mandoc_aux.h

Implement automatic line breaking inside individual table cells that contain text blocks. This cures overlong lines in various Xenocara manuals.

9 лет назад
mandoc_msg.c

In the tbl(7) layout parser, use the roff(7) numerical expression parser to support arithmetic operations in column width modifiers.

2 года назад
mandoc_ohash.c

including <ohash.h> requires including <stdint.h> beforehand; noticed by Svyatoslav Mishyn <juef at openmailbox dot org>

11 лет назад
mandoc_ohash.h

In private header files, __BEGIN_DECLS and __END_DECLS are pointless. Because these work slightly differently on different systems, they are becoming a maintenance burden in the portable version, so delete them.

11 лет назад
mandoc_parse.h

In the past, generating comment nodes stopped at the .TH or .Dd macro, which is usually close to the beginning of the file, right after the Copyright header comments. But espie@ found horrible input files in the textproc/fstrcmp port that generate lots of parse nodes before even getting to the header macro. In some formatters, comment nodes after some kinds of real content triggered assertions.

7 лет назад
mandoc_xr.c

If a single page references the same non-existent manual more than once, print "(N times)" after the message "referenced manual not found", to lessen the risk that people fix the first instance and miss the others; jmc@ confirmed that this is useful.

9 лет назад
mandoc_xr.h

If a single page references the same non-existent manual more than once, print "(N times)" after the message "referenced manual not found", to lessen the risk that people fix the first instance and miss the others; jmc@ confirmed that this is useful.

9 лет назад
mandocdb.c

In the SYNOPSIS, support the input syntax ".Lb libname [...]" with multiple arguments, to be printed as "/* -lname [...] */" and to be searched for with the already established syntax "man -k Lb=libname". Nothing changes outside the SYNOPSIS section.

год назад
manpath.c

Make sure that the configuration file is always read, even when running with the -M option or with a MANPATH environment variable that has neither a leading or trailing ":" nor any "::". If -M or MANPATH override the configuration file rather than adding to it, just ignore any "manpath" directives while processing the configuration file.

5 лет назад
mansearch.c

spelling fixes; from paul tagliamonte amendments to his diff are noted on tech

4 года назад
mansearch.h

In man(1) mode, i.e. when asking for a single manual page by name, prefer file name matches over .Dt/.TH matches over first NAME matches over later NAME matches, but do not change the ordering for apropos(1) nor for man -a.

7 лет назад
mdoc.c

Support manual tagging of .Pp, .Bd, .D1, .Dl, .Bl, and .It. In HTML output, improve the logic for writing inside permalinks: skip them when there is no child content or when there is a risk that the children might contain flow content.

6 лет назад
mdoc.h

Cleanup, no functional change:

8 лет назад
mdoc_argv.c

When parsing a tab character that is not preceded by a space character on an .It -column line, args() sets the MDOC_PHRASEQL flag to Quote the Last word of the Phrase. Even if it turns out this quoting is not needed because the word is already quoted for other reasons, clear the flag at the end of parsing the phrase, such that the flag does not leak to the next phrase.

7 лет назад
mdoc_html.c

Fix a violation of the HTML 5 standard (paragraph 4.5.6 "The cite element"). It is intended for titles, not to wrap complete citation blocks.

2 года назад
mdoc_macro.c

Use the MDOC_JOIN feature for .Ft, too. Semantically, this makes sense because printing two function return types one right after the other with nothing in between is never useful, whereas function return types consisting of more than one word are widespread. The change matters because people usually do not quote multi-word function return types (nor should they). We have about 1800 unquoted instances in our tree versus about 300 quoted instances.

год назад
mdoc_man.c

Small bug fix: Percent macros only get automatic trailing punctuation inside .Rs blocks. This was already correctly implemented for other output modes.

2 года назад
mdoc_markdown.c

For .%R RFC, link to rfc-editor.org in -T markdown output just like it was done for -T html in mdoc_html.c rev. 1.226.

2 года назад
mdoc_state.c

Up to version 1.22.4, groff_mdoc(7) only considered the first word when comparing section headers. For example, ".Sh SEE ELSEWHERE" and ".Sh SEE Em ALSO" were considered instances of a SEE ALSO section. In groff-current, exact matches with no sub-macros are required. Adjust mandoc behaviour.

4 года назад
mdoc_term.c

Reduce the man(7) default global indentation from 7n, which was an oddity in groff-1.01 to groff-1.22.4, to 5n for compatibility with Version 7 AT&T UNIX, 4.3BSD-Reno, groff-1.23.0, and all versions of mdoc(7). OK jmc@ millert@

3 года назад
mdoc_validate.c

In the SYNOPSIS, support the input syntax ".Lb libname [...]" with multiple arguments, to be printed as "/* -lname [...] */" and to be searched for with the already established syntax "man -k Lb=libname". Nothing changes outside the SYNOPSIS section.

год назад
msec.c

Major cleanup; may imply minor changes in edge cases of error reporting.

8 лет назад
msec.in

delete old, undocumented, obsolete section names that nobody uses

9 лет назад
out.c

In the tbl(7) layout parser, use the roff(7) numerical expression parser to support arithmetic operations in column width modifiers.

2 года назад
out.h

Finally expand and delete the macro SCALE_VS_INIT(). It's nothing but obfuscation and only used at three places in a single file. Removing it also makes the code three lines shorter. The ugliness was already pointed out six years ago by mmcc@.

4 года назад
preconv.c

Cleanup, no functional change: 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.

8 лет назад
predefs.in

Add some missing OpenBSD RCS markers and a few missing <sys/types.h> inclusions; no code change.

12 лет назад
read.c

improve a comment explaining a particularly nasty hack; no code change

4 года назад
roff.c

For release, fix a regression test that failed on i386 in the simplest possible and least intrusive way. The existing code miscalculated the scaled length 100M as 23u instead of the correct result 24u, but only when compiled with -O2 on i386. The problem was reported by bluhm@.

год назад
roff.h

Implement the man(7) .MR macro, a 2023 GNU extension. The syntax and semantics is almost identical to mdoc(7) .Xr.

3 года назад
roff_escape.c

Fix UTF-16 surrogate detection: lower case variants have to be rejected, too.

2 года назад
roff_html.c

In HTML output, allow switching the desired font for subsequent text without printing an opening tag right away, and use that in the .ft request handler. While here, garbage collect redundant enum htmlfont and reduce code duplication in print_text(). Fixing an assertion failure reported by Michael <Stapelberg at Debian> in pmRegisterDerived(3) from libpcp3-dev.

7 лет назад
roff_int.h

Avoid the layering violation of re-parsing for \E in roff_expand(). To that end, add another argument to roff_escape() returning the index of the escape name. This also makes the code in roff_escape() a bit more uniform in so far as it no longer needs the "char esc_name" local variable but now does everything with indices into buf[]. No functional change.

4 года назад
roff_term.c

spelling fixes; from paul tagliamonte amendments to his diff are noted on tech

4 года назад
roff_validate.c

Introduce the concept of nodes that are semantically transparent: they are skipped when looking for previous or following high-level macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm and .Tg, and man(7) .DT and .PD. Use this concept for a variety of improved decisions in various validators and formatters.

6 лет назад
st.c

Add an .St argument for C23.

2 года назад
tag.c

1. Do not put ASCII_HYPH (0x1c) into the tag file. That happened when tagging a string containing '-' on an input text line, most commonly in man(7) .TP next line scope. 2. Do not let "\-" end the tag. In both cases, translate ASCII_HYPH and "\-" to plain '-' for output. For example, this improves handling of unbound.conf(5).

3 года назад
tag.h

When a .Tg is attached to a paragraph, attach the permalink to the first word, or the first few words if they are short.

6 лет назад
tbl.c

In the tbl(7) layout parser, use the roff(7) numerical expression parser to support arithmetic operations in column width modifiers.

2 года назад
tbl.h

In the tbl(7) layout parser, use the roff(7) numerical expression parser to support arithmetic operations in column width modifiers.

2 года назад
tbl_data.c

Quirk-compatibility with GNU tbl(1): With the "nospaces" option, skip space characters before and after "T{", in addition to skipping those at the beginning and end of data cells.

5 лет назад
tbl_html.c

If the last data row of a tbl(7) contains nothing but a horizontal line, do not skip closing the table and cleaning up memory at the end of the table in the HTML output module.

4 года назад
tbl_int.h

remove prototypes with no matching function and externs with no var partly checked by millert@

2 года назад
tbl_layout.c

In the tbl(7) layout parser, use the roff(7) numerical expression parser to support arithmetic operations in column width modifiers.

2 года назад
tbl_opts.c

Almost mechanical diff to remove the "struct mparse *" argument from mandoc_msg(), where it is no longer used. While here, rename mandoc_vmsg() to mandoc_msg() and retire the old version: There is really no point in having another function merely to save "%s" in a few places. Minus 140 lines of code.

8 лет назад
tbl_parse.h

Cleanup, no functional change: Now that message handling is properly encapsulated, remove struct mparse pointers from four structs (roff, roff_man, tbl_node, eqn_node) and from the argument lists of five functions (roff_alloc, roff_man_alloc, mandoc_getarg, tbl_alloc, eqn_alloc). Except for being passed to the main program as an opaque object, it now only occurs in read.c, as it should, and not across 15 files like in the past.

8 лет назад
tbl_term.c

Stop skipping vertical space after boxed tables.

4 года назад
term.c

spelling fixes; from paul tagliamonte amendments to his diff are noted on tech

4 года назад
term.h

When starting a new input line, even when continuing the same output line, use the current output position as the reference position for tabs on that input line. This brings mandoc in line with the behaviour of GNU, Heirloom, and Plan 9 roff.

4 года назад
term_ascii.c

Reduce the man(7) default global indentation from 7n, which was an oddity in groff-1.01 to groff-1.22.4, to 5n for compatibility with Version 7 AT&T UNIX, 4.3BSD-Reno, groff-1.23.0, and all versions of mdoc(7). OK jmc@ millert@

3 года назад
term_ps.c

After .ti, there are many reasons why the offset may change, so setting it back later requires a guard against underflow, or subsequent assertions may fail. Issue found in an afl run performed by Jan Schreiber <jes at posteo dot de>.

6 лет назад
term_tab.c

Provide a cleanup function for the term_tab module, freeing memory and resetting the internal state to the initial state. Call this function from the proper place in term_free().

5 лет назад
term_tag.c

Append .html suffix to temporary files enabling browsers to recognise it

5 лет назад
term_tag.h

Append .html suffix to temporary files enabling browsers to recognise it

5 лет назад
tree.c

More accurately represent cells containing horizontal lines in -T tree output. In particular, do not represent "_" as "-", and distinguish "_" from "\_" and "=" from "\=". Output tweak following a related question from Ted Bullock <tbullock at comlore dot com>.

5 лет назад