Import sj3-patches-20040916
Signed-off-by: Masanori Ogino <mogino@acm.org>
This commit is contained in:
parent
381c676eda
commit
a76f53bc03
78 changed files with 3433 additions and 3852 deletions
|
|
@ -31,19 +31,20 @@
|
|||
* $SonyRCSfile: hzstrlen.c,v $
|
||||
* $SonyRevision: 1.1 $
|
||||
* $SonyDate: 1994/06/03 08:01:52 $
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "sj_euc.h"
|
||||
#include "sj_rename.h"
|
||||
#include "sj_typedef.h"
|
||||
#include "sj_const.h"
|
||||
#include "sj_dict.h"
|
||||
#include "kanakan.h"
|
||||
|
||||
Int euc_codesize(c)
|
||||
Reg1 Uchar c;
|
||||
Int
|
||||
euc_codesize (Uchar c)
|
||||
{
|
||||
if ((c & KanjiModeMask) == 0x90) {
|
||||
return 1;
|
||||
|
|
@ -56,17 +57,12 @@ Reg1 Uchar c;
|
|||
}
|
||||
}
|
||||
|
||||
Int hzstrlen(ptr, len)
|
||||
Reg1 Uchar *ptr;
|
||||
Reg2 Int len;
|
||||
Int
|
||||
hzstrlen (Uchar *ptr, Int len)
|
||||
{
|
||||
Uchar *head;
|
||||
|
||||
|
||||
head = ptr;
|
||||
|
||||
while (len-- > 0) ptr += euc_codesize(*ptr);
|
||||
|
||||
|
||||
return (ptr - head);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue