diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2008-09-05 00:30:55 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2008-09-05 00:30:55 -0400 |
commit | 260d8a57df392ef59b6430ccadf4e9e5bcdefe12 (patch) | |
tree | a279a10e16597a2b7b401f3c92bef9168be03d18 /src/LYStrings.c | |
parent | 3ec9560de810415534fac8c4e49caa5def1176de (diff) | |
download | lynx-snapshots-260d8a57df392ef59b6430ccadf4e9e5bcdefe12.tar.gz |
snapshot of project "lynx", label v2-8-7dev_9h
Diffstat (limited to 'src/LYStrings.c')
-rw-r--r-- | src/LYStrings.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/LYStrings.c b/src/LYStrings.c index 3ac742a1..41083eed 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -1,4 +1,4 @@ -/* $LynxId: LYStrings.c,v 1.146 2008/09/04 00:21:11 tom Exp $ */ +/* $LynxId: LYStrings.c,v 1.147 2008/09/05 00:17:48 tom Exp $ */ #include <HTUtils.h> #include <HTCJK.h> #include <UCAux.h> @@ -662,6 +662,21 @@ const char *LYmbcs_skip_glyphs(const char *data, return data; } +const char *LYmbcs_skip_cells(const char *data, + int n_cells, + BOOL utf_flag) +{ + const char *result; + int actual; + int target = n_cells; + + do { + result = LYmbcs_skip_glyphs(data, target--, utf_flag); + actual = LYstrExtent2(data, result - data); + } while ((actual > 0) && (actual > n_cells)); + return result; +} + /* * LYmbcsstrlen() returns the printable length of a string that might contain * IsSpecial or multibyte (CJK or UTF8) characters. - FM |