FLIP: Don't change new variables to upper case.
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 16 Sep 2010 16:11:17 +0000 (18:11 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 18 Sep 2010 14:00:24 +0000 (16:00 +0200)
This was a legacy from the days when variables could only
be upper case.

src/language/stats/flip.c
tests/language/stats/flip.at

index de7f52c043bcb4d85fa263d3fc91debd8e916488..a0e1e284174550e807f269c088953f677636d041 100644 (file)
@@ -186,7 +186,6 @@ cmd_flip (struct lexer *lexer, struct dataset *ds)
             {
               name = data_out_pool (value, dict_get_encoding (flip->dict), var_get_write_format (flip->new_names_var),
                 flip->pool);
-       
             }
           var_names_add (flip->pool, &flip->new_names, name);
         }
@@ -261,7 +260,6 @@ make_new_var (struct dictionary *dict, const char *name_)
           *cp = '_';
       }
   *cp = '\0';
-  str_uppercase (name);
 
   /* Use the mangled name, if it is available, or add numeric
      extensions until we find one that is. */
index 6ebacfd8dcd98e04464f6999b01fc4b5f87d58d6..508c9d91be5b17bf1fcae26bb97542b0b5fbfec6 100644 (file)
@@ -2,7 +2,7 @@ AT_BANNER([FLIP command])
 
 AT_SETUP([FLIP with NEWNAMES])
 AT_DATA([flip.sps], [dnl
-data list notable /N 1 (a) A B C D 2-9.
+data list notable /N 1 (a) a b c d 2-9.
 list.
 begin data.
 v 1 2 3 4 5
@@ -18,7 +18,7 @@ list.
 ])
 AT_CHECK([pspp -O format=csv flip.sps], [0], [dnl
 Table: Data List
-N,A,B,C,D
+N,a,b,c,d
 v,1,2,3,4
 w,6,7,8,9
 x,11,12,13,14
@@ -26,19 +26,19 @@ y,16,17,18,19
 z,21,22,23,24
 
 Table: Data List
-CASE_LBL,V,W,X,Y,Z
-A       ,1.00,6.00,11.00,16.00,21.00
-B       ,2.00,7.00,12.00,17.00,22.00
-C       ,3.00,8.00,13.00,18.00,23.00
-D       ,4.00,9.00,14.00,19.00,24.00
+CASE_LBL,v,w,x,y,z
+a       ,1.00,6.00,11.00,16.00,21.00
+b       ,2.00,7.00,12.00,17.00,22.00
+c       ,3.00,8.00,13.00,18.00,23.00
+d       ,4.00,9.00,14.00,19.00,24.00
 
 Table: Data List
-CASE_LBL,A,B,C,D
-V       ,1.00,2.00,3.00,4.00
-W       ,6.00,7.00,8.00,9.00
-X       ,11.00,12.00,13.00,14.00
-Y       ,16.00,17.00,18.00,19.00
-Z       ,21.00,22.00,23.00,24.00
+CASE_LBL,a,b,c,d
+v       ,1.00,2.00,3.00,4.00
+w       ,6.00,7.00,8.00,9.00
+x       ,11.00,12.00,13.00,14.00
+y       ,16.00,17.00,18.00,19.00
+z       ,21.00,22.00,23.00,24.00
 ])
 AT_CLEANUP