.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "_TIFFAUXILIARY" "3tiff" "Sep 08, 2023" "4.6" "LibTIFF" .SH NAME _TIFFauxiliary \- auxiliary functions .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .TP .B uint32_t _TIFFClampDoubleToUInt32(double val) .UNINDENT .INDENT 0.0 .TP .B uint32_t _TIFFMultiply32(TIFF *tif, uint32_t first, uint32_t second, const char *where) .UNINDENT .INDENT 0.0 .TP .B uint64_t _TIFFMultiply64(TIFF *tif, uint64_t first, uint64_t second, const char *where) .UNINDENT .SH DESCRIPTION .sp \fI\%_TIFFClampDoubleToUInt32()\fP clamps double values into the range of \fBuint32_t\fP (i.e. 0 .. 0xFFFFFFFF) .sp \fI\%_TIFFMultiply32()\fP and \fI\%_TIFFMultiply64()\fP checks for an integer overflow of the multiplication result and return the multiplication result or \fI0\fP if an overflow would happen. The string \fIwhere\fP is printed in the error message in case an overflow happens and can be used to indicate where the function was called. .SH SEE ALSO .sp \fI\%libtiff\fP (3tiff), .SH AUTHOR LibTIFF contributors .SH COPYRIGHT 1988-2022, LibTIFF contributors .\" Generated by docutils manpage writer. .