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

Diff for /src/usr.bin/mail/vars.c between version 1.2 and 1.3

version 1.2, 1996/06/11 12:53:53 version 1.3, 1997/07/13 21:21:18
Line 64 
Line 64 
         h = hash(name);          h = hash(name);
         vp = lookup(name);          vp = lookup(name);
         if (vp == NOVAR) {          if (vp == NOVAR) {
                 vp = (struct var *) calloc(sizeof *vp, 1);                  vp = (struct var *) calloc(sizeof(*vp), 1);
                 vp->v_name = vcopy(name);                  vp->v_name = vcopy(name);
                 vp->v_link = variables[h];                  vp->v_link = variables[h];
                 variables[h] = vp;                  variables[h] = vp;
Line 100 
Line 100 
         unsigned len;          unsigned len;
   
         if (*str == '\0')          if (*str == '\0')
                 return "";                  return("");
         len = strlen(str) + 1;          len = strlen(str) + 1;
         if ((new = malloc(len)) == NULL)          if ((new = malloc(len)) == NULL)
                 panic("Out of memory");                  panic("Out of memory");
         bcopy(str, new, (int) len);          bcopy(str, new, (int) len);
         return new;          return(new);
 }  }
   
 /*  /*
Line 193 
Line 193 
         }          }
         if (h < 0 && (h = -h) < 0)          if (h < 0 && (h = -h) < 0)
                 h = 0;                  h = 0;
         return (h % HSHSIZE);          return(h % HSHSIZE);
 }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3