Back to index

tetex-bin  3.0
my-vsnprintf.h
Go to the documentation of this file.
00001 /*------------------------------------------------------------
00002 
00003 written by S. Ulrich (ulrich@cis.uni-muenchen.de)  2001/02/25
00004 
00005 Permission is hereby granted, free of charge, to any person obtaining a copy
00006 of this software and associated documentation files (the "Software"), to
00007 deal in the Software without restriction, including without limitation the
00008 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
00009 sell copies of the Software, and to permit persons to whom the Software is
00010 furnished to do so, subject to the following conditions:
00011 
00012 The above copyright notice and this permission notice shall be included in
00013 all copies or substantial portions of the Software.
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00016 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 IN NO EVENT SHALL PAUL VOJTA OR ANY OTHER AUTHOR OF THIS SOFTWARE BE
00019 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00020 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00021 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022 ------------------------------------------------------------*/
00023 
00024 #ifndef MY_VSNPRINTF_H__
00025 #define MY_VSNPRINTF_H__
00026 
00027 #include "xdvi-config.h"
00028 #include "xdvi.h"
00029 
00030 #if HAVE_VSNPRINTF && HAVE_GOOD_VSNPRINTF
00031 
00032 #include <stdio.h>
00033 #include <stdarg.h>
00034 #define VSNPRINTF(buf, len, format, args) vsnprintf(buf, len, format, args)
00035 
00036 #else /* HAVE_VSNPRINTF && HAVE_GOOD_VSNPRINTF */
00037 
00038 #include <unistd.h> /* for pipe() */
00039 #include "util.h" /* for xpipe() etc. */
00040 extern int my_vsnprintf(char *, int, const char *, va_list);
00041 #define VSNPRINTF(buf, len, format, args) my_vsnprintf(buf, len, format, args)
00042 
00043 #endif /* HAVE_VSNPRINTF && HAVE_GOOD_VSNPRINTF */
00044 
00045 #endif /* MY_VSNPRINTF_H__ */