From 014d9b5e6b0de17a1910c32347bf86de48e06af4 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Tue, 20 Sep 2016 16:41:52 +0200 Subject: Use file stream for errors too --- src/GenSVMgrid.c | 5 ++++- src/GenSVMtraintest.c | 8 +++++++- src/gensvm_print.c | 17 +++++++++++++---- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/GenSVMgrid.c b/src/GenSVMgrid.c index e2cb161..2ac9ce3 100644 --- a/src/GenSVMgrid.c +++ b/src/GenSVMgrid.c @@ -26,6 +26,7 @@ #define MINARGS 2 extern FILE *GENSVM_OUTPUT_FILE; +extern FILE *GENSVM_ERROR_FILE; // function declarations void exit_with_help(); @@ -41,7 +42,7 @@ void exit_with_help() printf("Usage: trainGenSVMdataset [options] grid_file\n"); printf("Options:\n"); printf("-h | -help : print this help.\n"); - printf("-q : quiet mode (no output)\n"); + printf("-q : quiet mode (no output, not even errors!)\n"); exit(EXIT_FAILURE); } @@ -128,6 +129,7 @@ void parse_command_line(int argc, char **argv, char *input_filename) int i; GENSVM_OUTPUT_FILE = stdout; + GENSVM_ERROR_FILE = stderr; for (i=1; i