snprintf.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * snprintf.h
  3. * header file for snprintf.c
  4. *
  5. * $Id: snprintf.h,v 1.7 2001/04/12 02:39:44 guppy Exp $
  6. */
  7. /*
  8. * Copyright (C) 2000, 2001 Eggheads Development Team
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License
  12. * as published by the Free Software Foundation; either version 2
  13. * of the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  23. */
  24. #ifndef _EGG_COMPAT_SNPRINTF_H_
  25. #define _EGG_COMPAT_SNPRINTF_H_
  26. /* Use the system libraries version of vsnprintf() if available. Otherwise
  27. * use our own.
  28. */
  29. #ifndef HAVE_VSNPRINTF
  30. int egg_vsnprintf(char *str, size_t count, const char *fmt, va_list ap);
  31. #else
  32. # define egg_vsnprintf vsnprintf
  33. #endif
  34. /* Use the system libraries version of snprintf() if available. Otherwise
  35. * use our own.
  36. */
  37. #ifndef HAVE_SNPRINTF
  38. # ifdef __STDC__
  39. int egg_snprintf(char *str, size_t count, const char *fmt, ...);
  40. # else
  41. int egg_snprintf();
  42. # endif
  43. #define snprintf egg_snprintf
  44. #endif
  45. #endif /* !_EGG_COMPAT_SNPRINTF_H_ */