static void scan_xlatmap(fapi_ufst_server *r, ufst_common_font_data *d, const char *xlatmap, const char *font_kind, int (*choose_proc)(fapi_ufst_server *r, ufst_common_font_data *d, const char *cmapId)) { const char *p = xlatmap; while(*p) { int good_kind =!strcmp(p, font_kind); p += strlen(p) + 2; while(*p) { const char *cmapId = p, *decodingID = p + strlen(p) + 1; strncpy(d->decodingID, decodingID, sizeof(d->decodingID)); if (!decodingID[0]) break; p = decodingID + strlen(decodingID) + 1; if (good_kind) if (choose_proc(r, d, cmapId)) return; } } d->decodingID[0] = 0; }
void SkPngEncoderMgr::chooseProc(const SkImageInfo& srcInfo) { fProc = choose_proc(srcInfo); }