Error.c 620 B

123456789101112131415161718192021222324252627282930
  1. /* Copyright Massachusetts Institute of Technology 1985 */
  2. #include "copyright.h"
  3. /*
  4. * XMenu: MIT Project Athena, X Window system menu package
  5. *
  6. * XMenuError - Returns a string description of the current
  7. * XMenu error status flag.
  8. *
  9. * Author: Tony Della Fera, DEC
  10. * August, 1985
  11. *
  12. */
  13. #include "XMenuInt.h"
  14. char const *
  15. XMenuError(void)
  16. {
  17. static char message[128]; /* Error message buffer. */
  18. if ((_XMErrorCode < XME_CODE_COUNT) && (_XMErrorCode >= 0)) {
  19. return(_XMErrorList[_XMErrorCode]);
  20. }
  21. sprintf(message, "Unknown _XMErrorCode: %d", _XMErrorCode);
  22. return(message);
  23. }