From: John Darrington <john@darrington.wattle.id.au>
Date: Wed, 13 May 2009 22:54:56 +0000 (+0800)
Subject: Ensure that windows opens the right file for output.
X-Git-Tag: sav-api~248^2~63^2~25
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37f8a4cc05e3e99f0219ed2765ed242e63464857;p=pspp

Ensure that windows opens the right file for output.

Thanks to Michel Boaventura for reporting this problem.
Fixes bug #26542
---

diff --git a/src/ui/gui/output-viewer.c b/src/ui/gui/output-viewer.c
index 641944d004..4bcd580a9f 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
@@ -278,8 +278,6 @@ reload_viewer (struct output_viewer *ov)
 }
 
 
-#define OUTPUT_FILE_NAME "psppire.txt"
-
 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;
diff --git a/src/ui/gui/psppire.h b/src/ui/gui/psppire.h
index 9c99af02ea..815de4a07e 100644
--- a/src/ui/gui/psppire.h
+++ b/src/ui/gui/psppire.h
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004, 2005, 2006  Free Software Foundation
+   Copyright (C) 2004, 2005, 2006, 2009  Free Software Foundation
 
    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
@@ -20,5 +20,6 @@
 
 void initialize (void);
 void de_initialize (void);
+const char * output_file_name (void);
 
 #endif /* PSPPIRE_H */