home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / windows / winterm / xyerror.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-22  |  769 b   |  31 lines

  1. /*** xyerror.c ***/
  2.  
  3. #include <windows.h>
  4. #include <string.h>
  5. #include "xyerror.h"
  6. #include "errcodes.h"
  7.  
  8. char *ErrorText[16] = {
  9.   "No error",
  10.   "Already active",
  11.   "Cannot open file",
  12.   "File is empty",
  13.   "Expected startup character (NAK,'C','G') not received",
  14.   "Startup character was not NAK, 'C', or 'G'",
  15.   "Disk read error",
  16.   "Expected EOT character not received",
  17.   "Internal error",
  18.   "Cancelled by other end",
  19.   "Out of sync",
  20.   "Retry limit exceeded",
  21.   "Bad packet number",
  22.   "Timed out awiting incoming character",
  23.   "No such file",
  24.   "Not active"};
  25.  
  26. void xyError(int Code,char *ErrorMsg)
  27. {
  28.  if((Code>=0)||(Code<UNKNOWN_ERROR)) strcpy(ErrorMsg,ErrorText[Code]);
  29.  else strcpy(ErrorMsg,"Unknown error");
  30. } /* end xyError */
  31.