| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
package gen.lib.cdt; |
| 47 |
import static gen.lib.cdt.dtrestore__c.dtrestore; |
| 48 |
import static smetana.core.JUtils.EQ; |
| 49 |
import static smetana.core.JUtils.NEQ; |
| 50 |
import static smetana.core.JUtils.function; |
| 51 |
import static smetana.core.JUtils.strcmp; |
| 52 |
import static smetana.core.JUtilsDebug.ENTERING; |
| 53 |
import static smetana.core.JUtilsDebug.LEAVING; |
| 54 |
import static smetana.core.Macro.N; |
| 55 |
import static smetana.core.Macro.UNSUPPORTED; |
| 56 |
import static smetana.core.Macro.UNSUPPORTED_INT; |
| 57 |
import h.Dtcompar_f; |
| 58 |
import h.ST_dt_s; |
| 59 |
import smetana.core.CFunction; |
| 60 |
import smetana.core.CString; |
| 61 |
import smetana.core.__ptr__; |
| 62 |
|
| 63 |
public class dtview__c { |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
public static __ptr__ dtvsearch(ST_dt_s dt, __ptr__ obj, int type) { |
| 133 |
ENTERING("6spidg45w8teb64726drdswaa","dtvsearch"); |
| 134 |
try { |
| 135 |
ST_dt_s d, p; |
| 136 |
__ptr__ o=null, n, ok, nk; |
| 137 |
int cmp, lk, sz, ky; |
| 138 |
Dtcompar_f cmpf; |
| 139 |
|
| 140 |
if ((type&(0000001|0000002|0000100|0000040))!=0) |
| 141 |
return (__ptr__) dt.meth.searchf.exe(dt, obj, type); |
| 142 |
if(((type&(0001000|0000004))!=0) || |
| 143 |
(((type&(0000200|0000400))!=0) && N(dt.meth.type&(0000010|0000004)) ) ) |
| 144 |
{ for(d = dt; d!=null; d = (ST_dt_s) d.view) |
| 145 |
if((o = (__ptr__) d.meth.searchf.exe(d,obj,type))!=null ) |
| 146 |
break; |
| 147 |
dt.setPtr("walk", d); |
| 148 |
return o; |
| 149 |
} |
| 150 |
if((dt.meth.type & (0000010|0000004) )!=0) |
| 151 |
{ if(N(type & (0000200|0000400|0000010|0000020)) ) |
| 152 |
return null; |
| 153 |
n = nk = null; p = null; |
| 154 |
for(d = dt; d!=null; d = (ST_dt_s) d.view) |
| 155 |
{ if(N(o = (__ptr__) d.meth.searchf.exe(d, obj, type) )) |
| 156 |
continue; |
| 157 |
ky = d.disc.key; |
| 158 |
sz = d.disc.size; |
| 159 |
lk = d.disc.link; |
| 160 |
cmpf = (Dtcompar_f) d.disc.comparf; |
| 161 |
ok = (__ptr__) (sz < 0 ? ((__ptr__)o).addVirtualBytes(ky) : ((__ptr__)o).addVirtualBytes(ky)); |
| 162 |
if(n!=null) |
| 163 |
{ cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(d,ok,nk,d.disc) : (sz <= 0 ? strcmp((CString)ok,(CString)nk) : UNSUPPORTED_INT("memcmp(ok,nk,sz)")) ); |
| 164 |
if(((type & (0000010|0000200))!=0 && cmp < 0) || |
| 165 |
((type & (0000020|0000400))!=0 && cmp > 0) ) |
| 166 |
UNSUPPORTED("5o3u9aaanyd9yh74sjfkkofmo"); |
| 167 |
} |
| 168 |
else |
| 169 |
{ a_dj: p = d; |
| 170 |
n = o; |
| 171 |
nk = ok; |
| 172 |
} |
| 173 |
} |
| 174 |
dt.setPtr("walk", p); |
| 175 |
return n; |
| 176 |
} |
| 177 |
|
| 178 |
UNSUPPORTED("36qdhpbcwst6tc1gvwcyvg91u"); |
| 179 |
UNSUPPORTED("5p6q7ip4om6y4nrsjz07ua456"); |
| 180 |
UNSUPPORTED("bx84jj9durkqzcrq4l9h1b0za"); |
| 181 |
UNSUPPORTED("eh58afn12udc5q8yzr25advls"); |
| 182 |
UNSUPPORTED("de5yx4s0nsbgshd9seabcy2g9"); |
| 183 |
UNSUPPORTED("1dhrv6aj5eq8ntuvb7qbs8aot"); |
| 184 |
UNSUPPORTED("66mzv36wy2mflr2u2a5pwa2vg"); |
| 185 |
UNSUPPORTED("d4pllgr7b2ohssrhtxxtd1fbb"); |
| 186 |
UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); |
| 187 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 188 |
UNSUPPORTED("6he3c07r1xjfepuku37yav920"); |
| 189 |
UNSUPPORTED("d7hiatjof3gfyx3ab27oq4d74"); |
| 190 |
UNSUPPORTED("44tdztkynd140cqbaafbbxvqn"); |
| 191 |
UNSUPPORTED("72t51pabtpfsnn4qrcjvd6gkb"); |
| 192 |
UNSUPPORTED("4an2jpd7xs9lm1jlfrbualsrv"); |
| 193 |
UNSUPPORTED("bndt77eukkw8dnhl8sce4ts3d"); |
| 194 |
UNSUPPORTED("6ioth986rfbv208dp59shjy15"); |
| 195 |
UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); |
| 196 |
UNSUPPORTED("5bx9ax8tembk4pweu41m5yw43"); |
| 197 |
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); |
| 198 |
UNSUPPORTED("3diupilxwbi5nroolxiy7e8b0"); |
| 199 |
UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); |
| 200 |
UNSUPPORTED("esje2igec9cwwteta36lbrdvc"); |
| 201 |
UNSUPPORTED("aeh2pn8gp2xj4lehv52n4hp6b"); |
| 202 |
UNSUPPORTED("1lfqka4p8e7w15b16wquy0vjx"); |
| 203 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 204 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 205 |
|
| 206 |
throw new UnsupportedOperationException(); |
| 207 |
} finally { |
| 208 |
LEAVING("6spidg45w8teb64726drdswaa","dtvsearch"); |
| 209 |
} |
| 210 |
} |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
public static ST_dt_s dtview(ST_dt_s dt, ST_dt_s view) { |
| 218 |
ENTERING("dfryioch2xz35w8nq6lxbk5kh","dtview"); |
| 219 |
try { |
| 220 |
ST_dt_s d; |
| 221 |
if ((dt.data.type&010000)!=0) dtrestore(dt,null); |
| 222 |
if(view!=null) |
| 223 |
{ if ((view.data.type&010000)!=0) dtrestore(view,null); |
| 224 |
if(NEQ(view.meth, dt.meth)) |
| 225 |
UNSUPPORTED("return null;"); |
| 226 |
} |
| 227 |
|
| 228 |
for(d = view; d!=null; d = (ST_dt_s)d.view) |
| 229 |
if(EQ(d, dt)) |
| 230 |
return null; |
| 231 |
|
| 232 |
if((d = (ST_dt_s)dt.view)!=null ) |
| 233 |
d.setInt("nview", d.nview-1); |
| 234 |
dt.setPtr("walk", null); |
| 235 |
dt.setPtr("view", null); |
| 236 |
if(N(view)) |
| 237 |
{ dt.setPtr("searchf", dt.meth.searchf); |
| 238 |
return d; |
| 239 |
} |
| 240 |
|
| 241 |
dt.setPtr("view", view); |
| 242 |
dt.setPtr("searchf", function(dtview__c.class, "dtvsearch")); |
| 243 |
view.setInt("nview", view.nview+1 ); |
| 244 |
return view; |
| 245 |
} finally { |
| 246 |
LEAVING("dfryioch2xz35w8nq6lxbk5kh","dtview"); |
| 247 |
} |
| 248 |
} |
| 249 |
|
| 250 |
|
| 251 |
} |