rubyecm2cue 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rubyecm2cue/rubyecm2cue.c +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7576117a3a8de31b371769c5c66f6392ecf288a7
|
4
|
+
data.tar.gz: 0bd1f059273a08c35b8dbe9a0d117ab3e78ee62b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec2330dcb8adf72b0a2cbcfe769132f56c2f51033b9096e8ac6600ec3edfc4ce0d616f893a572a81a32170f6fcccbf2d1660066ad65563577c2f74564ba9f0d6
|
7
|
+
data.tar.gz: 8ef66937e065b634c6028f4f412b45a0ab91631a86062bfb959b80568701b4f1c8f2d6be6c93512c17d73acce200bb34ac1f2eb041421213f8a07dd7b3901e99
|
@@ -24,9 +24,11 @@ VALUE method_process(VALUE self, VALUE arg_path) {
|
|
24
24
|
|
25
25
|
if(strlen(infilename) < 5) {
|
26
26
|
strcpy(retValue, "filename is too short");
|
27
|
+
return rb_str_new_cstr(retValue);
|
27
28
|
}
|
28
29
|
if(strcasecmp(infilename + strlen(infilename) - 4, ".ecm")) {
|
29
30
|
strcpy(retValue, "filename must end in .ecm");
|
31
|
+
return rb_str_new_cstr(retValue);
|
30
32
|
}
|
31
33
|
|
32
34
|
outfilename = malloc(strlen(infilename) - 3);
|
@@ -40,11 +42,13 @@ VALUE method_process(VALUE self, VALUE arg_path) {
|
|
40
42
|
fin = fopen(infilename, "rb");
|
41
43
|
if(!fin) {
|
42
44
|
strcpy(retValue, "Cannot open file");
|
45
|
+
return rb_str_new_cstr(retValue);
|
43
46
|
}
|
44
47
|
fout = fopen(outfilename, "wb");
|
45
48
|
if(!fout) {
|
46
49
|
strcpy(retValue, "Cannot write file");
|
47
50
|
fclose(fin);
|
51
|
+
return rb_str_new_cstr(retValue);
|
48
52
|
}
|
49
53
|
|
50
54
|
unecm_ret = unecmify(fin, fout);
|
@@ -54,12 +58,14 @@ VALUE method_process(VALUE self, VALUE arg_path) {
|
|
54
58
|
|
55
59
|
if(unecm_ret != 0) {
|
56
60
|
strcpy(retValue, "Cannot decode file");
|
61
|
+
return rb_str_new_cstr(retValue);
|
57
62
|
}
|
58
63
|
|
59
64
|
strcpy(oldfilename, outfilename);
|
60
65
|
cue_file = fopen(strcat(outfilename, ".cue"), "w");
|
61
66
|
if(!cue_file) {
|
62
67
|
strcpy(retValue, "Cannot write cue file");
|
68
|
+
return rb_str_new_cstr(retValue);
|
63
69
|
}
|
64
70
|
fprintf(cue_file, "FILE \"%s\" BINARY\n", oldfilename);
|
65
71
|
fprintf(cue_file, "\tTRACK 01 MODE1/2352\n");
|
@@ -67,6 +73,5 @@ VALUE method_process(VALUE self, VALUE arg_path) {
|
|
67
73
|
fclose(cue_file);
|
68
74
|
|
69
75
|
strcpy(retValue, outfilename);
|
70
|
-
|
71
76
|
return rb_str_new_cstr(retValue);
|
72
77
|
}
|