X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Foutput-viewer.c;h=4bcd580a9fb078176fd4fdd222c7369f9228fe9b;hb=37f8a4cc05e3e99f0219ed2765ed242e63464857;hp=2b0c4af8094dbdd1668d7c6254d3f2e7f018ef18;hpb=df7e825aff8143a6624899a4594707fafb1ad82f;p=pspp-builds.git diff --git a/src/ui/gui/output-viewer.c b/src/ui/gui/output-viewer.c index 2b0c4af8..4bcd580a 100644 --- a/src/ui/gui/output-viewer.c +++ b/src/ui/gui/output-viewer.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -194,7 +194,7 @@ reload_the_viewer (void) reload_viewer (the_output_viewer); } -#define OUTPUT_FILE_NAME "psppire.txt" + void reload_viewer (struct output_viewer *ov) @@ -224,10 +224,10 @@ reload_viewer (struct output_viewer *ov) */ { GtkTextIter start_iter; - FILE *fp = fopen (OUTPUT_FILE_NAME, "r"); + FILE *fp = fopen (output_file_name (), "r"); if ( !fp) { - g_print ("Cannot open %s\n", OUTPUT_FILE_NAME); + g_warning ("Cannot open %s\n", output_file_name ()); return; } @@ -253,7 +253,7 @@ reload_viewer (struct output_viewer *ov) ov->fp = fopen (output_file_name (), "r"); if ( ov->fp == NULL) { - g_print ("Cannot open %s\n", output_file_name ()); + g_warning ("Cannot open %s\n", output_file_name ()); return; } } @@ -278,8 +278,6 @@ reload_viewer (struct output_viewer *ov) } - - const char * output_file_name (void) { @@ -287,7 +285,7 @@ output_file_name (void) static char *filename = NULL; if ( NULL == filename ) - filename = xasprintf ("%s%s", dir, OUTPUT_FILE_NAME); + filename = xasprintf ("%s%s", dir, output_file_name ()); return filename;