| 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.cgraph; |
| 47 |
import static gen.lib.cgraph.mem__c.agalloc; |
| 48 |
import static gen.lib.cgraph.utils__c.agdtdelete; |
| 49 |
import static gen.lib.cgraph.utils__c.agdtopen; |
| 50 |
import static smetana.core.JUtils.EQ; |
| 51 |
import static smetana.core.JUtils.sizeof; |
| 52 |
import static smetana.core.JUtilsDebug.ENTERING; |
| 53 |
import static smetana.core.JUtilsDebug.LEAVING; |
| 54 |
import static smetana.core.Macro.UNSUPPORTED; |
| 55 |
import h.ST_Agraph_s; |
| 56 |
import h.ST_dt_s; |
| 57 |
import h.ST_refstr_t; |
| 58 |
import smetana.core.ACCESS; |
| 59 |
import smetana.core.CString; |
| 60 |
import smetana.core.STARSTAR; |
| 61 |
import smetana.core.Z; |
| 62 |
import smetana.core.size_t; |
| 63 |
|
| 64 |
public class refstr__c { |
| 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 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
public static ST_dt_s refdict(final ST_Agraph_s g) { |
| 229 |
ENTERING("f1nwss2xoaub1hyord232ugoj","refdict"); |
| 230 |
try { |
| 231 |
STARSTAR<ST_dt_s> dictref; |
| 232 |
if (g != null) |
| 233 |
dictref = STARSTAR.amp(new ACCESS<ST_dt_s>() { |
| 234 |
public ST_dt_s get() { |
| 235 |
return (ST_dt_s) g.clos.strdict; |
| 236 |
} |
| 237 |
public void set(ST_dt_s obj) { |
| 238 |
g.clos.setPtr("strdict", obj); |
| 239 |
} |
| 240 |
}); |
| 241 |
else |
| 242 |
dictref = STARSTAR.amp(new ACCESS<ST_dt_s>() { |
| 243 |
public ST_dt_s get() { |
| 244 |
return Z.z().Refdict_default; |
| 245 |
} |
| 246 |
public void set(ST_dt_s obj) { |
| 247 |
Z.z().Refdict_default = obj; |
| 248 |
} |
| 249 |
}); |
| 250 |
if (dictref.getMe() == null) { |
| 251 |
dictref.setMe(agdtopen(g, Z.z().Refstrdisc, Z.z().Dttree)); |
| 252 |
} |
| 253 |
Z.z().HTML_BIT = 1 << 31; |
| 254 |
Z.z().CNT_BITS = ~Z.z().HTML_BIT; |
| 255 |
return dictref.getMe(); |
| 256 |
} finally { |
| 257 |
LEAVING("f1nwss2xoaub1hyord232ugoj","refdict"); |
| 258 |
} |
| 259 |
} |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
public static Object agstrclose(Object... arg) { |
| 267 |
UNSUPPORTED("c2l353zz5jt7jlmbhjbbt3m7v"); |
| 268 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 269 |
UNSUPPORTED("208rcf0f70q2wxwsa6po42oqq"); |
| 270 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 271 |
|
| 272 |
throw new UnsupportedOperationException(); |
| 273 |
} |
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
public static ST_refstr_t refsymbind(ST_dt_s strdict, CString s) { |
| 281 |
ENTERING("9ts4wqhw2xafdv3tlcilneewq","refsymbind"); |
| 282 |
try { |
| 283 |
final ST_refstr_t key = new ST_refstr_t(); |
| 284 |
ST_refstr_t r; |
| 285 |
|
| 286 |
key.setString(s); |
| 287 |
r = (ST_refstr_t) strdict.searchf.exe(strdict, key, 0000004); |
| 288 |
return r; |
| 289 |
} finally { |
| 290 |
LEAVING("9ts4wqhw2xafdv3tlcilneewq","refsymbind"); |
| 291 |
} |
| 292 |
} |
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
public static CString refstrbind(ST_dt_s strdict, CString s) { |
| 300 |
ENTERING("1scntgo71z7c2v15zapiyw59w","refstrbind"); |
| 301 |
try { |
| 302 |
ST_refstr_t r; |
| 303 |
r = refsymbind(strdict, s); |
| 304 |
if (r!=null) |
| 305 |
return r.s; |
| 306 |
else |
| 307 |
return null; |
| 308 |
} finally { |
| 309 |
LEAVING("1scntgo71z7c2v15zapiyw59w","refstrbind"); |
| 310 |
} |
| 311 |
} |
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
public static CString agstrbind(ST_Agraph_s g, CString s) { |
| 319 |
ENTERING("bb8aqjshw3ecae2lsmhigd0mc","agstrbind"); |
| 320 |
try { |
| 321 |
return refstrbind(refdict(g), s); |
| 322 |
} finally { |
| 323 |
LEAVING("bb8aqjshw3ecae2lsmhigd0mc","agstrbind"); |
| 324 |
} |
| 325 |
} |
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
public static CString agstrdup(ST_Agraph_s g, CString s) { |
| 333 |
ENTERING("86oznromwhn9qeym0k7pih73q","agstrdup"); |
| 334 |
try { |
| 335 |
ST_refstr_t r; |
| 336 |
ST_dt_s strdict; |
| 337 |
size_t sz; |
| 338 |
if (s == null) |
| 339 |
return null; |
| 340 |
strdict = refdict(g); |
| 341 |
r = (ST_refstr_t) refsymbind(strdict, s); |
| 342 |
if (r!=null) |
| 343 |
r.refcnt++; |
| 344 |
else { |
| 345 |
sz = sizeof(ST_refstr_t.class).plus(s.length()); |
| 346 |
if (g!=null) |
| 347 |
r = (ST_refstr_t) agalloc(g, sz); |
| 348 |
else |
| 349 |
r = new ST_refstr_t(); |
| 350 |
r.refcnt = 1; |
| 351 |
r.setString(s.duplicate()); |
| 352 |
|
| 353 |
|
| 354 |
strdict.searchf.exe(strdict,r,0000001); |
| 355 |
} |
| 356 |
return r.s; |
| 357 |
} finally { |
| 358 |
LEAVING("86oznromwhn9qeym0k7pih73q","agstrdup"); |
| 359 |
} |
| 360 |
} |
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
public static Object agstrdup_html(Object... arg) { |
| 368 |
UNSUPPORTED("6679vrn0j0vkzernsn2rlottw"); |
| 369 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 370 |
UNSUPPORTED("1uvxutp09oluiacpgn0f76bgu"); |
| 371 |
UNSUPPORTED("czgqod5ni1s5av81qa3n0ghgr"); |
| 372 |
UNSUPPORTED("55x2wgzchv0157f4g74693oaq"); |
| 373 |
UNSUPPORTED("a5abfeqtsa4i5x739edpwuxin"); |
| 374 |
UNSUPPORTED("xp8okoaicybpovkenntpd857"); |
| 375 |
UNSUPPORTED("bo3fdoot7ldevx250qweitj6z"); |
| 376 |
UNSUPPORTED("12vt0u4w3q0jht9f9vsaybntn"); |
| 377 |
UNSUPPORTED("67y4tszu7dmeves31gr9ydmpi"); |
| 378 |
UNSUPPORTED("5gybhadmtbc77f5wf9adyemj7"); |
| 379 |
UNSUPPORTED("1nyzbeonram6636b1w955bypn"); |
| 380 |
UNSUPPORTED("9llv1u64vbj6q8loctnrowtm5"); |
| 381 |
UNSUPPORTED("7tmc6a514rv2k24wg5o8qpvyp"); |
| 382 |
UNSUPPORTED("asjj8bj1b02f70rfr41ayipxy"); |
| 383 |
UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); |
| 384 |
UNSUPPORTED("bp5rr6mkh94826cbgdwglvpk9"); |
| 385 |
UNSUPPORTED("6sl9ejza97inawt8uprd120h6"); |
| 386 |
UNSUPPORTED("dadamob0ot3fpofdm1ey34srj"); |
| 387 |
UNSUPPORTED("1cyhds1lm0ee8rtp7k7h5cqfw"); |
| 388 |
UNSUPPORTED("b2zaf5uj8gofpyc40hl0ziymh"); |
| 389 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 390 |
UNSUPPORTED("lxjgfic7zk869xczsgazw3sx"); |
| 391 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 392 |
|
| 393 |
throw new UnsupportedOperationException(); |
| 394 |
} |
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
public static int agstrfree(ST_Agraph_s g, CString s) { |
| 402 |
ENTERING("enhn1ajfo86a19dgm4b8lduz7","agstrfree"); |
| 403 |
try { |
| 404 |
ST_refstr_t r; |
| 405 |
ST_dt_s strdict; |
| 406 |
if (s == null) |
| 407 |
return -1; |
| 408 |
strdict = refdict(g); |
| 409 |
r = (ST_refstr_t) refsymbind(strdict, s); |
| 410 |
if (r!=null && (EQ(r.s, s))) { |
| 411 |
r.refcnt--; |
| 412 |
if ((r.refcnt!=0 && Z.z().CNT_BITS!=0) == false) { |
| 413 |
agdtdelete(g, strdict, r); |
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
} |
| 419 |
} |
| 420 |
if (r == null) |
| 421 |
return -1; |
| 422 |
return 0; |
| 423 |
} finally { |
| 424 |
LEAVING("enhn1ajfo86a19dgm4b8lduz7","agstrfree"); |
| 425 |
} |
| 426 |
} |
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
public static int aghtmlstr(CString s) { |
| 434 |
ENTERING("3em4wzjnpajd5d3igb90l3rml","aghtmlstr"); |
| 435 |
try { |
| 436 |
ST_refstr_t key; |
| 437 |
if (s == null) |
| 438 |
return 0; |
| 439 |
key = (ST_refstr_t) s.getParent(); |
| 440 |
return (key.refcnt & Z.z().HTML_BIT); |
| 441 |
} finally { |
| 442 |
LEAVING("3em4wzjnpajd5d3igb90l3rml","aghtmlstr"); |
| 443 |
} |
| 444 |
} |
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
public static Object agmarkhtmlstr(Object... arg) { |
| 452 |
UNSUPPORTED("8oc24oz62ej815sjwuwuj9bmt"); |
| 453 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 454 |
UNSUPPORTED("164ww6fcxh6v2wmxj0v8aqviy"); |
| 455 |
UNSUPPORTED("8quozj18vjguewxdpv9w14yjn"); |
| 456 |
UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); |
| 457 |
UNSUPPORTED("9cmt4vbkm95fqftevdqyfvslr"); |
| 458 |
UNSUPPORTED("68mcf5kr6xw538zkdk8b50aeb"); |
| 459 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 460 |
|
| 461 |
throw new UnsupportedOperationException(); |
| 462 |
} |
| 463 |
|
| 464 |
|
| 465 |
} |