kusano 7d535a
.\" $Id: TIFFWarning.3tiff,v 1.3 2012-06-01 22:02:44 fwarmerdam Exp $
kusano 7d535a
.\"
kusano 7d535a
.\" Copyright (c) 1988-1997 Sam Leffler
kusano 7d535a
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
kusano 7d535a
.\"
kusano 7d535a
.\" Permission to use, copy, modify, distribute, and sell this software and 
kusano 7d535a
.\" its documentation for any purpose is hereby granted without fee, provided
kusano 7d535a
.\" that (i) the above copyright notices and this permission notice appear in
kusano 7d535a
.\" all copies of the software and related documentation, and (ii) the names of
kusano 7d535a
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
kusano 7d535a
.\" publicity relating to the software without the specific, prior written
kusano 7d535a
.\" permission of Sam Leffler and Silicon Graphics.
kusano 7d535a
.\" 
kusano 7d535a
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
kusano 7d535a
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
kusano 7d535a
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
kusano 7d535a
.\" 
kusano 7d535a
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
kusano 7d535a
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
kusano 7d535a
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
kusano 7d535a
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
kusano 7d535a
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
kusano 7d535a
.\" OF THIS SOFTWARE.
kusano 7d535a
.\"
kusano 7d535a
.if n .po 0
kusano 7d535a
.TH TIFFWarning 3TIFF "October 15, 1995" "libtiff"
kusano 7d535a
.SH NAME
kusano 7d535a
TIFFWarning, TIFFSetWarningHandler \- library warning interface
kusano 7d535a
.SH SYNOPSIS
kusano 7d535a
.B "#include <tiffio.h>"</tiffio.h>
kusano 7d535a
.sp
kusano 7d535a
.BI "void TIFFWarning(const char *" module ", const char *" fmt ", " ... ")"
kusano 7d535a
.sp
kusano 7d535a
.B "#include <stdarg.h>"</stdarg.h>
kusano 7d535a
.sp
kusano 7d535a
.BI "typedef void (*TIFFWarningHandler)(const char *" module ", const char *" fmt ", va_list " ap ");"
kusano 7d535a
.sp
kusano 7d535a
.BI "TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler " handler ");"
kusano 7d535a
.SH DESCRIPTION
kusano 7d535a
.I TIFFWarning
kusano 7d535a
invokes the library-wide warning handler function to (normally) write a
kusano 7d535a
warning message to the
kusano 7d535a
.BR stderr .
kusano 7d535a
The
kusano 7d535a
.I fmt
kusano 7d535a
parameter is a
kusano 7d535a
.IR printf (3S)
kusano 7d535a
format string, and any number arguments can be supplied. The
kusano 7d535a
.I module
kusano 7d535a
parameter is interpreted as a string that, if non-zero, should be printed
kusano 7d535a
before the message; it typically is used to identify the software module in
kusano 7d535a
which a warning is detected.
kusano 7d535a
.PP
kusano 7d535a
Applications that desire to capture control in the event of a warning should
kusano 7d535a
use
kusano 7d535a
.IR TIFFSetWarningHandler
kusano 7d535a
to override the default warning handler.
kusano 7d535a
A
kusano 7d535a
.SM NULL
kusano 7d535a
(0) warning handler function may be installed to suppress error messages.
kusano 7d535a
.SH "RETURN VALUES"
kusano 7d535a
.IR TIFFSetWarningHandler
kusano 7d535a
returns a reference to the previous error handling function.
kusano 7d535a
.SH "SEE ALSO"
kusano 7d535a
.BR TIFFError (3TIFF),
kusano 7d535a
.BR libtiff (3TIFF),
kusano 7d535a
.BR printf (3)
kusano 7d535a
.PP
kusano 7d535a
Libtiff library home page:
kusano 7d535a
.BR http://www.remotesensing.org/libtiff/