From 5ea3042eecf6741b8b10b56f4bb681aa60c32405 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 17 Jul 2002 17:43:51 +0000 Subject: [PATCH] fix -c -o ... --- tools/qfcc/source/qfcc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/qfcc.c b/tools/qfcc/source/qfcc.c index 44003bea2..7a40a3896 100644 --- a/tools/qfcc/source/qfcc.c +++ b/tools/qfcc/source/qfcc.c @@ -511,8 +511,8 @@ separate_compile (void) for (file = source_files; *file; file++) { dstring_clearstr (extension); dstring_clearstr (output_file); - dstring_appendstr (output_file, *file); + dstring_appendstr (output_file, *file); f = output_file->str + strlen (output_file->str); while (f >= output_file->str && *f != '.' && *f != '/') f--; @@ -521,7 +521,12 @@ separate_compile (void) dstring_appendstr (extension, f); *f = 0; } - dstring_appendstr (output_file, ".qfo"); + if (options.compile && options.output_file) { + dstring_clearstr (output_file); + dstring_appendstr (output_file, options.output_file); + } else { + dstring_appendstr (output_file, ".qfo"); + } if (strncmp (*file, "-l", 2) && (!strcmp (extension->str, ".r") || !strcmp (extension->str, ".qc"))) {