diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-04-24 19:58:38 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-04-24 19:58:38 +0200 |
commit | 577e739c5f4abd44a5e965b6ceee2a85f63fb00c (patch) | |
tree | 36fbb2e1abd4084b08e91b612ec585a293021cef /src | |
parent | 75430a2832098f3b26d9284500ea02c849409d63 (diff) | |
download | headstripper-577e739c5f4abd44a5e965b6ceee2a85f63fb00c.tar.gz |
Changed output name
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -65,6 +65,8 @@ int main(int argc, char* argv[]) exit(1); } + printf("headstripper v%i.%i\n", _VERSION, _SUBVERSION); + for(unsigned int cntr = 1; cntr < argc; cntr++) { char *filename = argv[cntr]; @@ -112,8 +114,8 @@ int strip_jpg(char *_filename) int f__outfile_len = strlen(_filename); char *f__outfile = malloc(f__outfile_len + 8); - strcpy( f__outfile, _filename); - strcpy(&f__outfile[f__outfile_len], ".strip\0"); + strncpy( f__outfile, "strip.", 6); + strcpy(&f__outfile[6], _filename); in = fopen(_filename, "r"); out = fopen(f__outfile, "w"); @@ -184,8 +186,8 @@ int strip_png(char *_filename) int f__outfile_len = strlen(_filename); char *f__outfile = malloc(f__outfile_len + 8); - strcpy( f__outfile, _filename); - strcpy(&f__outfile[f__outfile_len], ".strip\0"); + strncpy( f__outfile, "strip.", 6); + strcpy(&f__outfile[6], _filename); in = fopen(_filename, "r"); out = fopen(f__outfile, "w"); @@ -275,8 +277,8 @@ int strip_tiff(char *_filename) int f__outfile_len = strlen(_filename); char *f__outfile = malloc(f__outfile_len + 8); - strcpy( f__outfile, _filename); - strcpy(&f__outfile[f__outfile_len], ".strip\0"); + strncpy( f__outfile, "strip.", 6); + strcpy(&f__outfile[6], _filename); in = fopen(_filename, "r"); out = fopen(f__outfile, "w"); |