| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
| |
Uses a # to mark section titles, and a >> to indicate code sections,
which otherwise had no formatting to distinguish them from the rest of
the text. This helps with the conversion of the puzzles help text to a
format the sgt-puzzles rockbox port can use.
|
| |
|
|
| |
[originally from svn r10166]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
| |
|
|
|
|
|
|
|
|
| |
possible to specify an indent which is _overall_ negative, i.e.
intended to be off the left-hand side of the text file. There's no
nice way to handle this, but printing O(2^32) spaces in a while (n--)
loop is particularly bad. Fix the loop to read while (n-- > 0), so
that at least it doesn't get _that_ badly confused.
[originally from svn r9491]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"-" 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]
|
| |
|
|
|
|
| |
Fix it.
[originally from svn r8421]
|
| |
|
|
|
|
|
|
|
| |
both the back ends which currently support that, to leave out
chapter and section numbers totally in section headings. Can be
useful for publishing man pages (which don't normally want section
numbers) on the web.
[originally from svn r7892]
|
| |
|
|
|
|
| |
an integer charset ID.
[originally from svn r4317]
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(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 r4130]
|
| |
|
|
|
|
|
|
|
|
|
| |
configurable emphasis characters, various other configurable bits
which have been marked FIXME in the code for a while, and also to
warn when a code paragraph line is too long (because that was the
only other thing labelled FIXME). Fallback options are implemented,
and defaults set accordingly. A UTF-8 text output file now looks
like proper UTF-8.
[originally from svn r4128]
|
| |
|
|
|
|
|
|
|
|
|
|
| |
characters in order to wrap and align them properly. Therefore, they
should be using wcwidth(). So here are a couple of wrappers on
wcwidth(), one which filters out the Unicode characters not
representable in the target charset, and one which converts _from_ a
charset to Unicode before calling wcwidth(). bk_text and bk_info
should now align correctly even in the face of unsupported
characters and Japanese.
[originally from svn r4116]
|
| |
|
|
|
|
|
| |
checkin touches other files because a function in bk_text.c turned
out to be of more general use so I moved it out into ustring.c.)
[originally from svn r4111]
|
| |
|
|
|
|
|
| |
from the ground up in Unicode, and a single charset conversion pass
is done over the data as it's output.
[originally from svn r4100]
|
| |
|
|
|
|
|
|
|
|
|
| |
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]
|
| |
|
|
| |
[originally from svn r4016]
|
| |
|
|
|
|
|
|
|
| |
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]
|
| |
|
|
|
|
|
|
|
| |
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]
|
| |
|
|
|
|
|
|
| |
complaints, it would probably help if I arranged that those things
had been _allocated_ in all cases, otherwise we merely exchange a
memory leak for a core dump. Duh.
[originally from svn r1916]
|
| |
|
|
|
|
|
| |
thingy, which seems moderately cool and has reported a few very
small memory leaks. Now apparently fixed.
[originally from svn r1863]
|
| |
|
|
|
|
| |
before the section title (the ": " in "Section 1: Introduction").
[originally from svn r1838]
|
| |
|
|
|
|
| |
failed to be decreased to compensate for the additional indent.
[originally from svn r1834]
|
| |
|
|
| |
[originally from svn r1800]
|
| |
|
|
|
|
|
| |
near-complete functionality. All that's missing now is indexing and
horizontal rules.
[originally from svn r1449]
|
| |
|
|
|
|
|
|
|
|
|
| |
versionids. I thought it might be nice to include only the
versionid(s) from the .but file(s) that gave rise to a particular
chapter file, but actually this is very badly defined (that
information is thrown away very early on in the front end) and in
any case thanks to cross-references every file _does_ depend on its
fellows. Better to put them all in throughout.
[originally from svn r1417]
|
| |
|
|
|
|
|
| |
like a typographical Bad Plan, but they work OK in some types of
document such as a FAQ.)
[originally from svn r1324]
|
| |
|
|
| |
[originally from svn r828]
|
| |
|
|
| |
[originally from svn r276]
|
| |
|
|
| |
[originally from svn r274]
|
| |
|
|
| |
[originally from svn r248]
|
| |
|
|
|
|
| |
between emphasis _like_ _this_ and _like this_
[originally from svn r245]
|
|
|
[originally from svn r240]
|