1 /* cdbackup.h. |
1 /* cdbackup.h. |
2 Copyright (c) 2000-2002 Craig Condit, Stefan Hülswitt. |
2 Copyright (c) 2000-2004 Craig Condit, Stefan Hülswitt. |
3 |
3 |
4 Redistribution and use in source and binary forms, with or without |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
5 modification, are permitted provided that the following conditions are met: |
6 |
6 |
7 1. Redistributions of source code must retain the above copyright notice, |
7 1. Redistributions of source code must retain the above copyright notice, |
32 #define SHORT_HDR "cdbackup" |
32 #define SHORT_HDR "cdbackup" |
33 #define HDR_STRING SHORT_HDR" "VERSION |
33 #define HDR_STRING SHORT_HDR" "VERSION |
34 |
34 |
35 #define MIN_BLOCKS 2 /* min. required blocks for a session: header block, one data block */ |
35 #define MIN_BLOCKS 2 /* min. required blocks for a session: header block, one data block */ |
36 |
36 |
|
37 #define F_NONE 0 /* flag values */ |
|
38 #define F_CRC 1 /* backup has CRC checksum */ |
|
39 |
37 struct header_block { |
40 struct header_block { |
38 char id_str[33]; /* recorder id string (32 chars) */ |
41 char id_str[33]; /* recorder id string (32 chars) */ |
39 char vol_id[33]; /* volume label (32 characters) */ |
42 char vol_id[33]; /* volume label (32 characters) */ |
40 char t_stamp[13]; /* timestamp */ |
43 char t_stamp[13]; /* timestamp */ |
41 char disk_set; /* disk number - starts with 1 on multi-disk set */ |
44 char disk_set; /* disk number - starts with 1 on multi-disk set */ |
|
45 char flags; /* flags for the backup set */ |
42 }; |
46 }; |
43 |
47 |
44 struct data_block { |
48 struct data_block { |
45 char status; /* status of block (0=continue, 1=done, 2=disk full) */ |
49 char status; /* status of block (0=continue, 1=done, 2=disk full) */ |
46 char reserved; /* reserved byte to make structure 4 bytes long */ |
50 char flags; /* flags for this data block */ |
47 short datasize; /* # of bytes in block (max = CD_FRAMESIZE-this) */ |
51 short datasize; /* # of bytes in block (max = CD_FRAMESIZE-this) */ |
48 }; |
52 }; |
|
53 |
|
54 extern int padsize; |
|
55 extern long cd_len; |
|
56 extern int verbose; |
|
57 extern char *prg_name; |
|
58 |
|
59 void start_cdrecord(void); |
49 |
60 |
50 #define DBSIZE sizeof(struct data_block) |
61 #define DBSIZE sizeof(struct data_block) |
51 #define DATASIZE (CD_FRAMESIZE-DBSIZE) |
62 #define DATASIZE (CD_FRAMESIZE-DBSIZE) |
52 |
63 |
53 #endif |
64 #endif |