SCCS-vsn: old/awk/awk.def 4.3
SCCS-vsn: old/awk/tran.c 4.4
-/* awk.def 4.2 83/02/09 */
+/* awk.def 4.3 83/12/09 */
#define hack int
#define AWKFLOAT float
#define xfree(a) { if(a!=NULL) { yfree(a); a=NULL;} }
#define strfree(a) { if(a!=NULL && a!=EMPTY) { yfree(a);} a=EMPTY; }
#define yfree free
#define hack int
#define AWKFLOAT float
#define xfree(a) { if(a!=NULL) { yfree(a); a=NULL;} }
#define strfree(a) { if(a!=NULL && a!=EMPTY) { yfree(a);} a=EMPTY; }
#define yfree free
+#define isnull(x) ((x) == EMPTY || (x) == NULL)
+
#ifdef DEBUG
# define dprintf if(dbg)printf
#else
#ifdef DEBUG
# define dprintf if(dbg)printf
#else
-static char sccsid[] = "@(#)tran.c 4.3 %G%";
+static char sccsid[] = "@(#)tran.c 4.4 %G%";
#endif
#include "stdio.h"
#endif
#include "stdio.h"
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);
}
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);