Lines Matching refs:ptr

258 _inline sal_Int16 GetInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)  in GetInt16()  argument
261 assert(ptr != 0); in GetInt16()
264 t = (ptr+offset)[0] << 8 | (ptr+offset)[1]; in GetInt16()
266 t = (ptr+offset)[1] << 8 | (ptr+offset)[0]; in GetInt16()
272 _inline sal_uInt16 GetUInt16(const sal_uInt8 *ptr, size_t offset, int bigendian) in GetUInt16() argument
275 assert(ptr != 0); in GetUInt16()
278 t = (ptr+offset)[0] << 8 | (ptr+offset)[1]; in GetUInt16()
280 t = (ptr+offset)[1] << 8 | (ptr+offset)[0]; in GetUInt16()
286 _inline sal_Int32 GetInt32(const sal_uInt8 *ptr, size_t offset, int bigendian) in GetInt32() argument
289 assert(ptr != 0); in GetInt32()
292 t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 | in GetInt32()
293 (ptr+offset)[2] << 8 | (ptr+offset)[3]; in GetInt32()
295 t = (ptr+offset)[3] << 24 | (ptr+offset)[2] << 16 | in GetInt32()
296 (ptr+offset)[1] << 8 | (ptr+offset)[0]; in GetInt32()
302 _inline sal_uInt32 GetUInt32(const sal_uInt8 *ptr, size_t offset, int bigendian) in GetUInt32() argument
305 assert(ptr != 0); in GetUInt32()
309 t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 | in GetUInt32()
310 (ptr+offset)[2] << 8 | (ptr+offset)[3]; in GetUInt32()
312 t = (ptr+offset)[3] << 24 | (ptr+offset)[2] << 16 | in GetUInt32()
313 (ptr+offset)[1] << 8 | (ptr+offset)[0]; in GetUInt32()
319 _inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, size_t offset, int bigendian) in PutInt16() argument
321 assert(ptr != 0); in PutInt16()
324 ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF); in PutInt16()
325 ptr[offset+1] = (sal_uInt8)(val & 0xFF); in PutInt16()
327 ptr[offset+1] = (sal_uInt8)((val >> 8) & 0xFF); in PutInt16()
328 ptr[offset] = (sal_uInt8)(val & 0xFF); in PutInt16()
468 static void HexFmtBlockWrite(HexFmt *_this, const void *ptr, sal_uInt32 size) in HexFmtBlockWrite() argument
480 Ch = ((sal_uInt8 *) ptr)[i]; in HexFmtBlockWrite()
542 const sal_uInt8* ptr = table + ttf->goffsets[glyphID]; in GetSimpleTTOutline() local
543 const sal_Int16 numberOfContours = GetInt16(ptr, 0, 1); in GetSimpleTTOutline()
548 metrics->xMin = GetInt16(ptr, 2, 1); in GetSimpleTTOutline()
549 metrics->yMin = GetInt16(ptr, 4, 1); in GetSimpleTTOutline()
550 metrics->xMax = GetInt16(ptr, 6, 1); in GetSimpleTTOutline()
551 metrics->yMax = GetInt16(ptr, 8, 1); in GetSimpleTTOutline()
558 if ((t = GetUInt16(ptr, 10+i*2, 1)) > lastPoint) lastPoint = t; in GetSimpleTTOutline()
561 sal_uInt16 instLen = GetUInt16(ptr, 10 + numberOfContours*2, 1); in GetSimpleTTOutline()
562 const sal_uInt8* p = ptr + 10 + 2 * numberOfContours + 2 + instLen; in GetSimpleTTOutline()
613 pa[GetUInt16(ptr, 10 + i * 2, 1)].flags |= 0x00008000; /*- set the end contour flag */ in GetSimpleTTOutline()
636 const sal_uInt8* ptr = table + ttf->goffsets[glyphID]; in GetCompoundTTOutline() local
637 if ((numberOfContours = GetInt16(ptr, 0, 1)) != -1) /*- glyph is not compound */ in GetCompoundTTOutline()
641 metrics->xMin = GetInt16(ptr, 2, 1); in GetCompoundTTOutline()
642 metrics->yMin = GetInt16(ptr, 4, 1); in GetCompoundTTOutline()
643 metrics->xMax = GetInt16(ptr, 6, 1); in GetCompoundTTOutline()
644 metrics->yMax = GetInt16(ptr, 8, 1); in GetCompoundTTOutline()
648 ptr += 10; in GetCompoundTTOutline()
651 flags = GetUInt16(ptr, 0, 1); in GetCompoundTTOutline()
653 index = GetUInt16(ptr, 2, 1); in GetCompoundTTOutline()
654 ptr += 4; in GetCompoundTTOutline()
707 e = GetInt16(ptr, 0, 1); in GetCompoundTTOutline()
708 f = GetInt16(ptr, 2, 1); in GetCompoundTTOutline()
710 ptr += 4; in GetCompoundTTOutline()
713 e = (sal_Int8) *ptr++; in GetCompoundTTOutline()
714 f = (sal_Int8) *ptr++; in GetCompoundTTOutline()
718 e = *ptr++; in GetCompoundTTOutline()
719 f = *ptr++; in GetCompoundTTOutline()
731 a = GetInt16(ptr, 0, 1) << 2; in GetCompoundTTOutline()
733 ptr += 2; in GetCompoundTTOutline()
738 a = GetInt16(ptr, 0, 1) << 2; in GetCompoundTTOutline()
739 d = GetInt16(ptr, 2, 1) << 2; in GetCompoundTTOutline()
740 ptr += 4; in GetCompoundTTOutline()
745 a = GetInt16(ptr, 0, 1) << 2; in GetCompoundTTOutline()
746 b = GetInt16(ptr, 2, 1) << 2; in GetCompoundTTOutline()
747 c = GetInt16(ptr, 4, 1) << 2; in GetCompoundTTOutline()
748 d = GetInt16(ptr, 6, 1) << 2; in GetCompoundTTOutline()
749 ptr += 8; in GetCompoundTTOutline()
838 const sal_uInt8* ptr = table + ttf->goffsets[glyphID]; in GetTTGlyphOutline() local
846 numberOfContours = GetInt16(ptr, 0, 1); in GetTTGlyphOutline()
1016 const sal_uInt8* ptr = name + GetUInt16(name, 4, 1) + GetUInt16(name + 6, 12 * n + 10, 1); in nameExtract() local
1020 if( (len <= 0) || ((ptr+len) > (name+nTableSize)) ) in nameExtract()
1032 for (i = 0; i < len/2; i++) res[i] = *(ptr + i * 2 + 1); in nameExtract()
1037 for (i = 0; i < len/2; i++ ) (*ucs2result)[i] = GetUInt16( ptr, 2*i, 1 ); in nameExtract()
1043 memcpy(res, ptr, len); in nameExtract()
1421 if( (table - ttf->ptr) + offset > (sal_uInt32)ttf->fsize ) in FindCmap()
1495 const sal_uInt8 *ptr; in GetKern() local
1506 ptr = table + 4; in GetKern()
1508 ttf->kerntables[i] = ptr; in GetKern()
1509 ptr += GetUInt16(ptr, 2, 1); in GetKern()
1511 if( ptr > ttf->ptr+ttf->fsize ) in GetKern()
1526 ptr = table + 8; in GetKern()
1528 ttf->kerntables[i] = ptr; in GetKern()
1529 ptr += GetUInt32(ptr, 0, 1); in GetKern()
1531 if( ptr > ttf->ptr+ttf->fsize ) in GetKern()
1584 sal_uInt8 *ptr; in KernGlyphsPrim2() local
1596 ptr = ttf->kerntables[j]; in KernGlyphsPrim2()
1597 npairs = GetUInt16(ptr, 6, 1); in KernGlyphsPrim2()
1598 ptr += 14; in KernGlyphsPrim2()
1603 t = GetUInt32(ptr, k * 6, 1); in KernGlyphsPrim2()
1609 kern[i].x = XUnits(ttf->unitsPerEm, GetInt16(ptr, 4 + (l-1) * 6, 1)); in KernGlyphsPrim2()
1611 kern[i].y = XUnits(ttf->unitsPerEm, GetInt16(ptr, 4 + (l-1) * 6, 1)); in KernGlyphsPrim2()
1645 (*ttf)->ptr = 0; in allocTrueTypeFont()
1696 …if (((*ttf)->ptr = (sal_uInt8 *) mmap(0, (*ttf)->fsize, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAIL… in OpenTTFontFile()
1722 (*ttf)->ptr = (sal_uInt8*)pBuffer; in OpenTTFontBuffer()
1734 sal_uInt32 version = GetInt32(t->ptr, 0, 1); in doOpenTTFont()
1741 if (GetUInt32(t->ptr, 4, 1) == 0x00000000) { in doOpenTTFont()
1745 if (facenum >= GetUInt32(t->ptr, 8, 1)) { in doOpenTTFont()
1749 tdoffset = GetUInt32(t->ptr, 12 + 4 * facenum, 1); in doOpenTTFont()
1762 t->ntables = GetUInt16(t->ptr + tdoffset, 4, 1); in doOpenTTFont()
1777 tag = GetUInt32(t->ptr + tdoffset + 12, 16 * i, 1); in doOpenTTFont()
1800 sal_uInt32 nTableOffset = GetUInt32(t->ptr + tdoffset + 12, 16 * i + 8, 1); in doOpenTTFont()
1801 length = GetUInt32(t->ptr + tdoffset + 12, 16 * i + 12, 1); in doOpenTTFont()
1802 t->tables[nIndex] = t->ptr + nTableOffset; in doOpenTTFont()
1813 if( pHead > t->ptr + (t->fsize - 54) ) in doOpenTTFont()
1814 pHead = t->ptr + (t->fsize - 54); in doOpenTTFont()
1817 for( p = pHead + 12; p > t->ptr; --p ) { in doOpenTTFont()
1827 if( p <= t->ptr ) in doOpenTTFont()
1839 if( (sal_uInt8*)t->tables[i] < t->ptr ) in doOpenTTFont()
1843 …ont file %s has bad table offset %d (tagnum=%d)\n", t->fname, (sal_uInt8*)t->tables[i]-t->ptr, i ); in doOpenTTFont()
1848 else if( (sal_uInt8*)t->tables[i] + t->tlens[i] > t->ptr + t->fsize ) in doOpenTTFont()
1850 int nMaxLen = (t->ptr + t->fsize) - (sal_uInt8*)t->tables[i]; in doOpenTTFont()
1924 munmap((char *) ttf->ptr, ttf->fsize); in CloseTTFont()
1958 const sal_uInt8* ptr = glyf + ttf->goffsets[glyphID]; in GetTTGlyphComponents() local
1962 if (GetInt16(ptr, 0, 1) == -1) { in GetTTGlyphComponents()
1964 ptr += 10; in GetTTGlyphComponents()
1966 flags = GetUInt16(ptr, 0, 1); in GetTTGlyphComponents()
1967 index = GetUInt16(ptr, 2, 1); in GetTTGlyphComponents()
1969 ptr += 4; in GetTTGlyphComponents()
1973 ptr += 4; in GetTTGlyphComponents()
1975 ptr += 2; in GetTTGlyphComponents()
1979 ptr += 2; in GetTTGlyphComponents()
1981 ptr += 4; in GetTTGlyphComponents()
1983 ptr += 8; in GetTTGlyphComponents()
2073 …fprintf(outf, h17, rtl_crc32(0, ttf->ptr, ttf->fsize), nGlyphs, rtl_crc32(0, glyphArray, nGlyphs *… in CreateT3FromTTGlyphs()
2185 …const sal_uInt8 ptr[] = {0,'T',0,'r',0,'u',0,'e',0,'T',0,'y',0,'p',0,'e',0,'S',0,'u',0,'b',0,'s',0… in CreateTTFromTTGlyphs() local
2188 n2.sptr = (sal_uInt8 *) ptr; in CreateTTFromTTGlyphs()
2474 …03 0 1 16#%08X %d 16#%08X 16#%08X] def\n", (unsigned int)rtl_crc32(0, ttf->ptr, ttf->fsize), (unsi… in CreateT42FromTTGlyphs()
2779 d->ptr = (sal_uInt8*)malloc((length + 1) & ~1); assert(d->ptr != 0); in GetTTRawGlyphData()
2780 memcpy( d->ptr, srcptr, length ); in GetTTRawGlyphData()
2783 d->ptr = 0; in GetTTRawGlyphData()
2856 …if( rec_string > (sal_uInt8*)ttf->ptr && rec_string < ((sal_uInt8*)ttf->ptr + ttf->fsize - rec[i].… in GetTTNameRecords()