forked from jozip/cdirip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.h
55 lines (41 loc) · 1.28 KB
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef __COMMON_H__
#define __COMMON_H__
/* Error codes */
#define ERR_GENERIC 0L
#define ERR_OPENIMAGE 0x01
#define ERR_SAVETRACK 0x02
#define ERR_READIMAGE 0x03
#define ERR_SAVEIMAGE 0x04
#define ERR_PATH 0x05
/* For Debug only! */
// #define DEBUG_CDI
/* Basic structures */
typedef struct image_s
{
long header_offset;
long header_position;
long length;
unsigned long version;
unsigned short int sessions;
unsigned short int tracks;
unsigned short int remaining_sessions;
unsigned short int remaining_tracks;
unsigned short int global_current_session;
} image_s;
typedef struct track_s
{
unsigned short int global_current_track;
unsigned short int number;
long position;
unsigned long mode;
unsigned long sector_size;
unsigned long sector_size_value;
long length;
long pregap_length;
long total_length;
unsigned long start_lba;
unsigned char filename_length;
} track_s;
/* Functions */
void error_exit(long errcode, char *string);
#endif