projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4_3_Tahoe release
[unix-history]
/
usr
/
src
/
bin
/
awk
/
tran.c
diff --git
a/usr/src/bin/awk/tran.c
b/usr/src/bin/awk/tran.c
index
35a164a
..
b1d1c47
100644
(file)
--- a/
usr/src/bin/awk/tran.c
+++ b/
usr/src/bin/awk/tran.c
@@
-1,4
+1,6
@@
-/* tran.c 4.2 83/02/09 */
+#ifndef lint
+static char sccsid[] = "@(#)tran.c 4.5 10/22/87";
+#endif
#include "stdio.h"
#include "awk.def"
#include "stdio.h"
#include "awk.def"
@@
-134,7
+136,7
@@
awkfloat f;
error(FATAL, "can't set $0");
vp->tval &= ~STR; /* mark string invalid */
vp->tval |= NUM; /* mark number ok */
error(FATAL, "can't set $0");
vp->tval &= ~STR; /* mark string invalid */
vp->tval |= NUM; /* mark number ok */
- if ((vp->tval & FLD) &&
vp->nval == 0
)
+ if ((vp->tval & FLD) &&
isnull(vp->nval)
)
donerec = 0;
return(vp->fval = f);
}
donerec = 0;
return(vp->fval = f);
}
@@
-149,7
+151,7
@@
char *s;
error(FATAL, "can't set $0");
vp->tval &= ~NUM;
vp->tval |= STR;
error(FATAL, "can't set $0");
vp->tval &= ~NUM;
vp->tval |= STR;
- if ((vp->tval & FLD) &&
vp->nval == 0
)
+ if ((vp->tval & FLD) &&
isnull(vp->nval)
)
donerec = 0;
if (!(vp->tval&FLD))
strfree(vp->sval);
donerec = 0;
if (!(vp->tval&FLD))
strfree(vp->sval);
@@
-195,9
+197,9
@@
register cell *vp;
if (!(vp->tval&FLD))
strfree(vp->sval);
if ((long)vp->fval==vp->fval)
if (!(vp->tval&FLD))
strfree(vp->sval);
if ((long)vp->fval==vp->fval)
- sprintf(s, "%.20g", vp->fval);
+
(void)
sprintf(s, "%.20g", vp->fval);
else
else
- sprintf(s, *OFMT, vp->fval);
+
(void)
sprintf(s, *OFMT, vp->fval);
vp->sval = tostring(s);
vp->tval &= ~FLD;
vp->tval |= STR;
vp->sval = tostring(s);
vp->tval &= ~FLD;
vp->tval |= STR;