Merge branch 'master'; commit 'origin/stable'
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 2 Mar 2009 22:12:26 +0000 (07:12 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 2 Mar 2009 22:12:26 +0000 (07:12 +0900)
Conflicts:

src/math/linreg.h
src/ui/gui/psppire-data-editor.c

src/data/file-name.c
src/data/sys-file-reader.c
src/libpspp/str.c
src/libpspp/str.h
src/math/linreg.c

index 14afd60e53be5f86e01963d6f0a9aa08927e5de3..e9411b65d950d444ee07dbfd155bdaeb982d1351 100644 (file)
@@ -138,6 +138,7 @@ fn_search_path (const char *base_name, const char *path_)
       if (!ds_is_empty (&file) && !ISSLASH (ds_last (&file)))
        ds_put_char (&file, '/');
       ds_put_cstr (&file, base_name);
+      ds_relocate (&file);
 
       /* Check whether file exists. */
       if (fn_exists (ds_cstr (&file)))
index af09189e1fa0721919597bb18eef4d1508e07f1d..84d7f83c4c422a502272ec47039aeb3bb5889b18 100644 (file)
@@ -744,7 +744,11 @@ read_extension_record (struct sfm_reader *r, struct dictionary *dict,
       break;
 
     case 7:
-      /* Unknown purpose. */
+      /* Used by the MRSETS command. */
+      break;
+
+    case 8:
+      /* Used by the SPSS Data Entry software. */
       break;
 
     case 11:
@@ -784,7 +788,8 @@ read_extension_record (struct sfm_reader *r, struct dictionary *dict,
       break;
 
     default:
-      sys_warn (r, _("Unrecognized record type 7, subtype %d."), subtype);
+      sys_warn (r, _("Unrecognized record type 7, subtype %d.  Please send a copy of this file, and the syntax which created it to %s"),
+               subtype, PACKAGE_BUGREPORT);
       break;
     }
 
index f054c9ef28833046760957f2de9aabc7da6ec8dc..3cff0492c7d508d99d9ce0b5c77c57879bc1faf7 100644 (file)
@@ -26,6 +26,7 @@
 #include <libpspp/message.h>
 #include <libpspp/pool.h>
 
+#include <relocatable.h>
 #include "minmax.h"
 #include "xalloc.h"
 #include "xsize.h"
@@ -1393,3 +1394,20 @@ ds_put_char_multiple (struct string *st, int ch, size_t cnt)
 {
   memset (ds_put_uninit (st, cnt), ch, cnt);
 }
+
+
+/* If relocation has been enabled, replace ST,
+   with its relocated version */
+void
+ds_relocate (struct string *st)
+{
+  const char *orig = ds_cstr (st);
+  const char *rel = relocate (orig);
+
+  if ( orig != rel)
+    {
+      ds_clear (st);
+      ds_put_cstr (st, rel);
+      free ((char *) rel);
+    }
+}
index ff00b3593356580bd3a2888a1d2c26ebaec4c217..ca990dbc3632f8b4d4f0870cf8874f595be44163 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 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
@@ -218,4 +218,8 @@ void ds_put_format (struct string *, const char *, ...)
      PRINTF_FORMAT (2, 3);
 char *ds_put_uninit (struct string *st, size_t incr);
 
+/* Other */
+/* calls relocate from gnulib on ST */
+void ds_relocate (struct string *st);
+
 #endif /* str_h */
index f5ae33e5823f4f79cfaccd73637316baa2f96d0f..811f9d23a5f709877a55c6b535e0b61938e1ce1d 100644 (file)
@@ -742,4 +742,3 @@ double pspp_linreg_mse (const pspp_linreg_cache *c)
   assert (c != NULL);
   return (c->sse / c->dfe);
 }
-