|
LibTIFF 4.7.2
TIFF library public API and implementation reference
|
Provide public allocation and byte-memory operations. More...
Functions | |
| void | _TIFFfree (void *p) |
| Release a block allocated by the public allocation family. | |
| void * | _TIFFmalloc (tmsize_t s) |
| Allocate an uninitialised block through the public allocator. | |
| void * | _TIFFcalloc (tmsize_t nmemb, tmsize_t siz) |
| Allocate a zero-filled array through the public allocator. | |
| void * | _TIFFrealloc (void *p, tmsize_t s) |
| Resize a public-allocator block using platform realloc semantics. | |
| void | _TIFFmemset (void *p, int v, tmsize_t c) |
| Fill a byte range with one repeated byte. | |
| void | _TIFFmemcpy (void *d, const void *s, tmsize_t c) |
| Copy a non-overlapping byte range. | |
| int | _TIFFmemcmp (const void *p1, const void *p2, tmsize_t c) |
| Compare two byte ranges lexicographically. | |
Provide public allocation and byte-memory operations.
Allocate a zero-filled array through the public allocator.
Converts nonzero arguments to size_t and delegates allocation/product handling to the platform calloc(). Negative inputs are not checked and must not be supplied. Does not apply handle allocation limits, change handle state, or emit library diagnostics. errno follows the allocator.
| [in] | nmemb | Nonnegative element count. |
| [in] | siz | Nonnegative element size in bytes. |
Definition at line 483 of file tif_unix.c.
Referenced by _TIFFcallocExt(), and TIFFOpenOptionsAlloc().
|
extern |
Release a block allocated by the public allocation family.
Calls platform free(); NULL is accepted. Invalidates the block and all views into it. Does not release caller resources or emit diagnostics. Blocks using handle-aware cumulative accounting must instead be released with _TIFFfreeExt() and the matching handle.
| [in] | p | Owned public-allocator block, or NULL. |
Definition at line 491 of file tif_unix.c.
Referenced by _TIFFfreeExt(), TIFFOpenOptionsFree(), and TIFFOpenWExt().
|
extern |
Allocate an uninitialised block through the public allocator.
Calls the platform malloc() for nonzero requests after conversion to size_t. Negative values are not validated and must not be supplied. Does not apply TIFFOpenOptions limits or emit library diagnostics; errno follows the allocator. Storage remains valid until freed or successfully reallocated.
| [in] | s | Nonnegative requested byte count. |
Definition at line 475 of file tif_unix.c.
Referenced by _TIFFmallocExt(), and TIFFOpenWExt().
|
extern |
Compare two byte ranges lexicographically.
Compares bytes as unsigned char values. Returns only an ordering sign, not a promised magnitude. Does not allocate, mutate the ranges, validate bounds, transfer ownership, or emit diagnostics.
| [in] | p1 | First range valid for c readable bytes. |
| [in] | p2 | Second range valid for c readable bytes. |
| [in] | c | Nonnegative byte count representable by size_t. |
Definition at line 502 of file tif_unix.c.
Referenced by TIFFWriteDirectoryTagTransferfunction().
|
extern |
Copy a non-overlapping byte range.
Calls memcpy() after converting c to size_t; source and destination must meet its validity/non-overlap requirements. Does not allocate, retain pointers, validate bounds, or report errors. Use an appropriate memmove() operation if overlap is possible.
| [out] | d | Destination valid for c writable bytes. |
| [in] | s | Source valid for c readable bytes, not overlapping d. |
| [in] | c | Nonnegative byte count representable by size_t. |
Definition at line 497 of file tif_unix.c.
Referenced by _TIFFByteCursorCopy(), _TIFFVSetField(), DumpModeDecode(), DumpModeEncode(), fpAcc(), fpDiff(), JBIGCopyEncodedData(), JBIGDecode(), JPEGPostEncode(), NeXTDecode(), OJPEGReadBlock(), setByteArray(), TIFFAdvanceDirectory(), TIFFCIELabToRGBInit(), TIFFClientOpenExt(), TIFFDefaultTransferFunction(), TIFFFetchDirectory(), TIFFFetchNormalTag(), TIFFFetchStripThing(), TIFFGetConfiguredCODECs(), TIFFReadDirectory(), TIFFReadDirEntryArrayWithLimit(), TIFFReadDirEntryData(), TIFFReadRawStrip1(), TIFFReadRawTile1(), TIFFRegisterCODEC(), TIFFRGBAImageBegin(), TIFFSetClientInfo(), TIFFWriteDirectorySec(), TIFFWriteDirectoryTagColormap(), TIFFWriteDirectoryTagData(), TIFFWriteDirectoryTagTransferfunction(), and TWebPDatasetWriter().
|
extern |
Fill a byte range with one repeated byte.
Calls memset() after converting c to size_t; follows its pointer- validity requirements even for a zero count. Does not allocate, change ownership, validate bounds/counts, or emit diagnostics.
| [out] | p | Destination valid for c bytes. |
| [in] | v | Byte value after conversion to unsigned char. |
| [in] | c | Nonnegative byte count representable by size_t. |
Definition at line 495 of file tif_unix.c.
Referenced by _TIFFByteCursorFill(), _TIFFCreateAnonField(), _TIFFFillStrilesInternal(), _TIFFReadEncodedTileAndAllocBuffer(), _TIFFResetTifDirAndInitStrileCounters(), _TIFFVSetField(), LogL16Decode(), LogLuvDecode24(), LogLuvDecode32(), LogLuvDecodeStrip(), LogLuvDecodeTile(), LZWDecodeCompat(), TIFFClientOpenExt(), TIFFFetchStripThing(), TIFFFreeDirectory(), TIFFGetConfiguredCODECs(), TIFFGrowStrips(), TIFFInitJPEG(), TIFFInitOJPEG(), TIFFInitPixarLog(), TIFFInitSGILog(), TIFFReadRGBATileExt(), TIFFSetupStrips(), and TIFFYCbCrToRGBInit().
|
extern |
Resize a public-allocator block using platform realloc semantics.
For positive size, preserves the initial min(old size, s) bytes and invalidates the old pointer on success, even if the address is unchanged. New bytes are uninitialised. Pass the result through a temporary pointer until success is known. Negative sizes are not checked and must not be supplied. Does not apply handle limits or emit library diagnostics. Never pass an accounting-prefixed _TIFFmallocExt() block to this family.
| [in] | p | Public-allocator block to resize, or NULL. |
| [in] | s | Nonnegative new byte count. |
Definition at line 493 of file tif_unix.c.
Referenced by _TIFFreallocExt().