Akinori Ito wrote:
> OK, I found where the bug is. Here's a patch.
> retrieving revision 1.16
> diff -r1.16 file.c
> 1347a1348
> > int indent_here = 0;
> 1349c1350,1354
> < p = line->ptr+indent;
Horrors! What format is this? Looks like plain diff. I don't think
the patch(1) command can handle this reasonably. *Please* use only
context/unified diffs.
I think I have managed to add the changes manually. It seems to
work, although I have only checked a few pages as yet. If I didn't
miss anything, the equivalent unified diff should be this:
--- file.c.orig Fri Jan 21 08:18:57 2000
+++ file.c Thu Jan 27 14:26:52 2000
@@ -1339,11 +1339,16 @@
nspace++;
}
if (nspace > 0) {
+ int indent_here = 0;
d = rest/nspace;
- p = line->ptr+indent;
+ p = line->ptr;
+ while (IS_SPACE(*p)) {
+ p++;
+ indent_here++;
+ }
rrest = rest-d*nspace;
line = Strnew_size(width+1);
- for (i = 0; i < indent; i++)
+ for (i = 0; i < indent_here; i++)
Strcat_char(line,' ');
for (; *p; p++) {
Strcat_char(line,*p);
@@ -2403,7 +2408,7 @@
}
}
for (i = 0; i < INDENT_INCR - 3; i++)
- push_char(obuf, 1, 0, ' ', PC_ASCII);
+ push_charp(obuf, 1, " ", PC_ASCII);
switch(type) {
#ifdef KANJI_SYMBOLS
case 'd':
@@ -2420,7 +2425,7 @@
push_charp(obuf, 0, ullevel[(h_env->envc_real - 1) % MAX_UL_LEVEL], PC_ASCII);
break;
}
- push_char(obuf, 1, 0, ' ', PC_ASCII);
+ push_charp(obuf, 1, " ", PC_ASCII);
break;
case HTML_OL:
type = envs[h_env->envc].type;
-- Christian "naddy" Weisgerber naddy@unix-ag.uni-kl.de
This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:43 CDT