00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 #include "udanax.h"
00075
00083 static void
00084 expandcrumleftward(
00085 typecorecrum *crumptr,
00086 Tumbler *newdsp,
00087 Tumbler *base,
00088 int index)
00089 {
00090 typecorecrum *ptr;
00091
00092 #ifndef DISTRIBUTION
00093 foo("entering expandcrum leftward \n");
00094 #endif
00095
00096 movetumbler(newdsp, &crumptr->cdsp.dsas[index]);
00097 tumbleradd(base, &crumptr->cwid.dsas[index], &crumptr->cwid.dsas[index]);
00098
00099 #ifndef DISTRIBUTION
00100 footumbler("in expandcrumleftward cwid = ", &crumptr->cwid.dsas[index]);
00101 #endif
00102
00103 ptr = findleftson((typecuc *) crumptr);
00104 for (; ptr; ptr = (typecorecrum *) findrightbro(ptr)) {
00105 tumbleradd(base, &ptr->cdsp.dsas[index], &ptr->cdsp.dsas[index]);
00106 ivemodified(ptr);
00107
00108 #ifndef DISTRIBUTION
00109 footumbler("in expandcrumleftward cdsp = ", &crumptr->cdsp.dsas[index]);
00110 #endif
00111
00112 }
00113
00114 #ifndef DISTRIBUTION
00115 foo("leaveing expandcrum leftward \n");
00116 #endif
00117 }
00118
00126 void
00127 makeroomonleftnd(
00128 typecuc *father,
00129 typedsp *offset,
00130 typewid *origin,
00131 typedsp *grasp)
00132 {
00133 typedsp newdsp;
00134 Tumbler base;
00135 int i;
00136 int savedebug;
00137
00138 #ifndef DISTRIBUTION
00139 savedebug = debug;
00140
00141 foo("entering makeroomonleftnd\n");
00142 #endif
00143
00144 prologuend((typecorecrum *) father, offset, grasp, (typedsp *) NULL);
00145 for (i = 0; i < widsize(father->cenftype); ++i) {
00146 if (tumblercmp(&origin->dsas[i], &grasp->dsas[i]) == LESS) {
00147 #ifndef DISTRIBUTION
00148 footumbler(" origin = ", &origin->dsas[i]);
00149 footumbler(" grasp = ", &grasp->dsas[i]);
00150 #endif
00151 tumblersub(&grasp->dsas[i], &origin->dsas[i], &base);
00152 #ifndef DISTRIBUTION
00153 footumbler(" base = ", &base);
00154 footumbler(" origin = ", &origin->dsas[i]);
00155 footumbler(" offset = ", &offset->dsas[i]);
00156 #endif
00157 tumblersub(&origin->dsas[i], &offset->dsas[i], &newdsp.dsas[i]);
00158 #ifndef DISTRIBUTION
00159 footumbler(" newdsp = ", &newdsp.dsas[i]);
00160 #endif
00161 expandcrumleftward((typecorecrum *) father, &newdsp.dsas[i], &base, i);
00162 prologuend((typecorecrum *) father, offset, grasp, (typedsp *) NULL);
00163 }
00164 }
00165 #ifndef DISTRIBUTION
00166 foo("leaving makeroomonleftnd\n");
00167 debug = savedebug;
00168 #endif
00169 }