[BACK]Return to expr.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / bin / expr

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/bin/expr/Attic/expr.c between version 1.10 and 1.10.6.1

version 1.10, 1998/11/04 14:11:12 version 1.10.6.1, 1999/12/27 18:27:00
Line 62  make_int(i)
Line 62  make_int(i)
   
         vp = (struct val *) malloc(sizeof(*vp));          vp = (struct val *) malloc(sizeof(*vp));
         if (vp == NULL) {          if (vp == NULL) {
                 err(2, "%s", "");                  err(2, NULL);
         }          }
         vp->type = integer;          vp->type = integer;
         vp->u.i = i;          vp->u.i = i;
Line 78  make_str(s)
Line 78  make_str(s)
   
         vp = (struct val *) malloc(sizeof(*vp));          vp = (struct val *) malloc(sizeof(*vp));
         if (vp == NULL || ((vp->u.s = strdup(s)) == NULL)) {          if (vp == NULL || ((vp->u.s = strdup(s)) == NULL)) {
                 err(2, "%s", "");                  err(2, NULL);
         }          }
         vp->type = string;          vp->type = string;
         return vp;          return vp;
Line 172  to_string(vp)
Line 172  to_string(vp)
   
         tmp = malloc(25);          tmp = malloc(25);
         if (tmp == NULL) {          if (tmp == NULL) {
                 err(2, "%s", "");                  err(2, NULL);
         }          }
         (void)snprintf(tmp, 25, "%d", vp->u.i);          (void)snprintf(tmp, 25, "%d", vp->u.i);
         vp->type = string;          vp->type = string;

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

CVSweb <webmaster@jp.NetBSD.org>