LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
Functions | Variables
Diagnostic state and implementations

Store global callbacks and implement built-in diagnostic formatting. More...

Collaboration diagram for Diagnostic state and implementations:

Functions

static void unixWarningHandler (const char *module, const char *fmt, va_list ap)
 Print a default warning diagnostic to stderr.
 
static void unixErrorHandler (const char *module, const char *fmt, va_list ap)
 Print a default error diagnostic to stderr.
 
static void Win32WarningHandler (const char *module, const char *fmt, va_list ap)
 Print a default warning diagnostic to stderr.
 
static void Win32ErrorHandler (const char *module, const char *fmt, va_list ap)
 Print a default error diagnostic to stderr.
 

Variables

TIFFErrorHandler _TIFFwarningHandler
 Store the global warning callback.
 
TIFFErrorHandler _TIFFerrorHandler
 Store the global error callback.
 
TIFFErrorHandlerExt _TIFFwarningHandlerExt
 Store the global extended warning callback.
 
TIFFErrorHandlerExt _TIFFerrorHandlerExt
 Store the global extended error callback.
 

Detailed Description

Store global callbacks and implement built-in diagnostic formatting.

Function Documentation

◆ unixErrorHandler()

static void unixErrorHandler ( const char *  module,
const char *  fmt,
va_list  ap 
)
static

Print a default error diagnostic to stderr.

Writes to stderr using stdio. Prints the module prefix when non-NULL, then the formatted message and a final period/newline. Stdio failure is not checked and no status is returned. Does not own strings/arguments or terminate the process; output/errno effects follow stdio.

Parameters
[in]moduleOptional borrowed module name printed as a prefix.
[in]fmtNon-NULL printf-style format string.
[in,out]apBorrowed matching arguments consumed by vfprintf().

Definition at line 546 of file tif_unix.c.

◆ unixWarningHandler()

static void unixWarningHandler ( const char *  module,
const char *  fmt,
va_list  ap 
)
static

Print a default warning diagnostic to stderr.

Writes to stderr using stdio. Prints the module prefix when non-NULL, then "Warning, ", then the formatted message and a final period/newline. Stdio failure is not checked and no status is returned. Does not own strings/arguments or terminate the process; output/errno effects follow stdio.

Parameters
[in]moduleOptional borrowed module name printed as a prefix.
[in]fmtNon-NULL printf-style format string.
[in,out]apBorrowed matching arguments consumed by vfprintf().

Definition at line 522 of file tif_unix.c.

◆ Win32ErrorHandler()

static void Win32ErrorHandler ( const char *  module,
const char *  fmt,
va_list  ap 
)
static

Print a default error diagnostic to stderr.

Writes to stderr using stdio. Prints the module prefix when non-NULL, then the formatted message and a final period/newline. Stdio failure is not checked and no status is returned. Does not own strings/arguments or terminate the process; output/errno effects follow stdio.

Parameters
[in]moduleOptional borrowed module name printed as a prefix.
[in]fmtNon-NULL printf-style format string.
[in,out]apBorrowed matching arguments consumed by vfprintf().

Definition at line 640 of file tif_win32.c.

◆ Win32WarningHandler()

static void Win32WarningHandler ( const char *  module,
const char *  fmt,
va_list  ap 
)
static

Print a default warning diagnostic to stderr.

Writes to stderr using stdio. Prints the module prefix when non-NULL, then "Warning, ", then the formatted message and a final period/newline. Stdio failure is not checked and no status is returned. Does not own strings/arguments or terminate the process; output/errno effects follow stdio.

Parameters
[in]moduleOptional borrowed module name printed as a prefix.
[in]fmtNon-NULL printf-style format string.
[in,out]apBorrowed matching arguments consumed by vfprintf().

Definition at line 617 of file tif_win32.c.

Variable Documentation

◆ _TIFFerrorHandler

TIFFErrorHandler _TIFFerrorHandler
extern

Store the global error callback.

Initially the platform stderr formatter in the standard backends. TIFFSetErrorHandler() replaces this process-wide slot without locking or lifetime management. It does not own callback code/context and is not a per-handle setting.

Definition at line 553 of file tif_unix.c.

Referenced by _TIFFErrorEarly(), TIFFError(), TIFFErrorExt(), TIFFErrorExtR(), and TIFFSetErrorHandler().

◆ _TIFFerrorHandlerExt

TIFFErrorHandlerExt _TIFFerrorHandlerExt
extern

Store the global extended error callback.

Initially NULL. TIFFSetErrorHandlerExt() replaces this process-wide slot without locking or lifetime management. It does not own callback code/context and is not a per-handle setting.

Definition at line 35 of file tif_error.c.

Referenced by _TIFFErrorEarly(), TIFFError(), TIFFErrorExt(), TIFFErrorExtR(), and TIFFSetErrorHandlerExt().

◆ _TIFFwarningHandler

TIFFErrorHandler _TIFFwarningHandler
extern

Store the global warning callback.

Initially the platform stderr formatter in the standard backends. TIFFSetWarningHandler() replaces this process-wide slot without locking or lifetime management. It does not own callback code/context and is not a per-handle setting.

Definition at line 530 of file tif_unix.c.

Referenced by TIFFSetWarningHandler(), TIFFWarning(), TIFFWarningExt(), and TIFFWarningExtR().

◆ _TIFFwarningHandlerExt

TIFFErrorHandlerExt _TIFFwarningHandlerExt
extern

Store the global extended warning callback.

Initially NULL. TIFFSetWarningHandlerExt() replaces this process-wide slot without locking or lifetime management. It does not own callback code/context and is not a per-handle setting.

Definition at line 35 of file tif_warning.c.

Referenced by TIFFSetWarningHandlerExt(), TIFFWarning(), TIFFWarningExt(), and TIFFWarningExtR().