rbcdio 0.01

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/AUTHORS +1 -0
  2. data/COPYING +340 -0
  3. data/ChangeLog +315 -0
  4. data/INSTALL +236 -0
  5. data/Makefile.am +163 -0
  6. data/Makefile.in +557 -0
  7. data/NEWS +5 -0
  8. data/README +75 -0
  9. data/Rakefile +234 -0
  10. data/THANKS +3 -0
  11. data/VERSION +1 -0
  12. data/VERSION.in +1 -0
  13. data/config.guess +1473 -0
  14. data/config.sub +1576 -0
  15. data/configure +4802 -0
  16. data/configure.ac +158 -0
  17. data/data/copying.iso +0 -0
  18. data/data/isofs-m1.bin +0 -0
  19. data/data/isofs-m1.cue +3 -0
  20. data/doc/created.rid +1 -0
  21. data/doc/fr_class_index.html +42 -0
  22. data/doc/fr_file_index.html +40 -0
  23. data/doc/fr_method_index.html +133 -0
  24. data/doc/index.html +24 -0
  25. data/doc/rdoc-style.css +208 -0
  26. data/example/COPYING +340 -0
  27. data/example/README +47 -0
  28. data/example/audio.rb +186 -0
  29. data/example/cd-read.rb +167 -0
  30. data/example/copying +340 -0
  31. data/example/device.rb +91 -0
  32. data/example/drivers.rb +63 -0
  33. data/example/drives.rb +63 -0
  34. data/example/eject.rb +69 -0
  35. data/example/iso1.rb +89 -0
  36. data/example/iso2.rb +106 -0
  37. data/example/iso3.rb +111 -0
  38. data/example/tracks.rb +83 -0
  39. data/ext/cdio/Makefile +139 -0
  40. data/ext/cdio/extconf.rb +9 -0
  41. data/ext/cdio/rubycdio_wrap.c +3410 -0
  42. data/ext/iso9660/Makefile +139 -0
  43. data/ext/iso9660/extconf.rb +10 -0
  44. data/ext/iso9660/rubyiso9660_wrap.c +3005 -0
  45. data/install-sh +323 -0
  46. data/lib/Makefile +7 -0
  47. data/lib/cdio.rb +1000 -0
  48. data/lib/iso9660.rb +566 -0
  49. data/missing +360 -0
  50. data/rubycdio.m4 +14 -0
  51. data/swig/Makefile +7 -0
  52. data/swig/audio.swg +63 -0
  53. data/swig/compat.swg +104 -0
  54. data/swig/device.swg +513 -0
  55. data/swig/device_const.swg +144 -0
  56. data/swig/disc.swg +96 -0
  57. data/swig/read.swg +164 -0
  58. data/swig/rubycdio.swg +86 -0
  59. data/swig/rubyiso9660.swg +827 -0
  60. data/swig/track.swg +206 -0
  61. data/swig/types.swg +65 -0
  62. data/test/Makefile +7 -0
  63. data/test/Rakefile +8 -0
  64. data/test/cdda.bin +0 -0
  65. data/test/cdda.cue +7 -0
  66. data/test/cdda.toc +14 -0
  67. data/test/cdiotest.rb +228 -0
  68. data/test/isocopy.rb +394 -0
  69. data/test/isotest.rb +187 -0
  70. metadata +116 -0
