| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The one in wcwidth.c actually came up in one of my valgrind runs: if
you passed it a non-null-terminated wide string (specifically, one
that reaches invalid memory exactly when the length parameter runs
out), it would illegally load the character beyond the end of the
string before noticing that the length parameter said it shouldn't.
The one in bk_man.c may well not be able to come up at all, but I
spotted it in passing and I thought I might as well fix it - it makes
me twitch on general principles to see any use of buf[len-1] without
having checked len>0 first.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
this a couple of times in Halibut markup recently (in particular, it's
handy to have a typographical distinction between 'this term is
emphasised because it's new' and 'this term is emphasised because I
want you to pay attention to it'), so here's an implementation,
basically parallel to \e.
One slight oddity is that strong text in headings will not be
distinguished in some output formats, since they already use bolded
text for their headings.
[originally from svn r9772]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm not quite sure why I ever thought it was a good idea to have a
central variadic error() function taking an integer error code
followed by some list of arguments that depend on that code. It now
seems obvious to me that it's a much more sensible idea to have a
separate function per error, so that we can check at compile time that
the arguments to each error call are of the right number and type! So
I've done that instead.
A side effect is that the errors are no longer formatted into a
fixed-size buffer before going to stderr, so I can remove all the
%.200s precautions in the format strings.
[originally from svn r9639]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"-" as a special file name meaning standard output. I've restricted
it to just those output formats which can predictably output only
one file, just for the sake of not having to faff too much with the
others.
Probably what I should have done for all of this would have been to
write a set of wrappers around fopen, fclose and everything in
between, and use them everywhere. Those wrappers would uniformly
detect "-" and convert it into stdin or stdout as appropriate, would
avoid fclosing those files for real when told to close them, and
would also be able to handle reading a little bit of data from the
start of a file and then pushing it all back even if the file were
not seekable (which would allow input.c to lose the ugly special
case whereby it can't currently read font files from standard
input).
[originally from svn r8729]
|
| |
|
|
|
|
|
|
| |
apparently this is preferred (it's what pod2man uses); cf Debian #496063,
#159872.
[originally from svn r8641]
[r8309 == 73e8c7d1b4ac77ec1b5acc700cb3af277a150bcf]
|
| |
|
|
|
|
|
| |
(via Colin in Debian bug#496063).
[originally from svn r8640]
[r8321 == 5e7a3a5b1bbaccb7ce7d61bb9bc4654924135dfb]
|
| |
|
|
|
|
|
|
|
|
| |
contexts get output usefully in the face of UTF-8 *roff implementations.
Works on Debian-derived distributions (and hence along with r8309 should fix
#496063), but I'm slightly worried about portability as I've used a named
character "\(aq" which doesn't appear in the "classic" reference CS TR #54.
[originally from svn r8321]
[r8309 == 73e8c7d1b4ac77ec1b5acc700cb3af277a150bcf]
|
| |
|
|
|
|
|
|
|
|
| |
because otherwise UTF-8 versions of man(1) tend to turn them into
Unicode hyphen characters, with the result that if you cut and paste
sample command lines out of man pages in the obvious way then the
things that look like hyphens are not in fact the character that the
program in question would recognise as an option introducer.
[originally from svn r8309]
|
| |
|
|
|
|
|
|
|
|
|
|
| |
a period specially _even_ if there's an \fB or similar escape
sequence before the period. Therefore, man_rdaddctrl() now doesn't
clear the QUOTE_INITCTRL flag just because it generated some text;
instead, its call sites clear the flag when the _type_ of generated
text is appropriate for this. This should remove an error from the
`lns' man page (utils/lns/lns.but), which was where I noticed the
problem.
[originally from svn r6871]
|
| |
|
|
|
|
|
| |
string to the output. This incidentally fixes a bug whereby font changes
at the start of a line weren't resetting QUOTE_INITCTRL.
[originally from svn r6660]
|
| |
|
|
|
|
|
| |
its own function, since it's called so many times. Also call it in two places
I'd missed.
[originally from svn r6659]
|
| |
|
|
|
|
| |
works correctly inside macro arguments.
[originally from svn r6658]
|
| |
|
|
|
|
|
|
| |
beginning
to get ugly.
[originally from svn r6654]
|
| |
|
|
|
|
|
|
|
| |
side-effect
that breaking spaces are now forces to be ASCII spaces in output, whatever output
charset is in force. I doubt this will inconvenience anyone.
[originally from svn r6652]
|
| |
|
|
|
|
|
| |
is processed by nroff, the rule is made up of \cfg{man-rule}
characters (same defaults as \cfg{text-rule}).
[originally from svn r6651]
|
| |
|
|
|
|
|
| |
and incidentally proper (single) quotation marks too. This reworks a lot of
man_convert, but I think the result is correct.
[originally from svn r6650]
|
| |
|
|
|
|
| |
line-drawing function.
[originally from svn r6648]
|
| |
|
|
|
|
|
|
|
| |
copied mindlessly from whatever man page I read when working out the
format of man pages, has the function of putting `3rd Berkely
Distribution' in one of the footer slots and therefore is probably
inaccurate...
[originally from svn r6146]
|
| |
|
|
|
|
| |
Spotted (indirectly) by Damien Miller.
[originally from svn r5802]
|
| |
|
|
|
|
|
| |
neutralise a dot at the start of a line) even if there's been an
\fB-type sequence on the line before the dot.
[originally from svn r4867]
|
| |
|
|
| |
[originally from svn r4758]
|
| |
|
|
|
|
|
| |
the practice of using \dt and \dd in anything other than the obvious
interleaving.
[originally from svn r4417]
|
| |
|
|
|
|
| |
an integer charset ID.
[originally from svn r4317]
|
| |
|
|
| |
[originally from svn r4288]
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(mknew/mknewa/resize) to the PuTTY ones (snew/snewn/sresize). snewn
and mknewa have their arguments opposite ways round; this may make
the change initially painful but in the long term will free me of a
nasty context switch every time I move between codebases. Also
sresize takes an explicit type operand which is used to cast the
return value from realloc, thus enforcing that it must be correct,
and arranging that if anyone tries to compile Halibut with a C++
compiler there should be a lot less pain.
[originally from svn r4276]
|
| |
|
|
| |
[originally from svn r4247]
|
| |
|
|
| |
[originally from svn r4112]
|
| |
|
|
|
|
|
|
|
|
|
| |
ustrfroma, utoa_dup and ufroma_dup now take a charset parameter, and
also have a variety of subtly distinct forms. Also, when a \cfg
directive is seen in the input file, the precise octet strings for
each parameter are kept in their original form as well as being
translated into Unicode, so that when they represent filenames they
can be used verbatim.
[originally from svn r4097]
|
| |
|
|
|
|
| |
representable in the output character set.
[originally from svn r4094]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an enormous amount of preprocessing and differ only in their final
output form, I've introduced a new type of layer called a
`pre-backend' (bk_paper.c is one). This takes all the information
passed to a normal backend and returns an arbitrary void *, which is
cached by the front end and passed on to any backend(s) which state
a desire for the output of that particular pre-backend. Thus, all
the page layout is done only once, and the PS and PDF backends
process the same data structures into two output files.
Note that these backends are _very_ unfinished; all sorts of vital
things such as section numbers, list markers, and title formatting
are missing, the paragraph justification doesn't quite work, and
advanced stuff like indexes and PDF interactive features haven't
even been started. But this basic framework generates valid output
files and is a good starting point, so I'm checking it in.
[originally from svn r4058]
|
| |
|
|
|
|
|
|
|
| |
from its command-line option (`--text=foo.txt') and automatically
convert it into one or more notional \cfg directives. In the HTML
case this mechanism enables single-file mode as well as setting the
filename.
[originally from svn r4018]
|
| |
|
|
|
|
| |
name (or name schema, in HTML).
[originally from svn r4017]
|
| |
|
|
|
|
|
|
|
| |
the preamble: \copyright paragraphs are now treated identically to
normal paragraphs (so they appear precisely where they're put
instead of in a fixed location), _except_ that the Windows Help
backend also copies their text into the help file's copyright slot.
[originally from svn r4001]
|
| |
|
|
|
|
|
|
|
|
| |
any ordinary displayable paragraph(s) appearing before the first
chapter heading, meaning in particular that you can put lists, code
paragraphs etc in preambles. Of course, `\preamble' is still
supported for backwards compatibility, but it's now a zero-effect
paragraph marker.
[originally from svn r3981]
|
| |
|
|
| |
[originally from svn r3978]
|
| |
|
|
|
|
| |
there's nothing to go in it.
[originally from svn r3977]
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
markup feature: a \c line in a code paragraph can now be followed by
an optional \e line indicating emphasised bits of its preceding \c.
This allows discretionary bolding and (italic/underline) emphasis
within code paragraphs, but without introducing an escape character
or breaking any existing input files. Users are warned that not all
backends are required to actually render these hints, and so they
should avoid depending on them 100% to convey semantic information
unless they know they're writing for a restricted range of backends.
[originally from svn r3965]
|
|
|
features commonly used in man pages: (a) the ability to nest
paragraph breaks, code paragraphs and other lists inside list items,
and (b) description lists as normally used in man pages to describe
command-line options.
[originally from svn r3954]
|