Lines Matching refs:tn

260 _win_iconv(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
280 fz = tz = (*fn < *tn) ? *fn : *tn;
294 if ((tz = MultiByteToWideChar(cc->from.index, 0, (LPCSTR)*fb, (int)*fn, (LPWSTR)*tb, *tn)) && tz <= *tn)
315 if (tz == *tn)
323 if (tz > *tn)
351 if (tz = WideCharToMultiByte(cc->to.index, 0, (LPCWSTR)ub, un, *tb, *tn, 0, 0))
370 if (tz == *tn)
378 if (tz > *tn)
389 error(DEBUG_TRACE, "AHA#%d _win_iconv *fn=%u fz=%u[%u] *tn=%u tz=%u\n", __LINE__, *fn, fz, fz * sizeof(WCHAR), *tn, tz);
402 *tn -= tz;
531 utf2bin(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
547 te = t + (*tn);
595 *tn -= (n = (char*)t - (*tb));
605 bin2utf(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
620 te = t + (*tn);
669 *tn -= (char*)t - (*tb);
715 ume2bin(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
733 te = t + (*tn);
781 *tn -= (n = (char*)t - (*tb));
791 bin2ume(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
808 te = t + (*tn);
855 *tn -= (char*)t - (*tb);
865 ucs2bin(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
879 te = t + (*tn);
900 *tn -= (n = (char*)t - (*tb));
910 bin2ucs(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
925 te = t + (*tn);
946 *tn -= (char*)t - (*tb);
956 scu2bin(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
970 te = t + (*tn);
991 *tn -= (n = (char*)t - (*tb));
1001 bin2scu(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
1016 te = t + (*tn);
1037 *tn -= (char*)t - (*tb);
1230 * copy *fb size *fn to *tb size *tn
1231 * fb,fn tb,tn updated on return
1235 _ast_iconv(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
1256 n = *tn;
1276 n = (*cc->to.fun)(cc->cvt, &tfb, &tfn, tb, tn);
1282 if ((*cc->from.fun)(cc->cvt, fb, fn, tb, tn) == (size_t)(-1))
1284 n -= *tn;
1296 return (*cc->to.fun)(cc->cvt, fb, fn, tb, tn);
1309 n = (*cc->to.fun)(cc->cvt, &b, fn, tb, tn);
1329 *tn -= n;
1348 size_t tn;
1366 tn = 0;
1370 if (!(tb = (char*)sfreserve(op, -(tn + 1), SF_WRITE|SF_LOCKR)) || !(tn = sfvalue(op)))
1378 error(DEBUG_TRACE, "AHA#%d iconv_write ts=%p tn=%d", __LINE__, ts, tn);
1381 while (*fn > 0 && _ast_iconv(cd, fb, fn, &ts, &tn) == (size_t)(-1))
1386 error(DEBUG_TRACE, "AHA#%d iconv_write %d => %d `%-.*s'", __LINE__, *fn, tn, *fn, *fb);
1387 _r = _ast_iconv(cd, fb, fn, &ts, &tn);
1388 error(DEBUG_TRACE, "AHA#%d iconv_write %d => %d [%d]", __LINE__, *fn, tn, _r);
1407 if (!(disc->flags & ICONV_OMIT) && tn > 0)
1410 tn--;
1448 size_t tn;
1487 tn = sfvalue(op);
1488 while (fn > 0 && _ast_iconv(cd, &fs, &fn, &ts, &tn) == (size_t)(-1))
1511 if (!(disc->flags & ICONV_OMIT) && tn > 0)
1514 tn--;