* - might be helpful to diagnose duplicate node names!
*/
-/*
- * FIXME:
- *
- * - alignment in the index is broken when a non-representable
- * character appears with no alternative. More generally, I
- * fear, this is the fault of the info_rdadd* functions failing
- * to return correct width figures in this circumstance (so it
- * will affect list paragraph prefixes and paragraph wrapping as
- * well).
- */
-
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
attraux(words->aux) == attr_Always ? 0 : 1)
: 0) +
(cvt_ok(charset, words->text) || !words->alt ?
- ustrlen(words->text) :
+ ustrwid(words->text, charset) :
info_width_internal_list(words->alt, xrefs, charset)));
case word_WhiteSpace:
case word_LowerXref:
if (xrefs && words->private_data) {
/* "*Note " plus "::" comes to 8 characters */
- return 8 + strlen(((node *)words->private_data)->name);
+ return 8 + strwid(((node *)words->private_data)->name, charset);
}
break;
}
if (wcs) {
char buf[256];
- int len, origlen, ret;
+ int len, width, ret;
+
+ width = ustrwid(wcs, d->charset);
- origlen = len = ustrlen(wcs);
+ len = ustrlen(wcs);
while (len > 0) {
int prevlen = len;
}
}
- return origlen;
+ return width;
} else
return 0;
}