done_msg.c 730 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*!
  2. * \file lib/gis/done_msg.c
  3. *
  4. * \brief GIS Library - Done message functions.
  5. *
  6. * (C) 2001-2014 by the GRASS Development Team
  7. *
  8. * This program is free software under the GNU General Public License
  9. * (>=v2). Read the file COPYING that comes with GRASS for details.
  10. *
  11. * \author GRASS GIS Development Team
  12. *
  13. * \date 1999-2014
  14. */
  15. #include <stdarg.h>
  16. #include <grass/gis.h>
  17. #include <grass/glocale.h>
  18. /**
  19. * \brief Print a final message.
  20. *
  21. * \param[in] msg string. Cannot be NULL.
  22. * \return
  23. */
  24. void G_done_msg(const char *msg, ...)
  25. {
  26. char buffer[2000];
  27. va_list ap;
  28. va_start(ap, msg);
  29. vsprintf(buffer, msg, ap);
  30. va_end(ap);
  31. G_message(_("%s complete. %s"), G_program_name(), buffer);
  32. }