~mdw
/
sgt
/
halibut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revamp of the Halibut error handling mechanism.
[sgt/halibut]
/
bk_text.c
diff --git
a/bk_text.c
b/bk_text.c
index
4f8cdd7
..
315317f
100644
(file)
--- a/
bk_text.c
+++ b/
bk_text.c
@@
-328,7
+328,7
@@
void text_backend(paragraph *sourceform, keywordlist *keywords,
else
tf.fp = fopen(conf.filename, "w");
if (!tf.fp) {
else
tf.fp = fopen(conf.filename, "w");
if (!tf.fp) {
- err
or(err_cantopenw,
conf.filename);
+ err
_cantopenw(
conf.filename);
return;
}
tf.charset = conf.charset;
return;
}
tf.charset = conf.charset;
@@
-497,7
+497,7
@@
static void text_output_many(textfile *tf, int n, wchar_t c)
wchar_t s[2];
s[0] = c;
s[1] = L'\0';
wchar_t s[2];
s[0] = c;
s[1] = L'\0';
- while (n--)
+ while (n--
> 0
)
text_output(tf, s);
}
text_output(tf, s);
}
@@
-752,7
+752,7
@@
static void text_codepara(textfile *tf, word *text, int indent, int width) {
for (; text; text = text->next) if (text->type == word_WeakCode) {
int wid = ustrwid(text->text, tf->charset);
if (wid > width)
for (; text; text = text->next) if (text->type == word_WeakCode) {
int wid = ustrwid(text->text, tf->charset);
if (wid > width)
- err
or(err_text_codeline,
&text->fpos, wid, width);
+ err
_text_codeline(
&text->fpos, wid, width);
text_output_many(tf, indent, L' ');
text_output(tf, text->text);
text_output(tf, L"\n");
text_output_many(tf, indent, L' ');
text_output(tf, text->text);
text_output(tf, L"\n");