| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
In particular, two cases were wrong:
- single-line .if with trailing whitespace gave no blank line
- multiline .if with \{ but without \{\ gave no blank line
While here, simplify roff_cond() by partially reordering the code.
"good one" kristaps@
|
|
|
|
|
|
|
| |
When string expansion exceeds the recursion limit, drop the whole
input line, instead of leaving just the string unexpanded.
ok kristaps@
|
|
|
|
|
| |
is both preceded and followed by an alphabetic character.
ok kristaps@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a string is defined in terms of itself, the REPARSE_LIMIT in read.c
used to break the cycle. This no longer works since all the work
is now done in the function roff_res(), looping indefinitely.
Make this loop finite by arbitrarily limiting the number of times one
string may be expanded; when that limit is reached, leave the remaining
string references unexpanded.
This changes behaviour compared to 1.11.5, where the whole line would
have been dropped. The new behaviour is better because it loses less
information. We don't want to imitate groff-1.20.1 behaviour anyway
because groff aborts parsing of the whole file.
ok kristaps@
|
|
|
|
| |
found while syncing to OpenBSD
|
| |
|
|
|
|
| |
suggested by joerg@.
|
|
|
|
| |
roffstr.
|
| |
|
|
|
|
|
|
|
| |
through libroff, which does the appropriate translations of `tr'. This
is SLOW: it uses the backend of `ds' and `de', which is a simple linear
list. However, unlike `ds' and `de', it iterates over EACH CHARACTER of
the entire file looking for replacements.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
here, do some function renames for clarity and make all function
prototypes be in one place.
|
|
|
|
|
|
|
|
|
|
|
| |
before any other roff processing occurs, it's Ok to just let it do its
thing and pass through. Also, make sure this function is ALWAYS called,
not just when first_string is defined.
Second, add a new function, roff_parsetext(), that post-processes
non-macro lines. This, for the time being, amounts to detecting soft
hyphens. This fixes a long-standing bug in that -man now has proper
hyphen breaking!
|
|
|
|
| |
run even when `first_string' isn't defined.
|
|
|
|
|
| |
through looking for user-defined escapes. This clears up a nice bit of
validation code.
|
|
|
|
|
|
| |
This consists of a shim around the text parser that calls out to libroff
if equation components exist on the line. Right now this will do
nothing, as the equation delimiter always returns nil.
|
|
|
|
| |
somem more version notes (getting there). Have the equation nanme be captured.
|
|
|
|
| |
effect.
|
|
|
|
|
|
|
| |
the proper `define' dance, which amounts to pure word-replace (you can,
say, define `foo' as `define' then define `define' as something else).
eqn.c is now ready for some semantic parsing of `box' and `eqn'
productions as defined by the grammar.
|
|
|
|
|
| |
This is required for supporting in-line equations. While here, push
registers properly into roff and add an set/get/mod interface.
|
|
|
|
|
|
|
|
|
| |
This works by iterating over a simple list. It's a slow, auditable
early implementation. Data is read (the reading function will be
reused) then parsed, then the line re-run if remaining stuff exists.
Note this function isn't the same as mandoc_getarg(), as eqn(7) uses a
different system for reading quoted strings.
This doesn't actually use the defines.
|
|
|
|
| |
messages.
|
|
|
|
|
|
|
|
| |
proper macro in some conditions, resulting in strange parse errors. The
second, where `\}' was being re-written as `\&'. Instead, we re-write
this as two spaces OR nothing at all, if at the end of line. This isn't
exactly what groff does (who knows...) but is a much safer and better
way than how I was doing it before.
|
|
|
|
|
| |
after the first parse. Do this, but note there are more efficient ways
just waiting for a table of macros.
|
|
|
|
|
|
| |
string instead of passing it along to libmdoc/libman (where it'll be
printed verbatim, now). This is what groff seems to do, too (of course
without a warning).
|
|
|
|
|
|
|
|
|
|
|
| |
within roff.c. These are now grokked from a table in the roff
allocation routine and rest in the newly-created predefs.in (for
consistency with chars.in). This is a first implementation and will
likely be optimised along with the ds/de lookup table itself.
This allows mandoc-defined predefined strings to be correctly removed or
whatnot; earlier they couldn't. What will follow is the stripping-away
of all predefined-string crud in the other parts of the system.
|
|
|
|
|
|
| |
ccond(). Fix the text handler to behave like the macro handler
regarding escaped \}. Make \} actually become a zero-width space, too,
and clean up the documentation in this regard.
|
|
|
|
|
|
|
|
|
|
| |
the `\}' not being directly after the `.br'. Now we check for `\}' in
arbitrary parts of the line, and account for if it's escaped in funny
ways.
This behaviour diverges somewhat from groff in that the text at and
following the `\}' is lost, while groff keeps it (sort-of). I'll add a
COMPATIBILITY note to this effect.
|
|
|
|
| |
(which will come).
|
|
|
|
|
| |
The latter got lost due to a regression in rev. 1.130.
ok kristaps@
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This transforms the stack pop to occur prior to body execution, instead
of afterward. Floated to tech@ without response, but it makes sense
that this is alright and doesn't cause problems during extensive
testing.
|
| |
|
|
|
|
| |
and `SS' bodies.
|
|
|
|
|
| |
Bug reported by Tristan dot LeGuern at gmail dot com in fvwm2(1).
tweaks and ok kristaps@; earlier version looked good to espie@ as well
|
|
|
|
|
|
|
|
|
| |
line. Note that we now properly ignore \.", which earlier would have
been pushed through macro detection. This required attention to all
entries of roff_parse().
This removes a TODO by schwarze@ to the effect that \. can be a control
character, which is now handled in mandoc_getcontrol().
|
|
|
|
| |
libmandoc.h and there's nothing left.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
the adding itself is implemented; equation data is not yet shown.
|
|
|
|
|
|
|
|
| |
between EQ and EN roff blocks. EQN is different from TBL in that data
after .EQ is unilaterally considered an equation until an .EN. Thus,
there's no need to jump through hoops in having table spans and so on.
This is ONLY the parse code framework in libroff. EQN is not yet passed
into the backends.
|
|
|
|
|
|
| |
for now. All of these just cause a bit too much or too little
whitespace, but no serious formatting problems.
Triggered by reports from brad@.
|