PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/freedos/source/kernel/hdr/error.h

https://github.com/vvnikitin/sdcboot
C++ Header | 88 lines | 47 code | 8 blank | 33 comment | 0 complexity | 25a91f390bd32d51ad543e842c4cb01f MD5 | raw file
 1/****************************************************************/
 2/*                                                              */
 3/*                          error.h                             */
 4/*                                                              */
 5/*                    DOS-C error return codes                  */
 6/*                                                              */
 7/*                       December 1, 1991                       */
 8/*                                                              */
 9/*                      Copyright (c) 1995                      */
10/*                      Pasquale J. Villani                     */
11/*                      All Rights Reserved                     */
12/*                                                              */
13/* This file is part of DOS-C.                                  */
14/*                                                              */
15/* DOS-C is free software; you can redistribute it and/or       */
16/* modify it under the terms of the GNU General Public License  */
17/* as published by the Free Software Foundation; either version */
18/* 2, or (at your option) any later version.                    */
19/*                                                              */
20/* DOS-C is distributed in the hope that it will be useful, but */
21/* WITHOUT ANY WARRANTY; without even the implied warranty of   */
22/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See    */
23/* the GNU General Public License for more details.             */
24/*                                                              */
25/* You should have received a copy of the GNU General Public    */
26/* License along with DOS-C; see the file COPYING.  If not,     */
27/* write to the Free Software Foundation, 675 Mass Ave,         */
28/* Cambridge, MA 02139, USA.                                    */
29/****************************************************************/
30
31#ifdef MAIN
32#ifdef VERSION_STRINGS
33static BYTE *error_hRcsId =
34    "$Id: error.h 485 2002-12-09 00:17:15Z bartoldeman $";
35#endif
36#endif
37
38/* Internal system error returns                                */
39#define SUCCESS         0       /* Function was successful      */
40#define DE_INVLDFUNC    -1      /* Invalid function number      */
41#define DE_FILENOTFND   -2      /* File not found               */
42#define DE_PATHNOTFND   -3      /* Path not found               */
43#define DE_TOOMANY      -4      /* Too many open files          */
44#define DE_ACCESS       -5      /* Access denied                */
45#define DE_INVLDHNDL    -6      /* Invalid handle               */
46#define DE_MCBDESTRY    -7      /* Memory control blocks shot   */
47#define DE_NOMEM        -8      /* Insufficient memory          */
48#define DE_INVLDMCB     -9      /* Invalid memory control block */
49#define DE_INVLDENV     -10     /* Invalid enviornement         */
50#define DE_INVLDFMT     -11     /* Invalid format               */
51#define DE_INVLDACC     -12     /* Invalid access               */
52#define DE_INVLDDATA    -13     /* Invalid data                 */
53#define DE_INVLDDRV     -15     /* Invalid drive                */
54#define DE_RMVCUDIR     -16     /* Attempt remove current dir   */
55#define DE_DEVICE       -17     /* Not same device              */
56#define DE_NFILES       -18     /* No more files                */
57#define DE_WRTPRTCT     -19     /* No more files                */
58#define DE_BLKINVLD     -20     /* invalid block                */
59#define DE_INVLDBUF     -24     /* invalid buffer size, ext fnc */
60#define DE_SEEK         -25     /* error on file seek           */
61#define DE_HNDLDSKFULL  -28     /* handle disk full (?)         */
62
63#define DE_INVLDPARM    -0x57   /* invalid parameter */
64
65#define DE_DEADLOCK	-36
66#define DE_LOCK		-39
67
68#define DE_FILEEXISTS   -80     /* File exists                  */
69
70/* Critical error flags                                         */
71#define EFLG_READ       0x00    /* Read error                   */
72#define EFLG_WRITE      0x01    /* Write error                  */
73#define EFLG_RSVRD      0x00    /* Error in rserved area        */
74#define EFLG_FAT        0x02    /* Error in FAT area            */
75#define EFLG_DIR        0x04    /* Error in dir area            */
76#define EFLG_DATA       0x06    /* Error in data area           */
77#define EFLG_ABORT      0x08    /* Handler can abort            */
78#define EFLG_RETRY      0x10    /* Handler can retry            */
79#define EFLG_IGNORE     0x20    /* Handler can ignore           */
80#define EFLG_CHAR       0x80    /* Error in char or FAT image   */
81
82/* error results returned after asking user                     */
83/* MS-DOS compatible -- returned by CriticalError               */
84#define CONTINUE        0
85#define RETRY           1
86#define ABORT           2
87#define FAIL            3
88