#define def_utf2ucs(errcheck) \
SQLULEN utf8_to_ucs2_lf##errcheck(const char *utf8str, SQLLEN ilen, BOOL lfconv, SQLWCHAR *ucs2str, SQLULEN bufcount) \
{ \
- int i, lfcount = 0; \
+ int i; \
SQLULEN rtn, ocount, wcode; \
const UCHAR *str; \
\
if (ocount < bufcount) \
ucs2str[ocount] = PG_CARRIAGE_RETURN; \
ocount++; \
- lfcount++; \
} \
if (ocount < bufcount) \
ucs2str[ocount] = *str; \
rtn = 0; \
ocount = 0; \
} \
- if (ocount >= bufcount && ocount < bufcount + lfcount) \
- return utf8_to_ucs2_lf##errcheck(utf8str, ilen, FALSE, ucs2str, bufcount); \
if (ocount < bufcount && ucs2str) \
ucs2str[ocount] = 0; \
/*mylog(" ocount=%d\n", ocount);*/ \