mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Patches submitted from May 20 to Aug 28 1997
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2406 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7b12c4af23
commit
a57d791f91
119 changed files with 16409 additions and 1698 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Support functions for Unicode implementation
|
||||
/* Support functions for Unicode implementation
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Stevo Crvenkovski <stevoc@lotus.mpt.com.mk>
|
||||
|
@ -144,10 +144,26 @@ int strtoustr(unichar * u1,const char *s1,int size)
|
|||
int ustrtostr(char *s2,unichar *u1,int size)
|
||||
{
|
||||
int count;
|
||||
for(count=0;count<size;count++)
|
||||
for(count=0;(u1[count]!=(unichar)0)&(count<size);count++)
|
||||
s2[count]=unitochar(u1[count]);
|
||||
return(count);
|
||||
}
|
||||
|
||||
int encode_strtoustr(unichar * u1,const char *s1,int size, NSStringEncoding enc)
|
||||
{
|
||||
int count;
|
||||
for(count=0;(s1[count]!=0)&(count<size);count++)
|
||||
u1[count]=encode_chartouni(s1[count],enc);
|
||||
return count;
|
||||
}
|
||||
|
||||
int encode_ustrtostr(char *s2,unichar *u1,int size, NSStringEncoding enc)
|
||||
{
|
||||
int count;
|
||||
for(count=0;(u1[count]!=(unichar)0)&(count<size);count++)
|
||||
s2[count]=encode_unitochar(u1[count],enc);
|
||||
return(count);
|
||||
}
|
||||
|
||||
/* Be carefull if you use this. Unicode arrays returned by
|
||||
-getCharacters methods are not zero terminated */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue