V_error.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * \file V_error.c
  3. *
  4. * \brief Display error functions.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. *
  20. * \author GRASS GIS Development Team
  21. *
  22. * \date 1999-2006
  23. */
  24. #include <stdio.h>
  25. #include <stdarg.h>
  26. #include <grass/gis.h>
  27. #include <grass/vask.h>
  28. /**
  29. * \fn int V_error (char *message)
  30. *
  31. * \brief Dispay error routine.
  32. *
  33. * Deals with error messages generated by other Visual ask routines.
  34. *
  35. * \param[in] message
  36. * \return always returns 0
  37. */
  38. void V_error(const char *fmt, ...)
  39. {
  40. va_list ap;
  41. va_start(ap, fmt);
  42. fprintf(stderr,"V_ask error: ");
  43. vfprintf(stderr, fmt, ap);
  44. va_end(ap);
  45. G_sleep(4);
  46. }