SCCS-vsn: usr.bin/pascal/src/proc.c 1.18
SCCS-vsn: usr.bin/pascal/src/pcproc.c 1.21
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)pcproc.c 1.20 %G%";
+static char sccsid[] = "@(#)pcproc.c 1.21 %G%";
#include "whoami.h"
#ifdef PC
#include "whoami.h"
#ifdef PC
+ * The constant EXPOSIZE specifies the number of digits in the exponent
+ * of real numbers.
+ *
* The constant REALSPC defines the amount of forced padding preceeding
* real numbers when they are printed. If REALSPC == 0, then no padding
* is added, REALSPC == 1 adds one extra blank irregardless of the width
* The constant REALSPC defines the amount of forced padding preceeding
* real numbers when they are printed. If REALSPC == 0, then no padding
* is added, REALSPC == 1 adds one extra blank irregardless of the width
*
* N.B. - Values greater than one require program mods.
*/
*
* N.B. - Values greater than one require program mods.
*/
+#define EXPOSIZE 2
+#define REALSPC 0
/*
* The following array is used to determine which classes may be read
/*
* The following array is used to determine which classes may be read
tdouble:
switch (fmtspec) {
case NIL:
tdouble:
switch (fmtspec) {
case NIL:
- field = 21;
- prec = 14;
+ field = 14 + (5 + EXPOSIZE);
+ prec = field - (5 + EXPOSIZE);
fmt = 'e';
fmtspec = CONWIDTH + CONPREC;
break;
fmt = 'e';
fmtspec = CONWIDTH + CONPREC;
break;
field -= REALSPC;
if (field < 1)
field = 1;
field -= REALSPC;
if (field < 1)
field = 1;
+ prec = field - (5 + EXPOSIZE);
if (prec < 1)
prec = 1;
fmtspec += CONPREC;
if (prec < 1)
prec = 1;
fmtspec += CONPREC;
tempnlp -> extra_flags ,
P2INT );
tmpfree(&soffset);
tempnlp -> extra_flags ,
P2INT );
tmpfree(&soffset);
- putleaf( P2ICON , 7 + REALSPC , 0 , P2INT , 0 );
+ putleaf( P2ICON ,
+ 5 + EXPOSIZE + REALSPC ,
+ 0 , P2INT , 0 );
putop( P2LISTOP , P2INT );
putleaf( P2ICON , 1 , 0 , P2INT , 0 );
putop( P2LISTOP , P2INT );
putop( P2LISTOP , P2INT );
putleaf( P2ICON , 1 , 0 , P2INT , 0 );
putop( P2LISTOP , P2INT );
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)proc.c 1.17 %G%";
+static char sccsid[] = "@(#)proc.c 1.18 %G%";
#include "whoami.h"
#ifdef OBJ
#include "whoami.h"
#ifdef OBJ
+ * The constant EXPOSIZE specifies the number of digits in the exponent
+ * of real numbers.
+ *
* The constant REALSPC defines the amount of forced padding preceeding
* real numbers when they are printed. If REALSPC == 0, then no padding
* is added, REALSPC == 1 adds one extra blank irregardless of the width
* The constant REALSPC defines the amount of forced padding preceeding
* real numbers when they are printed. If REALSPC == 0, then no padding
* is added, REALSPC == 1 adds one extra blank irregardless of the width
*
* N.B. - Values greater than one require program mods.
*/
*
* N.B. - Values greater than one require program mods.
*/
+#define EXPOSIZE 2
+#define REALSPC 0
/*
* The following array is used to determine which classes may be read
/*
* The following array is used to determine which classes may be read
tdouble:
switch (fmtspec) {
case NIL:
tdouble:
switch (fmtspec) {
case NIL:
-# ifdef DEC11
- field = 21;
-# else
- field = 22;
-# endif DEC11
- prec = 14;
+ field = 14 + (5 + EXPOSIZE);
+ prec = field - (5 + EXPOSIZE);
fmt = 'e';
fmtspec = CONWIDTH + CONPREC;
break;
fmt = 'e';
fmtspec = CONWIDTH + CONPREC;
break;
field -= REALSPC;
if (field < 1)
field = 1;
field -= REALSPC;
if (field < 1)
field = 1;
-# ifdef DEC11
- prec = field - 7;
-# else
- prec = field - 8;
-# endif DEC11
+ prec = field - (5 + EXPOSIZE);
if (prec < 1)
prec = 1;
fmtspec += CONPREC;
if (prec < 1)
prec = 1;
fmtspec += CONPREC;
put(1, O_AS4);
put(2, O_RV4 | cbn << 8 + INDX,
tempnlp -> value[NL_OFFS] );
put(1, O_AS4);
put(2, O_RV4 | cbn << 8 + INDX,
tempnlp -> value[NL_OFFS] );
-# ifdef DEC11
- put(3, O_MAX, 7 + REALSPC, 1);
-# else
- put(3, O_MAX, 8 + REALSPC, 1);
-# endif DEC11
+ put(3, O_MAX,
+ 5 + EXPOSIZE + REALSPC, 1);
convert(nl+T4INT, INT_TYP);
stkcnt += sizeof(int);
put(2, O_RV4 | cbn << 8 + INDX,
convert(nl+T4INT, INT_TYP);
stkcnt += sizeof(int);
put(2, O_RV4 | cbn << 8 + INDX,