[BACK]Return to apropos.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / apropos

Diff for /src/usr.bin/apropos/Attic/apropos.c between version 1.10 and 1.12

version 1.10, 2003/06/10 22:20:44 version 1.12, 2006/04/02 21:38:56
Line 99 
Line 99 
         if (argc < 1)          if (argc < 1)
                 usage();                  usage();
   
         if ((found = malloc((u_int)argc * sizeof(int))) == NULL)          if ((found = calloc(argc, sizeof(int))) == NULL)
                 err(1, NULL);                  err(1, NULL);
         memset(found, 0, argc * sizeof(int));  
   
         for (p = argv; *p; ++p)                 /* convert to lower-case */          for (p = argv; *p; ++p)                 /* convert to lower-case */
                 lowstr(*p, *p);                  lowstr(*p, *p);
Line 113 
Line 112 
         else {          else {
                 config(conffile);                  config(conffile);
                 ep = (tp = getlist("_whatdb")) == NULL ?                  ep = (tp = getlist("_whatdb")) == NULL ?
                     NULL : tp->list.tqh_first;                      NULL : TAILQ_FIRST(&tp->list);
                 for (; ep != NULL; ep = ep->q.tqe_next)                  for (; ep != NULL; ep = TAILQ_NEXT(ep, q))
                         apropos(argv, ep->s, 0);                          apropos(argv, ep->s, 0);
         }          }
   

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.12