summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-04-24 19:58:38 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-04-24 19:58:38 +0200
commit577e739c5f4abd44a5e965b6ceee2a85f63fb00c (patch)
tree36fbb2e1abd4084b08e91b612ec585a293021cef /src/main.c
parent75430a2832098f3b26d9284500ea02c849409d63 (diff)
downloadheadstripper-577e739c5f4abd44a5e965b6ceee2a85f63fb00c.tar.gz
Changed output name
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 45e203b..1f33825 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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");