@@ -0,0 +1,3005 @@
1
+ /* ----------------------------------------------------------------------------
2
+ * This file was automatically generated by SWIG (http://www.swig.org).
3
+ * Version 1.3.27
4
+ *
5
+ * This file is not intended to be easily readable and contains a number of
6
+ * coding conventions designed to improve portability and efficiency. Do not make
7
+ * changes to this file unless you know what you are doing--modify the SWIG
8
+ * interface file instead.
9
+ * ----------------------------------------------------------------------------- */
10
+
11
+ /***********************************************************************
12
+ *
13
+ * This section contains generic SWIG labels for method/variable
14
+ * declarations/attributes, and other compiler dependent labels.
15
+ *
16
+ ************************************************************************/
17
+
18
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
19
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
20
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
21
+ # define SWIGTEMPLATEDISAMBIGUATOR template
22
+ # else
23
+ # define SWIGTEMPLATEDISAMBIGUATOR
24
+ # endif
25
+ #endif
26
+
27
+ /* inline attribute */
28
+ #ifndef SWIGINLINE
29
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
30
+ # define SWIGINLINE inline
31
+ # else
32
+ # define SWIGINLINE
33
+ # endif
34
+ #endif
35
+
36
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
37
+ #ifndef SWIGUNUSED
38
+ # if defined(__GNUC__) || defined(__ICC)
39
+ # define SWIGUNUSED __attribute__ ((unused))
40
+ # else
41
+ # define SWIGUNUSED
42
+ # endif
43
+ #endif
44
+
45
+ /* internal SWIG method */
46
+ #ifndef SWIGINTERN
47
+ # define SWIGINTERN static SWIGUNUSED
48
+ #endif
49
+
50
+ /* internal inline SWIG method */
51
+ #ifndef SWIGINTERNINLINE
52
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
53
+ #endif
54
+
55
+ /* exporting methods for Windows DLLs */
56
+ #ifndef SWIGEXPORT
57
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
58
+ # if defined(STATIC_LINKED)
59
+ # define SWIGEXPORT
60
+ # else
61
+ # define SWIGEXPORT __declspec(dllexport)
62
+ # endif
63
+ # else
64
+ # define SWIGEXPORT
65
+ # endif
66
+ #endif
67
+
68
+ /* calling conventions for Windows */
69
+ #ifndef SWIGSTDCALL
70
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
71
+ # define SWIGSTDCALL __stdcall
72
+ # else
73
+ # define SWIGSTDCALL
74
+ # endif
75
+ #endif
76
+
77
+
78
+ /* ruby.swg */
79
+ /* Implementation : RUBY */
80
+ #define SWIGRUBY 1
81
+
82
+ #include "ruby.h"
83
+
84
+ /* Flags for pointer conversion */
85
+ #define SWIG_POINTER_EXCEPTION 0x1
86
+ #define SWIG_POINTER_OWN 0x1
87
+ #define SWIG_POINTER_DISOWN 0x2
88
+ #define SWIG_TRACK_OBJECTS 0x4
89
+
90
+ #define NUM2USHRT(n) (\
91
+ (0 <= NUM2UINT(n) && NUM2UINT(n) <= USHRT_MAX)\
92
+ ? (unsigned short) NUM2UINT(n) \
93
+ : (rb_raise(rb_eArgError, "integer %d out of range of `unsigned short'",\
94
+ NUM2UINT(n)), (short)0)\
95
+ )
96
+
97
+ #define NUM2SHRT(n) (\
98
+ (SHRT_MIN <= NUM2INT(n) && NUM2INT(n) <= SHRT_MAX)\
99
+ ? (short)NUM2INT(n)\
100
+ : (rb_raise(rb_eArgError, "integer %d out of range of `short'",\
101
+ NUM2INT(n)), (short)0)\
102
+ )
103
+
104
+ /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
105
+ #ifndef NUM2LL
106
+ #define NUM2LL(x) NUM2LONG((x))
107
+ #endif
108
+ #ifndef LL2NUM
109
+ #define LL2NUM(x) INT2NUM((long) (x))
110
+ #endif
111
+ #ifndef ULL2NUM
112
+ #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
113
+ #endif
114
+
115
+ /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
116
+ #ifndef NUM2ULL
117
+ #ifdef HAVE_LONG_LONG
118
+ #define NUM2ULL(x) rb_num2ull((x))
119
+ #else
120
+ #define NUM2ULL(x) NUM2ULONG(x)
121
+ #endif
122
+ #endif
123
+
124
+ /*
125
+ * Need to be very careful about how these macros are defined, especially
126
+ * when compiling C++ code or C code with an ANSI C compiler.
127
+ *
128
+ * VALUEFUNC(f) is a macro used to typecast a C function that implements
129
+ * a Ruby method so that it can be passed as an argument to API functions
130
+ * like rb_define_method() and rb_define_singleton_method().
131
+ *
132
+ * VOIDFUNC(f) is a macro used to typecast a C function that implements
133
+ * either the "mark" or "free" stuff for a Ruby Data object, so that it
134
+ * can be passed as an argument to API functions like Data_Wrap_Struct()
135
+ * and Data_Make_Struct().
136
+ */
137
+
138
+ #ifdef __cplusplus
139
+ # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
140
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
141
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
142
+ # define VOIDFUNC(f) ((void (*)()) f)
143
+ # else
144
+ # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
145
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
146
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
147
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
148
+ # else /* These definitions should work for Ruby 1.7+ */
149
+ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
150
+ # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
151
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
152
+ # endif
153
+ # endif
154
+ #else
155
+ # define VALUEFUNC(f) (f)
156
+ # define VOIDFUNC(f) (f)
157
+ #endif
158
+
159
+ typedef struct {
160
+ VALUE klass;
161
+ VALUE mImpl;
162
+ void (*mark)(void *);
163
+ void (*destroy)(void *);
164
+ } swig_class;
165
+
166
+ /* Don't use for expressions have side effect */
167
+ #ifndef RB_STRING_VALUE
168
+ #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
169
+ #endif
170
+ #ifndef StringValue
171
+ #define StringValue(s) RB_STRING_VALUE(s)
172
+ #endif
173
+ #ifndef StringValuePtr
174
+ #define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr
175
+ #endif
176
+ #ifndef StringValueLen
177
+ #define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
178
+ #endif
179
+ #ifndef SafeStringValue
180
+ #define SafeStringValue(v) do {\
181
+ StringValue(v);\
182
+ rb_check_safe_str(v);\
183
+ } while (0)
184
+ #endif
185
+
186
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
187
+ #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
188
+ #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
189
+ #endif
190
+
191
+ /* Contract support */
192
+
193
+ #define SWIG_contract_assert(expr, msg) if (!(expr)) { rb_raise(rb_eRuntimeError, (char *) msg ); } else
194
+
195
+
196
+ /***********************************************************************
197
+ * swigrun.swg
198
+ *
199
+ * This file contains generic CAPI SWIG runtime support for pointer
200
+ * type checking.
201
+ *
202
+ ************************************************************************/
203
+
204
+ /* This should only be incremented when either the layout of swig_type_info changes,
205
+ or for whatever reason, the runtime changes incompatibly */
206
+ #define SWIG_RUNTIME_VERSION "2"
207
+
208
+ /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
209
+ #ifdef SWIG_TYPE_TABLE
210
+ # define SWIG_QUOTE_STRING(x) #x
211
+ # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
212
+ # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
213
+ #else
214
+ # define SWIG_TYPE_TABLE_NAME
215
+ #endif
216
+
217
+ /*
218
+ You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
219
+ creating a static or dynamic library from the swig runtime code.
220
+ In 99.9% of the cases, swig just needs to declare them as 'static'.
221
+
222
+ But only do this if is strictly necessary, ie, if you have problems
223
+ with your compiler or so.
224
+ */
225
+
226
+ #ifndef SWIGRUNTIME
227
+ # define SWIGRUNTIME SWIGINTERN
228
+ #endif
229
+
230
+ #ifndef SWIGRUNTIMEINLINE
231
+ # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
232
+ #endif
233
+
234
+ #include <string.h>
235
+
236
+ #ifdef __cplusplus
237
+ extern "C" {
238
+ #endif
239
+
240
+ typedef void *(*swig_converter_func)(void *);
241
+ typedef struct swig_type_info *(*swig_dycast_func)(void **);
242
+
243
+ /* Structure to store inforomation on one type */
244
+ typedef struct swig_type_info {
245
+ const char *name; /* mangled name of this type */
246
+ const char *str; /* human readable name of this type */
247
+ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
248
+ struct swig_cast_info *cast; /* linked list of types that can cast into this type */
249
+ void *clientdata; /* language specific type data */
250
+ } swig_type_info;
251
+
252
+ /* Structure to store a type and conversion function used for casting */
253
+ typedef struct swig_cast_info {
254
+ swig_type_info *type; /* pointer to type that is equivalent to this type */
255
+ swig_converter_func converter; /* function to cast the void pointers */
256
+ struct swig_cast_info *next; /* pointer to next cast in linked list */
257
+ struct swig_cast_info *prev; /* pointer to the previous cast */
258
+ } swig_cast_info;
259
+
260
+ /* Structure used to store module information
261
+ * Each module generates one structure like this, and the runtime collects
262
+ * all of these structures and stores them in a circularly linked list.*/
263
+ typedef struct swig_module_info {
264
+ swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
265
+ size_t size; /* Number of types in this module */
266
+ struct swig_module_info *next; /* Pointer to next element in circularly linked list */
267
+ swig_type_info **type_initial; /* Array of initially generated type structures */
268
+ swig_cast_info **cast_initial; /* Array of initially generated casting structures */
269
+ void *clientdata; /* Language specific module data */
270
+ } swig_module_info;
271
+
272
+
273
+ /*
274
+ Compare two type names skipping the space characters, therefore
275
+ "char*" == "char *" and "Class<int>" == "Class<int >", etc.
276
+
277
+ Return 0 when the two name types are equivalent, as in
278
+ strncmp, but skipping ' '.
279
+ */
280
+ SWIGRUNTIME int
281
+ SWIG_TypeNameComp(const char *f1, const char *l1,
282
+ const char *f2, const char *l2) {
283
+ for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
284
+ while ((*f1 == ' ') && (f1 != l1)) ++f1;
285
+ while ((*f2 == ' ') && (f2 != l2)) ++f2;
286
+ if (*f1 != *f2) return (int)(*f1 - *f2);
287
+ }
288
+ return (l1 - f1) - (l2 - f2);
289
+ }
290
+
291
+ /*
292
+ Check type equivalence in a name list like <name1>|<name2>|...
293
+ Return 0 if not equal, 1 if equal
294
+ */
295
+ SWIGRUNTIME int
296
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
297
+ int equiv = 0;
298
+ const char* te = tb + strlen(tb);
299
+ const char* ne = nb;
300
+ while (!equiv && *ne) {
301
+ for (nb = ne; *ne; ++ne) {
302
+ if (*ne == '|') break;
303
+ }
304
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
305
+ if (*ne) ++ne;
306
+ }
307
+ return equiv;
308
+ }
309
+
310
+ /*
311
+ Check type equivalence in a name list like <name1>|<name2>|...
312
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
313
+ */
314
+ SWIGRUNTIME int
315
+ SWIG_TypeCompare(const char *nb, const char *tb) {
316
+ int equiv = 0;
317
+ const char* te = tb + strlen(tb);
318
+ const char* ne = nb;
319
+ while (!equiv && *ne) {
320
+ for (nb = ne; *ne; ++ne) {
321
+ if (*ne == '|') break;
322
+ }
323
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
324
+ if (*ne) ++ne;
325
+ }
326
+ return equiv;
327
+ }
328
+
329
+
330
+ /* think of this as a c++ template<> or a scheme macro */
331
+ #define SWIG_TypeCheck_Template(comparison, ty) \
332
+ if (ty) { \
333
+ swig_cast_info *iter = ty->cast; \
334
+ while (iter) { \
335
+ if (comparison) { \
336
+ if (iter == ty->cast) return iter; \
337
+ /* Move iter to the top of the linked list */ \
338
+ iter->prev->next = iter->next; \
339
+ if (iter->next) \
340
+ iter->next->prev = iter->prev; \
341
+ iter->next = ty->cast; \
342
+ iter->prev = 0; \
343
+ if (ty->cast) ty->cast->prev = iter; \
344
+ ty->cast = iter; \
345
+ return iter; \
346
+ } \
347
+ iter = iter->next; \
348
+ } \
349
+ } \
350
+ return 0
351
+
352
+ /*
353
+ Check the typename
354
+ */
355
+ SWIGRUNTIME swig_cast_info *
356
+ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
357
+ SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
358
+ }
359
+
360
+ /* Same as previous function, except strcmp is replaced with a pointer comparison */
361
+ SWIGRUNTIME swig_cast_info *
362
+ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
363
+ SWIG_TypeCheck_Template(iter->type == from, into);
364
+ }
365
+
366
+ /*
367
+ Cast a pointer up an inheritance hierarchy
368
+ */
369
+ SWIGRUNTIMEINLINE void *
370
+ SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
371
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
372
+ }
373
+
374
+ /*
375
+ Dynamic pointer casting. Down an inheritance hierarchy
376
+ */
377
+ SWIGRUNTIME swig_type_info *
378
+ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
379
+ swig_type_info *lastty = ty;
380
+ if (!ty || !ty->dcast) return ty;
381
+ while (ty && (ty->dcast)) {
382
+ ty = (*ty->dcast)(ptr);
383
+ if (ty) lastty = ty;
384
+ }
385
+ return lastty;
386
+ }
387
+
388
+ /*
389
+ Return the name associated with this type
390
+ */
391
+ SWIGRUNTIMEINLINE const char *
392
+ SWIG_TypeName(const swig_type_info *ty) {
393
+ return ty->name;
394
+ }
395
+
396
+ /*
397
+ Return the pretty name associated with this type,
398
+ that is an unmangled type name in a form presentable to the user.
399
+ */
400
+ SWIGRUNTIME const char *
401
+ SWIG_TypePrettyName(const swig_type_info *type) {
402
+ /* The "str" field contains the equivalent pretty names of the
403
+ type, separated by vertical-bar characters. We choose
404
+ to print the last name, as it is often (?) the most
405
+ specific. */
406
+ if (type->str != NULL) {
407
+ const char *last_name = type->str;
408
+ const char *s;
409
+ for (s = type->str; *s; s++)
410
+ if (*s == '|') last_name = s+1;
411
+ return last_name;
412
+ }
413
+ else
414
+ return type->name;
415
+ }
416
+
417
+ /*
418
+ Set the clientdata field for a type
419
+ */
420
+ SWIGRUNTIME void
421
+ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
422
+ swig_cast_info *cast = ti->cast;
423
+ /* if (ti->clientdata == clientdata) return; */
424
+ ti->clientdata = clientdata;
425
+
426
+ while (cast) {
427
+ if (!cast->converter) {
428
+ swig_type_info *tc = cast->type;
429
+ if (!tc->clientdata) {
430
+ SWIG_TypeClientData(tc, clientdata);
431
+ }
432
+ }
433
+ cast = cast->next;
434
+ }
435
+ }
436
+
437
+ /*
438
+ Search for a swig_type_info structure only by mangled name
439
+ Search is a O(log #types)
440
+
441
+ We start searching at module start, and finish searching when start == end.
442
+ Note: if start == end at the beginning of the function, we go all the way around
443
+ the circular list.
444
+ */
445
+ SWIGRUNTIME swig_type_info *
446
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
447
+ swig_module_info *end,
448
+ const char *name) {
449
+ swig_module_info *iter = start;
450
+ do {
451
+ if (iter->size) {
452
+ register size_t l = 0;
453
+ register size_t r = iter->size - 1;
454
+ do {
455
+ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
456
+ register size_t i = (l + r) >> 1;
457
+ const char *iname = iter->types[i]->name;
458
+ if (iname) {
459
+ register int compare = strcmp(name, iname);
460
+ if (compare == 0) {
461
+ return iter->types[i];
462
+ } else if (compare < 0) {
463
+ if (i) {
464
+ r = i - 1;
465
+ } else {
466
+ break;
467
+ }
468
+ } else if (compare > 0) {
469
+ l = i + 1;
470
+ }
471
+ } else {
472
+ break; /* should never happen */
473
+ }
474
+ } while (l <= r);
475
+ }
476
+ iter = iter->next;
477
+ } while (iter != end);
478
+ return 0;
479
+ }
480
+
481
+ /*
482
+ Search for a swig_type_info structure for either a mangled name or a human readable name.
483
+ It first searches the mangled names of the types, which is a O(log #types)
484
+ If a type is not found it then searches the human readable names, which is O(#types).
485
+
486
+ We start searching at module start, and finish searching when start == end.
487
+ Note: if start == end at the beginning of the function, we go all the way around
488
+ the circular list.
489
+ */
490
+ SWIGRUNTIME swig_type_info *
491
+ SWIG_TypeQueryModule(swig_module_info *start,
492
+ swig_module_info *end,
493
+ const char *name) {
494
+ /* STEP 1: Search the name field using binary search */
495
+ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
496
+ if (ret) {
497
+ return ret;
498
+ } else {
499
+ /* STEP 2: If the type hasn't been found, do a complete search
500
+ of the str field (the human readable name) */
501
+ swig_module_info *iter = start;
502
+ do {
503
+ register size_t i = 0;
504
+ for (; i < iter->size; ++i) {
505
+ if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
506
+ return iter->types[i];
507
+ }
508
+ iter = iter->next;
509
+ } while (iter != end);
510
+ }
511
+
512
+ /* neither found a match */
513
+ return 0;
514
+ }
515
+
516
+
517
+ /*
518
+ Pack binary data into a string
519
+ */
520
+ SWIGRUNTIME char *
521
+ SWIG_PackData(char *c, void *ptr, size_t sz) {
522
+ static const char hex[17] = "0123456789abcdef";
523
+ register const unsigned char *u = (unsigned char *) ptr;
524
+ register const unsigned char *eu = u + sz;
525
+ for (; u != eu; ++u) {
526
+ register unsigned char uu = *u;
527
+ *(c++) = hex[(uu & 0xf0) >> 4];
528
+ *(c++) = hex[uu & 0xf];
529
+ }
530
+ return c;
531
+ }
532
+
533
+ /*
534
+ Unpack binary data from a string
535
+ */
536
+ SWIGRUNTIME const char *
537
+ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
538
+ register unsigned char *u = (unsigned char *) ptr;
539
+ register const unsigned char *eu = u + sz;
540
+ for (; u != eu; ++u) {
541
+ register char d = *(c++);
542
+ register unsigned char uu = 0;
543
+ if ((d >= '0') && (d <= '9'))
544
+ uu = ((d - '0') << 4);
545
+ else if ((d >= 'a') && (d <= 'f'))
546
+ uu = ((d - ('a'-10)) << 4);
547
+ else
548
+ return (char *) 0;
549
+ d = *(c++);
550
+ if ((d >= '0') && (d <= '9'))
551
+ uu |= (d - '0');
552
+ else if ((d >= 'a') && (d <= 'f'))
553
+ uu |= (d - ('a'-10));
554
+ else
555
+ return (char *) 0;
556
+ *u = uu;
557
+ }
558
+ return c;
559
+ }
560
+
561
+ /*
562
+ Pack 'void *' into a string buffer.
563
+ */
564
+ SWIGRUNTIME char *
565
+ SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
566
+ char *r = buff;
567
+ if ((2*sizeof(void *) + 2) > bsz) return 0;
568
+ *(r++) = '_';
569
+ r = SWIG_PackData(r,&ptr,sizeof(void *));
570
+ if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
571
+ strcpy(r,name);
572
+ return buff;
573
+ }
574
+
575
+ SWIGRUNTIME const char *
576
+ SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
577
+ if (*c != '_') {
578
+ if (strcmp(c,"NULL") == 0) {
579
+ *ptr = (void *) 0;
580
+ return name;
581
+ } else {
582
+ return 0;
583
+ }
584
+ }
585
+ return SWIG_UnpackData(++c,ptr,sizeof(void *));
586
+ }
587
+
588
+ SWIGRUNTIME char *
589
+ SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
590
+ char *r = buff;
591
+ size_t lname = (name ? strlen(name) : 0);
592
+ if ((2*sz + 2 + lname) > bsz) return 0;
593
+ *(r++) = '_';
594
+ r = SWIG_PackData(r,ptr,sz);
595
+ if (lname) {
596
+ strncpy(r,name,lname+1);
597
+ } else {
598
+ *r = 0;
599
+ }
600
+ return buff;
601
+ }
602
+
603
+ SWIGRUNTIME const char *
604
+ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
605
+ if (*c != '_') {
606
+ if (strcmp(c,"NULL") == 0) {
607
+ memset(ptr,0,sz);
608
+ return name;
609
+ } else {
610
+ return 0;
611
+ }
612
+ }
613
+ return SWIG_UnpackData(++c,ptr,sz);
614
+ }
615
+
616
+ #ifdef __cplusplus
617
+ }
618
+ #endif
619
+
620
+ /***********************************************************************
621
+ * rubytracking.swg
622
+ *
623
+ * This file contains support for tracking mappings from
624
+ * Ruby objects to C++ objects. This functionality is needed
625
+ * to implement mark functions for Ruby's mark and sweep
626
+ * garbage collector.
627
+ ************************************************************************/
628
+
629
+ /* Global Ruby hash table to store Trackings from C/C++
630
+ structs to Ruby Objects. */
631
+ static VALUE swig_ruby_trackings;
632
+
633
+ /* Setup a Ruby hash table to store Trackings */
634
+ static void SWIG_RubyInitializeTrackings() {
635
+ /* Create a ruby hash table to store Trackings from C++
636
+ objects to Ruby objects. Also make sure to tell
637
+ the garabage collector about the hash table. */
638
+ swig_ruby_trackings = rb_hash_new();
639
+ rb_gc_register_address(&swig_ruby_trackings);
640
+ }
641
+
642
+ /* Get a Ruby number to reference a pointer */
643
+ static VALUE SWIG_RubyPtrToReference(void* ptr) {
644
+ /* We cast the pointer to an unsigned long
645
+ and then store a reference to it using
646
+ a Ruby number object. */
647
+
648
+ /* Convert the pointer to a Ruby number */
649
+ unsigned long value = (unsigned long) ptr;
650
+ return LONG2NUM(value);
651
+ }
652
+
653
+ /* Get a Ruby number to reference an object */
654
+ static VALUE SWIG_RubyObjectToReference(VALUE object) {
655
+ /* We cast the object to an unsigned long
656
+ and then store a reference to it using
657
+ a Ruby number object. */
658
+
659
+ /* Convert the Object to a Ruby number */
660
+ unsigned long value = (unsigned long) object;
661
+ return LONG2NUM(value);
662
+ }
663
+
664
+ /* Get a Ruby object from a previously stored reference */
665
+ static VALUE SWIG_RubyReferenceToObject(VALUE reference) {
666
+ /* The provided Ruby number object is a reference
667
+ to the Ruby object we want.*/
668
+
669
+ /* First convert the Ruby number to a C number */
670
+ unsigned long value = NUM2LONG(reference);
671
+ return (VALUE) value;
672
+ }
673
+
674
+ /* Add a Tracking from a C/C++ struct to a Ruby object */
675
+ static void SWIG_RubyAddTracking(void* ptr, VALUE object) {
676
+ /* In a Ruby hash table we store the pointer and
677
+ the associated Ruby object. The trick here is
678
+ that we cannot store the Ruby object directly - if
679
+ we do then it cannot be garbage collected. So
680
+ instead we typecast it as a unsigned long and
681
+ convert it to a Ruby number object.*/
682
+
683
+ /* Get a reference to the pointer as a Ruby number */
684
+ VALUE key = SWIG_RubyPtrToReference(ptr);
685
+
686
+ /* Get a reference to the Ruby object as a Ruby number */
687
+ VALUE value = SWIG_RubyObjectToReference(object);
688
+
689
+ /* Store the mapping to the global hash table. */
690
+ rb_hash_aset(swig_ruby_trackings, key, value);
691
+ }
692
+
693
+ /* Get the Ruby object that owns the specified C/C++ struct */
694
+ static VALUE SWIG_RubyInstanceFor(void* ptr) {
695
+ /* Get a reference to the pointer as a Ruby number */
696
+ VALUE key = SWIG_RubyPtrToReference(ptr);
697
+
698
+ /* Now lookup the value stored in the global hash table */
699
+ VALUE value = rb_hash_aref(swig_ruby_trackings, key);
700
+
701
+ if (value == Qnil) {
702
+ /* No object exists - return nil. */
703
+ return Qnil;
704
+ }
705
+ else {
706
+ /* Convert this value to Ruby object */
707
+ return SWIG_RubyReferenceToObject(value);
708
+ }
709
+ }
710
+
711
+ /* Remove a Tracking from a C/C++ struct to a Ruby object */
712
+ static void SWIG_RubyRemoveTracking(void* ptr) {
713
+ /* Get a reference to the pointer as a Ruby number */
714
+ VALUE key = SWIG_RubyPtrToReference(ptr);
715
+
716
+ /* Define delete method - in C++ this could be marked as
717
+ static but unfortunately not in C. */
718
+ VALUE delete_function = rb_intern("delete");
719
+
720
+ /* Delete the object from the hash table by calling Ruby's
721
+ do this we need to call the Hash.delete method.*/
722
+ rb_funcall(swig_ruby_trackings, delete_function, 1, key);
723
+ }
724
+
725
+ /* This is a helper method that unlinks a Ruby object from its
726
+ underlying C++ object. This is needed if the lifetime of the
727
+ Ruby object is longer than the C++ object */
728
+ static void SWIG_RubyUnlinkObjects(void* ptr) {
729
+ VALUE object = SWIG_RubyInstanceFor(ptr);
730
+
731
+ if (object != Qnil) {
732
+ DATA_PTR(object) = 0;
733
+ }
734
+ }
735
+
736
+ /* Common SWIG API */
737
+ #define SWIG_ConvertPtr(obj, pp, type, flags) \
738
+ SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
739
+ #define SWIG_NewPointerObj(p, type, flags) \
740
+ SWIG_Ruby_NewPointerObj(p, type, flags)
741
+ #define SWIG_MustGetPtr(p, type, argnum, flags) \
742
+ SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
743
+ #define SWIG_GetModule(clientdata) \
744
+ SWIG_Ruby_GetModule()
745
+ #define SWIG_SetModule(clientdata, pointer) \
746
+ SWIG_Ruby_SetModule(pointer)
747
+
748
+ /* Ruby-specific SWIG API */
749
+
750
+ #define SWIG_InitRuntime() \
751
+ SWIG_Ruby_InitRuntime()
752
+ #define SWIG_define_class(ty) \
753
+ SWIG_Ruby_define_class(ty)
754
+ #define SWIG_NewClassInstance(value, ty) \
755
+ SWIG_Ruby_NewClassInstance(value, ty)
756
+ #define SWIG_MangleStr(value) \
757
+ SWIG_Ruby_MangleStr(value)
758
+ #define SWIG_CheckConvert(value, ty) \
759
+ SWIG_Ruby_CheckConvert(value, ty)
760
+ #define SWIG_NewPackedObj(ptr, sz, ty) \
761
+ SWIG_Ruby_NewPackedObj(ptr, sz, ty)
762
+ #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
763
+ SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
764
+
765
+ /* rubydef.swg */
766
+ #ifdef __cplusplus
767
+ extern "C" {
768
+ #endif
769
+
770
+ static VALUE _mSWIG = Qnil;
771
+ static VALUE _cSWIG_Pointer = Qnil;
772
+ static VALUE swig_runtime_data_type_pointer = Qnil;
773
+
774
+ /* Initialize Ruby runtime support */
775
+ static void
776
+ SWIG_Ruby_InitRuntime(void)
777
+ {
778
+ if (_mSWIG == Qnil) {
779
+ _mSWIG = rb_define_module("SWIG");
780
+ }
781
+ }
782
+
783
+ /* Define Ruby class for C type */
784
+ static void
785
+ SWIG_Ruby_define_class(swig_type_info *type)
786
+ {
787
+ VALUE klass;
788
+ char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
789
+ sprintf(klass_name, "TYPE%s", type->name);
790
+ if (NIL_P(_cSWIG_Pointer)) {
791
+ _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
792
+ rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
793
+ }
794
+ klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
795
+ free((void *) klass_name);
796
+ }
797
+
798
+ /* Create a new pointer object */
799
+ static VALUE
800
+ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
801
+ {
802
+ int own = flags & SWIG_POINTER_OWN;
803
+ int track = flags & SWIG_TRACK_OBJECTS;
804
+
805
+ char *klass_name;
806
+ swig_class *sklass;
807
+ VALUE klass;
808
+ VALUE obj;
809
+
810
+ if (!ptr)
811
+ return Qnil;
812
+
813
+ /* Have we already wrapped this pointer? */
814
+ if (track) {
815
+ obj = SWIG_RubyInstanceFor(ptr);
816
+ if (obj != Qnil) {
817
+ return obj;
818
+ }
819
+ }
820
+
821
+ if (type->clientdata) {
822
+ sklass = (swig_class *) type->clientdata;
823
+ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
824
+ } else {
825
+ klass_name = (char *) malloc(4 + strlen(type->name) + 1);
826
+ sprintf(klass_name, "TYPE%s", type->name);
827
+ klass = rb_const_get(_mSWIG, rb_intern(klass_name));
828
+ free((void *) klass_name);
829
+ obj = Data_Wrap_Struct(klass, 0, 0, ptr);
830
+ }
831
+ rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
832
+
833
+ /* Keep track of this object if necessary */
834
+ if (track) {
835
+ SWIG_RubyAddTracking(ptr, obj);
836
+ }
837
+
838
+ return obj;
839
+ }
840
+
841
+ /* Create a new class instance (always owned) */
842
+ static VALUE
843
+ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
844
+ {
845
+ VALUE obj;
846
+ swig_class *sklass = (swig_class *) type->clientdata;
847
+ obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
848
+ rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
849
+ return obj;
850
+ }
851
+
852
+ /* Get type mangle from class name */
853
+ static SWIGINLINE char *
854
+ SWIG_Ruby_MangleStr(VALUE obj)
855
+ {
856
+ VALUE stype = rb_iv_get(obj, "__swigtype__");
857
+ return StringValuePtr(stype);
858
+ }
859
+
860
+ /* Convert a pointer value */
861
+ static int
862
+ SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
863
+ {
864
+ char *c;
865
+ swig_cast_info *tc;
866
+
867
+ /* Grab the pointer */
868
+ if (NIL_P(obj)) {
869
+ *ptr = 0;
870
+ return 0;
871
+ } else {
872
+ Data_Get_Struct(obj, void, *ptr);
873
+ }
874
+
875
+ /* Check to see if the input object is giving up ownership
876
+ of the underlying C struct or C++ object. If so then we
877
+ need to reset the destructor since the Ruby object no
878
+ longer owns the underlying C++ object.*/
879
+ if (flags & SWIG_POINTER_DISOWN) {
880
+ if (flags & SWIG_TRACK_OBJECTS) {
881
+ /* We are tracking objects. Thus we change the destructor
882
+ * to SWIG_RubyRemoveTracking. This allows us to
883
+ * remove the mapping from the C++ to Ruby object
884
+ * when the Ruby object is garbage collected. If we don't
885
+ * do this, then it is possible we will return a reference
886
+ * to a Ruby object that no longer exists thereby crashing Ruby. */
887
+ RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
888
+ } else {
889
+ RDATA(obj)->dfree = 0;
890
+ }
891
+ }
892
+
893
+ /* Do type-checking if type info was provided */
894
+ if (ty) {
895
+ if (ty->clientdata) {
896
+ if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
897
+ if (*ptr == 0)
898
+ rb_raise(rb_eRuntimeError, "This %s already released", ty->str);
899
+ return 0;
900
+ }
901
+ }
902
+ if ((c = SWIG_MangleStr(obj)) == NULL) {
903
+ if (flags & SWIG_POINTER_EXCEPTION)
904
+ rb_raise(rb_eTypeError, "Expected %s", ty->str);
905
+ else
906
+ return -1;
907
+ }
908
+ tc = SWIG_TypeCheck(c, ty);
909
+ if (!tc) {
910
+ if (flags & SWIG_POINTER_EXCEPTION)
911
+ rb_raise(rb_eTypeError, "Expected %s", ty->str);
912
+ else
913
+ return -1;
914
+ }
915
+ *ptr = SWIG_TypeCast(tc, *ptr);
916
+ }
917
+ return 0;
918
+ }
919
+
920
+ /* Convert a pointer value, signal an exception on a type mismatch */
921
+ static SWIGINLINE void *
922
+ SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
923
+ {
924
+ void *result;
925
+ SWIG_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
926
+ return result;
927
+ }
928
+
929
+ /* Check convert */
930
+ static SWIGINLINE int
931
+ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
932
+ {
933
+ char *c = SWIG_MangleStr(obj);
934
+ if (!c)
935
+ return 0;
936
+ return SWIG_TypeCheck(c,ty) != 0;
937
+ }
938
+
939
+ static VALUE
940
+ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
941
+ char result[1024];
942
+ char *r = result;
943
+ if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
944
+ *(r++) = '_';
945
+ r = SWIG_PackData(r, ptr, sz);
946
+ strcpy(r, type->name);
947
+ return rb_str_new2(result);
948
+ }
949
+
950
+ /* Convert a packed value value */
951
+ static void
952
+ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) {
953
+ swig_cast_info *tc;
954
+ const char *c;
955
+
956
+ if (TYPE(obj) != T_STRING) goto type_error;
957
+ c = StringValuePtr(obj);
958
+ /* Pointer values must start with leading underscore */
959
+ if (*c != '_') goto type_error;
960
+ c++;
961
+ c = SWIG_UnpackData(c, ptr, sz);
962
+ if (ty) {
963
+ tc = SWIG_TypeCheck(c, ty);
964
+ if (!tc) goto type_error;
965
+ }
966
+ return;
967
+
968
+ type_error:
969
+
970
+ if (flags) {
971
+ if (ty) {
972
+ rb_raise(rb_eTypeError, "Type error. Expected %s", ty->name);
973
+ } else {
974
+ rb_raise(rb_eTypeError, "Expected a pointer");
975
+ }
976
+ }
977
+ }
978
+
979
+ static swig_module_info *SWIG_Ruby_GetModule() {
980
+ VALUE pointer;
981
+ swig_module_info *ret = 0;
982
+
983
+ /* first check if pointer already created */
984
+ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
985
+ if (pointer != Qnil) {
986
+ Data_Get_Struct(pointer, swig_module_info, ret);
987
+ }
988
+ return ret;
989
+ }
990
+
991
+ static void SWIG_Ruby_SetModule(swig_module_info *pointer) {
992
+ /* register a new class */
993
+ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
994
+ /* create and store the structure pointer to a global variable */
995
+ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
996
+ rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
997
+ }
998
+
999
+ #ifdef __cplusplus
1000
+ }
1001
+ #endif
1002
+
1003
+
1004
+
1005
+ /* -------- TYPES TABLE (BEGIN) -------- */
1006
+
1007
+ #define SWIGTYPE_p_Buf_tuple_t swig_types[0]
1008
+ #define SWIGTYPE_p_CdIo_t swig_types[1]
1009
+ #define SWIGTYPE_p_CdioList_t swig_types[2]
1010
+ #define SWIGTYPE_p_cdio_read_mode_t swig_types[3]
1011
+ #define SWIGTYPE_p_char swig_types[4]
1012
+ #define SWIGTYPE_p_int swig_types[5]
1013
+ #define SWIGTYPE_p_iso9660_dir_t swig_types[6]
1014
+ #define SWIGTYPE_p_iso9660_dtime_t swig_types[7]
1015
+ #define SWIGTYPE_p_iso9660_ltime_t swig_types[8]
1016
+ #define SWIGTYPE_p_iso9660_pvd_t swig_types[9]
1017
+ #define SWIGTYPE_p_iso9660_stat_t swig_types[10]
1018
+ #define SWIGTYPE_p_iso9660_t swig_types[11]
1019
+ #define SWIGTYPE_p_long swig_types[12]
1020
+ #define SWIGTYPE_p_unsigned_int swig_types[13]
1021
+ #define SWIGTYPE_p_unsigned_long swig_types[14]
1022
+ static swig_type_info *swig_types[16];
1023
+ static swig_module_info swig_module = {swig_types, 15, 0, 0, 0, 0};
1024
+ #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1025
+ #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1026
+
1027
+ /* -------- TYPES TABLE (END) -------- */
1028
+
1029
+ #define SWIG_init Init_rubyiso9660
1030
+ #define SWIG_name "Rubyiso9660"
1031
+
1032
+ static VALUE mRubyiso9660;
1033
+
1034
+ static void SWIG_AsVal(VALUE obj, int *val)
1035
+ {
1036
+ *val = (int) NUM2INT(obj);
1037
+ }
1038
+
1039
+
1040
+ /* Includes the header in the wrapper code */
1041
+ #include <time.h>
1042
+ #include <cdio/iso9660.h>
1043
+ #include <cdio/version.h>
1044
+
1045
+
1046
+ /* When libcdio version > 0.76 comes out this won't be needed. */
1047
+ #include <cdio/version.h>
1048
+ #if LIBCDIO_VERSION_NUM <= 76
1049
+
1050
+ /**< Masks derived from above... */
1051
+ #undef CDIO_DRIVE_CAP_WRITE_DVD
1052
+ #define CDIO_DRIVE_CAP_WRITE_DVD ( \
1053
+ CDIO_DRIVE_CAP_WRITE_DVD_R \
1054
+ | CDIO_DRIVE_CAP_WRITE_DVD_PR \
1055
+ | CDIO_DRIVE_CAP_WRITE_DVD_RAM \
1056
+ | CDIO_DRIVE_CAP_WRITE_DVD_RW \
1057
+ | CDIO_DRIVE_CAP_WRITE_DVD_RPW \
1058
+ )
1059
+
1060
+ /** All the different ways a block/sector can be read. */
1061
+ typedef enum {
1062
+ CDIO_READ_MODE_AUDIO, /**< CD-DA, audio, Red Book */
1063
+ CDIO_READ_MODE_M1F1, /**< Mode 1 Form 1 */
1064
+ CDIO_READ_MODE_M1F2, /**< Mode 1 Form 2 */
1065
+ CDIO_READ_MODE_M2F1, /**< Mode 2 Form 1 */
1066
+ CDIO_READ_MODE_M2F2, /**< Mode 2 Form 2 */
1067
+ } cdio_read_mode_t;
1068
+
1069
+ /*!
1070
+ Reads a number of sectors (AKA blocks).
1071
+
1072
+ @param p_buf place to read data into. The caller should make sure
1073
+ this location is large enough. See below for size information.
1074
+ @param read_mode the kind of "mode" to use in reading.
1075
+ @param i_lsn sector to read
1076
+ @param i_blocks number of sectors to read
1077
+ @return DRIVER_OP_SUCCESS (0) if no error, other (negative) enumerations
1078
+ are returned on error.
1079
+
1080
+ If read_mode is CDIO_MODE_AUDIO,
1081
+ *p_buf should hold at least CDIO_FRAMESIZE_RAW * i_blocks bytes.
1082
+
1083
+ If read_mode is CDIO_MODE_DATA,
1084
+ *p_buf should hold at least i_blocks times either ISO_BLOCKSIZE,
1085
+ M1RAW_SECTOR_SIZE or M2F2_SECTOR_SIZE depending on the kind of
1086
+ sector getting read. If you don't know whether you have a Mode 1/2,
1087
+ Form 1/ Form 2/Formless sector best to reserve space for the maximum
1088
+ which is M2RAW_SECTOR_SIZE.
1089
+
1090
+ If read_mode is CDIO_MODE_M2F1,
1091
+ *p_buf should hold at least M2RAW_SECTOR_SIZE * i_blocks bytes.
1092
+
1093
+ If read_mode is CDIO_MODE_M2F2,
1094
+ *p_buf should hold at least CDIO_CD_FRAMESIZE * i_blocks bytes.
1095
+
1096
+
1097
+ */
1098
+ driver_return_code_t
1099
+ cdio_read_sectors(const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn,
1100
+ cdio_read_mode_t read_mode, uint32_t i_blocks)
1101
+ {
1102
+ switch(read_mode) {
1103
+ case CDIO_READ_MODE_AUDIO:
1104
+ return cdio_read_audio_sectors (p_cdio, p_buf, i_lsn, i_blocks);
1105
+ case CDIO_READ_MODE_M1F1:
1106
+ return cdio_read_mode1_sectors (p_cdio, p_buf, i_lsn, false, i_blocks);
1107
+ case CDIO_READ_MODE_M1F2:
1108
+ return cdio_read_mode1_sectors (p_cdio, p_buf, i_lsn, true, i_blocks);
1109
+ case CDIO_READ_MODE_M2F1:
1110
+ return cdio_read_mode2_sectors (p_cdio, p_buf, i_lsn, false, i_blocks);
1111
+ case CDIO_READ_MODE_M2F2:
1112
+ return cdio_read_mode2_sectors (p_cdio, p_buf, i_lsn, true, i_blocks);
1113
+ }
1114
+ /* Can't happen. Just to shut up gcc. */
1115
+ return DRIVER_OP_ERROR;
1116
+ }
1117
+
1118
+ driver_return_code_t
1119
+ cdio_eject_media_drive (const char *psz_drive)
1120
+ {
1121
+ CdIo_t *p_cdio = cdio_open (psz_drive, DRIVER_DEVICE);
1122
+ if (p_cdio) {
1123
+ return cdio_eject_media(&p_cdio);
1124
+ } else {
1125
+ return DRIVER_OP_UNINIT;
1126
+ }
1127
+ }
1128
+ #endif /* LIBCDIO_VERSION_NUM <= 76 */
1129
+
1130
+
1131
+ #ifdef __cplusplus
1132
+ extern "C" {
1133
+ #endif
1134
+ #ifdef HAVE_SYS_TIME_H
1135
+ # include <sys/time.h>
1136
+ struct timeval rb_time_timeval(VALUE);
1137
+ #endif
1138
+ #ifdef __cplusplus
1139
+ }
1140
+ #endif
1141
+
1142
+
1143
+ #ifdef __cplusplus
1144
+ extern "C" {
1145
+ #endif
1146
+ #include "rubyio.h"
1147
+ #ifdef __cplusplus
1148
+ }
1149
+ #endif
1150
+
1151
+
1152
+ typedef CdioList_t IsoStatList_t;
1153
+ typedef iso9660_stat_t IsoStat_t;
1154
+
1155
+
1156
+ typedef struct {
1157
+ char *data;
1158
+ size_t i_size;
1159
+ } Buf_tuple_t;
1160
+
1161
+
1162
+ Buf_tuple_t
1163
+ seek_read (const iso9660_t *p_iso, lsn_t start, ssize_t i_size)
1164
+ {
1165
+ Buf_tuple_t buf_tuple;
1166
+ buf_tuple.data = calloc(1, i_size);
1167
+ buf_tuple.i_size = iso9660_iso_seek_read(p_iso, buf_tuple.data, start,
1168
+ (i_size) / ISO_BLOCKSIZE);
1169
+ return buf_tuple;
1170
+ }
1171
+
1172
+
1173
+ iso9660_pvd_t *fs_read_pvd ( const CdIo_t *p_cdio ) {
1174
+ static iso9660_pvd_t pvd;
1175
+ bool b_ok = iso9660_fs_read_pvd ( p_cdio, &pvd );
1176
+ if (!b_ok) return NULL;
1177
+ return &pvd;
1178
+ }
1179
+
1180
+
1181
+ iso9660_pvd_t *ifs_read_pvd ( const iso9660_t *p_iso ) {
1182
+ static iso9660_pvd_t pvd;
1183
+ bool b_ok = iso9660_ifs_read_pvd ( p_iso, &pvd );
1184
+ if (!b_ok) return NULL;
1185
+ return &pvd;
1186
+ }
1187
+
1188
+
1189
+ iso9660_dtime_t *
1190
+ set_dtime ( int year, int mon, int mday, int hour, int min, int sec)
1191
+ {
1192
+ struct tm tm = { sec, min, hour, mday, mon-1, year-1900, 0, 0, -1 };
1193
+ static iso9660_dtime_t dtime;
1194
+ iso9660_set_dtime (&tm, &dtime);
1195
+ return &dtime;
1196
+ }
1197
+
1198
+
1199
+ iso9660_ltime_t *
1200
+ set_ltime ( int year, int mon, int mday, int hour, int min, int sec)
1201
+ {
1202
+ struct tm tm = { sec, min, hour, mday, mon-1, year-1900, 0, 0, -1 };
1203
+ static iso9660_ltime_t ldate;
1204
+ iso9660_set_ltime (&tm, &ldate);
1205
+ return &ldate;
1206
+ }
1207
+
1208
+
1209
+ struct tm *get_dtime (const iso9660_dtime_t *p_dtime, bool use_localtime) {
1210
+ struct tm *p_tm = (struct tm *) calloc(1, sizeof(struct tm));
1211
+ if (!iso9660_get_dtime (p_dtime, use_localtime, p_tm)) {
1212
+ free(p_tm);
1213
+ return NULL;
1214
+ }
1215
+ return p_tm;
1216
+ }
1217
+
1218
+
1219
+ struct tm *get_ltime (const iso9660_ltime_t *p_ltime)
1220
+ {
1221
+ struct tm *p_tm = (struct tm *) calloc(1, sizeof(struct tm));
1222
+ if (!iso9660_get_ltime (p_ltime, p_tm)) {
1223
+ free(p_tm);
1224
+ return NULL;
1225
+ }
1226
+ return p_tm;
1227
+ }
1228
+
1229
+
1230
+ char *
1231
+ name_translate(const char *psz_oldname) {
1232
+ char *psz_newname=calloc(sizeof(char), strlen(psz_oldname));
1233
+ iso9660_name_translate(psz_oldname, psz_newname);
1234
+ return psz_newname;
1235
+ }
1236
+
1237
+
1238
+ char *
1239
+ name_translate_ext(const char *psz_oldname, uint8_t i_joliet_level) {
1240
+ char *psz_newname=calloc(sizeof(char), strlen(psz_oldname));
1241
+ iso9660_name_translate_ext(psz_oldname, psz_newname, i_joliet_level);
1242
+ return psz_newname;
1243
+ }
1244
+
1245
+
1246
+ char *
1247
+ strncpy_pad(const char src[], size_t len, enum strncpy_pad_check _check) {
1248
+ char *dst = calloc(sizeof(char), len+1);
1249
+ return iso9660_strncpy_pad(dst, src, len, _check);
1250
+ }
1251
+
1252
+
1253
+ IsoStatList_t *fs_readdir (CdIo_t *p_cdio, const char psz_path[])
1254
+ {
1255
+ CdioList_t *p_statlist = iso9660_fs_readdir (p_cdio, psz_path, false);
1256
+ return p_statlist;
1257
+ }
1258
+
1259
+
1260
+ IsoStatList_t *ifs_readdir (iso9660_t *p_iso, const char psz_path[])
1261
+ {
1262
+ CdioList_t *p_statlist = iso9660_ifs_readdir (p_iso, psz_path);
1263
+ return p_statlist;
1264
+ }
1265
+
1266
+
1267
+ typedef char * string_or_nil_t;
1268
+ string_or_nil_t
1269
+ ifs_get_application_id(iso9660_t *p_iso) {
1270
+ char *psz;
1271
+ bool ok = iso9660_ifs_get_application_id(p_iso, &psz);
1272
+ if (!ok) return NULL;
1273
+ return psz;
1274
+ }
1275
+
1276
+
1277
+ string_or_nil_t
1278
+ ifs_get_preparer_id(iso9660_t *p_iso) {
1279
+ char *psz;
1280
+ bool ok = iso9660_ifs_get_preparer_id(p_iso, &psz);
1281
+ if (!ok) return NULL;
1282
+ return psz;
1283
+ }
1284
+
1285
+
1286
+ string_or_nil_t
1287
+ ifs_get_publisher_id(iso9660_t *p_iso) {
1288
+ char *psz;
1289
+ bool ok = iso9660_ifs_get_publisher_id(p_iso, &psz);
1290
+ if (!ok) return NULL;
1291
+ return psz;
1292
+ }
1293
+
1294
+
1295
+ char *
1296
+ ifs_get_system_id(iso9660_t *p_iso) {
1297
+ char *psz;
1298
+ bool ok = iso9660_ifs_get_system_id(p_iso, &psz);
1299
+ if (!ok) return NULL;
1300
+ return psz;
1301
+ }
1302
+
1303
+
1304
+ char *
1305
+ ifs_get_volume_id(iso9660_t *p_iso) {
1306
+ char *psz;
1307
+ bool ok = iso9660_ifs_get_volume_id(p_iso, &psz);
1308
+ if (!ok) return NULL;
1309
+ return psz;
1310
+ }
1311
+
1312
+
1313
+ string_or_nil_t
1314
+ ifs_get_volumeset_id(iso9660_t *p_iso) {
1315
+ char *psz;
1316
+ bool ok = iso9660_ifs_get_volumeset_id(p_iso, &psz);
1317
+ if (!ok) return NULL;
1318
+ return psz;
1319
+ }
1320
+
1321
+ static VALUE
1322
+ _wrap_cdio_read_sectors(int argc, VALUE *argv, VALUE self) {
1323
+ CdIo_t *arg1 = (CdIo_t *) 0 ;
1324
+ void *arg2 = (void *) 0 ;
1325
+ lsn_t arg3 ;
1326
+ cdio_read_mode_t arg4 ;
1327
+ unsigned int arg5 ;
1328
+ driver_return_code_t result;
1329
+ VALUE vresult = Qnil;
1330
+
1331
+ if ((argc < 5) || (argc > 5))
1332
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc);
1333
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_CdIo_t, 0);
1334
+ SWIG_ConvertPtr(argv[1], (void **) &arg2, 0, SWIG_POINTER_EXCEPTION|0);
1335
+ arg3 = NUM2INT(argv[2]);
1336
+ arg4 = (cdio_read_mode_t) NUM2INT(argv[3]);
1337
+ arg5 = NUM2UINT(argv[4]);
1338
+ result = (driver_return_code_t)cdio_read_sectors((CdIo_t const *)arg1,arg2,arg3,arg4,arg5);
1339
+
1340
+ vresult = INT2NUM(result);
1341
+ return vresult;
1342
+ }
1343
+
1344
+
1345
+ static VALUE
1346
+ _wrap_cdio_eject_media_drive(int argc, VALUE *argv, VALUE self) {
1347
+ char *arg1 = (char *) 0 ;
1348
+ driver_return_code_t result;
1349
+ VALUE vresult = Qnil;
1350
+
1351
+ if ((argc < 1) || (argc > 1))
1352
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1353
+ arg1 = StringValuePtr(argv[0]);
1354
+ result = (driver_return_code_t)cdio_eject_media_drive((char const *)arg1);
1355
+
1356
+ vresult = INT2NUM(result);
1357
+ return vresult;
1358
+ }
1359
+
1360
+
1361
+ static VALUE
1362
+ _wrap_open_iso(int argc, VALUE *argv, VALUE self) {
1363
+ char *arg1 = (char *) 0 ;
1364
+ iso9660_t *result;
1365
+ VALUE vresult = Qnil;
1366
+
1367
+ if ((argc < 1) || (argc > 1))
1368
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1369
+ arg1 = StringValuePtr(argv[0]);
1370
+ result = (iso9660_t *)iso9660_open((char const *)arg1);
1371
+
1372
+ vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_iso9660_t,0);
1373
+ return vresult;
1374
+ }
1375
+
1376
+
1377
+ static VALUE
1378
+ _wrap_open_ext(int argc, VALUE *argv, VALUE self) {
1379
+ char *arg1 = (char *) 0 ;
1380
+ iso_extension_mask_t arg2 ;
1381
+ iso9660_t *result;
1382
+ VALUE vresult = Qnil;
1383
+
1384
+ if ((argc < 2) || (argc > 2))
1385
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
1386
+ arg1 = StringValuePtr(argv[0]);
1387
+ arg2 = NUM2UINT(argv[1]);
1388
+ result = (iso9660_t *)iso9660_open_ext((char const *)arg1,arg2);
1389
+
1390
+ vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_iso9660_t,0);
1391
+ return vresult;
1392
+ }
1393
+
1394
+
1395
+ static VALUE
1396
+ _wrap_open_fuzzy(int argc, VALUE *argv, VALUE self) {
1397
+ char *arg1 = (char *) 0 ;
1398
+ unsigned int arg2 ;
1399
+ iso9660_t *result;
1400
+ VALUE vresult = Qnil;
1401
+
1402
+ if ((argc < 2) || (argc > 2))
1403
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
1404
+ arg1 = StringValuePtr(argv[0]);
1405
+ arg2 = NUM2UINT(argv[1]);
1406
+ result = (iso9660_t *)iso9660_open_fuzzy((char const *)arg1,arg2);
1407
+
1408
+ vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_iso9660_t,0);
1409
+ return vresult;
1410
+ }
1411
+
1412
+
1413
+ static VALUE
1414
+ _wrap_iso9660_open_fuzzy_ext(int argc, VALUE *argv, VALUE self) {
1415
+ char *arg1 = (char *) 0 ;
1416
+ iso_extension_mask_t arg2 ;
1417
+ unsigned int arg3 ;
1418
+ iso9660_t *result;
1419
+ VALUE vresult = Qnil;
1420
+
1421
+ if ((argc < 3) || (argc > 3))
1422
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
1423
+ arg1 = StringValuePtr(argv[0]);
1424
+ arg2 = NUM2UINT(argv[1]);
1425
+ arg3 = NUM2UINT(argv[2]);
1426
+ result = (iso9660_t *)iso9660_open_fuzzy_ext((char const *)arg1,arg2,arg3);
1427
+
1428
+ vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_iso9660_t,0);
1429
+ return vresult;
1430
+ }
1431
+
1432
+
1433
+ static VALUE
1434
+ _wrap_ifs_fuzzy_read_superblock(int argc, VALUE *argv, VALUE self) {
1435
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
1436
+ iso_extension_mask_t arg2 ;
1437
+ unsigned int arg3 ;
1438
+ bool result;
1439
+ VALUE vresult = Qnil;
1440
+
1441
+ if ((argc < 3) || (argc > 3))
1442
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
1443
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
1444
+ arg2 = NUM2UINT(argv[1]);
1445
+ arg3 = NUM2UINT(argv[2]);
1446
+ result = (bool)iso9660_ifs_fuzzy_read_superblock(arg1,arg2,arg3);
1447
+
1448
+ vresult = (result != 0) ? Qtrue : Qfalse;
1449
+ return vresult;
1450
+ }
1451
+
1452
+
1453
+ static VALUE
1454
+ _wrap_close(int argc, VALUE *argv, VALUE self) {
1455
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
1456
+ bool result;
1457
+ VALUE vresult = Qnil;
1458
+
1459
+ if ((argc < 1) || (argc > 1))
1460
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1461
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
1462
+ result = (bool)iso9660_close(arg1);
1463
+
1464
+ vresult = (result != 0) ? Qtrue : Qfalse;
1465
+ return vresult;
1466
+ }
1467
+
1468
+
1469
+ swig_class cBuf_tuple_t;
1470
+
1471
+ static VALUE
1472
+ _wrap_Buf_tuple_t_data_set(int argc, VALUE *argv, VALUE self) {
1473
+ Buf_tuple_t *arg1 = (Buf_tuple_t *) 0 ;
1474
+ char *arg2 = (char *) 0 ;
1475
+
1476
+ if ((argc < 1) || (argc > 1))
1477
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1478
+ SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_Buf_tuple_t, 0);
1479
+ arg2 = StringValuePtr(argv[0]);
1480
+ {
1481
+ if (arg1->data) free((char*)arg1->data);
1482
+ if (arg2) {
1483
+ arg1->data = (char *) malloc(strlen(arg2)+1);
1484
+ strcpy((char*)arg1->data,arg2);
1485
+ } else {
1486
+ arg1->data = 0;
1487
+ }
1488
+ }
1489
+ return Qnil;
1490
+ }
1491
+
1492
+
1493
+ static VALUE
1494
+ _wrap_Buf_tuple_t_data_get(int argc, VALUE *argv, VALUE self) {
1495
+ Buf_tuple_t *arg1 = (Buf_tuple_t *) 0 ;
1496
+ char *result;
1497
+ VALUE vresult = Qnil;
1498
+
1499
+ if ((argc < 0) || (argc > 0))
1500
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
1501
+ SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_Buf_tuple_t, 0);
1502
+ result = (char *) ((arg1)->data);
1503
+
1504
+ vresult = rb_str_new2(result);
1505
+ return vresult;
1506
+ }
1507
+
1508
+
1509
+ static VALUE
1510
+ _wrap_Buf_tuple_t_i_size_set(int argc, VALUE *argv, VALUE self) {
1511
+ Buf_tuple_t *arg1 = (Buf_tuple_t *) 0 ;
1512
+ size_t arg2 ;
1513
+
1514
+ if ((argc < 1) || (argc > 1))
1515
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1516
+ SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_Buf_tuple_t, 0);
1517
+ arg2 = NUM2ULONG(argv[0]);
1518
+ if (arg1) (arg1)->i_size = arg2;
1519
+
1520
+ return Qnil;
1521
+ }
1522
+
1523
+
1524
+ static VALUE
1525
+ _wrap_Buf_tuple_t_i_size_get(int argc, VALUE *argv, VALUE self) {
1526
+ Buf_tuple_t *arg1 = (Buf_tuple_t *) 0 ;
1527
+ size_t result;
1528
+ VALUE vresult = Qnil;
1529
+
1530
+ if ((argc < 0) || (argc > 0))
1531
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
1532
+ SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_Buf_tuple_t, 0);
1533
+ result = ((arg1)->i_size);
1534
+
1535
+ vresult = UINT2NUM(result);
1536
+ return vresult;
1537
+ }
1538
+
1539
+
1540
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
1541
+ static VALUE
1542
+ _wrap_Buf_tuple_t_allocate(VALUE self) {
1543
+ #else
1544
+ static VALUE
1545
+ _wrap_Buf_tuple_t_allocate(int argc, VALUE *argv, VALUE self) {
1546
+ #endif
1547
+
1548
+
1549
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Buf_tuple_t);
1550
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
1551
+ rb_obj_call_init(vresult, argc, argv);
1552
+ #endif
1553
+ return vresult;
1554
+ }
1555
+
1556
+
1557
+ static VALUE
1558
+ _wrap_new_Buf_tuple_t(int argc, VALUE *argv, VALUE self) {
1559
+ Buf_tuple_t *result;
1560
+
1561
+ if ((argc < 0) || (argc > 0))
1562
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
1563
+ result = (Buf_tuple_t *)(Buf_tuple_t *) calloc(1, sizeof(Buf_tuple_t));
1564
+ DATA_PTR(self) = result;
1565
+
1566
+ return self;
1567
+ }
1568
+
1569
+
1570
+ static void
1571
+ free_Buf_tuple_t(Buf_tuple_t *arg1) {
1572
+ free((char *) arg1);
1573
+ }
1574
+
1575
+ static VALUE
1576
+ _wrap_seek_read(int argc, VALUE *argv, VALUE self) {
1577
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
1578
+ lsn_t arg2 ;
1579
+ ssize_t arg3 ;
1580
+ Buf_tuple_t result;
1581
+ VALUE vresult = Qnil;
1582
+
1583
+ if ((argc < 3) || (argc > 3))
1584
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
1585
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
1586
+ arg2 = NUM2INT(argv[1]);
1587
+ arg3 = NUM2LONG(argv[2]);
1588
+ result = seek_read((iso9660_t const *)arg1,arg2,arg3);
1589
+
1590
+ {
1591
+ if (!(&result)->data)
1592
+ return Qnil;
1593
+ else {
1594
+ VALUE data_tuple = rb_ary_new();
1595
+ rb_ary_push(data_tuple, INT2NUM((&result)->i_size));
1596
+ rb_ary_push(data_tuple, rb_str_new((&result)->data, (&result)->i_size));
1597
+ free((&result)->data);
1598
+ return data_tuple;
1599
+ }
1600
+ }
1601
+ return vresult;
1602
+ }
1603
+
1604
+
1605
+ static VALUE
1606
+ _wrap_fs_read_pvd(int argc, VALUE *argv, VALUE self) {
1607
+ CdIo_t *arg1 = (CdIo_t *) 0 ;
1608
+ iso9660_pvd_t *result;
1609
+ VALUE vresult = Qnil;
1610
+
1611
+ if ((argc < 1) || (argc > 1))
1612
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1613
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_CdIo_t, 0);
1614
+ result = (iso9660_pvd_t *)fs_read_pvd((CdIo_t const *)arg1);
1615
+
1616
+ vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_iso9660_pvd_t,0);
1617
+ return vresult;
1618
+ }
1619
+
1620
+
1621
+ static VALUE
1622
+ _wrap_ifs_read_pvd(int argc, VALUE *argv, VALUE self) {
1623
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
1624
+ iso9660_pvd_t *result;
1625
+ VALUE vresult = Qnil;
1626
+
1627
+ if ((argc < 1) || (argc > 1))
1628
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1629
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
1630
+ result = (iso9660_pvd_t *)ifs_read_pvd((iso9660_t const *)arg1);
1631
+
1632
+ vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_iso9660_pvd_t,0);
1633
+ return vresult;
1634
+ }
1635
+
1636
+
1637
+ static VALUE
1638
+ _wrap_fs_read_superblock(int argc, VALUE *argv, VALUE self) {
1639
+ CdIo_t *arg1 = (CdIo_t *) 0 ;
1640
+ iso_extension_mask_t arg2 ;
1641
+ bool result;
1642
+ VALUE vresult = Qnil;
1643
+
1644
+ if ((argc < 2) || (argc > 2))
1645
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
1646
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_CdIo_t, 0);
1647
+ arg2 = NUM2UINT(argv[1]);
1648
+ result = (bool)iso9660_fs_read_superblock(arg1,arg2);
1649
+
1650
+ vresult = (result != 0) ? Qtrue : Qfalse;
1651
+ return vresult;
1652
+ }
1653
+
1654
+
1655
+ static VALUE
1656
+ _wrap_ifs_read_superblock(int argc, VALUE *argv, VALUE self) {
1657
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
1658
+ iso_extension_mask_t arg2 ;
1659
+ bool result;
1660
+ VALUE vresult = Qnil;
1661
+
1662
+ if ((argc < 2) || (argc > 2))
1663
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
1664
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
1665
+ arg2 = NUM2UINT(argv[1]);
1666
+ result = (bool)iso9660_ifs_read_superblock(arg1,arg2);
1667
+
1668
+ vresult = (result != 0) ? Qtrue : Qfalse;
1669
+ return vresult;
1670
+ }
1671
+
1672
+
1673
+ static VALUE
1674
+ _wrap_set_dtime(int argc, VALUE *argv, VALUE self) {
1675
+ int arg1 ;
1676
+ int arg2 ;
1677
+ int arg3 ;
1678
+ int arg4 ;
1679
+ int arg5 ;
1680
+ int arg6 ;
1681
+ iso9660_dtime_t *result;
1682
+ VALUE vresult = Qnil;
1683
+
1684
+ if ((argc < 6) || (argc > 6))
1685
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
1686
+ arg1 = NUM2INT(argv[0]);
1687
+ arg2 = NUM2INT(argv[1]);
1688
+ arg3 = NUM2INT(argv[2]);
1689
+ arg4 = NUM2INT(argv[3]);
1690
+ arg5 = NUM2INT(argv[4]);
1691
+ arg6 = NUM2INT(argv[5]);
1692
+ result = (iso9660_dtime_t *)set_dtime(arg1,arg2,arg3,arg4,arg5,arg6);
1693
+
1694
+ vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_iso9660_dtime_t,0);
1695
+ return vresult;
1696
+ }
1697
+
1698
+
1699
+ static VALUE
1700
+ _wrap_set_ltime(int argc, VALUE *argv, VALUE self) {
1701
+ int arg1 ;
1702
+ int arg2 ;
1703
+ int arg3 ;
1704
+ int arg4 ;
1705
+ int arg5 ;
1706
+ int arg6 ;
1707
+ iso9660_ltime_t *result;
1708
+ VALUE vresult = Qnil;
1709
+
1710
+ if ((argc < 6) || (argc > 6))
1711
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
1712
+ arg1 = NUM2INT(argv[0]);
1713
+ arg2 = NUM2INT(argv[1]);
1714
+ arg3 = NUM2INT(argv[2]);
1715
+ arg4 = NUM2INT(argv[3]);
1716
+ arg5 = NUM2INT(argv[4]);
1717
+ arg6 = NUM2INT(argv[5]);
1718
+ result = (iso9660_ltime_t *)set_ltime(arg1,arg2,arg3,arg4,arg5,arg6);
1719
+
1720
+ vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_iso9660_ltime_t,0);
1721
+ return vresult;
1722
+ }
1723
+
1724
+
1725
+ static VALUE
1726
+ _wrap_get_dtime(int argc, VALUE *argv, VALUE self) {
1727
+ iso9660_dtime_t *arg1 = (iso9660_dtime_t *) 0 ;
1728
+ bool arg2 ;
1729
+ struct tm *result;
1730
+ VALUE vresult = Qnil;
1731
+
1732
+ if ((argc < 2) || (argc > 2))
1733
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
1734
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_dtime_t, 0);
1735
+ arg2 = RTEST(argv[1]);
1736
+ result = (struct tm *)get_dtime((iso9660_dtime_t const *)arg1,arg2);
1737
+
1738
+ {
1739
+ struct tm *p_tm = result;
1740
+
1741
+ if (result) {
1742
+ VALUE resultobj = rb_hash_new();
1743
+ rb_hash_aset(resultobj, rb_str_new2("year"),
1744
+ INT2NUM(p_tm->tm_year+1900));
1745
+ rb_hash_aset(resultobj, rb_str_new2("month"),
1746
+ INT2NUM(p_tm->tm_mon+1));
1747
+ rb_hash_aset(resultobj, rb_str_new2("mday"),
1748
+ INT2NUM(p_tm->tm_mday));
1749
+ rb_hash_aset(resultobj, rb_str_new2("hour"),
1750
+ INT2NUM(p_tm->tm_hour));
1751
+ rb_hash_aset(resultobj, rb_str_new2("min"),
1752
+ INT2NUM(p_tm->tm_min));
1753
+ rb_hash_aset(resultobj, rb_str_new2("sec"),
1754
+ INT2NUM(p_tm->tm_sec));
1755
+ rb_hash_aset(resultobj, rb_str_new2("wday"),
1756
+ INT2NUM((p_tm->tm_wday-1))%7);
1757
+ rb_hash_aset(resultobj, rb_str_new2("isdst"),
1758
+ INT2NUM((p_tm->tm_isdst)));
1759
+ free (p_tm);
1760
+ return resultobj;
1761
+ }
1762
+ }
1763
+ return vresult;
1764
+ }
1765
+
1766
+
1767
+ static VALUE
1768
+ _wrap_get_ltime(int argc, VALUE *argv, VALUE self) {
1769
+ iso9660_ltime_t *arg1 = (iso9660_ltime_t *) 0 ;
1770
+ struct tm *result;
1771
+ VALUE vresult = Qnil;
1772
+
1773
+ if ((argc < 1) || (argc > 1))
1774
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1775
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_ltime_t, 0);
1776
+ result = (struct tm *)get_ltime((iso9660_ltime_t const *)arg1);
1777
+
1778
+ {
1779
+ struct tm *p_tm = result;
1780
+
1781
+ if (result) {
1782
+ VALUE resultobj = rb_hash_new();
1783
+ rb_hash_aset(resultobj, rb_str_new2("year"),
1784
+ INT2NUM(p_tm->tm_year+1900));
1785
+ rb_hash_aset(resultobj, rb_str_new2("month"),
1786
+ INT2NUM(p_tm->tm_mon+1));
1787
+ rb_hash_aset(resultobj, rb_str_new2("mday"),
1788
+ INT2NUM(p_tm->tm_mday));
1789
+ rb_hash_aset(resultobj, rb_str_new2("hour"),
1790
+ INT2NUM(p_tm->tm_hour));
1791
+ rb_hash_aset(resultobj, rb_str_new2("min"),
1792
+ INT2NUM(p_tm->tm_min));
1793
+ rb_hash_aset(resultobj, rb_str_new2("sec"),
1794
+ INT2NUM(p_tm->tm_sec));
1795
+ rb_hash_aset(resultobj, rb_str_new2("wday"),
1796
+ INT2NUM((p_tm->tm_wday-1))%7);
1797
+ rb_hash_aset(resultobj, rb_str_new2("isdst"),
1798
+ INT2NUM((p_tm->tm_isdst)));
1799
+ free (p_tm);
1800
+ return resultobj;
1801
+ }
1802
+ }
1803
+ return vresult;
1804
+ }
1805
+
1806
+
1807
+ static VALUE
1808
+ _wrap_dcharq___(int argc, VALUE *argv, VALUE self) {
1809
+ int arg1 ;
1810
+ bool result;
1811
+ VALUE vresult = Qnil;
1812
+
1813
+ if ((argc < 1) || (argc > 1))
1814
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1815
+ arg1 = NUM2INT(argv[0]);
1816
+ result = (bool)iso9660_isdchar(arg1);
1817
+
1818
+ vresult = (result != 0) ? Qtrue : Qfalse;
1819
+ return vresult;
1820
+ }
1821
+
1822
+
1823
+ static VALUE
1824
+ _wrap_acharq___(int argc, VALUE *argv, VALUE self) {
1825
+ int arg1 ;
1826
+ bool result;
1827
+ VALUE vresult = Qnil;
1828
+
1829
+ if ((argc < 1) || (argc > 1))
1830
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1831
+ arg1 = NUM2INT(argv[0]);
1832
+ result = (bool)iso9660_isachar(arg1);
1833
+
1834
+ vresult = (result != 0) ? Qtrue : Qfalse;
1835
+ return vresult;
1836
+ }
1837
+
1838
+
1839
+ static VALUE
1840
+ _wrap_name_translate(int argc, VALUE *argv, VALUE self) {
1841
+ char *arg1 = (char *) 0 ;
1842
+ char *result;
1843
+ VALUE vresult = Qnil;
1844
+
1845
+ if ((argc < 1) || (argc > 1))
1846
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1847
+ arg1 = StringValuePtr(argv[0]);
1848
+ result = (char *)name_translate((char const *)arg1);
1849
+
1850
+ vresult = rb_str_new2(result);
1851
+ free(result);
1852
+ return vresult;
1853
+ }
1854
+
1855
+
1856
+ static VALUE
1857
+ _wrap_name_translate_ext(int argc, VALUE *argv, VALUE self) {
1858
+ char *arg1 = (char *) 0 ;
1859
+ unsigned char arg2 ;
1860
+ char *result;
1861
+ VALUE vresult = Qnil;
1862
+
1863
+ if ((argc < 2) || (argc > 2))
1864
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
1865
+ arg1 = StringValuePtr(argv[0]);
1866
+ arg2 = (unsigned char) NUM2INT(argv[1]);
1867
+ result = (char *)name_translate_ext((char const *)arg1,arg2);
1868
+
1869
+ vresult = rb_str_new2(result);
1870
+ free(result);
1871
+ return vresult;
1872
+ }
1873
+
1874
+
1875
+ static VALUE
1876
+ _wrap_strncpy_pad(int argc, VALUE *argv, VALUE self) {
1877
+ char *arg1 ;
1878
+ size_t arg2 ;
1879
+ enum strncpy_pad_check arg3 ;
1880
+ char *result;
1881
+ VALUE vresult = Qnil;
1882
+
1883
+ if ((argc < 3) || (argc > 3))
1884
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
1885
+ arg1 = StringValuePtr(argv[0]);
1886
+ arg2 = NUM2ULONG(argv[1]);
1887
+ arg3 = (enum strncpy_pad_check) NUM2INT(argv[2]);
1888
+ result = (char *)strncpy_pad((char const (*))arg1,arg2,arg3);
1889
+
1890
+ vresult = rb_str_new2(result);
1891
+ free(result);
1892
+ return vresult;
1893
+ }
1894
+
1895
+
1896
+ static VALUE
1897
+ _wrap_dirname_validq___(int argc, VALUE *argv, VALUE self) {
1898
+ char *arg1 ;
1899
+ bool result;
1900
+ VALUE vresult = Qnil;
1901
+
1902
+ if ((argc < 1) || (argc > 1))
1903
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1904
+ arg1 = StringValuePtr(argv[0]);
1905
+ result = (bool)iso9660_dirname_valid_p((char const (*))arg1);
1906
+
1907
+ vresult = (result != 0) ? Qtrue : Qfalse;
1908
+ return vresult;
1909
+ }
1910
+
1911
+
1912
+ static VALUE
1913
+ _wrap_pathname_isofy(int argc, VALUE *argv, VALUE self) {
1914
+ char *arg1 ;
1915
+ unsigned int arg2 = (unsigned int) 1 ;
1916
+ char *result;
1917
+ VALUE vresult = Qnil;
1918
+
1919
+ if ((argc < 1) || (argc > 2))
1920
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1921
+ arg1 = StringValuePtr(argv[0]);
1922
+ if (argc > 1) {
1923
+ arg2 = NUM2UINT(argv[1]);
1924
+ }
1925
+ result = (char *)iso9660_pathname_isofy((char const (*))arg1,arg2);
1926
+
1927
+ vresult = rb_str_new2(result);
1928
+ free(result);
1929
+ return vresult;
1930
+ }
1931
+
1932
+
1933
+ static VALUE
1934
+ _wrap_pathname_validq___(int argc, VALUE *argv, VALUE self) {
1935
+ char *arg1 ;
1936
+ bool result;
1937
+ VALUE vresult = Qnil;
1938
+
1939
+ if ((argc < 1) || (argc > 1))
1940
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1941
+ arg1 = StringValuePtr(argv[0]);
1942
+ result = (bool)iso9660_pathname_valid_p((char const (*))arg1);
1943
+
1944
+ vresult = (result != 0) ? Qtrue : Qfalse;
1945
+ return vresult;
1946
+ }
1947
+
1948
+
1949
+ static VALUE
1950
+ _wrap_fs_stat(int argc, VALUE *argv, VALUE self) {
1951
+ CdIo_t *arg1 = (CdIo_t *) 0 ;
1952
+ char *arg2 ;
1953
+ IsoStat_t *result;
1954
+ VALUE vresult = Qnil;
1955
+
1956
+ if ((argc < 2) || (argc > 2))
1957
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
1958
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_CdIo_t, 0);
1959
+ arg2 = StringValuePtr(argv[1]);
1960
+ result = (IsoStat_t *)iso9660_fs_stat(arg1,(char const (*))arg2);
1961
+
1962
+ {
1963
+ iso9660_stat_t *p_statbuf = result;
1964
+
1965
+ if (result) {
1966
+ VALUE resultobj = rb_hash_new();
1967
+ rb_hash_aset(resultobj, rb_str_new2("filename"),
1968
+ rb_str_new2(p_statbuf->filename));
1969
+ rb_hash_aset(resultobj, rb_str_new2("lsn"),
1970
+ INT2NUM(p_statbuf->lsn));
1971
+ rb_hash_aset(resultobj, rb_str_new2("size"),
1972
+ INT2NUM(p_statbuf->size));
1973
+ rb_hash_aset(resultobj, rb_str_new2("secsize"),
1974
+ INT2NUM(p_statbuf->secsize));
1975
+ rb_hash_aset(resultobj, rb_str_new2("type"),
1976
+ INT2NUM(p_statbuf->type));
1977
+ free (p_statbuf);
1978
+ return resultobj;
1979
+ }
1980
+ }
1981
+ return vresult;
1982
+ }
1983
+
1984
+
1985
+ static VALUE
1986
+ _wrap_fs_stat_translate(int argc, VALUE *argv, VALUE self) {
1987
+ CdIo_t *arg1 = (CdIo_t *) 0 ;
1988
+ char *arg2 ;
1989
+ bool arg3 = (bool) false ;
1990
+ IsoStat_t *result;
1991
+ VALUE vresult = Qnil;
1992
+
1993
+ if ((argc < 2) || (argc > 3))
1994
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
1995
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_CdIo_t, 0);
1996
+ arg2 = StringValuePtr(argv[1]);
1997
+ if (argc > 2) {
1998
+ arg3 = RTEST(argv[2]);
1999
+ }
2000
+ result = (IsoStat_t *)iso9660_fs_stat_translate(arg1,(char const (*))arg2,arg3);
2001
+
2002
+ {
2003
+ iso9660_stat_t *p_statbuf = result;
2004
+
2005
+ if (result) {
2006
+ VALUE resultobj = rb_hash_new();
2007
+ rb_hash_aset(resultobj, rb_str_new2("filename"),
2008
+ rb_str_new2(p_statbuf->filename));
2009
+ rb_hash_aset(resultobj, rb_str_new2("lsn"),
2010
+ INT2NUM(p_statbuf->lsn));
2011
+ rb_hash_aset(resultobj, rb_str_new2("size"),
2012
+ INT2NUM(p_statbuf->size));
2013
+ rb_hash_aset(resultobj, rb_str_new2("secsize"),
2014
+ INT2NUM(p_statbuf->secsize));
2015
+ rb_hash_aset(resultobj, rb_str_new2("type"),
2016
+ INT2NUM(p_statbuf->type));
2017
+ free (p_statbuf);
2018
+ return resultobj;
2019
+ }
2020
+ }
2021
+ return vresult;
2022
+ }
2023
+
2024
+
2025
+ static VALUE
2026
+ _wrap_ifs_stat(int argc, VALUE *argv, VALUE self) {
2027
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2028
+ char *arg2 ;
2029
+ IsoStat_t *result;
2030
+ VALUE vresult = Qnil;
2031
+
2032
+ if ((argc < 2) || (argc > 2))
2033
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
2034
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2035
+ arg2 = StringValuePtr(argv[1]);
2036
+ result = (IsoStat_t *)iso9660_ifs_stat(arg1,(char const (*))arg2);
2037
+
2038
+ {
2039
+ iso9660_stat_t *p_statbuf = result;
2040
+
2041
+ if (result) {
2042
+ VALUE resultobj = rb_hash_new();
2043
+ rb_hash_aset(resultobj, rb_str_new2("filename"),
2044
+ rb_str_new2(p_statbuf->filename));
2045
+ rb_hash_aset(resultobj, rb_str_new2("lsn"),
2046
+ INT2NUM(p_statbuf->lsn));
2047
+ rb_hash_aset(resultobj, rb_str_new2("size"),
2048
+ INT2NUM(p_statbuf->size));
2049
+ rb_hash_aset(resultobj, rb_str_new2("secsize"),
2050
+ INT2NUM(p_statbuf->secsize));
2051
+ rb_hash_aset(resultobj, rb_str_new2("type"),
2052
+ INT2NUM(p_statbuf->type));
2053
+ free (p_statbuf);
2054
+ return resultobj;
2055
+ }
2056
+ }
2057
+ return vresult;
2058
+ }
2059
+
2060
+
2061
+ static VALUE
2062
+ _wrap_ifs_stat_translate(int argc, VALUE *argv, VALUE self) {
2063
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2064
+ char *arg2 ;
2065
+ IsoStat_t *result;
2066
+ VALUE vresult = Qnil;
2067
+
2068
+ if ((argc < 2) || (argc > 2))
2069
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
2070
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2071
+ arg2 = StringValuePtr(argv[1]);
2072
+ result = (IsoStat_t *)iso9660_ifs_stat_translate(arg1,(char const (*))arg2);
2073
+
2074
+ {
2075
+ iso9660_stat_t *p_statbuf = result;
2076
+
2077
+ if (result) {
2078
+ VALUE resultobj = rb_hash_new();
2079
+ rb_hash_aset(resultobj, rb_str_new2("filename"),
2080
+ rb_str_new2(p_statbuf->filename));
2081
+ rb_hash_aset(resultobj, rb_str_new2("lsn"),
2082
+ INT2NUM(p_statbuf->lsn));
2083
+ rb_hash_aset(resultobj, rb_str_new2("size"),
2084
+ INT2NUM(p_statbuf->size));
2085
+ rb_hash_aset(resultobj, rb_str_new2("secsize"),
2086
+ INT2NUM(p_statbuf->secsize));
2087
+ rb_hash_aset(resultobj, rb_str_new2("type"),
2088
+ INT2NUM(p_statbuf->type));
2089
+ free (p_statbuf);
2090
+ return resultobj;
2091
+ }
2092
+ }
2093
+ return vresult;
2094
+ }
2095
+
2096
+
2097
+ static VALUE
2098
+ _wrap_fs_readdir(int argc, VALUE *argv, VALUE self) {
2099
+ CdIo_t *arg1 = (CdIo_t *) 0 ;
2100
+ char *arg2 ;
2101
+ IsoStatList_t *result;
2102
+ VALUE vresult = Qnil;
2103
+
2104
+ if ((argc < 2) || (argc > 2))
2105
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
2106
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_CdIo_t, 0);
2107
+ arg2 = StringValuePtr(argv[1]);
2108
+ result = (IsoStatList_t *)fs_readdir(arg1,(char const (*))arg2);
2109
+
2110
+ {
2111
+ CdioList_t *p_entlist = result;
2112
+ CdioListNode_t *p_entnode;
2113
+
2114
+ if (result) {
2115
+ VALUE resultobj = rb_ary_new();
2116
+ _CDIO_LIST_FOREACH (p_entnode, p_entlist) {
2117
+ VALUE stat = rb_hash_new();
2118
+ iso9660_stat_t *p_statbuf =
2119
+ (iso9660_stat_t *) _cdio_list_node_data (p_entnode);
2120
+
2121
+ rb_hash_aset(stat, rb_str_new2("filename"),
2122
+ rb_str_new2(p_statbuf->filename));
2123
+ rb_hash_aset(stat, rb_str_new2("lsn"),
2124
+ INT2NUM(p_statbuf->lsn));
2125
+ rb_hash_aset(stat, rb_str_new2("size"),
2126
+ INT2NUM(p_statbuf->size));
2127
+ rb_hash_aset(stat, rb_str_new2("secsize"),
2128
+ INT2NUM(p_statbuf->secsize));
2129
+ rb_hash_aset(stat, rb_str_new2("type"),
2130
+ INT2NUM(p_statbuf->type));
2131
+ rb_ary_push(resultobj, stat);
2132
+
2133
+ }
2134
+ _cdio_list_free(result, 1);
2135
+ return resultobj;
2136
+ }
2137
+ }
2138
+ return vresult;
2139
+ }
2140
+
2141
+
2142
+ static VALUE
2143
+ _wrap_ifs_readdir(int argc, VALUE *argv, VALUE self) {
2144
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2145
+ char *arg2 ;
2146
+ IsoStatList_t *result;
2147
+ VALUE vresult = Qnil;
2148
+
2149
+ if ((argc < 2) || (argc > 2))
2150
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
2151
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2152
+ arg2 = StringValuePtr(argv[1]);
2153
+ result = (IsoStatList_t *)ifs_readdir(arg1,(char const (*))arg2);
2154
+
2155
+ {
2156
+ CdioList_t *p_entlist = result;
2157
+ CdioListNode_t *p_entnode;
2158
+
2159
+ if (result) {
2160
+ VALUE resultobj = rb_ary_new();
2161
+ _CDIO_LIST_FOREACH (p_entnode, p_entlist) {
2162
+ VALUE stat = rb_hash_new();
2163
+ iso9660_stat_t *p_statbuf =
2164
+ (iso9660_stat_t *) _cdio_list_node_data (p_entnode);
2165
+
2166
+ rb_hash_aset(stat, rb_str_new2("filename"),
2167
+ rb_str_new2(p_statbuf->filename));
2168
+ rb_hash_aset(stat, rb_str_new2("lsn"),
2169
+ INT2NUM(p_statbuf->lsn));
2170
+ rb_hash_aset(stat, rb_str_new2("size"),
2171
+ INT2NUM(p_statbuf->size));
2172
+ rb_hash_aset(stat, rb_str_new2("secsize"),
2173
+ INT2NUM(p_statbuf->secsize));
2174
+ rb_hash_aset(stat, rb_str_new2("type"),
2175
+ INT2NUM(p_statbuf->type));
2176
+ rb_ary_push(resultobj, stat);
2177
+
2178
+ }
2179
+ _cdio_list_free(result, 1);
2180
+ return resultobj;
2181
+ }
2182
+ }
2183
+ return vresult;
2184
+ }
2185
+
2186
+
2187
+ static VALUE
2188
+ _wrap_get_application_id(int argc, VALUE *argv, VALUE self) {
2189
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2190
+ char *result;
2191
+ VALUE vresult = Qnil;
2192
+
2193
+ if ((argc < 1) || (argc > 1))
2194
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2195
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2196
+ result = (char *)iso9660_get_application_id(arg1);
2197
+
2198
+ vresult = rb_str_new2(result);
2199
+ return vresult;
2200
+ }
2201
+
2202
+
2203
+ static VALUE
2204
+ _wrap_ifs_get_application_id(int argc, VALUE *argv, VALUE self) {
2205
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2206
+ string_or_nil_t result;
2207
+ VALUE vresult = Qnil;
2208
+
2209
+ if ((argc < 1) || (argc > 1))
2210
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2211
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2212
+ result = (string_or_nil_t)ifs_get_application_id(arg1);
2213
+
2214
+ {
2215
+ if (result == NULL) return Qnil;
2216
+ vresult = rb_str_new2(result);
2217
+ }
2218
+ free(result);
2219
+ return vresult;
2220
+ }
2221
+
2222
+
2223
+ static VALUE
2224
+ _wrap_get_joliet_level(int argc, VALUE *argv, VALUE self) {
2225
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2226
+ unsigned char result;
2227
+ VALUE vresult = Qnil;
2228
+
2229
+ if ((argc < 1) || (argc > 1))
2230
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2231
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2232
+ result = (unsigned char)iso9660_ifs_get_joliet_level(arg1);
2233
+
2234
+ vresult = UINT2NUM(result);
2235
+ return vresult;
2236
+ }
2237
+
2238
+
2239
+ static VALUE
2240
+ _wrap_get_dir_len(int argc, VALUE *argv, VALUE self) {
2241
+ iso9660_dir_t *arg1 = (iso9660_dir_t *) 0 ;
2242
+ unsigned char result;
2243
+ VALUE vresult = Qnil;
2244
+
2245
+ if ((argc < 1) || (argc > 1))
2246
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2247
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_dir_t, 0);
2248
+ result = (unsigned char)iso9660_get_dir_len((iso9660_dir_t const *)arg1);
2249
+
2250
+ vresult = UINT2NUM(result);
2251
+ return vresult;
2252
+ }
2253
+
2254
+
2255
+ static VALUE
2256
+ _wrap_iso9660_dir_to_name(int argc, VALUE *argv, VALUE self) {
2257
+ iso9660_dir_t *arg1 = (iso9660_dir_t *) 0 ;
2258
+ char *result;
2259
+ VALUE vresult = Qnil;
2260
+
2261
+ if ((argc < 1) || (argc > 1))
2262
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2263
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_dir_t, 0);
2264
+ result = (char *)iso9660_dir_to_name((iso9660_dir_t const *)arg1);
2265
+
2266
+ vresult = rb_str_new2(result);
2267
+ free(result);
2268
+ return vresult;
2269
+ }
2270
+
2271
+
2272
+ static VALUE
2273
+ _wrap_get_preparer_id(int argc, VALUE *argv, VALUE self) {
2274
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2275
+ char *result;
2276
+ VALUE vresult = Qnil;
2277
+
2278
+ if ((argc < 1) || (argc > 1))
2279
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2280
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2281
+ result = (char *)iso9660_get_preparer_id((iso9660_pvd_t const *)arg1);
2282
+
2283
+ vresult = rb_str_new2(result);
2284
+ return vresult;
2285
+ }
2286
+
2287
+
2288
+ static VALUE
2289
+ _wrap_ifs_get_preparer_id(int argc, VALUE *argv, VALUE self) {
2290
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2291
+ string_or_nil_t result;
2292
+ VALUE vresult = Qnil;
2293
+
2294
+ if ((argc < 1) || (argc > 1))
2295
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2296
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2297
+ result = (string_or_nil_t)ifs_get_preparer_id(arg1);
2298
+
2299
+ {
2300
+ if (result == NULL) return Qnil;
2301
+ vresult = rb_str_new2(result);
2302
+ }
2303
+ free(result);
2304
+ return vresult;
2305
+ }
2306
+
2307
+
2308
+ static VALUE
2309
+ _wrap_get_publisher_id(int argc, VALUE *argv, VALUE self) {
2310
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2311
+ char *result;
2312
+ VALUE vresult = Qnil;
2313
+
2314
+ if ((argc < 1) || (argc > 1))
2315
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2316
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2317
+ result = (char *)iso9660_get_publisher_id((iso9660_pvd_t const *)arg1);
2318
+
2319
+ vresult = rb_str_new2(result);
2320
+ return vresult;
2321
+ }
2322
+
2323
+
2324
+ static VALUE
2325
+ _wrap_ifs_get_publisher_id(int argc, VALUE *argv, VALUE self) {
2326
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2327
+ string_or_nil_t result;
2328
+ VALUE vresult = Qnil;
2329
+
2330
+ if ((argc < 1) || (argc > 1))
2331
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2332
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2333
+ result = (string_or_nil_t)ifs_get_publisher_id(arg1);
2334
+
2335
+ {
2336
+ if (result == NULL) return Qnil;
2337
+ vresult = rb_str_new2(result);
2338
+ }
2339
+ free(result);
2340
+ return vresult;
2341
+ }
2342
+
2343
+
2344
+ static VALUE
2345
+ _wrap_get_pvd_type(int argc, VALUE *argv, VALUE self) {
2346
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2347
+ unsigned char result;
2348
+ VALUE vresult = Qnil;
2349
+
2350
+ if ((argc < 1) || (argc > 1))
2351
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2352
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2353
+ result = (unsigned char)iso9660_get_pvd_type((iso9660_pvd_t const *)arg1);
2354
+
2355
+ vresult = UINT2NUM(result);
2356
+ return vresult;
2357
+ }
2358
+
2359
+
2360
+ static VALUE
2361
+ _wrap_get_pvd_id(int argc, VALUE *argv, VALUE self) {
2362
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2363
+ char *result;
2364
+ VALUE vresult = Qnil;
2365
+
2366
+ if ((argc < 1) || (argc > 1))
2367
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2368
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2369
+ result = (char *)iso9660_get_pvd_id((iso9660_pvd_t const *)arg1);
2370
+
2371
+ vresult = rb_str_new2(result);
2372
+ return vresult;
2373
+ }
2374
+
2375
+
2376
+ static VALUE
2377
+ _wrap_get_pvd_space_size(int argc, VALUE *argv, VALUE self) {
2378
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2379
+ int result;
2380
+ VALUE vresult = Qnil;
2381
+
2382
+ if ((argc < 1) || (argc > 1))
2383
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2384
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2385
+ result = (int)iso9660_get_pvd_space_size((iso9660_pvd_t const *)arg1);
2386
+
2387
+ vresult = INT2NUM(result);
2388
+ return vresult;
2389
+ }
2390
+
2391
+
2392
+ static VALUE
2393
+ _wrap_get_pvd_block_size(int argc, VALUE *argv, VALUE self) {
2394
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2395
+ int result;
2396
+ VALUE vresult = Qnil;
2397
+
2398
+ if ((argc < 1) || (argc > 1))
2399
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2400
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2401
+ result = (int)iso9660_get_pvd_block_size((iso9660_pvd_t const *)arg1);
2402
+
2403
+ vresult = INT2NUM(result);
2404
+ return vresult;
2405
+ }
2406
+
2407
+
2408
+ static VALUE
2409
+ _wrap_get_pvd_version(int argc, VALUE *argv, VALUE self) {
2410
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2411
+ int result;
2412
+ VALUE vresult = Qnil;
2413
+
2414
+ if ((argc < 1) || (argc > 1))
2415
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2416
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2417
+ result = (int)iso9660_get_pvd_version((iso9660_pvd_t const *)arg1);
2418
+
2419
+ vresult = INT2NUM(result);
2420
+ return vresult;
2421
+ }
2422
+
2423
+
2424
+ static VALUE
2425
+ _wrap_get_system_id(int argc, VALUE *argv, VALUE self) {
2426
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2427
+ char *result;
2428
+ VALUE vresult = Qnil;
2429
+
2430
+ if ((argc < 1) || (argc > 1))
2431
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2432
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2433
+ result = (char *)iso9660_get_system_id((iso9660_pvd_t const *)arg1);
2434
+
2435
+ vresult = rb_str_new2(result);
2436
+ return vresult;
2437
+ }
2438
+
2439
+
2440
+ static VALUE
2441
+ _wrap_ifs_get_system_id(int argc, VALUE *argv, VALUE self) {
2442
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2443
+ char *result;
2444
+ VALUE vresult = Qnil;
2445
+
2446
+ if ((argc < 1) || (argc > 1))
2447
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2448
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2449
+ result = (char *)ifs_get_system_id(arg1);
2450
+
2451
+ vresult = rb_str_new2(result);
2452
+ free(result);
2453
+ return vresult;
2454
+ }
2455
+
2456
+
2457
+ static VALUE
2458
+ _wrap_get_root_lsn(int argc, VALUE *argv, VALUE self) {
2459
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2460
+ lsn_t result;
2461
+ VALUE vresult = Qnil;
2462
+
2463
+ if ((argc < 1) || (argc > 1))
2464
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2465
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2466
+ result = (lsn_t)iso9660_get_root_lsn((iso9660_pvd_t const *)arg1);
2467
+
2468
+ vresult = INT2NUM(result);
2469
+ return vresult;
2470
+ }
2471
+
2472
+
2473
+ static VALUE
2474
+ _wrap_get_volume_id(int argc, VALUE *argv, VALUE self) {
2475
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2476
+ char *result;
2477
+ VALUE vresult = Qnil;
2478
+
2479
+ if ((argc < 1) || (argc > 1))
2480
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2481
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2482
+ result = (char *)iso9660_get_volume_id((iso9660_pvd_t const *)arg1);
2483
+
2484
+ vresult = rb_str_new2(result);
2485
+ return vresult;
2486
+ }
2487
+
2488
+
2489
+ static VALUE
2490
+ _wrap_ifs_get_volume_id(int argc, VALUE *argv, VALUE self) {
2491
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2492
+ char *result;
2493
+ VALUE vresult = Qnil;
2494
+
2495
+ if ((argc < 1) || (argc > 1))
2496
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2497
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2498
+ result = (char *)ifs_get_volume_id(arg1);
2499
+
2500
+ vresult = rb_str_new2(result);
2501
+ free(result);
2502
+ return vresult;
2503
+ }
2504
+
2505
+
2506
+ static VALUE
2507
+ _wrap_get_volumeset_id(int argc, VALUE *argv, VALUE self) {
2508
+ iso9660_pvd_t *arg1 = (iso9660_pvd_t *) 0 ;
2509
+ char *result;
2510
+ VALUE vresult = Qnil;
2511
+
2512
+ if ((argc < 1) || (argc > 1))
2513
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2514
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_pvd_t, 0);
2515
+ result = (char *)iso9660_get_volumeset_id((iso9660_pvd_t const *)arg1);
2516
+
2517
+ vresult = rb_str_new2(result);
2518
+ return vresult;
2519
+ }
2520
+
2521
+
2522
+ static VALUE
2523
+ _wrap_ifs_get_volumeset_id(int argc, VALUE *argv, VALUE self) {
2524
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2525
+ string_or_nil_t result;
2526
+ VALUE vresult = Qnil;
2527
+
2528
+ if ((argc < 1) || (argc > 1))
2529
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2530
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2531
+ result = (string_or_nil_t)ifs_get_volumeset_id(arg1);
2532
+
2533
+ {
2534
+ if (result == NULL) return Qnil;
2535
+ vresult = rb_str_new2(result);
2536
+ }
2537
+ free(result);
2538
+ return vresult;
2539
+ }
2540
+
2541
+
2542
+ static VALUE
2543
+ _wrap_pathtable_init(int argc, VALUE *argv, VALUE self) {
2544
+ void *arg1 = (void *) 0 ;
2545
+
2546
+ if ((argc < 1) || (argc > 1))
2547
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2548
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, SWIG_POINTER_EXCEPTION|0);
2549
+ iso9660_pathtable_init(arg1);
2550
+
2551
+ return Qnil;
2552
+ }
2553
+
2554
+
2555
+ static VALUE
2556
+ _wrap_pathtable_get_size(int argc, VALUE *argv, VALUE self) {
2557
+ void *arg1 = (void *) 0 ;
2558
+ unsigned int result;
2559
+ VALUE vresult = Qnil;
2560
+
2561
+ if ((argc < 1) || (argc > 1))
2562
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2563
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, SWIG_POINTER_EXCEPTION|0);
2564
+ result = (unsigned int)iso9660_pathtable_get_size((void const *)arg1);
2565
+
2566
+ vresult = UINT2NUM(result);
2567
+ return vresult;
2568
+ }
2569
+
2570
+
2571
+ static VALUE
2572
+ _wrap_pathtable_l_add_entry(int argc, VALUE *argv, VALUE self) {
2573
+ void *arg1 = (void *) 0 ;
2574
+ char *arg2 ;
2575
+ unsigned int arg3 ;
2576
+ unsigned int arg4 ;
2577
+ unsigned int result;
2578
+ VALUE vresult = Qnil;
2579
+
2580
+ if ((argc < 4) || (argc > 4))
2581
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
2582
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, SWIG_POINTER_EXCEPTION|0);
2583
+ arg2 = StringValuePtr(argv[1]);
2584
+ arg3 = NUM2UINT(argv[2]);
2585
+ arg4 = NUM2UINT(argv[3]);
2586
+ result = (unsigned int)iso9660_pathtable_l_add_entry(arg1,(char const (*))arg2,arg3,arg4);
2587
+
2588
+ vresult = UINT2NUM(result);
2589
+ return vresult;
2590
+ }
2591
+
2592
+
2593
+ static VALUE
2594
+ _wrap_pathtable_m_add_entry(int argc, VALUE *argv, VALUE self) {
2595
+ void *arg1 = (void *) 0 ;
2596
+ char *arg2 ;
2597
+ unsigned int arg3 ;
2598
+ unsigned int arg4 ;
2599
+ unsigned int result;
2600
+ VALUE vresult = Qnil;
2601
+
2602
+ if ((argc < 4) || (argc > 4))
2603
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
2604
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, SWIG_POINTER_EXCEPTION|0);
2605
+ arg2 = StringValuePtr(argv[1]);
2606
+ arg3 = NUM2UINT(argv[2]);
2607
+ arg4 = NUM2UINT(argv[3]);
2608
+ result = (unsigned int)iso9660_pathtable_m_add_entry(arg1,(char const (*))arg2,arg3,arg4);
2609
+
2610
+ vresult = UINT2NUM(result);
2611
+ return vresult;
2612
+ }
2613
+
2614
+
2615
+ static VALUE
2616
+ _wrap_set_evd(int argc, VALUE *argv, VALUE self) {
2617
+ void *arg1 = (void *) 0 ;
2618
+
2619
+ if ((argc < 1) || (argc > 1))
2620
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2621
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, SWIG_POINTER_EXCEPTION|0);
2622
+ iso9660_set_evd(arg1);
2623
+
2624
+ return Qnil;
2625
+ }
2626
+
2627
+
2628
+ static VALUE
2629
+ _wrap_xaq___(int argc, VALUE *argv, VALUE self) {
2630
+ iso9660_t *arg1 = (iso9660_t *) 0 ;
2631
+ bool result;
2632
+ VALUE vresult = Qnil;
2633
+
2634
+ if ((argc < 1) || (argc > 1))
2635
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2636
+ SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_iso9660_t, 0);
2637
+ result = (bool)iso9660_ifs_is_xa((iso9660_t const *)arg1);
2638
+
2639
+ vresult = (result != 0) ? Qtrue : Qfalse;
2640
+ return vresult;
2641
+ }
2642
+
2643
+
2644
+
2645
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
2646
+
2647
+ static swig_type_info _swigt__p_Buf_tuple_t = {"_p_Buf_tuple_t", "Buf_tuple_t *", 0, 0, 0};
2648
+ static swig_type_info _swigt__p_CdIo_t = {"_p_CdIo_t", "CdIo_t *", 0, 0, 0};
2649
+ static swig_type_info _swigt__p_CdioList_t = {"_p_CdioList_t", "CdioList_t *|IsoStatList_t *", 0, 0, 0};
2650
+ static swig_type_info _swigt__p_cdio_read_mode_t = {"_p_cdio_read_mode_t", "enum cdio_read_mode_t *|cdio_read_mode_t *", 0, 0, 0};
2651
+ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, 0};
2652
+ static swig_type_info _swigt__p_int = {"_p_int", "int *|lba_t *", 0, 0, 0};
2653
+ static swig_type_info _swigt__p_iso9660_dir_t = {"_p_iso9660_dir_t", "iso9660_dir_t *", 0, 0, 0};
2654
+ static swig_type_info _swigt__p_iso9660_dtime_t = {"_p_iso9660_dtime_t", "iso9660_dtime_t *", 0, 0, 0};
2655
+ static swig_type_info _swigt__p_iso9660_ltime_t = {"_p_iso9660_ltime_t", "iso9660_ltime_t *", 0, 0, 0};
2656
+ static swig_type_info _swigt__p_iso9660_pvd_t = {"_p_iso9660_pvd_t", "iso9660_pvd_t *", 0, 0, 0};
2657
+ static swig_type_info _swigt__p_iso9660_stat_t = {"_p_iso9660_stat_t", "iso9660_stat_t *|IsoStat_t *", 0, 0, 0};
2658
+ static swig_type_info _swigt__p_iso9660_t = {"_p_iso9660_t", "iso9660_t *", 0, 0, 0};
2659
+ static swig_type_info _swigt__p_long = {"_p_long", "long *|ssize_t *", 0, 0, 0};
2660
+ static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|iso_extension_mask_t *", 0, 0, 0};
2661
+ static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "unsigned long *|VALUE *", 0, 0, 0};
2662
+
2663
+ static swig_type_info *swig_type_initial[] = {
2664
+ &_swigt__p_Buf_tuple_t,
2665
+ &_swigt__p_CdIo_t,
2666
+ &_swigt__p_CdioList_t,
2667
+ &_swigt__p_cdio_read_mode_t,
2668
+ &_swigt__p_char,
2669
+ &_swigt__p_int,
2670
+ &_swigt__p_iso9660_dir_t,
2671
+ &_swigt__p_iso9660_dtime_t,
2672
+ &_swigt__p_iso9660_ltime_t,
2673
+ &_swigt__p_iso9660_pvd_t,
2674
+ &_swigt__p_iso9660_stat_t,
2675
+ &_swigt__p_iso9660_t,
2676
+ &_swigt__p_long,
2677
+ &_swigt__p_unsigned_int,
2678
+ &_swigt__p_unsigned_long,
2679
+ };
2680
+
2681
+ static swig_cast_info _swigc__p_Buf_tuple_t[] = { {&_swigt__p_Buf_tuple_t, 0, 0, 0},{0, 0, 0, 0}};
2682
+ static swig_cast_info _swigc__p_CdIo_t[] = { {&_swigt__p_CdIo_t, 0, 0, 0},{0, 0, 0, 0}};
2683
+ static swig_cast_info _swigc__p_CdioList_t[] = { {&_swigt__p_CdioList_t, 0, 0, 0},{0, 0, 0, 0}};
2684
+ static swig_cast_info _swigc__p_cdio_read_mode_t[] = { {&_swigt__p_cdio_read_mode_t, 0, 0, 0},{0, 0, 0, 0}};
2685
+ static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
2686
+ static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
2687
+ static swig_cast_info _swigc__p_iso9660_dir_t[] = { {&_swigt__p_iso9660_dir_t, 0, 0, 0},{0, 0, 0, 0}};
2688
+ static swig_cast_info _swigc__p_iso9660_dtime_t[] = { {&_swigt__p_iso9660_dtime_t, 0, 0, 0},{0, 0, 0, 0}};
2689
+ static swig_cast_info _swigc__p_iso9660_ltime_t[] = { {&_swigt__p_iso9660_ltime_t, 0, 0, 0},{0, 0, 0, 0}};
2690
+ static swig_cast_info _swigc__p_iso9660_pvd_t[] = { {&_swigt__p_iso9660_pvd_t, 0, 0, 0},{0, 0, 0, 0}};
2691
+ static swig_cast_info _swigc__p_iso9660_stat_t[] = { {&_swigt__p_iso9660_stat_t, 0, 0, 0},{0, 0, 0, 0}};
2692
+ static swig_cast_info _swigc__p_iso9660_t[] = { {&_swigt__p_iso9660_t, 0, 0, 0},{0, 0, 0, 0}};
2693
+ static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
2694
+ static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
2695
+ static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
2696
+
2697
+ static swig_cast_info *swig_cast_initial[] = {
2698
+ _swigc__p_Buf_tuple_t,
2699
+ _swigc__p_CdIo_t,
2700
+ _swigc__p_CdioList_t,
2701
+ _swigc__p_cdio_read_mode_t,
2702
+ _swigc__p_char,
2703
+ _swigc__p_int,
2704
+ _swigc__p_iso9660_dir_t,
2705
+ _swigc__p_iso9660_dtime_t,
2706
+ _swigc__p_iso9660_ltime_t,
2707
+ _swigc__p_iso9660_pvd_t,
2708
+ _swigc__p_iso9660_stat_t,
2709
+ _swigc__p_iso9660_t,
2710
+ _swigc__p_long,
2711
+ _swigc__p_unsigned_int,
2712
+ _swigc__p_unsigned_long,
2713
+ };
2714
+
2715
+
2716
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
2717
+
2718
+ /*************************************************************************
2719
+ * Type initialization:
2720
+ * This problem is tough by the requirement that no dynamic
2721
+ * memory is used. Also, since swig_type_info structures store pointers to
2722
+ * swig_cast_info structures and swig_cast_info structures store pointers back
2723
+ * to swig_type_info structures, we need some lookup code at initialization.
2724
+ * The idea is that swig generates all the structures that are needed.
2725
+ * The runtime then collects these partially filled structures.
2726
+ * The SWIG_InitializeModule function takes these initial arrays out of
2727
+ * swig_module, and does all the lookup, filling in the swig_module.types
2728
+ * array with the correct data and linking the correct swig_cast_info
2729
+ * structures together.
2730
+
2731
+ * The generated swig_type_info structures are assigned staticly to an initial
2732
+ * array. We just loop though that array, and handle each type individually.
2733
+ * First we lookup if this type has been already loaded, and if so, use the
2734
+ * loaded structure instead of the generated one. Then we have to fill in the
2735
+ * cast linked list. The cast data is initially stored in something like a
2736
+ * two-dimensional array. Each row corresponds to a type (there are the same
2737
+ * number of rows as there are in the swig_type_initial array). Each entry in
2738
+ * a column is one of the swig_cast_info structures for that type.
2739
+ * The cast_initial array is actually an array of arrays, because each row has
2740
+ * a variable number of columns. So to actually build the cast linked list,
2741
+ * we find the array of casts associated with the type, and loop through it
2742
+ * adding the casts to the list. The one last trick we need to do is making
2743
+ * sure the type pointer in the swig_cast_info struct is correct.
2744
+
2745
+ * First off, we lookup the cast->type name to see if it is already loaded.
2746
+ * There are three cases to handle:
2747
+ * 1) If the cast->type has already been loaded AND the type we are adding
2748
+ * casting info to has not been loaded (it is in this module), THEN we
2749
+ * replace the cast->type pointer with the type pointer that has already
2750
+ * been loaded.
2751
+ * 2) If BOTH types (the one we are adding casting info to, and the
2752
+ * cast->type) are loaded, THEN the cast info has already been loaded by
2753
+ * the previous module so we just ignore it.
2754
+ * 3) Finally, if cast->type has not already been loaded, then we add that
2755
+ * swig_cast_info to the linked list (because the cast->type) pointer will
2756
+ * be correct.
2757
+ **/
2758
+
2759
+ #ifdef __cplusplus
2760
+ extern "C" {
2761
+ #endif
2762
+
2763
+ SWIGRUNTIME void
2764
+ SWIG_InitializeModule(void *clientdata) {
2765
+ swig_type_info *type, *ret;
2766
+ swig_cast_info *cast;
2767
+ size_t i;
2768
+ swig_module_info *module_head;
2769
+ static int init_run = 0;
2770
+
2771
+ clientdata = clientdata;
2772
+
2773
+ if (init_run) return;
2774
+ init_run = 1;
2775
+
2776
+ /* Initialize the swig_module */
2777
+ swig_module.type_initial = swig_type_initial;
2778
+ swig_module.cast_initial = swig_cast_initial;
2779
+
2780
+ /* Try and load any already created modules */
2781
+ module_head = SWIG_GetModule(clientdata);
2782
+ if (module_head) {
2783
+ swig_module.next = module_head->next;
2784
+ module_head->next = &swig_module;
2785
+ } else {
2786
+ /* This is the first module loaded */
2787
+ swig_module.next = &swig_module;
2788
+ SWIG_SetModule(clientdata, &swig_module);
2789
+ }
2790
+
2791
+ /* Now work on filling in swig_module.types */
2792
+ for (i = 0; i < swig_module.size; ++i) {
2793
+ type = 0;
2794
+
2795
+ /* if there is another module already loaded */
2796
+ if (swig_module.next != &swig_module) {
2797
+ type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
2798
+ }
2799
+ if (type) {
2800
+ /* Overwrite clientdata field */
2801
+ if (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata;
2802
+ } else {
2803
+ type = swig_module.type_initial[i];
2804
+ }
2805
+
2806
+ /* Insert casting types */
2807
+ cast = swig_module.cast_initial[i];
2808
+ while (cast->type) {
2809
+
2810
+ /* Don't need to add information already in the list */
2811
+ ret = 0;
2812
+ if (swig_module.next != &swig_module) {
2813
+ ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
2814
+ }
2815
+ if (ret && type == swig_module.type_initial[i]) {
2816
+ cast->type = ret;
2817
+ ret = 0;
2818
+ }
2819
+
2820
+ if (!ret) {
2821
+ if (type->cast) {
2822
+ type->cast->prev = cast;
2823
+ cast->next = type->cast;
2824
+ }
2825
+ type->cast = cast;
2826
+ }
2827
+
2828
+ cast++;
2829
+ }
2830
+
2831
+ /* Set entry in modules->types array equal to the type */
2832
+ swig_module.types[i] = type;
2833
+ }
2834
+ swig_module.types[i] = 0;
2835
+ }
2836
+
2837
+ /* This function will propagate the clientdata field of type to
2838
+ * any new swig_type_info structures that have been added into the list
2839
+ * of equivalent types. It is like calling
2840
+ * SWIG_TypeClientData(type, clientdata) a second time.
2841
+ */
2842
+ SWIGRUNTIME void
2843
+ SWIG_PropagateClientData(void) {
2844
+ size_t i;
2845
+ swig_cast_info *equiv;
2846
+ static int init_run = 0;
2847
+
2848
+ if (init_run) return;
2849
+ init_run = 1;
2850
+
2851
+ for (i = 0; i < swig_module.size; i++) {
2852
+ if (swig_module.types[i]->clientdata) {
2853
+ equiv = swig_module.types[i]->cast;
2854
+ while (equiv) {
2855
+ if (!equiv->converter) {
2856
+ if (equiv->type && !equiv->type->clientdata)
2857
+ SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
2858
+ }
2859
+ equiv = equiv->next;
2860
+ }
2861
+ }
2862
+ }
2863
+ }
2864
+
2865
+ #ifdef __cplusplus
2866
+ }
2867
+ #endif
2868
+
2869
+
2870
+ #ifdef __cplusplus
2871
+ extern "C"
2872
+ #endif
2873
+ SWIGEXPORT void Init_rubyiso9660(void) {
2874
+ size_t i;
2875
+
2876
+ SWIG_InitRuntime();
2877
+ mRubyiso9660 = rb_define_module("Rubyiso9660");
2878
+
2879
+ SWIG_InitializeModule(0);
2880
+ for (i = 0; i < swig_module.size; i++) {
2881
+ SWIG_define_class(swig_module.types[i]);
2882
+ }
2883
+
2884
+ SWIG_RubyInitializeTrackings();
2885
+ rb_define_const(mRubyiso9660,"VERSION_NUM", INT2NUM(LIBCDIO_VERSION_NUM));
2886
+ rb_define_const(mRubyiso9660,"INVALID_LBA", INT2NUM(CDIO_INVALID_LBA));
2887
+ rb_define_const(mRubyiso9660,"INVALID_LSN", INT2NUM(CDIO_INVALID_LSN));
2888
+ rb_define_const(mRubyiso9660,"CD_FRAMESIZE", INT2NUM(CDIO_CD_FRAMESIZE));
2889
+ rb_define_const(mRubyiso9660,"CD_FRAMESIZE_RAW", INT2NUM(CDIO_CD_FRAMESIZE_RAW));
2890
+ rb_define_const(mRubyiso9660,"ISO_BLOCKSIZE", INT2NUM(CDIO_CD_FRAMESIZE));
2891
+ rb_define_const(mRubyiso9660,"M2F2_SECTOR_SIZE", INT2NUM(M2F2_SECTOR_SIZE));
2892
+ rb_define_const(mRubyiso9660,"M2RAW_SECTOR_SIZE", INT2NUM(M2RAW_SECTOR_SIZE));
2893
+ rb_define_const(mRubyiso9660,"CDIO_READ_MODE_AUDIO", INT2NUM(CDIO_READ_MODE_AUDIO));
2894
+ rb_define_const(mRubyiso9660,"CDIO_READ_MODE_M1F1", INT2NUM(CDIO_READ_MODE_M1F1));
2895
+ rb_define_const(mRubyiso9660,"CDIO_READ_MODE_M1F2", INT2NUM(CDIO_READ_MODE_M1F2));
2896
+ rb_define_const(mRubyiso9660,"CDIO_READ_MODE_M2F1", INT2NUM(CDIO_READ_MODE_M2F1));
2897
+ rb_define_const(mRubyiso9660,"CDIO_READ_MODE_M2F2", INT2NUM(CDIO_READ_MODE_M2F2));
2898
+ rb_define_module_function(mRubyiso9660, "cdio_read_sectors", _wrap_cdio_read_sectors, -1);
2899
+ rb_define_module_function(mRubyiso9660, "cdio_eject_media_drive", _wrap_cdio_eject_media_drive, -1);
2900
+ rb_define_const(mRubyiso9660,"PVD_SECTOR", INT2NUM(ISO_PVD_SECTOR));
2901
+ rb_define_const(mRubyiso9660,"EVD_SECTOR", INT2NUM(ISO_EVD_SECTOR));
2902
+ rb_define_const(mRubyiso9660,"LEN_ISONAME", INT2NUM(LEN_ISONAME));
2903
+ rb_define_const(mRubyiso9660,"MAX_SYSTEM_ID", INT2NUM(ISO_MAX_SYSTEM_ID));
2904
+ rb_define_const(mRubyiso9660,"MAX_ISONAME", INT2NUM(MAX_ISONAME));
2905
+ rb_define_const(mRubyiso9660,"MAX_PREPARER_ID", INT2NUM(ISO_MAX_PREPARER_ID));
2906
+ rb_define_const(mRubyiso9660,"MAX_ISOPATHNAME", INT2NUM(MAX_ISOPATHNAME));
2907
+ rb_define_const(mRubyiso9660,"FILE", INT2NUM(ISO_FILE));
2908
+ rb_define_const(mRubyiso9660,"EXISTENCE", INT2NUM(ISO_EXISTENCE));
2909
+ rb_define_const(mRubyiso9660,"DIRECTORY", INT2NUM(ISO_DIRECTORY));
2910
+ rb_define_const(mRubyiso9660,"ASSOCIATED", INT2NUM(ISO_ASSOCIATED));
2911
+ rb_define_const(mRubyiso9660,"RECORD", INT2NUM(ISO_RECORD));
2912
+ rb_define_const(mRubyiso9660,"PROTECTION", INT2NUM(ISO_PROTECTION));
2913
+ rb_define_const(mRubyiso9660,"DRESERVED1", INT2NUM(ISO_DRESERVED1));
2914
+ rb_define_const(mRubyiso9660,"DRESERVED2", INT2NUM(ISO_DRESERVED2));
2915
+ rb_define_const(mRubyiso9660,"MULTIEXTENT", INT2NUM(ISO_MULTIEXTENT));
2916
+ rb_define_const(mRubyiso9660,"VD_BOOT_RECORD", INT2NUM(ISO_VD_BOOT_RECORD));
2917
+ rb_define_const(mRubyiso9660,"VD_PRIMARY", INT2NUM(ISO_VD_PRIMARY));
2918
+ rb_define_const(mRubyiso9660,"VD_SUPPLEMENTARY", INT2NUM(ISO_VD_SUPPLEMENTARY));
2919
+ rb_define_const(mRubyiso9660,"VD_PARITION", INT2NUM(ISO_VD_PARITION));
2920
+ rb_define_const(mRubyiso9660,"VD_END", INT2NUM(ISO_VD_END));
2921
+ rb_define_const(mRubyiso9660,"MAX_PUBLISHER_ID", INT2NUM(ISO_MAX_PUBLISHER_ID));
2922
+ rb_define_const(mRubyiso9660,"MAX_APPLICATION_ID", INT2NUM(ISO_MAX_APPLICATION_ID));
2923
+ rb_define_const(mRubyiso9660,"MAX_VOLUME_ID", INT2NUM(ISO_MAX_VOLUME_ID));
2924
+ rb_define_const(mRubyiso9660,"MAX_VOLUMESET_ID", INT2NUM(ISO_MAX_VOLUMESET_ID));
2925
+ rb_define_const(mRubyiso9660,"NOCHECK", INT2NUM(ISO9660_NOCHECK));
2926
+ rb_define_const(mRubyiso9660,"SEVEN_BIT", INT2NUM(ISO9660_7BIT));
2927
+ rb_define_const(mRubyiso9660,"ACHARS", INT2NUM(ISO9660_ACHARS));
2928
+ rb_define_const(mRubyiso9660,"DCHARS", INT2NUM(ISO9660_DCHARS));
2929
+ rb_define_const(mRubyiso9660,"EXTENSION_JOLIET_LEVEL1", INT2NUM(ISO_EXTENSION_JOLIET_LEVEL1));
2930
+ rb_define_const(mRubyiso9660,"EXTENSION_JOLIET_LEVEL2", INT2NUM(ISO_EXTENSION_JOLIET_LEVEL2));
2931
+ rb_define_const(mRubyiso9660,"EXTENSION_JOLIET_LEVEL3", INT2NUM(ISO_EXTENSION_JOLIET_LEVEL3));
2932
+ rb_define_const(mRubyiso9660,"EXTENSION_ROCK_RIDGE", INT2NUM(ISO_EXTENSION_ROCK_RIDGE));
2933
+ rb_define_const(mRubyiso9660,"EXTENSION_HIGH_SIERRA", INT2NUM(ISO_EXTENSION_HIGH_SIERRA));
2934
+ rb_define_const(mRubyiso9660,"EXTENSION_ALL", INT2NUM(ISO_EXTENSION_ALL));
2935
+ rb_define_const(mRubyiso9660,"EXTENSION_NONE", INT2NUM(ISO_EXTENSION_NONE));
2936
+ rb_define_const(mRubyiso9660,"EXTENSION_JOLIET", INT2NUM(ISO_EXTENSION_JOLIET));
2937
+ rb_define_module_function(mRubyiso9660, "open_iso", _wrap_open_iso, -1);
2938
+ rb_define_module_function(mRubyiso9660, "open_ext", _wrap_open_ext, -1);
2939
+ rb_define_module_function(mRubyiso9660, "open_fuzzy", _wrap_open_fuzzy, -1);
2940
+ rb_define_module_function(mRubyiso9660, "iso9660_open_fuzzy_ext", _wrap_iso9660_open_fuzzy_ext, -1);
2941
+ rb_define_module_function(mRubyiso9660, "ifs_fuzzy_read_superblock", _wrap_ifs_fuzzy_read_superblock, -1);
2942
+ rb_define_module_function(mRubyiso9660, "close", _wrap_close, -1);
2943
+
2944
+ cBuf_tuple_t.klass = rb_define_class_under(mRubyiso9660, "Buf_tuple_t", rb_cObject);
2945
+ SWIG_TypeClientData(SWIGTYPE_p_Buf_tuple_t, (void *) &cBuf_tuple_t);
2946
+ rb_define_alloc_func(cBuf_tuple_t.klass, _wrap_Buf_tuple_t_allocate);
2947
+ rb_define_method(cBuf_tuple_t.klass, "initialize", _wrap_new_Buf_tuple_t, -1);
2948
+ rb_define_method(cBuf_tuple_t.klass, "data=", _wrap_Buf_tuple_t_data_set, -1);
2949
+ rb_define_method(cBuf_tuple_t.klass, "data", _wrap_Buf_tuple_t_data_get, -1);
2950
+ rb_define_method(cBuf_tuple_t.klass, "i_size=", _wrap_Buf_tuple_t_i_size_set, -1);
2951
+ rb_define_method(cBuf_tuple_t.klass, "i_size", _wrap_Buf_tuple_t_i_size_get, -1);
2952
+ cBuf_tuple_t.mark = 0;
2953
+ cBuf_tuple_t.destroy = (void (*)(void *)) free_Buf_tuple_t;
2954
+ rb_define_module_function(mRubyiso9660, "seek_read", _wrap_seek_read, -1);
2955
+ rb_define_module_function(mRubyiso9660, "fs_read_pvd", _wrap_fs_read_pvd, -1);
2956
+ rb_define_module_function(mRubyiso9660, "ifs_read_pvd", _wrap_ifs_read_pvd, -1);
2957
+ rb_define_module_function(mRubyiso9660, "fs_read_superblock", _wrap_fs_read_superblock, -1);
2958
+ rb_define_module_function(mRubyiso9660, "ifs_read_superblock", _wrap_ifs_read_superblock, -1);
2959
+ rb_define_module_function(mRubyiso9660, "set_dtime", _wrap_set_dtime, -1);
2960
+ rb_define_module_function(mRubyiso9660, "set_ltime", _wrap_set_ltime, -1);
2961
+ rb_define_module_function(mRubyiso9660, "get_dtime", _wrap_get_dtime, -1);
2962
+ rb_define_module_function(mRubyiso9660, "get_ltime", _wrap_get_ltime, -1);
2963
+ rb_define_module_function(mRubyiso9660, "dchar?", _wrap_dcharq___, -1);
2964
+ rb_define_module_function(mRubyiso9660, "achar?", _wrap_acharq___, -1);
2965
+ rb_define_module_function(mRubyiso9660, "name_translate", _wrap_name_translate, -1);
2966
+ rb_define_module_function(mRubyiso9660, "name_translate_ext", _wrap_name_translate_ext, -1);
2967
+ rb_define_module_function(mRubyiso9660, "strncpy_pad", _wrap_strncpy_pad, -1);
2968
+ rb_define_module_function(mRubyiso9660, "dirname_valid?", _wrap_dirname_validq___, -1);
2969
+ rb_define_module_function(mRubyiso9660, "pathname_isofy", _wrap_pathname_isofy, -1);
2970
+ rb_define_module_function(mRubyiso9660, "pathname_valid?", _wrap_pathname_validq___, -1);
2971
+ rb_define_module_function(mRubyiso9660, "fs_stat", _wrap_fs_stat, -1);
2972
+ rb_define_module_function(mRubyiso9660, "fs_stat_translate", _wrap_fs_stat_translate, -1);
2973
+ rb_define_module_function(mRubyiso9660, "ifs_stat", _wrap_ifs_stat, -1);
2974
+ rb_define_module_function(mRubyiso9660, "ifs_stat_translate", _wrap_ifs_stat_translate, -1);
2975
+ rb_define_module_function(mRubyiso9660, "fs_readdir", _wrap_fs_readdir, -1);
2976
+ rb_define_module_function(mRubyiso9660, "ifs_readdir", _wrap_ifs_readdir, -1);
2977
+ rb_define_module_function(mRubyiso9660, "get_application_id", _wrap_get_application_id, -1);
2978
+ rb_define_module_function(mRubyiso9660, "ifs_get_application_id", _wrap_ifs_get_application_id, -1);
2979
+ rb_define_module_function(mRubyiso9660, "get_joliet_level", _wrap_get_joliet_level, -1);
2980
+ rb_define_module_function(mRubyiso9660, "get_dir_len", _wrap_get_dir_len, -1);
2981
+ rb_define_module_function(mRubyiso9660, "iso9660_dir_to_name", _wrap_iso9660_dir_to_name, -1);
2982
+ rb_define_module_function(mRubyiso9660, "get_preparer_id", _wrap_get_preparer_id, -1);
2983
+ rb_define_module_function(mRubyiso9660, "ifs_get_preparer_id", _wrap_ifs_get_preparer_id, -1);
2984
+ rb_define_module_function(mRubyiso9660, "get_publisher_id", _wrap_get_publisher_id, -1);
2985
+ rb_define_module_function(mRubyiso9660, "ifs_get_publisher_id", _wrap_ifs_get_publisher_id, -1);
2986
+ rb_define_module_function(mRubyiso9660, "get_pvd_type", _wrap_get_pvd_type, -1);
2987
+ rb_define_module_function(mRubyiso9660, "get_pvd_id", _wrap_get_pvd_id, -1);
2988
+ rb_define_module_function(mRubyiso9660, "get_pvd_space_size", _wrap_get_pvd_space_size, -1);
2989
+ rb_define_module_function(mRubyiso9660, "get_pvd_block_size", _wrap_get_pvd_block_size, -1);
2990
+ rb_define_module_function(mRubyiso9660, "get_pvd_version", _wrap_get_pvd_version, -1);
2991
+ rb_define_module_function(mRubyiso9660, "get_system_id", _wrap_get_system_id, -1);
2992
+ rb_define_module_function(mRubyiso9660, "ifs_get_system_id", _wrap_ifs_get_system_id, -1);
2993
+ rb_define_module_function(mRubyiso9660, "get_root_lsn", _wrap_get_root_lsn, -1);
2994
+ rb_define_module_function(mRubyiso9660, "get_volume_id", _wrap_get_volume_id, -1);
2995
+ rb_define_module_function(mRubyiso9660, "ifs_get_volume_id", _wrap_ifs_get_volume_id, -1);
2996
+ rb_define_module_function(mRubyiso9660, "get_volumeset_id", _wrap_get_volumeset_id, -1);
2997
+ rb_define_module_function(mRubyiso9660, "ifs_get_volumeset_id", _wrap_ifs_get_volumeset_id, -1);
2998
+ rb_define_module_function(mRubyiso9660, "pathtable_init", _wrap_pathtable_init, -1);
2999
+ rb_define_module_function(mRubyiso9660, "pathtable_get_size", _wrap_pathtable_get_size, -1);
3000
+ rb_define_module_function(mRubyiso9660, "pathtable_l_add_entry", _wrap_pathtable_l_add_entry, -1);
3001
+ rb_define_module_function(mRubyiso9660, "pathtable_m_add_entry", _wrap_pathtable_m_add_entry, -1);
3002
+ rb_define_module_function(mRubyiso9660, "set_evd", _wrap_set_evd, -1);
3003
+ rb_define_module_function(mRubyiso9660, "xa?", _wrap_xaq___, -1);
3004
+ }
3005
+