[sword-cvs] sword/src/utilfuns utilstr.cpp,1.22,1.23
sword@www.crosswire.org
sword@www.crosswire.org
Sun, 22 Jun 2003 16:50:25 -0700
- Previous message: [sword-cvs] sword/include utilstr.h,1.10,1.11
- Next message: [sword-cvs] sword/apps/windoze/CBuilder5/BibleCS AboutBoxfrm.dfm,1.48,1.49 RxRichEditX.cpp,1.43,1.44 RxRichEditX.h,1.16,1.17 mainfrm.cpp,1.122,1.123 sword.bpr,1.113,1.114 sword.res,1.100,1.101
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/local/cvsroot/sword/src/utilfuns
In directory www:/tmp/cvs-serv6574/src/utilfuns
Modified Files:
utilstr.cpp
Log Message:
RTF SelText bug fixes with added SetTextWide function
Memory leak in zstr flushCache fixed
empty popups supressed
Index: utilstr.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/utilfuns/utilstr.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** utilstr.cpp 19 Jun 2003 16:58:30 -0000 1.22
--- utilstr.cpp 22 Jun 2003 23:50:23 -0000 1.23
***************
*** 26,35 ****
*/
! char *stdstr(char **ipstr, const char *istr) {
if (istr) {
if (*ipstr)
delete [] *ipstr;
int len = strlen(istr) + 1;
! *ipstr = new char [ len ];
memcpy(*ipstr, istr, len);
}
--- 26,35 ----
*/
! char *stdstr(char **ipstr, const char *istr, unsigned int memPadFactor) {
if (istr) {
if (*ipstr)
delete [] *ipstr;
int len = strlen(istr) + 1;
! *ipstr = new char [ len * memPadFactor ];
memcpy(*ipstr, istr, len);
}
***************
*** 174,178 ****
*/
! char *toupperstr_utf8(char *buf) {
char *ret = buf;
--- 174,178 ----
*/
! char *toupperstr_utf8(char *buf, unsigned int max) {
char *ret = buf;
***************
*** 189,197 ****
}
#else
UErrorCode err = U_ZERO_ERROR;
UConverter *conv = ucnv_open("UTF-8", &err);
UnicodeString str(buf, -1, conv, err);
UnicodeString ustr = str.toUpper();
! ustr.extract(ret, strlen(ret)*2, conv, err);
ucnv_close(conv);
#endif
--- 189,199 ----
}
#else
+ if (!max)
+ max = strlen(ret);
UErrorCode err = U_ZERO_ERROR;
UConverter *conv = ucnv_open("UTF-8", &err);
UnicodeString str(buf, -1, conv, err);
UnicodeString ustr = str.toUpper();
! ustr.extract(ret, max, conv, err);
ucnv_close(conv);
#endif
- Previous message: [sword-cvs] sword/include utilstr.h,1.10,1.11
- Next message: [sword-cvs] sword/apps/windoze/CBuilder5/BibleCS AboutBoxfrm.dfm,1.48,1.49 RxRichEditX.cpp,1.43,1.44 RxRichEditX.h,1.16,1.17 mainfrm.cpp,1.122,1.123 sword.bpr,1.113,1.114 sword.res,1.100,1.101
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]