Subversion Repositories SvarDOS

Rev

Rev 421 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 421 Rev 471
Line 30... Line 30...
30
#include <stdio.h>
30
#include <stdio.h>
31
 
31
 
32
#include "doserr.h"
32
#include "doserr.h"
33
 
33
 
34
const char *doserr(unsigned short err) {
34
const char *doserr(unsigned short err) {
35
  static char buf[24];
35
  static char buf[18] = "DOS ERROR 0x";
36
  switch (err) {
36
  switch (err) {
37
    case 0x00: return("Success");
37
    case 0x00: return("Success");
38
    case 0x01: return("Function number invalid");
38
    case 0x01: return("Function number invalid");
39
    case 0x02: return("File not found");
39
    case 0x02: return("File not found");
40
    case 0x03: return("Path not found");
40
    case 0x03: return("Path not found");
Line 72... Line 72...
72
    case 0x24: return("Sharing buffer overflow");
72
    case 0x24: return("Sharing buffer overflow");
73
    case 0x25: return("Code page mismatch");
73
    case 0x25: return("Code page mismatch");
74
    case 0x26: return("Cannot complete file operations (EOF / out of input)");
74
    case 0x26: return("Cannot complete file operations (EOF / out of input)");
75
    case 0x27: return("Insufficient disk space");
75
    case 0x27: return("Insufficient disk space");
76
    default:
76
    default:
77
      snprintf(buf, sizeof(buf), "DOS ERROR 0x%02X", err);
77
      sprintf(buf + 12, "%02X", err);
78
      return(buf);
78
      return(buf);
79
  }
79
  }
80
}
80
}