aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-output.boot.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-09-24 16:55:26 +0000
committerdos-reis <gdr@axiomatics.org>2007-09-24 16:55:26 +0000
commit06e6b3ab540b836fe050b25b651f403ce4c4fdba (patch)
tree682aa34a0de5130028902fc6bee7b6482bd0dacf /src/interp/i-output.boot.pamphlet
parenta3a5203b3605c9ed8c4f89dc97704415d0557359 (diff)
downloadopen-axiom-06e6b3ab540b836fe050b25b651f403ce4c4fdba.tar.gz
* i-output.boot.pamphlet (half): New macro.
(bigopAppAux): Use it. (charyTop): Likewise. (binomApp): Likewise.
Diffstat (limited to 'src/interp/i-output.boot.pamphlet')
-rw-r--r--src/interp/i-output.boot.pamphlet15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/interp/i-output.boot.pamphlet b/src/interp/i-output.boot.pamphlet
index f28b0af0..c671ac53 100644
--- a/src/interp/i-output.boot.pamphlet
+++ b/src/interp/i-output.boot.pamphlet
@@ -1177,6 +1177,9 @@ bigopWidth(bot,top,arg,kind) ==
kindWidth := (kind = 'pi => 5; 3)
MAX(kindWidth,WIDTH bot,(top => WIDTH top; 0)) + 2 + WIDTH arg
+half x ==>
+ QUOTIENT(x, 2)
+
bigopAppAux(bot,top,arg,x,y,d,kind) ==
botWidth := (bot => WIDTH bot; 0)
topWidth := WIDTH top
@@ -1184,15 +1187,15 @@ bigopAppAux(bot,top,arg,x,y,d,kind) ==
kind = 'pi => 5
3
maxWidth := MAX(opWidth,botWidth,topWidth)
- xCenter := (maxWidth-1)/ 2 + x
+ xCenter := half(maxWidth-1) + x
d:=APP(arg,x+2+maxWidth,y,d)
d:=
atom bot and SIZE atom2String bot = 1 => APP(bot,xCenter,y-2,d)
- APP(bot,x + (maxWidth - botWidth)/2,y-2-superspan bot,d)
+ APP(bot,x + half(maxWidth - botWidth),y-2-superspan bot,d)
if top then
d:=
atom top and SIZE atom2String top = 1 => APP(top,xCenter,y+2,d)
- APP(top,x + (maxWidth - topWidth)/2,y+2+subspan top,d)
+ APP(top,x + half(maxWidth - topWidth),y+2+subspan top,d)
delta := (kind = 'pi => 2; 1)
opCode :=
kind = 'sigma =>
@@ -1540,7 +1543,7 @@ charyTop(u,start,linelength) ==
u is ['CENTER,a] =>
b := charyTopWidth a
(w := WIDTH(b)) > linelength-start => charyTop(a,start,linelength)
- charyTop(b,(linelength-start-w)/2,linelength)
+ charyTop(b,half(linelength-start-w),linelength)
v := charyTopWidth u
EQ(keyp u,'ELSE) => charyElse(u,v,start,linelength)
WIDTH(v) > linelength => charyTrouble(u,v,start,linelength)
@@ -2292,8 +2295,8 @@ binomApp(u,x,y,d) ==
wden := WIDTH den
wnum := WIDTH num
w := MAX(wden,wnum)
- d := APP(den,x+1+(w - wden)/2,ysub,d)
- d := APP(num,x+1+(w - wnum)/2,ysup,d)
+ d := APP(den,x+1+ half(w - wden),ysub,d)
+ d := APP(num,x+1+ half(w - wnum),ysup,d)
hnum := height num
hden := height den
w := 1 + w