/[pspp]/pspp/src/val-labs.c
ViewVC logotype

Diff of /pspp/src/val-labs.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by blp, Sun Jul 31 21:42:46 2005 UTC revision 1.16 by blp, Mon Oct 24 02:51:31 2005 UTC
# Line 35  Line 35 
35  /* Declarations. */  /* Declarations. */
36    
37  static int do_value_labels (int);  static int do_value_labels (int);
38  static int verify_val_labs (struct variable **vars, int var_cnt);  static int verify_val_labs (struct variable **vars, size_t var_cnt);
39  static void erase_labels (struct variable **vars, int var_cnt);  static void erase_labels (struct variable **vars, size_t var_cnt);
40  static int get_label (struct variable **vars, int var_cnt);  static int get_label (struct variable **vars, size_t var_cnt);
41    
42  /* Stubs. */  /* Stubs. */
43    
# Line 59  static int Line 59  static int
59  do_value_labels (int erase)  do_value_labels (int erase)
60  {  {
61    struct variable **vars; /* Variable list. */    struct variable **vars; /* Variable list. */
62    int var_cnt;            /* Number of variables. */    size_t var_cnt;         /* Number of variables. */
63    int parse_err=0;        /* true if error parsing variables */    int parse_err=0;        /* true if error parsing variables */
64    
65    lex_match ('/');    lex_match ('/');
# Line 108  do_value_labels (int erase) Line 108  do_value_labels (int erase)
108  /* Verifies that none of the VAR_CNT variables in VARS are long  /* Verifies that none of the VAR_CNT variables in VARS are long
109     string variables. */     string variables. */
110  static int  static int
111  verify_val_labs (struct variable **vars, int var_cnt)  verify_val_labs (struct variable **vars, size_t var_cnt)
112  {  {
113    int i;    size_t i;
114    
115    for (i = 0; i < var_cnt; i++)    for (i = 0; i < var_cnt; i++)
116      {      {
# Line 128  verify_val_labs (struct variable **vars, Line 128  verify_val_labs (struct variable **vars,
128    
129  /* Erases all the labels for the VAR_CNT variables in VARS. */  /* Erases all the labels for the VAR_CNT variables in VARS. */
130  static void  static void
131  erase_labels (struct variable **vars, int var_cnt)  erase_labels (struct variable **vars, size_t var_cnt)
132  {  {
133    int i;    size_t i;
134    
135    /* Erase old value labels if desired. */    /* Erase old value labels if desired. */
136    for (i = 0; i < var_cnt; i++)    for (i = 0; i < var_cnt; i++)
# Line 140  erase_labels (struct variable **vars, in Line 140  erase_labels (struct variable **vars, in
140  /* Parse all the labels for the VAR_CNT variables in VARS and add  /* Parse all the labels for the VAR_CNT variables in VARS and add
141     the specified labels to those variables.  */     the specified labels to those variables.  */
142  static int  static int
143  get_label (struct variable **vars, int var_cnt)  get_label (struct variable **vars, size_t var_cnt)
144  {  {
145    /* Parse all the labels and add them to the variables. */    /* Parse all the labels and add them to the variables. */
146    do    do
147      {      {
148        union value value;        union value value;
149        char *label;        char *label;
150        int i;        size_t i;
151    
152        /* Set value. */        /* Set value. */
153        if (vars[0]->type == ALPHA)        if (vars[0]->type == ALPHA)

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26