diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-08-07 10:24:11 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-08-07 10:24:11 +0000 |
commit | c8bdcbf8ff7892011a084b4b6d6f35a75248e724 (patch) | |
tree | 86e94d539e1aecf40795a3406292866dab4deda5 /utils/jz4740_tools/HXFmerge.c | |
parent | 99f68ea7e8d288a7c7c31bff685168b8b4632c0d (diff) | |
download | rockbox-c8bdcbf8ff7892011a084b4b6d6f35a75248e724.tar.gz rockbox-c8bdcbf8ff7892011a084b4b6d6f35a75248e724.zip |
jz4740 utilities:
* Fix TABs problem
* Add IHFSsplit made by William Poetra Yoga Hadisoeseno
* Fix compilation warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18206 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/jz4740_tools/HXFmerge.c')
-rw-r--r-- | utils/jz4740_tools/HXFmerge.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/utils/jz4740_tools/HXFmerge.c b/utils/jz4740_tools/HXFmerge.c index fb5a0bf2f3..6b6c62505e 100644 --- a/utils/jz4740_tools/HXFmerge.c +++ b/utils/jz4740_tools/HXFmerge.c | |||
@@ -143,12 +143,12 @@ static void merge_hxf(const char* indir, FILE* outfile, const char* add) | |||
143 | unsigned int filesize; | 143 | unsigned int filesize; |
144 | strcpy(file, dir); | 144 | strcpy(file, dir); |
145 | strcat(file, dirs->d_name); | 145 | strcat(file, dirs->d_name); |
146 | if((filehandle = fopen(file, "rb")) == NULL) | 146 | if((filehandle = fopen(file, "rb")) == NULL) |
147 | { | 147 | { |
148 | fprintf(stderr, "[ERR] Cannot open %s\n", file); | 148 | fprintf(stderr, "[ERR] Cannot open %s\n", file); |
149 | closedir(indir_handle); | 149 | closedir(indir_handle); |
150 | return; | 150 | return; |
151 | } | 151 | } |
152 | filesize = _filesize(filehandle); | 152 | filesize = _filesize(filehandle); |
153 | if(filesize > 0) | 153 | if(filesize > 0) |
154 | { | 154 | { |
@@ -179,7 +179,7 @@ static void merge_hxf(const char* indir, FILE* outfile, const char* add) | |||
179 | WRITE(int2le(strlen(dirs->d_name)+strlen(add)), 4); | 179 | WRITE(int2le(strlen(dirs->d_name)+strlen(add)), 4); |
180 | #endif | 180 | #endif |
181 | #ifndef _WIN32 | 181 | #ifndef _WIN32 |
182 | WRITE(replace(&add), strlen(add)-1); | 182 | WRITE(replace((char*)add), strlen(add)-1); |
183 | #else | 183 | #else |
184 | WRITE(add, strlen(add)-1); | 184 | WRITE(add, strlen(add)-1); |
185 | #endif | 185 | #endif |
@@ -276,20 +276,20 @@ int main(int argc, char *argv[]) | |||
276 | #ifdef _WIN32 | 276 | #ifdef _WIN32 |
277 | if(strcmp((char*)(argv[1]+strlen(argv[1])-1), "\\") != 0) | 277 | if(strcmp((char*)(argv[1]+strlen(argv[1])-1), "\\") != 0) |
278 | { | 278 | { |
279 | fprintf(stderr, "[ERR] Input path must end with a \\\n"); | 279 | fprintf(stderr, "[ERR] Input path must end with a \\\n"); |
280 | #else | 280 | #else |
281 | if(strcmp((char*)(argv[1]+strlen(argv[1])-1), "/") != 0) | 281 | if(strcmp((char*)(argv[1]+strlen(argv[1])-1), "/") != 0) |
282 | { | 282 | { |
283 | fprintf(stderr, "[ERR] Input path must end with a /\n"); | 283 | fprintf(stderr, "[ERR] Input path must end with a /\n"); |
284 | #endif | 284 | #endif |
285 | return 2; | 285 | return 2; |
286 | } | 286 | } |
287 | 287 | ||
288 | if((outfile = fopen(argv[2], "wb+")) == NULL) | 288 | if((outfile = fopen(argv[2], "wb+")) == NULL) |
289 | { | 289 | { |
290 | fprintf(stderr, "[ERR] Cannot open %s\n", argv[2]); | 290 | fprintf(stderr, "[ERR] Cannot open %s\n", argv[2]); |
291 | return 3; | 291 | return 3; |
292 | } | 292 | } |
293 | 293 | ||
294 | fseek(outfile, 0x40, SEEK_SET); | 294 | fseek(outfile, 0x40, SEEK_SET); |
295 | 295 | ||