This patch removes multiple code which warns that xdvi
is compiled without iconv.
It helps us to add Japanese support.
Another suggestion is to use such a macro
#define strNcmp(src,dst) memcmp(src, dst, strlen(src))
in order to simplify
memcmp(fontname, "lcircle", strlen("lcircle"))
to
strNcmp("lcircle", fontname)
in encodings.c.
Thanks!
Removes multiple code in encodings.c
Logged In: YES
user_id=177175
Thanks very much for the suggestions; I've applied the patch
to the CVS trunk and STABLE branch and added a macro
#define HAS_PREFIX(src,dst) (memcmp(src, dst, strlen(src)) == 0)
to the trunk.
Logged In: YES
user_id=599487
Thank you for quick response and nice job.
'HAS_PREFIX' is a better name.
I guess you mean the macro shoud be following.
#define HAS_PREFIX(src,dst) (memcmp(src, dst, strlen(dst)) == 0)
^^^
We need the length of 'dst', not 'src'
when we test HAS_PREFIX(fontname, "lcircle").
Logged In: YES
user_id=177175
> #define HAS_PREFIX(src,dst) (memcmp(src, dst, strlen(dst))
== 0)
Ouch, you're right; fixed now in HEAD.