From: John Darrington Date: Mon, 2 Mar 2009 22:12:26 +0000 (+0900) Subject: Merge branch 'master'; commit 'origin/stable' X-Git-Tag: v0.7.3~263 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8af88c0b7ea2fe75df7e45497988ed0371006a86;hp=cdcdc851b79c8f9ddcaaa358a80670bbb21d61f2;p=pspp-builds.git Merge branch 'master'; commit 'origin/stable' Conflicts: src/math/linreg.h src/ui/gui/psppire-data-editor.c --- diff --git a/src/data/file-name.c b/src/data/file-name.c index 14afd60e..e9411b65 100644 --- a/src/data/file-name.c +++ b/src/data/file-name.c @@ -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))) diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index af09189e..84d7f83c 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -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; } diff --git a/src/libpspp/str.c b/src/libpspp/str.c index f054c9ef..3cff0492 100644 --- a/src/libpspp/str.c +++ b/src/libpspp/str.c @@ -26,6 +26,7 @@ #include #include +#include #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); + } +} diff --git a/src/libpspp/str.h b/src/libpspp/str.h index ff00b359..ca990dbc 100644 --- a/src/libpspp/str.h +++ b/src/libpspp/str.h @@ -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 */ diff --git a/src/math/linreg.c b/src/math/linreg.c index f5ae33e5..811f9d23 100644 --- a/src/math/linreg.c +++ b/src/math/linreg.c @@ -742,4 +742,3 @@ double pspp_linreg_mse (const pspp_linreg_cache *c) assert (c != NULL); return (c->sse / c->dfe); } -