| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Minus 80 lines of code, no functional change.
Written on the train from Koeln to Wolfsburg returning from p2k15.
|
|
|
|
|
| |
and call them from mparse_alloc() and choose_parser(),
preparing unified allocation of struct roff_man.
|
|
|
|
|
| |
Almost completely mechanical, no functional change.
Written on the train from Exeter to London returning from p2k15.
|
|
|
|
|
| |
Replace struct mdoc_meta and struct man_meta by a unified struct roff_meta.
Written of the train from London to Exeter on the way to p2k15.
|
|
|
|
|
|
|
|
|
| |
Replace struct mdoc_node and struct man_node by a unified struct roff_node.
To be able to use the tok member for both mdoc(7) and man(7) without
defining all the macros in roff.h, sacrifice a tiny bit of type safety
and make tok an int rather than an enum.
Almost mechanical, no functional change.
Written on the Eurostar from Bruxelles to London on the way to p2k15.
|
|
|
|
|
|
| |
remain in other functions. As a bonus, this fixes an assertion failure
jsg@ found some time ago with afl (test case 982) and improves minor
details in error reporting.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
same chunk of argument parsing code out of five of the eight callback
functions. The other three have too much special handling to
participate.
As a bonus, let lookup() and mdoc_args() deal with line macros and
retire the lookup_raw() helper and the mdoc_zargs() internal interface
function.
No functional change, minus 40 lines of code.
|
|
|
|
|
|
| |
it was the same in all four cases. As a bonus, get rid
of one enum type that was used for internal communication.
No functional change, minus 40 lines of code.
|
|
|
|
|
| |
long obsolete and were never written in mdoc(7) in the first place.
Removes 100 lines from source files.
|
|
|
|
| |
no functional change, minus 50 lines of code.
|
|
|
|
| |
No functional change, minus 130 lines of code.
|
|
|
|
| |
No functional change, minus 90 lines of code.
|
|
|
|
|
|
|
|
|
|
| |
* .No selects the default font; relevant e.g. in .Bf blocks
* no need to force empty .Li elements
* closing delimiters as leading macro arguments do not suppress space
* opening delimiters at the end of a macro line do not suppress space
* correctly handle delimiter spacing in -Tman
As a side effect, these fixes let mandoc warn about empty .No macros
as requested by bentley@.
|
| |
|
| |
|
|
|
|
| |
and it is occasionally useful to be able to pass literal strings
|
|
|
|
|
| |
since this is hardly more complicated than explicitly ignoring them
as we did in the past. Of course, do not use them!
|
|
|
|
|
| |
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for accelerated generation of reduced-size databases.
Implement this by allowing the parsers to optionally
abort the parse sequence after the NAME section.
While here, garbage collect the unused void *arg attribute of
struct mparse and mparse_alloc() and fix some errors in mandoc(3).
This reduces the processing time of mandocdb(8) on /usr/share/man
by a factor of 2 and the database size by a factor of 4.
However, it still takes 5 times the time and 6 times the space
of makewhatis(8), so more work is clearly needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
positional arguments (like Dt Fn Xr) and macros taking text as
arguments (like Nd Sh Em %T An). In the past, even the latter put
each word of their arguments into its own MDOC_TEXT node; instead,
concatenate arguments unless delimiters, keeps or spacing mode
prevent that. Regarding mandoc(1), this is internal refactoring,
no output change intended.
Regarding mandocdb(8), this fixes yet another regression introduced
when switching from DB to SQLite: The ability to search for strings
crossing word boundaries was lost and is hereby restored. At the
same time, database sizes and build times are both reduced by a bit
more than 5% each.
|
|
|
|
|
|
|
|
| |
Settle for "struct man *man", "struct mdoc *mdoc", "struct meta *meta"
and avoid the confusing "*m" which was sometimes this, sometimes that.
No functional change.
ok kristaps@ some time ago
|
|
|
|
|
|
|
| |
* When they are trailing the last item, move them outside the list.
* When they are trailing any other none-compact item, drop them.
OpenBSD rev. mdoc_validate.c 1.107, mdoc.c 1.91
|
|
|
|
|
|
|
|
|
|
| |
default value for the mdoc(7) .Os macro.
Needed for man.cgi on the OpenBSD website.
Problem with man.cgi first noticed by deraadt@;
beck@ and deraadt@ agree with the way to solve the issue.
"Please check them in and I'll look into them later!" kristaps@
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
found while syncing to OpenBSD
|
| |
|
|
|
|
|
| |
This is required for supporting in-line equations. While here, push
registers properly into roff and add an set/get/mod interface.
|
|
|
|
|
|
|
|
| |
variable from mandoc_getarg() so that it prints the warning every time.
Then, remove the warning from args_checkpunct(). This way, warnings
are being posted at the correct time. This makes the flag argument to
mdoc_zargs() superfluous, so make it be zero when it's invoked. Finally,
move the args() flags into mdoc_argv.c and make them enums.
|
|
|
|
| |
function a parameter to suppress warnings.
|
|
|
|
|
| |
Don't have them do that (includes in header files = faugh), and have
individual files directly include these files.
|
| |
|
|
|
|
|
|
|
|
|
| |
error where (1) -man pages were punctuating delimiters (e.g., `.B a ;')
and where (2) standalone punctuation in -mdoc or -man (e.g., ";" on its
own line) would also be punctuated. This introduces a small amount of
complexity of mdoc_{html,term}.c must manage their own spacing with
running print_word() or print_text(). The check for delimiting now
happens in mdoc_macro.c's dword().
|
|
|
|
|
|
|
|
|
| |
libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the
time being in libmandoc.h. This requires struct mparse to be passed
into the allocation routines instead of mandocmsg and a void pointer.
Then, move some of the functionality of the old mmsg() into read.c's
mparse_mmsg() (check against wlevel and setting of file_status) and use
main.c's mmsg() as simply a printing tool.
|
|
|
|
|
| |
make mdoc_vmsg not return an int. libmdoc is now completely clean of
return-value checks from the message subsystem.
|
| |
|
|
|
|
| |
place that it's being used.
|
|
|
|
|
|
| |
removal of manual delimiter checks in html.c and term.c. Finally, add
the escaped period as a closing delimiter, removing a TODO to this
effect.
|
|
|
|
| |
which is wrong. Then remove mdoc_iscdelim() alltogether.
|
|
|
|
|
| |
Remove references to MDOC_ACTED (it was only assertions) and the pre-
and post-action functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now have sufficient practical experience to know what we want,
so this is intended to be final:
- provide -Wlevel (warning, error or fatal) to select what you care about
- provide -Wstop to stop after parsing a file with warnings you care about
- provide consistent exit status codes for those warnings you care about
- fully document what warnings, errors and fatal errors mean
- remove all other cruft from the user interface, less is more:
- remove all -f knobs along with the whole -f option
- remove the old -Werror because calling warnings "fatal" is silly
- always finish parsing each file, unless fatal errors prevent that
This commit also includes a couple of related simplifications behind
the scenes regarding error handling.
Feedback and OK kristaps@; Joerg Sonnenberger (NetBSD) and
Sascha Wildner (DragonFly BSD) agree with the general direction.
|
|
|
|
| |
ok kristaps@
|
|
|
|
|
|
|
|
|
| |
roff_getstr() family of functions into roff.c with the "first_string"
directly in struct roff. Second, pre-process each line for reserved
words in libroff, splicing and re-running a line if it has one (this
allows defined symbols to be macros). Remove term.c's invocation of the
roff_getstrn() function. Removed function documentation in roff.3 and
added roff.7 `ds' documentation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the parser can use the resulting cues. In particular, this allows
to use .nr nS to force SYNOPSIS-style .Nm indentation outside the
SYNOPSIS as needed by ifconfig(8).
To actually make this useable, .Pp must rewind .Nm, or the rest of the
section would end up indented. Implement a quick hack for now,
a generic solution can be designed later.
ok kristaps@ and tested by sobrado@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the Rostock mandoc hackathon and tested and polished since,
supporting constructs like:
.Ao Bo Ac Bc (exp breaking exp)
.Aq Bo eol Bc (imp breaking exp)
.Ao Bq Ac eol (exp breaking imp)
.Ao Bo So Bc Ac Sc (double break, inner before outer)
.Ao Bo So Ac Bc Sc (double break, outer before inner)
.Ao Bo Ac So Bc Sc (broken breaker)
.Ao Bo So Bc Do Ac Sc Dc (broken double breaker)
There are still two known issues which are tricky:
1) Breaking two identical explicit blocks (Ao Bo Bo Ac or Aq Bo Bo eol)
fails outright, triggering a bogus syntax error.
2) Breaking a block by two identical explicit blocks (Ao Ao Bo Ac Ac Bc
or Ao Ao Bq Ac Ac eol) still has a minor rendering error left:
"<ao1 <ao2 [bo ac2> ac1> bc]>" should not have the final ">".
We can fix these later in the tree, let's not grow this diff too large.
"get it in" kristaps@
|
|
|
|
|
|
|
|
|
| |
passed in to libmdoc and libman.
Fix mdoc.3 and man.3 EXAMPLE sections to include regset.
Add MDOC_SYNPRETTY flag cueing front-end to nicely format certain values
as if SEC_SYNOPSIS were the current section.
|
|
|
|
|
|
|
|
|
| |
functionality and UGLY works quite well thanks to schwarze@'s careful
attention.
This also backs out function-prototype changes for struct regset,
instead stuffing a pointer to the regset directly into struct
mdoc/man/roff.
|
|
|
|
| |
libman and libmdoc.
|
|
|
|
| |
const struct regset pointer. No functionality.
|
| |
|