• Home
  • Raw
  • Download

Lines Matching full:fileheader

54  *	FileHeader
57 * FileHeader:
291 _XcursorFileHeaderDestroy (XcursorFileHeader *fileHeader) in _XcursorFileHeaderDestroy() argument
293 free (fileHeader); in _XcursorFileHeaderDestroy()
299 XcursorFileHeader *fileHeader; in _XcursorFileHeaderCreate() local
303 fileHeader = malloc (sizeof (XcursorFileHeader) + in _XcursorFileHeaderCreate()
305 if (!fileHeader) in _XcursorFileHeaderCreate()
307 fileHeader->magic = XCURSOR_MAGIC; in _XcursorFileHeaderCreate()
308 fileHeader->header = XCURSOR_FILE_HEADER_LEN; in _XcursorFileHeaderCreate()
309 fileHeader->version = XCURSOR_FILE_VERSION; in _XcursorFileHeaderCreate()
310 fileHeader->ntoc = ntoc; in _XcursorFileHeaderCreate()
311 fileHeader->tocs = (XcursorFileToc *) (fileHeader + 1); in _XcursorFileHeaderCreate()
312 return fileHeader; in _XcursorFileHeaderCreate()
318 XcursorFileHeader head, *fileHeader; in _XcursorReadFileHeader() local
339 fileHeader = _XcursorFileHeaderCreate (head.ntoc); in _XcursorReadFileHeader()
340 if (!fileHeader) in _XcursorReadFileHeader()
342 fileHeader->magic = head.magic; in _XcursorReadFileHeader()
343 fileHeader->header = head.header; in _XcursorReadFileHeader()
344 fileHeader->version = head.version; in _XcursorReadFileHeader()
345 fileHeader->ntoc = head.ntoc; in _XcursorReadFileHeader()
346 for (n = 0; n < fileHeader->ntoc; n++) in _XcursorReadFileHeader()
348 if (!_XcursorReadUInt (file, &fileHeader->tocs[n].type)) in _XcursorReadFileHeader()
350 if (!_XcursorReadUInt (file, &fileHeader->tocs[n].subtype)) in _XcursorReadFileHeader()
352 if (!_XcursorReadUInt (file, &fileHeader->tocs[n].position)) in _XcursorReadFileHeader()
355 if (n != fileHeader->ntoc) in _XcursorReadFileHeader()
357 _XcursorFileHeaderDestroy (fileHeader); in _XcursorReadFileHeader()
360 return fileHeader; in _XcursorReadFileHeader()
365 XcursorFileHeader *fileHeader, in _XcursorSeekToToc() argument
368 if (!file || !fileHeader || \ in _XcursorSeekToToc()
369 (*file->seek) (file, fileHeader->tocs[toc].position, SEEK_SET) == EOF) in _XcursorSeekToToc()
376 XcursorFileHeader *fileHeader, in _XcursorFileReadChunkHeader() argument
380 if (!file || !fileHeader || !chunkHeader) in _XcursorFileReadChunkHeader()
382 if (!_XcursorSeekToToc (file, fileHeader, toc)) in _XcursorFileReadChunkHeader()
393 if (chunkHeader->type != fileHeader->tocs[toc].type || in _XcursorFileReadChunkHeader()
394 chunkHeader->subtype != fileHeader->tocs[toc].subtype) in _XcursorFileReadChunkHeader()
402 _XcursorFindBestSize (XcursorFileHeader *fileHeader, in _XcursorFindBestSize() argument
411 if (!fileHeader || !nsizesp) in _XcursorFindBestSize()
414 for (n = 0; n < fileHeader->ntoc; n++) in _XcursorFindBestSize()
416 if (fileHeader->tocs[n].type != XCURSOR_IMAGE_TYPE) in _XcursorFindBestSize()
418 thisSize = fileHeader->tocs[n].subtype; in _XcursorFindBestSize()
432 _XcursorFindImageToc (XcursorFileHeader *fileHeader, in _XcursorFindImageToc() argument
439 if (!fileHeader) in _XcursorFindImageToc()
442 for (toc = 0; toc < fileHeader->ntoc; toc++) in _XcursorFindImageToc()
444 if (fileHeader->tocs[toc].type != XCURSOR_IMAGE_TYPE) in _XcursorFindImageToc()
446 thisSize = fileHeader->tocs[toc].subtype; in _XcursorFindImageToc()
453 if (toc == fileHeader->ntoc) in _XcursorFindImageToc()
460 XcursorFileHeader *fileHeader, in _XcursorReadImage() argument
469 if (!file || !fileHeader) in _XcursorReadImage()
472 if (!_XcursorFileReadChunkHeader (file, fileHeader, toc, &chunkHeader)) in _XcursorReadImage()
519 XcursorFileHeader *fileHeader; in XcursorXcFileLoadImages() local
528 fileHeader = _XcursorReadFileHeader (file); in XcursorXcFileLoadImages()
529 if (!fileHeader) in XcursorXcFileLoadImages()
531 bestSize = _XcursorFindBestSize (fileHeader, (XcursorDim) size, &nsize); in XcursorXcFileLoadImages()
534 _XcursorFileHeaderDestroy (fileHeader); in XcursorXcFileLoadImages()
540 _XcursorFileHeaderDestroy (fileHeader); in XcursorXcFileLoadImages()
545 toc = _XcursorFindImageToc (fileHeader, bestSize, n); in XcursorXcFileLoadImages()
548 images->images[images->nimage] = _XcursorReadImage (file, fileHeader, in XcursorXcFileLoadImages()
554 _XcursorFileHeaderDestroy (fileHeader); in XcursorXcFileLoadImages()