| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
As with any low-level roff request involving subtle interactions
with macro internals, this implementation is not exact, but it
does handle the simplest cases.
This request occurs in man(7) code generated from DocBook,
for example mysql(1) and yasm_arch(7).
Thanks to brad@ for reporting the issue back in January 2011.
|
|
|
|
|
|
|
|
|
|
|
| |
even when the conditional evaluated to false.
While here, reshuffle the code to reduce indentation and make it
more readable; that way, we can even trim down the comments because
it becomes obvious what the code does.
Found in zipinfo(1) - thanks to espie@ and naddy@
for making me look at that manual page.
|
|
|
|
|
| |
that is already used almost everywhere instead of gratuitiously
inventing different names at four places. No functional change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after .TH, it works. Trying to redefine standard mdoc(7) macros before .Dd
works when calling groff with the -mdoc command line option, but does not
when calling groff with -mandoc; after .Dd, it always works.
Arguably, one might call that buggy behaviour in groff, but it is very
unlikely that anybody will change groff in this respect (certainly, i'm
not volunteering). So let's be bug-compatible.
This fixes the vertical spacing in sox(1).
Merging from OpenBSD libmandoc.h 1.18, read.c 1.8, roff.c 1.47, June 2, 2012.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was reported by espie@ and in the TODO.
Caveat: `cc' has buggy behaviour when invoked in groff(1) and followed
by a line-breaking control character macro, e.g., in a -man doc,
.cc |
.B foo
'B foo
|cc
'B foo
will cause groff(1) to behave properly for `.B' but inline the macro
definition for `B' when invoked with the line-breaking macro.
|
|
|
|
|
|
|
|
|
|
| |
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.
|