/[pspp]/pspp/src/get.c
ViewVC logotype

Diff of /pspp/src/get.c

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

revision 1.38 by blp, Sun Aug 21 07:21:06 2005 UTC revision 1.39 by blp, Mon Oct 24 02:51:32 2005 UTC
# Line 559  parse_dict_trim (struct dictionary *dict Line 559  parse_dict_trim (struct dictionary *dict
559  static bool  static bool
560  rename_variables (struct dictionary *dict)  rename_variables (struct dictionary *dict)
561  {  {
562    int i;    size_t i;
563    
564    int success = 0;    int success = 0;
565    
566    struct variable **v;    struct variable **v;
567    char **new_names;    char **new_names;
568    int nv, nn;    size_t nv, nn;
569    char *err_name;    char *err_name;
570    
571    int group;    int group;
# Line 602  rename_variables (struct dictionary *dic Line 602  rename_variables (struct dictionary *dic
602    group = 1;    group = 1;
603    while (lex_match ('('))    while (lex_match ('('))
604      {      {
605        int old_nv = nv;        size_t old_nv = nv;
606    
607        if (!parse_variables (dict, &v, &nv, PV_NO_DUPLICATE | PV_APPEND))        if (!parse_variables (dict, &v, &nv, PV_NO_DUPLICATE | PV_APPEND))
608          goto done;          goto done;
# Line 618  rename_variables (struct dictionary *dic Line 618  rename_variables (struct dictionary *dic
618            msg (SE, _("Number of variables on left side of `=' (%d) does not "            msg (SE, _("Number of variables on left side of `=' (%d) does not "
619                       "match number of variables on right side (%d), in "                       "match number of variables on right side (%d), in "
620                       "parenthesized group %d of RENAME subcommand."),                       "parenthesized group %d of RENAME subcommand."),
621                 nv - old_nv, nn - old_nv, group);                 (unsigned) (nv - old_nv), (unsigned) (nn - old_nv), group);
622            goto done;            goto done;
623          }          }
624        if (!lex_force_match (')'))        if (!lex_force_match (')'))
# Line 648  static bool Line 648  static bool
648  drop_variables (struct dictionary *dict)  drop_variables (struct dictionary *dict)
649  {  {
650    struct variable **v;    struct variable **v;
651    int nv;    size_t nv;
652    
653    lex_match ('=');    lex_match ('=');
654    if (!parse_variables (dict, &v, &nv, PV_NONE))    if (!parse_variables (dict, &v, &nv, PV_NONE))
# Line 670  static bool Line 670  static bool
670  keep_variables (struct dictionary *dict)  keep_variables (struct dictionary *dict)
671  {  {
672    struct variable **v;    struct variable **v;
673    int nv;    size_t nv;
674    int i;    size_t i;
675    
676    lex_match ('=');    lex_match ('=');
677    if (!parse_variables (dict, &v, &nv, PV_NONE))    if (!parse_variables (dict, &v, &nv, PV_NONE))
# Line 726  struct mtf_proc Line 726  struct mtf_proc
726      struct mtf_file *head;      /* First file mentioned on FILE or TABLE. */      struct mtf_file *head;      /* First file mentioned on FILE or TABLE. */
727      struct mtf_file *tail;      /* Last file mentioned on FILE or TABLE. */      struct mtf_file *tail;      /* Last file mentioned on FILE or TABLE. */
728            
729      int by_cnt;                 /* Number of variables on BY subcommand. */      size_t by_cnt;              /* Number of variables on BY subcommand. */
730    
731      /* Names of FIRST, LAST variables. */      /* Names of FIRST, LAST variables. */
732      char first[LONG_NAME_LEN + 1], last[LONG_NAME_LEN + 1];      char first[LONG_NAME_LEN + 1], last[LONG_NAME_LEN + 1];
# Line 919  cmd_match_files (void) Line 919  cmd_match_files (void)
919    
920            for (iter = mtf.head; iter != NULL; iter = iter->next)            for (iter = mtf.head; iter != NULL; iter = iter->next)
921              {              {
922                int i;                size_t i;
923                        
924                iter->by = xmalloc (sizeof *iter->by * mtf.by_cnt);                iter->by = xmalloc (sizeof *iter->by * mtf.by_cnt);
925    

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

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