Changed all the licence notices in all the files.
[pspp-builds.git] / src / descript.c
index e05c92921614c4e3b11d8499248ad281fbda65ee..e0717993a18f4232164de6958b3247b55eac7f72 100644 (file)
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 /* FIXME: Many possible optimizations. */
 
@@ -29,6 +29,7 @@
 #include "case.h"
 #include "casefile.h"
 #include "command.h"
+#include "dictionary.h"
 #include "lexer.h"
 #include "error.h"
 #include "magic.h"
@@ -119,7 +120,7 @@ static const struct dsc_statistic_info dsc_info[DSC_N_STATS] =
 struct dsc_var
   {
     struct variable *v;         /* Variable to calculate on. */
-    char z_name[9];            /* Name for z-score variable. */
+    char z_name[SHORT_NAME_LEN + 1];/* Name for z-score variable. */
     double valid, missing;     /* Valid, missing counts. */
     struct moments *moments;    /* Moments. */
     double min, max;            /* Maximum and mimimum values. */
@@ -482,7 +483,7 @@ generate_z_varname (struct dsc_proc *dsc, char *z_name,
   /* Try a name based on the original variable name. */
   name[0] = 'Z';
   strcpy (name + 1, var_name);
-  name[8] = '\0';
+  name[SHORT_NAME_LEN] = '\0';
   if (try_name (dsc, name))
     {
       strcpy (z_name, name);