Lines Matching refs:s

311     sal_uInt32 s, offset, checkSumAdjustment = 0;  in StreamToMemory()  local
345 s = offset = 12 + 16 * n; in StreamToMemory()
348 s += (te[i].length + 3) & (sal_uInt32) ~3; in StreamToMemory()
352 sal_uInt8* ttf = (sal_uInt8*)smalloc(s); in StreamToMemory()
380 for (i = 0; i < (int)s / 4; i++) checkSumAdjustment += p[i]; in StreamToMemory()
384 *length = s; in StreamToMemory()
454 CmapSubTable *s; /* sorted array of sub-tables */ member
557 CmapSubTable *s; in TrueTypeTableDispose_cmap() local
563 s = t->s; in TrueTypeTableDispose_cmap()
564 if (s) { in TrueTypeTableDispose_cmap()
566 if (s[i].xc) free(s[i].xc); in TrueTypeTableDispose_cmap()
567 if (s[i].xg) free(s[i].xg); in TrueTypeTableDispose_cmap()
569 free(s); in TrueTypeTableDispose_cmap()
715 static sal_uInt8 *PackCmapType0(CmapSubTable *s, sal_uInt32 *length) in PackCmapType0() argument
728 for (j = 0; j < s->n; j++) { in PackCmapType0()
729 if (s->xc[j] == i) { in PackCmapType0()
730 g = (sal_uInt16) s->xg[j]; in PackCmapType0()
739 static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 *length) in PackCmapType6() argument
741 sal_uInt8* ptr = (sal_uInt8*)smalloc(s->n*2 + 10); in PackCmapType6()
747 PutUInt16((sal_uInt16)(s->n*2+10), ptr, 2, 1); in PackCmapType6()
750 PutUInt16((sal_uInt16)(s->n), ptr, 8, 1 ); in PackCmapType6()
752 for (i = 0; i < s->n; i++) { in PackCmapType6()
754 for (j = 0; j < s->n; j++) { in PackCmapType6()
755 if (s->xc[j] == i) { in PackCmapType6()
756 g = (sal_uInt16) s->xg[j]; in PackCmapType6()
761 *length = s->n*2+10; in PackCmapType6()
768 static sal_uInt8 *PackCmap(CmapSubTable *s, sal_uInt32 *length) in PackCmap() argument
770 if( s->xg[s->n-1] > 0xff ) in PackCmap()
771 return PackCmapType6(s, length); in PackCmap()
773 return PackCmapType0(s, length); in PackCmap()
795 subtables[i] = PackCmap(t->s+i, &l); in GetRawData_cmap()
808 PutUInt16((sal_uInt16)(t->s[i].id >> 16), cmap + 4, i * 8, 1); in GetRawData_cmap()
809 PutUInt16((sal_uInt16)(t->s[i].id & 0xFF), cmap + 4, 2 + i * 8, 1); in GetRawData_cmap()
1099 cmap->s = (CmapSubTable *) scalloc(CMAP_SUBTABLE_INIT, sizeof(CmapSubTable)); in TrueTypeTableNew_cmap()
1100 memset(cmap->s, 0, sizeof(CmapSubTable) * CMAP_SUBTABLE_INIT); in TrueTypeTableNew_cmap()
1211 CmapSubTable *s; in cmapAdd() local
1216 s = t->s; assert(s != 0); in cmapAdd()
1221 if (s[i].id == id) { in cmapAdd()
1231 memcpy(tmp, s, sizeof(CmapSubTable) * t->m); in cmapAdd()
1233 free(s); in cmapAdd()
1234 s = tmp; in cmapAdd()
1235 t->s = s; in cmapAdd()
1239 if (s[i].id > id) break; in cmapAdd()
1243 memmove(s+i+1, s+i, t->n-i); in cmapAdd()
1248 s[i].id = id; in cmapAdd()
1249 s[i].n = 0; in cmapAdd()
1250 s[i].m = CMAP_PAIR_INIT; in cmapAdd()
1251 s[i].xc = (sal_uInt32*)scalloc(CMAP_PAIR_INIT, sizeof(sal_uInt32)); in cmapAdd()
1252 s[i].xg = (sal_uInt32*)scalloc(CMAP_PAIR_INIT, sizeof(sal_uInt32)); in cmapAdd()
1255 if (s[i].n == s[i].m) { in cmapAdd()
1256 sal_uInt32* tmp1 = (sal_uInt32*)scalloc(s[i].m + CMAP_PAIR_INCR, sizeof(sal_uInt32)); in cmapAdd()
1257 sal_uInt32* tmp2 = (sal_uInt32*)scalloc(s[i].m + CMAP_PAIR_INCR, sizeof(sal_uInt32)); in cmapAdd()
1260 memcpy(tmp1, s[i].xc, sizeof(sal_uInt32) * s[i].m); in cmapAdd()
1261 memcpy(tmp2, s[i].xg, sizeof(sal_uInt32) * s[i].m); in cmapAdd()
1262 s[i].m += CMAP_PAIR_INCR; in cmapAdd()
1263 free(s[i].xc); in cmapAdd()
1264 free(s[i].xg); in cmapAdd()
1265 s[i].xc = tmp1; in cmapAdd()
1266 s[i].xg = tmp2; in cmapAdd()
1269 s[i].xc[s[i].n] = c; in cmapAdd()
1270 s[i].xg[s[i].n] = g; in cmapAdd()
1271 s[i].n++; in cmapAdd()