| 1 |
/*------------------------------------------------------------ |
| 2 |
|
| 3 |
written by S. Ulrich ([email protected]) 2001/02/25 |
| 4 |
|
| 5 |
Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 |
of this software and associated documentation files (the "Software"), to |
| 7 |
deal in the Software without restriction, including without limitation the |
| 8 |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 9 |
sell copies of the Software, and to permit persons to whom the Software is |
| 10 |
furnished to do so, subject to the following conditions: |
| 11 |
|
| 12 |
The above copyright notice and this permission notice shall be included in |
| 13 |
all copies or substantial portions of the Software. |
| 14 |
|
| 15 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 16 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 17 |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 18 |
IN NO EVENT SHALL PAUL VOJTA OR ANY OTHER AUTHOR OF THIS SOFTWARE BE |
| 19 |
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| 20 |
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 21 |
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 |
------------------------------------------------------------*/ |
| 23 |
|
| 24 |
#ifndef MY_VSNPRINTF_H__ |
| 25 |
#define MY_VSNPRINTF_H__ |
| 26 |
|
| 27 |
#include "xdvi.h" |
| 28 |
|
| 29 |
#if HAVE_VSNPRINTF && HAVE_GOOD_VSNPRINTF |
| 30 |
|
| 31 |
#include <stdio.h> |
| 32 |
#include <stdarg.h> |
| 33 |
#define VSNPRINTF(buf, len, format, args) vsnprintf(buf, len, format, args) |
| 34 |
|
| 35 |
#else /* HAVE_VSNPRINTF && HAVE_GOOD_VSNPRINTF */ |
| 36 |
|
| 37 |
#include <unistd.h> /* for pipe() */ |
| 38 |
#include "util.h" /* for xpipe() etc. */ |
| 39 |
extern int my_vsnprintf(char *, size_t, const char *, va_list); |
| 40 |
#define VSNPRINTF(buf, len, format, args) my_vsnprintf(buf, len, format, args) |
| 41 |
|
| 42 |
#endif /* HAVE_VSNPRINTF && HAVE_GOOD_VSNPRINTF */ |
| 43 |
|
| 44 |
#endif /* MY_VSNPRINTF_H__ */ |