summaryrefslogtreecommitdiff
blob: 0397a4e42bca27d3662bfe68c093d88517a93402 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff -ur AtomicParsley-source-0.9.0.orig/AtomicParsley.cpp AtomicParsley-source-0.9.0/AtomicParsley.cpp
--- AtomicParsley-source-0.9.0.orig/AtomicParsley.cpp	2006-09-16 02:22:33.000000000 +0300
+++ AtomicParsley-source-0.9.0/AtomicParsley.cpp	2009-07-22 00:52:48.000000000 +0300
@@ -1447,7 +1447,7 @@
 	uint32_t atom_offsets = 0;
 	char* uuid_outfile = (char*)calloc(1, sizeof(char)*MAXPATHLEN+1); //malloc a new string because it may be a cli arg for a specific output path	
 	if (output_path == NULL) {
-		char* orig_suffix = strrchr(originating_file, '.');
+		const char* orig_suffix = strrchr(originating_file, '.');
 		if (orig_suffix == NULL) {
 			fprintf(stdout, "AP warning: a file extension for the input file was not found.\n\tGlobbing onto original filename...\n");
 			path_len = strlen(originating_file);
@@ -4462,7 +4462,7 @@
 #endif
 
 void APar_DeriveNewPath(const char *filePath, char* temp_path, int output_type, const char* file_kind, char* forced_suffix, bool random_filename = true) {
-	char* suffix = NULL;
+	const char* suffix = NULL;
 	if (forced_suffix == NULL) {
 		suffix = strrchr(filePath, '.');
 	} else {
@@ -4480,7 +4480,7 @@
 		memcpy(temp_path, filePath, base_len);
 		memcpy(temp_path + base_len, file_kind, strlen(file_kind));
 #else
-		char* file_name = strrchr(filePath, '/');
+		const char* file_name = strrchr(filePath, '/');
 		size_t file_name_len = strlen(file_name);
 		memcpy(temp_path, filePath, filepath_len-file_name_len+1);
 		memcpy(temp_path + strlen(temp_path), ".", 1);
@@ -5006,7 +5006,7 @@
 			free_modified_name = true;
 			if (forced_suffix_type == FORCE_M4B_TYPE) { //using --stik Audiobook with --overWrite will change the original file's extension
 				uint16_t filename_len = strlen(m4aFile);
-				char* suffix = strrchr(m4aFile, '.');
+				const char* suffix = strrchr(m4aFile, '.');
 				memcpy(originating_file, m4aFile, filename_len+1 );
 				memcpy(originating_file + (filename_len - strlen(suffix) ), ".m4b", 5 );
 			}