-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathvobcopy.h
More file actions
182 lines (143 loc) · 3 KB
/
Copy pathvobcopy.h
File metadata and controls
182 lines (143 loc) · 3 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#ifndef VOBCOPY_H
#define VOBCOPY_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define DVDCSS_VERBOSE 1
#define BLOCK_COUNT 64
#define MAX_STRING 81
#define MAX_DIFFER 2000
#define PATH_BUFFER_SIZE 255
#define DEFAULT_DVD_NAME "insert_name_here"
#ifdef ENABLE_NLS
#define _(Text) gettext(Text)
#else
#define _(Text) Text
#endif
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
#ifdef HAVE_LIBINTL_H
#include <libintl.h>
#endif
#ifdef HAVE_FEATURES_H
#include <features.h>
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#include <string.h>
#include <ctype.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <dirent.h> /*for readdir*/
#include <errno.h>
#include <signal.h>
#include <time.h>
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_GETMNTINFO
#define USE_GETMNTINFO
#endif
#ifndef HAVE_STDBOOL_H
typedef enum { FALSE=0, TRUE=1 } bool;
#else
#include <stdbool.h>
#ifndef TRUE
#define TRUE true
#define FALSE false
#endif
#endif
#ifdef HAVE_SYS_MNTTAB_H
#include <sys/mnttab.h>
#endif
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#define USE_STATFS
/* #define USE_STATFS_FOR_DEV */
#endif
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#ifndef USE_STATFS
#define USE_STATVFS
#ifndef USE_STATFS_FOR_DEV
#define USE_STATVFS_FOR_DEV
#endif
#endif
#endif
#ifdef HAVE_MNTENT_H
#include <mntent.h>
#endif
#ifdef HAVE_GETMNTINFO
#define USE_GETMNTINFO
#define GETMNTINFO_USES_STATFS
#ifdef USE_STATVFS_FOR_DEV
#undef USE_STATVFS_FOR_DEV
#endif
#ifndef USE_STATFS_FOR_DEV
#define USE_STATFS_FOR_DEV
#endif
#endif
#include <dvdread/dvd_reader.h>
/*for/from play_title.c*/
#ifdef HAVE_ASSERT_H
#include <assert.h>
#endif
#include <dvdread/ifo_types.h>
#include <dvdread/ifo_read.h>
/* #include <dvdread/dvd_udf.h> */
#include <dvdread/nav_read.h>
#include <dvdread/nav_print.h>
#include "dvd.h"
#include "common.h"
void usage(char *);
int add_end_slash( char * );
off_t get_free_space( char *, int );
off_t get_used_space( char *path, int verbosity_level );
int make_output_path( char *, char *, char *, int, int );
int is_nav_pack( unsigned char *buffer );
void re_name( char *output_file );
int makedir( char *name );
void install_signal_handlers();
void watchdog_handler( int signal );
void shutdown_handler( int signal );
int check_progress( void ); /* this can be removed because the one below supersedes it */
int progressUpdate( int starttime, int cur, int tot, int force );
#ifndef HAVE_FDATASYNC
#define fdatasync(fd) 0
#endif
#endif