~ubuntu-branches/ubuntu/dapper/vice/dapper

« back to all changes in this revision

Viewing changes to src/cbmdos.h

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2004-08-26 13:35:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040826133551-gcje8j31q5cqgdq2
Tags: 1.14-3
Apply patch from Spiro Trikaliotis <vice@trikaliotis.net> to fix a
problem that some users were experiencing with a floating point
exception on startup related to the fullscreen option being enabled
during compile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * cbmdos.h - Common CBM DOS routines.
 
3
 *
 
4
 * Written by
 
5
 *  Andreas Boose <viceteam@t-online.de>
 
6
 *
 
7
 * This file is part of VICE, the Versatile Commodore Emulator.
 
8
 * See README for copyright notice.
 
9
 *
 
10
 *  This program is free software; you can redistribute it and/or modify
 
11
 *  it under the terms of the GNU General Public License as published by
 
12
 *  the Free Software Foundation; either version 2 of the License, or
 
13
 *  (at your option) any later version.
 
14
 *
 
15
 *  This program is distributed in the hope that it will be useful,
 
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 *  GNU General Public License for more details.
 
19
 *
 
20
 *  You should have received a copy of the GNU General Public License
 
21
 *  along with this program; if not, write to the Free Software
 
22
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 
23
 *  02111-1307  USA.
 
24
 *
 
25
 */
 
26
 
 
27
#ifndef _CBMDOS_H
 
28
#define _CBMDOS_H
 
29
 
 
30
#include "types.h"
 
31
 
 
32
/* CBM DOS Input Processor Error Codes.  */
 
33
#define CBMDOS_IPE_OK                      0
 
34
#define CBMDOS_IPE_DELETED                 1
 
35
#define CBMDOS_IPE_SEL_PARTN               2   /* 1581 */
 
36
#define CBMDOS_IPE_UNIMPL                  3
 
37
#define CBMDOS_IPE_MEMORY_READ             4
 
38
 
 
39
#define CBMDOS_IPE_WRITE_ERROR             25
 
40
#define CBMDOS_IPE_WRITE_PROTECT_ON        26
 
41
#define CBMDOS_IPE_SYNTAX                  30
 
42
#define CBMDOS_IPE_INVAL                   31
 
43
#define CBMDOS_IPE_LONG_LINE               32
 
44
#define CBMDOS_IPE_BAD_NAME                33
 
45
#define CBMDOS_IPE_NO_NAME                 34
 
46
 
 
47
#define CBMDOS_IPE_NO_RECORD               50
 
48
#define CBMDOS_IPE_OVERFLOW                51
 
49
 
 
50
#define CBMDOS_IPE_NOT_WRITE               60
 
51
#define CBMDOS_IPE_NOT_OPEN                61
 
52
#define CBMDOS_IPE_NOT_FOUND               62
 
53
#define CBMDOS_IPE_FILE_EXISTS             63
 
54
#define CBMDOS_IPE_BAD_TYPE                64
 
55
#define CBMDOS_IPE_NO_BLOCK                65
 
56
#define CBMDOS_IPE_ILLEGAL_TRACK_OR_SECTOR 66
 
57
 
 
58
#define CBMDOS_IPE_NO_CHANNEL              70
 
59
#define CBMDOS_IPE_DISK_FULL               72
 
60
#define CBMDOS_IPE_DOS_VERSION             73
 
61
#define CBMDOS_IPE_NOT_READY               74
 
62
#define CBMDOS_IPE_BAD_PARTN               77  /* 1581 */
 
63
 
 
64
#define CBMDOS_IPE_NOT_EMPTY               80  /* dir to remove not empty */
 
65
#define CBMDOS_IPE_PERMISSION              81  /* permission denied */
 
66
 
 
67
/* CBM DOS File Types */
 
68
#define CBMDOS_FT_DEL         0
 
69
#define CBMDOS_FT_SEQ         1
 
70
#define CBMDOS_FT_PRG         2
 
71
#define CBMDOS_FT_USR         3
 
72
#define CBMDOS_FT_REL         4
 
73
#define CBMDOS_FT_CBM         5       /* 1581 partition */
 
74
#define CBMDOS_FT_REPLACEMENT 0x20
 
75
#define CBMDOS_FT_LOCKED      0x40
 
76
#define CBMDOS_FT_CLOSED      0x80
 
77
 
 
78
/* CBM DOS Access Control Methods */
 
79
#define CBMDOS_FAM_READ   0
 
80
#define CBMDOS_FAM_WRITE  1
 
81
#define CBMDOS_FAM_APPEND 2
 
82
 
 
83
/* CBM DOS directory definitions.  */
 
84
#define CBMDOS_SLOT_NAME_LENGTH 16
 
85
 
 
86
 
 
87
struct cbmdos_cmd_parse_s {
 
88
    const char *cmd;
 
89
    unsigned int cmdlength;
 
90
    char *parsecmd;
 
91
    unsigned int secondary;
 
92
    unsigned int parselength;
 
93
    unsigned int readmode;
 
94
    unsigned int filetype;
 
95
    unsigned int recordlength;
 
96
};
 
97
typedef struct cbmdos_cmd_parse_s cbmdos_cmd_parse_t;
 
98
 
 
99
 
 
100
extern const char *cbmdos_errortext(unsigned int code);
 
101
extern const char *cbmdos_filetype_get(unsigned int filetype);
 
102
 
 
103
extern unsigned int cbmdos_parse_wildcard_check(const char *name,
 
104
                                                unsigned int len);
 
105
extern unsigned int cbmdos_parse_wildcard_compare(const BYTE *name1,
 
106
                                                  const BYTE *name2);
 
107
extern BYTE *cbmdos_dir_slot_create(const char *name, unsigned int len);
 
108
 
 
109
extern unsigned int cbmdos_command_parse(cbmdos_cmd_parse_t *cmd_parse);
 
110
 
 
111
#endif
 
112