home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 mARCH / PCWK3A99.iso / Linux / DDD331 / DDD-3_1_.000 / DDD-3_1_ / ddd-3.1.1 / ddd / ddd.vsl.h < prev    next >
Text File  |  1998-12-06  |  26KB  |  1,233 lines

  1. "#line 1 \"ddd.vsl\"\n"
  2. "\n"
  3. "\n"
  4. "\n"
  5. "\n"
  6. "\n"
  7. "\n"
  8. "\n"
  9. "\n"
  10. "\n"
  11. "\n"
  12. "\n"
  13. "\n"
  14. "\n"
  15. "\n"
  16. "\n"
  17. "\n"
  18. "\n"
  19. "\n"
  20. "\n"
  21. "\n"
  22. "\n"
  23. "\n"
  24. "\n"
  25. "\n"
  26. "\n"
  27. "\n"
  28. "\n"
  29. "\n"
  30. "\n"
  31. "\n"
  32. "#line 1 \"../vsllib/std.vsl\"\n"
  33. "\n"
  34. "\n"
  35. "\n"
  36. "\n"
  37. "\n"
  38. "\n"
  39. "\n"
  40. "\n"
  41. "\n"
  42. "\n"
  43. "\n"
  44. "\n"
  45. "\n"
  46. "\n"
  47. "\n"
  48. "\n"
  49. "\n"
  50. "\n"
  51. "\n"
  52. "\n"
  53. "\n"
  54. "\n"
  55. "\n"
  56. "\n"
  57. "\n"
  58. "\n"
  59. "\n"
  60. "\n"
  61. "#line 1 \"../vsllib/builtin.vsl\"\n"
  62. "\n"
  63. "\n"
  64. "\n"
  65. "\n"
  66. "\n"
  67. "\n"
  68. "\n"
  69. "\n"
  70. "\n"
  71. "\n"
  72. "\n"
  73. "\n"
  74. "\n"
  75. "\n"
  76. "\n"
  77. "\n"
  78. "\n"
  79. "\n"
  80. "\n"
  81. "\n"
  82. "\n"
  83. "\n"
  84. "\n"
  85. "\n"
  86. "\n"
  87. "\n"
  88. "\n"
  89. "\n"
  90. "\n"
  91. "\n"
  92. "\n"
  93. "__op_halign(...);\n"
  94. "__op_valign(...);\n"
  95. "__op_ualign(...);\n"
  96. "__op_talign(...);\n"
  97. "__op_plus(...);\n"
  98. "__op_mult(...);\n"
  99. "__op_cons(...);\n"
  100. "__op_minus(a, b);\n"
  101. "__op_div(a, b);\n"
  102. "__op_mod(a, b);\n"
  103. "__op_eq(a, b);\n"
  104. "__op_ne(a, b);\n"
  105. "__op_gt(a, b);\n"
  106. "__op_ge(a, b);\n"
  107. "__op_lt(a, b);\n"
  108. "__op_le(a, b);\n"
  109. "__op_not(a);\n"
  110. "\n"
  111. "\n"
  112. "__hspace(box);\n"
  113. "__vspace(box);\n"
  114. "__hfix(box);\n"
  115. "__vfix(box);\n"
  116. "__rise(linethickness);\n"
  117. "__fall(linethickness);\n"
  118. "__arc(start, length, linethickness);\n"
  119. "__square(box);\n"
  120. "__tag(box);\n"
  121. "__string(box);\n"
  122. "__font(box, font);\n"
  123. "__fontfix(box);\n"
  124. "__background(box, color);\n"
  125. "__foreground(box, color);\n"
  126. "\n"
  127. "\n"
  128. "__fill();\n"
  129. "__rule();\n"
  130. "__diag();\n"
  131. "\n"
  132. "\n"
  133. "__fail(...);\n"
  134. "__undef();\n"
  135. "\n"
  136. "\n"
  137. "\n"
  138. "\n"
  139. "\n"
  140. "(&)(...) = __op_halign(...);\n"
  141. "(|)(...) = __op_valign(...);\n"
  142. "(^)(...) = __op_ualign(...);\n"
  143. "(~)(...) = __op_talign(...);\n"
  144. "(+)(...) = __op_plus(...);\n"
  145. "(*)(...) = __op_mult(...);\n"
  146. "(::)(...) = __op_cons(...);\n"
  147. "(-)(a, b)  = __op_minus(a, b);\n"
  148. "(/)(a, b)  = __op_div(a, b);\n"
  149. "(%)(a, b)  = __op_mod(a, b);\n"
  150. "(=)(a, b)  = __op_eq(a, b);\n"
  151. "(<>)(a, b) = __op_ne(a, b);\n"
  152. "(>)(a, b)  = __op_gt(a, b);\n"
  153. "(>=)(a, b) = __op_ge(a, b);\n"
  154. "(<)(a, b)  = __op_lt(a, b);\n"
  155. "(<=)(a, b) = __op_le(a, b);\n"
  156. "(not)(a) = __op_not(a);\n"
  157. "\n"
  158. "\n"
  159. "hspace(box) = __hspace(box);\n"
  160. "vspace(box) = __vspace(box);\n"
  161. "hfix(box) = __hfix(box);\n"
  162. "vfix(box) = __vfix(box);\n"
  163. "rise(linethickness) = __rise(linethickness);\n"
  164. "fall(linethickness) = __fall(linethickness);\n"
  165. "arc(start, length, linethickness) = __arc(start, length, linethickness);\n"
  166. "square(box) = __square(box);\n"
  167. "tag(box) = __tag(box);\n"
  168. "string(box) = __string(box);\n"
  169. "font(box, font)                   = __font(box, font);\n"
  170. "fontfix(box) = __fontfix(box);\n"
  171. "background(box, color)            = __background(box, color);\n"
  172. "foreground(box, color)            = __foreground(box, color);\n"
  173. "fill() = __fill();\n"
  174. "rule() = __rule();\n"
  175. "diag() = __diag();\n"
  176. "fail() = __fail();\n"
  177. "fail(message) = __fail(message);\n"
  178. "undef() = __undef();\n"
  179. "#line 29 \"../vsllib/std.vsl\"\n"
  180. "\n"
  181. "\n"
  182. "\n"
  183. "std_version() = \"$Id: std.vsl,v 1.6 1997/10/08 13:19:55 zeller Exp $\";\n"
  184. "\n"
  185. "\n"
  186. "rulethickness() = 1;\n"
  187. "whitethickness() = 2;\n"
  188. "indentamount() = hspace(\"  \");\n"
  189. "true = 1;\n"
  190. "false = 0;\n"
  191. "\n"
  192. "\n"
  193. "\n"
  194. "\n"
  195. "max(a) = a;\n"
  196. "max(a, b, ...) = if a > b then max(a, ...) else max(b, ...) fi;\n"
  197. "min(a) = a;\n"
  198. "min(a, b, ...) = if a < b then min(a, ...) else min(b, ...) fi;\n"
  199. "\n"
  200. "\n"
  201. "hfill() = vfix(fill());\n"
  202. "vfill() = hfix(fill());\n"
  203. "\n"
  204. "\n"
  205. "hnull() = vfill();\n"
  206. "vnull() = hfill();\n"
  207. "\n"
  208. "\n"
  209. "hrule(thickness) = rule() & vspace(thickness);\n"
  210. "vrule(thickness) = rule() | hspace(thickness);\n"
  211. "hwhite(thickness) = fill() & vspace(thickness);\n"
  212. "vwhite(thickness) = fill() | hspace(thickness);\n"
  213. "\n"
  214. "hrule() = hrule(rulethickness());\n"
  215. "vrule() = vrule(rulethickness());\n"
  216. "hwhite() = hwhite(whitethickness());\n"
  217. "vwhite() = vwhite(whitethickness());\n"
  218. "\n"
  219. "\n"
  220. "fix(a) = hfix(vfix(a));\n"
  221. "space(a) = hspace(a) + vspace(a);\n"
  222. "\n"
  223. "\n"
  224. "box(x) = x;\n"
  225. "box(x,y) = hspace(x) + vspace(y);\n"
  226. "\n"
  227. "\n"
  228. "halign(...) = (&)(...);\n"
  229. "valign(...) = (|)(...);\n"
  230. "talign(...) = (~)(...);\n"
  231. "\n"
  232. "\n"
  233. "hralign() = hnull();\n"
  234. "hralign(head) = head;\n"
  235. "hralign(head, ...) = hralign(...) & head;\n"
  236. "tralign() = hnull();\n"
  237. "tralign(head) = head;\n"
  238. "tralign(head, ...) = tralign(...) ~ head;\n"
  239. "vralign() = vnull();\n"
  240. "vralign(head) = head;\n"
  241. "vralign(head, ...) = vralign(...) | head;\n"
  242. "\n"
  243. "\n"
  244. "hlist(_) = hnull();\n"
  245. "hlist(_, head) = head;\n"
  246. "hlist(sep, head, ...) = head & sep & hlist(sep, ...);\n"
  247. "\n"
  248. "tlist(_) = hnull();\n"
  249. "tlist(_, head) = head;\n"
  250. "tlist(sep, head, ...) = head ~ sep ~ tlist(sep, ...);\n"
  251. "\n"
  252. "vlist(_) = vnull();\n"
  253. "vlist(_, head) = head;\n"
  254. "vlist(sep, head, ...) = head | sep | vlist(sep, ...);\n"
  255. "\n"
  256. "hvlist(_) = vnull();\n"
  257. "hvlist(sep, head) = head & sep;\n"
  258. "hvlist(sep, head, ...) = head & sep | hvlist(sep, ...);\n"
  259. "\n"
  260. "tvlist(_) = vnull();\n"
  261. "tvlist(sep, head) = head ~ sep;\n"
  262. "tvlist(sep, head, ...) = head ~ sep | tvlist(sep, ...);\n"
  263. "\n"
  264. "vhlist(_) = vnull();\n"
  265. "vhlist(sep, head) = head | sep;\n"
  266. "vhlist(sep, head, ...) = (head | sep) & vhlist(sep, ...);\n"
  267. "\n"
  268. "vtlist(_) = vnull();\n"
  269. "vtlist(sep, head) = head | sep;\n"
  270. "vtlist(sep, head, ...) = (head | sep) ~ vtlist(sep, ...);\n"
  271. "\n"
  272. "commalist(...) = tlist(\", \", ...);\n"
  273. "semicolonlist(...) = tlist(\"; \", ...);\n"
  274. "\n"
  275. "\n"
  276. "heven(box, align) = box ^ hspace(box + box % align);\n"
  277. "veven(box, align) = box ^ vspace(box + box % align);\n"
  278. "even(box, align) = heven(veven(box, align), align);\n"
  279. "heven(box) = heven(box, 2);\n"
  280. "veven(box) = veven(box, 2);\n"
  281. "even(box) = heven(veven(box));\n"
  282. "\n"
  283. "\n"
  284. "\n"
  285. "num(a);\n"
  286. "digit(0) = \"0\";\n"
  287. "digit(1) = \"1\";\n"
  288. "digit(2) = \"2\";\n"
  289. "digit(3) = \"3\";\n"
  290. "digit(4) = \"4\";\n"
  291. "digit(5) = \"5\";\n"
  292. "digit(6) = \"6\";\n"
  293. "digit(7) = \"7\";\n"
  294. "digit(8) = \"8\";\n"
  295. "digit(9) = \"9\";\n"
  296. "digit(10) = \"a\";\n"
  297. "digit(11) = \"b\";\n"
  298. "digit(12) = \"c\";\n"
  299. "digit(13) = \"d\";\n"
  300. "digit(14) = \"e\";\n"
  301. "digit(15) = \"f\";\n"
  302. "digit(_) = fail(\"invalid digit() argument\");\n"
  303. "\n"
  304. "\n"
  305. "\n"
  306. "pnum(a, base) =\n"
  307. "if a < base then\n"
  308. "digit(a)\n"
  309. "else\n"
  310. "pnum(a / base, base) & pnum(a % base, base)\n"
  311. "fi;\n"
  312. "\n"
  313. "\n"
  314. "num(a, base) =\n"
  315. "if a < 0 then \"-\" & pnum(0 - a, base) else pnum(a, base) fi;\n"
  316. "num(a) = num(a, 10);\n"
  317. "\n"
  318. "\n"
  319. "dec(a) = num(a, 10);\n"
  320. "oct(a) = num(a, 8);\n"
  321. "bin(a) = num(a, 2);\n"
  322. "hex(a) = num(a, 16);\n"
  323. "\n"
  324. "\n"
  325. "n_rule() = hrule() | hwhite();\n"
  326. "w_rule() = vrule() & vwhite();\n"
  327. "s_rule() = hwhite() | hrule();\n"
  328. "e_rule() = vwhite() & vrule();\n"
  329. "\n"
  330. "\n"
  331. "whiteframe(box, thickness) =\n"
  332. "hwhite(thickness)\n"
  333. "| vwhite(thickness) & box & vwhite(thickness)\n"
  334. "| hwhite(thickness);\n"
  335. "whiteframe(box) = whiteframe(box, whitethickness());\n"
  336. "\n"
  337. "ruleframe(box, thickness) =\n"
  338. "hrule(thickness)\n"
  339. "| vrule(thickness) & box & vrule(thickness)\n"
  340. "| hrule(thickness);\n"
  341. "ruleframe(box) = ruleframe(box, rulethickness());\n"
  342. "\n"
  343. "frame(box) = ruleframe(whiteframe(box));\n"
  344. "doubleframe(box) = frame(frame(box));\n"
  345. "thickframe(box) = ruleframe(frame(box));\n"
  346. "\n"
  347. "\n"
  348. "hcenter(box) = fill() & box & fill();\n"
  349. "vcenter(box) = fill() | box | fill();\n"
  350. "center(box) = hcenter(vcenter(box));\n"
  351. "\n"
  352. "\n"
  353. "n_flush(box) = hcenter(box) | fill();\n"
  354. "s_flush(box) = fill() | hcenter(box);\n"
  355. "w_flush(box) = vcenter(box) & fill();\n"
  356. "e_flush(box) = fill() & vcenter(box);\n"
  357. "sw_flush(box) = fill() | (box & fill());\n"
  358. "nw_flush(box) = (box & fill()) | fill();\n"
  359. "se_flush(box) = fill() | (fill() & box);\n"
  360. "ne_flush(box) = (fill() & box) | fill();\n"
  361. "\n"
  362. "\n"
  363. "indent(box) = indentamount() & box;\n"
  364. "\n"
  365. "\n"
  366. "underline(box) = box | hrule();\n"
  367. "overline(box) = hrule() | box;\n"
  368. "crossline(box) = hfix(box ^ vcenter(hrule()));\n"
  369. "\n"
  370. "\n"
  371. "doublestrike(box) = box ^ (hspace(1) & box);\n"
  372. "\n"
  373. "\n"
  374. "dquote() = \"\\\"\";\n"
  375. "squote() = \"'\";\n"
  376. "copyright() = \"(c)\";\n"
  377. "#line 31 \"ddd.vsl\"\n"
  378. "\n"
  379. "#line 1 \"../vsllib/tab.vsl\"\n"
  380. "\n"
  381. "\n"
  382. "\n"
  383. "\n"
  384. "\n"
  385. "\n"
  386. "\n"
  387. "\n"
  388. "\n"
  389. "\n"
  390. "\n"
  391. "\n"
  392. "\n"
  393. "\n"
  394. "\n"
  395. "\n"
  396. "\n"
  397. "\n"
  398. "\n"
  399. "\n"
  400. "\n"
  401. "\n"
  402. "\n"
  403. "\n"
  404. "\n"
  405. "\n"
  406. "\n"
  407. "\n"
  408. "#line 1 \"../vsllib/std.vsl\"\n"
  409. "\n"
  410. "\n"
  411. "\n"
  412. "\n"
  413. "\n"
  414. "\n"
  415. "\n"
  416. "\n"
  417. "\n"
  418. "\n"
  419. "\n"
  420. "\n"
  421. "\n"
  422. "\n"
  423. "\n"
  424. "\n"
  425. "\n"
  426. "\n"
  427. "\n"
  428. "\n"
  429. "\n"
  430. "\n"
  431. "\n"
  432. "\n"
  433. "\n"
  434. "\n"
  435. "\n"
  436. "\n"
  437. "#line 1 \"../vsllib/builtin.vsl\"\n"
  438. "\n"
  439. "\n"
  440. "\n"
  441. "\n"
  442. "\n"
  443. "\n"
  444. "\n"
  445. "\n"
  446. "\n"
  447. "\n"
  448. "\n"
  449. "\n"
  450. "\n"
  451. "\n"
  452. "\n"
  453. "\n"
  454. "\n"
  455. "\n"
  456. "\n"
  457. "\n"
  458. "\n"
  459. "\n"
  460. "\n"
  461. "\n"
  462. "\n"
  463. "\n"
  464. "\n"
  465. "\n"
  466. "\n"
  467. "\n"
  468. "\n"
  469. "__op_halign(...);\n"
  470. "__op_valign(...);\n"
  471. "__op_ualign(...);\n"
  472. "__op_talign(...);\n"
  473. "__op_plus(...);\n"
  474. "__op_mult(...);\n"
  475. "__op_cons(...);\n"
  476. "__op_minus(a, b);\n"
  477. "__op_div(a, b);\n"
  478. "__op_mod(a, b);\n"
  479. "__op_eq(a, b);\n"
  480. "__op_ne(a, b);\n"
  481. "__op_gt(a, b);\n"
  482. "__op_ge(a, b);\n"
  483. "__op_lt(a, b);\n"
  484. "__op_le(a, b);\n"
  485. "__op_not(a);\n"
  486. "\n"
  487. "\n"
  488. "__hspace(box);\n"
  489. "__vspace(box);\n"
  490. "__hfix(box);\n"
  491. "__vfix(box);\n"
  492. "__rise(linethickness);\n"
  493. "__fall(linethickness);\n"
  494. "__arc(start, length, linethickness);\n"
  495. "__square(box);\n"
  496. "__tag(box);\n"
  497. "__string(box);\n"
  498. "__font(box, font);\n"
  499. "__fontfix(box);\n"
  500. "__background(box, color);\n"
  501. "__foreground(box, color);\n"
  502. "\n"
  503. "\n"
  504. "__fill();\n"
  505. "__rule();\n"
  506. "__diag();\n"
  507. "\n"
  508. "\n"
  509. "__fail(...);\n"
  510. "__undef();\n"
  511. "\n"
  512. "\n"
  513. "\n"
  514. "\n"
  515. "\n"
  516. "(&)(...) = __op_halign(...);\n"
  517. "(|)(...) = __op_valign(...);\n"
  518. "(^)(...) = __op_ualign(...);\n"
  519. "(~)(...) = __op_talign(...);\n"
  520. "(+)(...) = __op_plus(...);\n"
  521. "(*)(...) = __op_mult(...);\n"
  522. "(::)(...) = __op_cons(...);\n"
  523. "(-)(a, b)  = __op_minus(a, b);\n"
  524. "(/)(a, b)  = __op_div(a, b);\n"
  525. "(%)(a, b)  = __op_mod(a, b);\n"
  526. "(=)(a, b)  = __op_eq(a, b);\n"
  527. "(<>)(a, b) = __op_ne(a, b);\n"
  528. "(>)(a, b)  = __op_gt(a, b);\n"
  529. "(>=)(a, b) = __op_ge(a, b);\n"
  530. "(<)(a, b)  = __op_lt(a, b);\n"
  531. "(<=)(a, b) = __op_le(a, b);\n"
  532. "(not)(a) = __op_not(a);\n"
  533. "\n"
  534. "\n"
  535. "hspace(box) = __hspace(box);\n"
  536. "vspace(box) = __vspace(box);\n"
  537. "hfix(box) = __hfix(box);\n"
  538. "vfix(box) = __vfix(box);\n"
  539. "rise(linethickness) = __rise(linethickness);\n"
  540. "fall(linethickness) = __fall(linethickness);\n"
  541. "arc(start, length, linethickness) = __arc(start, length, linethickness);\n"
  542. "square(box) = __square(box);\n"
  543. "tag(box) = __tag(box);\n"
  544. "string(box) = __string(box);\n"
  545. "font(box, font)                   = __font(box, font);\n"
  546. "fontfix(box) = __fontfix(box);\n"
  547. "background(box, color)            = __background(box, color);\n"
  548. "foreground(box, color)            = __foreground(box, color);\n"
  549. "fill() = __fill();\n"
  550. "rule() = __rule();\n"
  551. "diag() = __diag();\n"
  552. "fail() = __fail();\n"
  553. "fail(message) = __fail(message);\n"
  554. "undef() = __undef();\n"
  555. "#line 29 \"../vsllib/std.vsl\"\n"
  556. "\n"
  557. "\n"
  558. "\n"
  559. "std_version() = \"$Id: std.vsl,v 1.6 1997/10/08 13:19:55 zeller Exp $\";\n"
  560. "\n"
  561. "\n"
  562. "rulethickness() = 1;\n"
  563. "whitethickness() = 2;\n"
  564. "indentamount() = hspace(\"  \");\n"
  565. "true = 1;\n"
  566. "false = 0;\n"
  567. "\n"
  568. "\n"
  569. "\n"
  570. "\n"
  571. "max(a) = a;\n"
  572. "max(a, b, ...) = if a > b then max(a, ...) else max(b, ...) fi;\n"
  573. "min(a) = a;\n"
  574. "min(a, b, ...) = if a < b then min(a, ...) else min(b, ...) fi;\n"
  575. "\n"
  576. "\n"
  577. "hfill() = vfix(fill());\n"
  578. "vfill() = hfix(fill());\n"
  579. "\n"
  580. "\n"
  581. "hnull() = vfill();\n"
  582. "vnull() = hfill();\n"
  583. "\n"
  584. "\n"
  585. "hrule(thickness) = rule() & vspace(thickness);\n"
  586. "vrule(thickness) = rule() | hspace(thickness);\n"
  587. "hwhite(thickness) = fill() & vspace(thickness);\n"
  588. "vwhite(thickness) = fill() | hspace(thickness);\n"
  589. "\n"
  590. "hrule() = hrule(rulethickness());\n"
  591. "vrule() = vrule(rulethickness());\n"
  592. "hwhite() = hwhite(whitethickness());\n"
  593. "vwhite() = vwhite(whitethickness());\n"
  594. "\n"
  595. "\n"
  596. "fix(a) = hfix(vfix(a));\n"
  597. "space(a) = hspace(a) + vspace(a);\n"
  598. "\n"
  599. "\n"
  600. "box(x) = x;\n"
  601. "box(x,y) = hspace(x) + vspace(y);\n"
  602. "\n"
  603. "\n"
  604. "halign(...) = (&)(...);\n"
  605. "valign(...) = (|)(...);\n"
  606. "talign(...) = (~)(...);\n"
  607. "\n"
  608. "\n"
  609. "hralign() = hnull();\n"
  610. "hralign(head) = head;\n"
  611. "hralign(head, ...) = hralign(...) & head;\n"
  612. "tralign() = hnull();\n"
  613. "tralign(head) = head;\n"
  614. "tralign(head, ...) = tralign(...) ~ head;\n"
  615. "vralign() = vnull();\n"
  616. "vralign(head) = head;\n"
  617. "vralign(head, ...) = vralign(...) | head;\n"
  618. "\n"
  619. "\n"
  620. "hlist(_) = hnull();\n"
  621. "hlist(_, head) = head;\n"
  622. "hlist(sep, head, ...) = head & sep & hlist(sep, ...);\n"
  623. "\n"
  624. "tlist(_) = hnull();\n"
  625. "tlist(_, head) = head;\n"
  626. "tlist(sep, head, ...) = head ~ sep ~ tlist(sep, ...);\n"
  627. "\n"
  628. "vlist(_) = vnull();\n"
  629. "vlist(_, head) = head;\n"
  630. "vlist(sep, head, ...) = head | sep | vlist(sep, ...);\n"
  631. "\n"
  632. "hvlist(_) = vnull();\n"
  633. "hvlist(sep, head) = head & sep;\n"
  634. "hvlist(sep, head, ...) = head & sep | hvlist(sep, ...);\n"
  635. "\n"
  636. "tvlist(_) = vnull();\n"
  637. "tvlist(sep, head) = head ~ sep;\n"
  638. "tvlist(sep, head, ...) = head ~ sep | tvlist(sep, ...);\n"
  639. "\n"
  640. "vhlist(_) = vnull();\n"
  641. "vhlist(sep, head) = head | sep;\n"
  642. "vhlist(sep, head, ...) = (head | sep) & vhlist(sep, ...);\n"
  643. "\n"
  644. "vtlist(_) = vnull();\n"
  645. "vtlist(sep, head) = head | sep;\n"
  646. "vtlist(sep, head, ...) = (head | sep) ~ vtlist(sep, ...);\n"
  647. "\n"
  648. "commalist(...) = tlist(\", \", ...);\n"
  649. "semicolonlist(...) = tlist(\"; \", ...);\n"
  650. "\n"
  651. "\n"
  652. "heven(box, align) = box ^ hspace(box + box % align);\n"
  653. "veven(box, align) = box ^ vspace(box + box % align);\n"
  654. "even(box, align) = heven(veven(box, align), align);\n"
  655. "heven(box) = heven(box, 2);\n"
  656. "veven(box) = veven(box, 2);\n"
  657. "even(box) = heven(veven(box));\n"
  658. "\n"
  659. "\n"
  660. "\n"
  661. "num(a);\n"
  662. "digit(0) = \"0\";\n"
  663. "digit(1) = \"1\";\n"
  664. "digit(2) = \"2\";\n"
  665. "digit(3) = \"3\";\n"
  666. "digit(4) = \"4\";\n"
  667. "digit(5) = \"5\";\n"
  668. "digit(6) = \"6\";\n"
  669. "digit(7) = \"7\";\n"
  670. "digit(8) = \"8\";\n"
  671. "digit(9) = \"9\";\n"
  672. "digit(10) = \"a\";\n"
  673. "digit(11) = \"b\";\n"
  674. "digit(12) = \"c\";\n"
  675. "digit(13) = \"d\";\n"
  676. "digit(14) = \"e\";\n"
  677. "digit(15) = \"f\";\n"
  678. "digit(_) = fail(\"invalid digit() argument\");\n"
  679. "\n"
  680. "\n"
  681. "\n"
  682. "pnum(a, base) =\n"
  683. "if a < base then\n"
  684. "digit(a)\n"
  685. "else\n"
  686. "pnum(a / base, base) & pnum(a % base, base)\n"
  687. "fi;\n"
  688. "\n"
  689. "\n"
  690. "num(a, base) =\n"
  691. "if a < 0 then \"-\" & pnum(0 - a, base) else pnum(a, base) fi;\n"
  692. "num(a) = num(a, 10);\n"
  693. "\n"
  694. "\n"
  695. "dec(a) = num(a, 10);\n"
  696. "oct(a) = num(a, 8);\n"
  697. "bin(a) = num(a, 2);\n"
  698. "hex(a) = num(a, 16);\n"
  699. "\n"
  700. "\n"
  701. "n_rule() = hrule() | hwhite();\n"
  702. "w_rule() = vrule() & vwhite();\n"
  703. "s_rule() = hwhite() | hrule();\n"
  704. "e_rule() = vwhite() & vrule();\n"
  705. "\n"
  706. "\n"
  707. "whiteframe(box, thickness) =\n"
  708. "hwhite(thickness)\n"
  709. "| vwhite(thickness) & box & vwhite(thickness)\n"
  710. "| hwhite(thickness);\n"
  711. "whiteframe(box) = whiteframe(box, whitethickness());\n"
  712. "\n"
  713. "ruleframe(box, thickness) =\n"
  714. "hrule(thickness)\n"
  715. "| vrule(thickness) & box & vrule(thickness)\n"
  716. "| hrule(thickness);\n"
  717. "ruleframe(box) = ruleframe(box, rulethickness());\n"
  718. "\n"
  719. "frame(box) = ruleframe(whiteframe(box));\n"
  720. "doubleframe(box) = frame(frame(box));\n"
  721. "thickframe(box) = ruleframe(frame(box));\n"
  722. "\n"
  723. "\n"
  724. "hcenter(box) = fill() & box & fill();\n"
  725. "vcenter(box) = fill() | box | fill();\n"
  726. "center(box) = hcenter(vcenter(box));\n"
  727. "\n"
  728. "\n"
  729. "n_flush(box) = hcenter(box) | fill();\n"
  730. "s_flush(box) = fill() | hcenter(box);\n"
  731. "w_flush(box) = vcenter(box) & fill();\n"
  732. "e_flush(box) = fill() & vcenter(box);\n"
  733. "sw_flush(box) = fill() | (box & fill());\n"
  734. "nw_flush(box) = (box & fill()) | fill();\n"
  735. "se_flush(box) = fill() | (fill() & box);\n"
  736. "ne_flush(box) = (fill() & box) | fill();\n"
  737. "\n"
  738. "\n"
  739. "indent(box) = indentamount() & box;\n"
  740. "\n"
  741. "\n"
  742. "underline(box) = box | hrule();\n"
  743. "overline(box) = hrule() | box;\n"
  744. "crossline(box) = hfix(box ^ vcenter(hrule()));\n"
  745. "\n"
  746. "\n"
  747. "doublestrike(box) = box ^ (hspace(1) & box);\n"
  748. "\n"
  749. "\n"
  750. "dquote() = \"\\\"\";\n"
  751. "squote() = \"'\";\n"
  752. "copyright() = \"(c)\";\n"
  753. "#line 29 \"../vsllib/tab.vsl\"\n"
  754. "\n"
  755. "\n"
  756. "\n"
  757. "tab_version() = \"$Id: tab.vsl,v 1.8 1998/03/25 14:21:56 zeller Exp $\";\n"
  758. "\n"
  759. "\n"
  760. "\n"
  761. "\n"
  762. "\n"
  763. "\n"
  764. "\n"
  765. "\n"
  766. "\n"
  767. "\n"
  768. "\n"
  769. "\n"
  770. "\n"
  771. "\n"
  772. "tab_elem([]) = tab_elem(0);\n"
  773. "tab_elem(x) = whiteframe(x);\n"
  774. "\n"
  775. "\n"
  776. "\n"
  777. "\n"
  778. "_tab_maxhspace([...]) = hspace(valign(...));\n"
  779. "_tab_maxvspace([...]) = vspace(halign(...));\n"
  780. "\n"
  781. "\n"
  782. "_tab_allempty([[]]) = true;\n"
  783. "_tab_allempty([[] : more]) = _tab_allempty(more);\n"
  784. "_tab_allempty([_...]) = false;\n"
  785. "\n"
  786. "\n"
  787. "_tab_heads([]) = [];\n"
  788. "_tab_heads([[head : _] : more]) =\n"
  789. "[tab_elem(head) : _tab_heads(more)];\n"
  790. "_tab_heads([x]) = [tab_elem(x)];\n"
  791. "\n"
  792. "\n"
  793. "_tab_tails([]) = [];\n"
  794. "_tab_tails([[_ : tail] : more]) =\n"
  795. "[tail : _tab_tails(more)];\n"
  796. "_tab_tails(_) = [];\n"
  797. "\n"
  798. "\n"
  799. "_tab_width(...) =\n"
  800. "if _tab_allempty(...)\n"
  801. "then []\n"
  802. "else [ _tab_maxhspace(_tab_heads(...)) : _tab_width(_tab_tails(...)) ]\n"
  803. "fi;\n"
  804. "\n"
  805. "\n"
  806. "_tab_line([width], [head]) =\n"
  807. "width | tab_elem(head);\n"
  808. "_tab_line([width : twidth], [head : tail]) =\n"
  809. "_tab_line([width], [head]) & _tab_line(twidth, tail);\n"
  810. "_tab_line([width], x) =\n"
  811. "_tab_line([width], [x]);\n"
  812. "_tab_line([width : twidth], x) =\n"
  813. "_tab_line([width], [x]) & _tab_line(twidth, 0);\n"
  814. "\n"
  815. "\n"
  816. "_dtab_line([width], [head]) =\n"
  817. "width | tab_elem(head);\n"
  818. "_dtab_line([width : twidth], [head : tail]) =\n"
  819. "_dtab_line([width], [head]) & vrule() & _dtab_line(twidth, tail);\n"
  820. "_dtab_line([width], x) =\n"
  821. "_tab_line([width], [x]);\n"
  822. "_dtab_line([width : twidth], x) =\n"
  823. "_tab_line([width], [x]) & vwhite(rulethickness()) & _dtab_line(twidth, 0);\n"
  824. "\n"
  825. "\n"
  826. "_tab(width, [head]) =\n"
  827. "_tab_line(width, head);\n"
  828. "_tab(width, [head : tail]) =\n"
  829. "_tab_line(width, head)\n"
  830. "| _tab(width, tail);\n"
  831. "\n"
  832. "\n"
  833. "_dtab(width, [head]) =\n"
  834. "vrule() & _dtab_line(width, head) & vrule();\n"
  835. "_dtab(width, [head : tail]) =\n"
  836. "vrule() & _dtab_line(width, head) & vrule()\n"
  837. "| hrule()\n"
  838. "| _dtab(width, tail);\n"
  839. "\n"
  840. "\n"
  841. "\n"
  842. "\n"
  843. "\n"
  844. "tab(...) =\n"
  845. "_tab(_tab_width(...), ...);\n"
  846. "\n"
  847. "\n"
  848. "dtab(...) =\n"
  849. "hrule()\n"
  850. "| _dtab(_tab_width(...), ...)\n"
  851. "| hrule();\n"
  852. "#line 32 \"ddd.vsl\"\n"
  853. "\n"
  854. "#line 1 \"../vsllib/fonts.vsl\"\n"
  855. "\n"
  856. "\n"
  857. "\n"
  858. "\n"
  859. "\n"
  860. "\n"
  861. "\n"
  862. "\n"
  863. "\n"
  864. "\n"
  865. "\n"
  866. "\n"
  867. "\n"
  868. "\n"
  869. "\n"
  870. "\n"
  871. "\n"
  872. "\n"
  873. "\n"
  874. "\n"
  875. "\n"
  876. "\n"
  877. "\n"
  878. "\n"
  879. "\n"
  880. "\n"
  881. "\n"
  882. "\n"
  883. "\n"
  884. "fonts_version() = \"$Id: fonts.vsl,v 1.10 1998/04/24 09:38:02 zeller Exp $\";\n"
  885. "\n"
  886. "\n"
  887. "_font(box, font) = font(box, font);\n"
  888. "_fontfix(box) = fontfix(box);\n"
  889. "\n"
  890. "\n"
  891. "#pragma override font\n"
  892. "font(box, font) = _fontfix(_font(box, string(font)));\n"
  893. "\n"
  894. "\n"
  895. "slant_unslanted() = \"r\";\n"
  896. "slant_italic() = \"*\";\n"
  897. "weight_medium() = \"medium\";\n"
  898. "weight_bold() = \"bold\";\n"
  899. "family_times() = \"times\";\n"
  900. "family_courier() = \"courier\";\n"
  901. "family_helvetica() = \"helvetica\";\n"
  902. "family_new_century() = \"new century schoolbook\";\n"
  903. "family_typewriter() = \"lucidatypewriter\";\n"
  904. "\n"
  905. "\n"
  906. "stdfontfamily() = family_times();\n"
  907. "stdfontsize() = 0;\n"
  908. "stdfontpoints() = 90;\n"
  909. "stdfontslant() = slant_unslanted();\n"
  910. "stdfontweight() = weight_medium();\n"
  911. "\n"
  912. "\n"
  913. "fontnum(n) = if n > 0 then num(n) else \"*\" fi;\n"
  914. "\n"
  915. "\n"
  916. "\n"
  917. "sysfontname(fndry, family, weight, slant, sWdth, adstyl, pxlsz, ptSz,\n"
  918. "resx, resy, spc, avgWdth, rgstry, encdng) = string(\n"
  919. "\"-\" & fndry &\n"
  920. "\"-\" & family &\n"
  921. "\"-\" & weight &\n"
  922. "\"-\" & slant &\n"
  923. "\"-\" & sWdth &\n"
  924. "\"-\" & adstyl &\n"
  925. "\"-\" & pxlsz &\n"
  926. "\"-\" & ptSz &\n"
  927. "\"-\" & resx &\n"
  928. "\"-\" & resy &\n"
  929. "\"-\" & spc &\n"
  930. "\"-\" & avgWdth &\n"
  931. "\"-\" & rgstry &\n"
  932. "\"-\" & encdng);\n"
  933. "\n"
  934. "\n"
  935. "fontname(weight, slant, family, pixels, points) = string(\n"
  936. "\"-\" & \"*\" &\n"
  937. "\"-\" & family &\n"
  938. "\"-\" & weight &\n"
  939. "\"-\" & slant &\n"
  940. "\"-\" & \"*\" &\n"
  941. "\"-\" & \"*\" &\n"
  942. "\"-\" & fontnum(pixels) &\n"
  943. "\"-\" & fontnum(points) &\n"
  944. "\"-\" & \"*\" &\n"
  945. "\"-\" & \"*\" &\n"
  946. "\"-\" & \"*\" &\n"
  947. "\"-\" & \"*\" &\n"
  948. "\"-\" & \"*\" &\n"
  949. "\"-\" & \"*\");\n"
  950. "\n"
  951. "\n"
  952. "fontname(weight, slant, family, size) =\n"
  953. "fontname(weight, slant, family, size, stdfontpoints());\n"
  954. "fontname(weight, slant, family) =\n"
  955. "fontname(weight, slant, family, stdfontsize());\n"
  956. "fontname(weight, slant) =\n"
  957. "fontname(weight, slant, stdfontfamily());\n"
  958. "fontname(weight) =\n"
  959. "fontname(weight, stdfontslant());\n"
  960. "fontname() =\n"
  961. "fontname(stdfontweight());\n"
  962. "\n"
  963. "\n"
  964. "\n"
  965. "fontname_rm() =\n"
  966. "fontname(weight_medium(), slant_unslanted());\n"
  967. "fontname_bf() =\n"
  968. "fontname(weight_bold(), slant_unslanted());\n"
  969. "fontname_it() =\n"
  970. "fontname(weight_medium(), slant_italic());\n"
  971. "fontname_bi() =\n"
  972. "fontname(weight_bold(), slant_italic());\n"
  973. "\n"
  974. "fontname_rm(family) =\n"
  975. "fontname(weight_medium(), slant_unslanted(), family);\n"
  976. "fontname_bf(family) =\n"
  977. "fontname(weight_bold(), slant_unslanted(), family);\n"
  978. "fontname_it(family) =\n"
  979. "fontname(weight_medium(), slant_italic(), family);\n"
  980. "fontname_bi(family) =\n"
  981. "fontname(weight_bold(), slant_italic(), family);\n"
  982. "\n"
  983. "fontname_rm(family, size) =\n"
  984. "fontname(weight_medium(), slant_unslanted(), family, size);\n"
  985. "fontname_bf(family, size) =\n"
  986. "fontname(weight_bold(), slant_unslanted(), family, size);\n"
  987. "fontname_it(family, size) =\n"
  988. "fontname(weight_medium(), slant_italic(), family, size);\n"
  989. "fontname_bi(family, size) =\n"
  990. "fontname(weight_bold(), slant_italic(), family, size);\n"
  991. "\n"
  992. "\n"
  993. "\n"
  994. "rm(box) = font(box, fontname_rm());\n"
  995. "bf(box) = font(box, fontname_bf());\n"
  996. "it(box) = font(box, fontname_it());\n"
  997. "bi(box) = font(box, fontname_bi());\n"
  998. "\n"
  999. "rm(box, family) = font(box, fontname_rm(family));\n"
  1000. "bf(box, family) = font(box, fontname_bf(family));\n"
  1001. "it(box, family) = font(box, fontname_it(family));\n"
  1002. "bi(box, family) = font(box, fontname_bi(family));\n"
  1003. "\n"
  1004. "rm(box, family, size) = font(box, fontname_rm(family, size));\n"
  1005. "bf(box, family, size) = font(box, fontname_bf(family, size));\n"
  1006. "it(box, family, size) = font(box, fontname_it(family, size));\n"
  1007. "bi(box, family, size) = font(box, fontname_bi(family, size));\n"
  1008. "\n"
  1009. "\n"
  1010. "\n"
  1011. "sl(...) = it(...);\n"
  1012. "bs(...) = bi(...);\n"
  1013. "#line 33 \"ddd.vsl\"\n"
  1014. "\n"
  1015. "#line 1 \"../vsllib/colors.vsl\"\n"
  1016. "\n"
  1017. "\n"
  1018. "\n"
  1019. "\n"
  1020. "\n"
  1021. "\n"
  1022. "\n"
  1023. "\n"
  1024. "\n"
  1025. "\n"
  1026. "\n"
  1027. "\n"
  1028. "\n"
  1029. "\n"
  1030. "\n"
  1031. "\n"
  1032. "\n"
  1033. "\n"
  1034. "\n"
  1035. "\n"
  1036. "\n"
  1037. "\n"
  1038. "\n"
  1039. "\n"
  1040. "\n"
  1041. "\n"
  1042. "\n"
  1043. "\n"
  1044. "\n"
  1045. "colors_version() = \"$Id: colors.vsl,v 1.4 1997/10/08 13:19:52 zeller Exp $\";\n"
  1046. "\n"
  1047. "\n"
  1048. "color(box, fg, bg)   = foreground(background(box, bg), fg);\n"
  1049. "color(box, fg)       = foreground(box, fg);\n"
  1050. "#line 34 \"ddd.vsl\"\n"
  1051. "\n"
  1052. "\n"
  1053. "\n"
  1054. "#pragma replace stdfontfamily\n"
  1055. "stdfontfamily() = family_typewriter();\n"
  1056. "small(...) = rm(...);\n"
  1057. "\n"
  1058. "\n"
  1059. "display_color(box) = color(box, \"black\", \"white\");\n"
  1060. "title_color(box) = color(box, \"black\");\n"
  1061. "disabled_color(box) = color(box, \"white\", \"grey50\");\n"
  1062. "simple_color(box) = color(box, \"black\");\n"
  1063. "text_color(box) = color(box, \"black\");\n"
  1064. "pointer_color(box) = color(box, \"blue4\");\n"
  1065. "struct_color(box) = color(box, \"black\");\n"
  1066. "list_color(box) = color(box, \"black\");\n"
  1067. "array_color(box) = color(box, \"blue4\");\n"
  1068. "reference_color(box) = color(box, \"blue4\");\n"
  1069. "changed_color(box) = color(box, \"black\", \"#ffffcc\");\n"
  1070. "shadow_color(box) = color(box, \"grey\");\n"
  1071. "\n"
  1072. "\n"
  1073. "shadow(box, thickness) =\n"
  1074. "box & (square(thickness) | shadow_color(vrule(thickness)))\n"
  1075. "| square(thickness) & shadow_color(hrule(thickness));\n"
  1076. "shadow(box) = shadow(box, 1);\n"
  1077. "\n"
  1078. "\n"
  1079. "fixed_hlist(_) = hnull();\n"
  1080. "fixed_hlist(_, head) = hfix(head);\n"
  1081. "fixed_hlist(sep, head, ...) = hfix(head) & sep & fixed_hlist(sep, ...);\n"
  1082. "\n"
  1083. "fixed_vlist(_) = vnull();\n"
  1084. "fixed_vlist(_, head) = vfix(head);\n"
  1085. "fixed_vlist(sep, head, ...) = vfix(head) | sep | fixed_vlist(sep, ...);\n"
  1086. "\n"
  1087. "\n"
  1088. "title (disp_nr, name) ->\n"
  1089. "title_color(rm(disp_nr & \": \") & bf(name) & hfill());\n"
  1090. "title (name) ->\n"
  1091. "title_color(bf(name) & hfill());\n"
  1092. "\n"
  1093. "\n"
  1094. "annotation (name) ->\n"
  1095. "small(name);\n"
  1096. "\n"
  1097. "\n"
  1098. "disabled () ->\n"
  1099. "disabled_color(vcenter(it(\"(Disabled)\") & hfill()));\n"
  1100. "\n"
  1101. "\n"
  1102. "none () -> \"\";\n"
  1103. "\n"
  1104. "\n"
  1105. "simple_value (value) ->\n"
  1106. "simple_color(vcenter(value & hfill()));\n"
  1107. "numeric_value (value) ->\n"
  1108. "simple_color(vcenter(hfill() & value));\n"
  1109. "\n"
  1110. "\n"
  1111. "collapsed_simple_value () ->\n"
  1112. "simple_color(vcenter(rm(\"...\") & hfill()));\n"
  1113. "\n"
  1114. "\n"
  1115. "text_line (line) ->\n"
  1116. "text_color(rm(line) & hfill());\n"
  1117. "\n"
  1118. "\n"
  1119. "text_value (...) -> valign(...);\n"
  1120. "\n"
  1121. "\n"
  1122. "collapsed_text_value () ->\n"
  1123. "text_color(rm(\"...\") & hfill());\n"
  1124. "\n"
  1125. "\n"
  1126. "pointer_value (value) ->\n"
  1127. "pointer_color(vcenter(value & hfill()));\n"
  1128. "\n"
  1129. "\n"
  1130. "collapsed_pointer_value () ->\n"
  1131. "pointer_color(vcenter(rm(\"...\") & hfill()));\n"
  1132. "\n"
  1133. "\n"
  1134. "dereferenced_pointer_value (value) ->\n"
  1135. "pointer_color(vcenter(bf(value)) & hfill());\n"
  1136. "\n"
  1137. "\n"
  1138. "collapsed_array () ->\n"
  1139. "array_color(vcenter(rm(\"\\133...\\135\") & hfill()));\n"
  1140. "\n"
  1141. "\n"
  1142. "empty_array () ->\n"
  1143. "array_color(vcenter(rm(\"\\133\\135\") & hfill()));\n"
  1144. "\n"
  1145. "\n"
  1146. "vertical_array (...) ->\n"
  1147. "array_color(frame(indent(vlist(hwhite() | hrule() | hwhite(), ...))));\n"
  1148. "\n"
  1149. "\n"
  1150. "horizontal_array (...) ->\n"
  1151. "array_color(frame(indent(fixed_hlist(vwhite() & vrule() & vwhite(), ...)))\n"
  1152. "& hfill());\n"
  1153. "\n"
  1154. "\n"
  1155. "twodim_array (...) ->\n"
  1156. "array_color(dtab(...));\n"
  1157. "twodim_array_elem (...) ->\n"
  1158. "rm(...);\n"
  1159. "\n"
  1160. "\n"
  1161. "struct_value (...) ->\n"
  1162. "struct_color(frame(indent(valign(...))));\n"
  1163. "\n"
  1164. "\n"
  1165. "collapsed_struct_value () ->\n"
  1166. "struct_color(vcenter(rm(\"{...}\") & hfill()));\n"
  1167. "\n"
  1168. "\n"
  1169. "empty_struct_value () ->\n"
  1170. "struct_color(vcenter(rm(\"{}\") & hfill()));\n"
  1171. "\n"
  1172. "\n"
  1173. "struct_member_name (name) ->\n"
  1174. "struct_color(rm(name));\n"
  1175. "\n"
  1176. "\n"
  1177. "struct_member (name, sep, value, name_width) ->\n"
  1178. "vcenter(rm(name) | hspace(name_width))\n"
  1179. "& vcenter(rm(sep)) & rm(value);\n"
  1180. "\n"
  1181. "\n"
  1182. "list_value (...) ->\n"
  1183. "list_color(valign(...));\n"
  1184. "\n"
  1185. "\n"
  1186. "collapsed_list_value () ->\n"
  1187. "list_color(vcenter(rm(\"...\") & hfill()));\n"
  1188. "\n"
  1189. "\n"
  1190. "empty_list_value () ->\n"
  1191. "list_color(vcenter(rm(\"\") & hfill()));\n"
  1192. "\n"
  1193. "\n"
  1194. "list_member_name (name) ->\n"
  1195. "list_color(rm(name));\n"
  1196. "\n"
  1197. "\n"
  1198. "list_member (name, sep, value, name_width) ->\n"
  1199. "vcenter(rm(name) | hspace(name_width))\n"
  1200. "& vcenter(rm(sep)) & rm(value) & hfill();\n"
  1201. "\n"
  1202. "\n"
  1203. "sequence_value (...) ->\n"
  1204. "simple_color(fixed_hlist(vwhite(), ...) & hfill());\n"
  1205. "\n"
  1206. "\n"
  1207. "collapsed_sequence_value () ->\n"
  1208. "collapsed_simple_value();\n"
  1209. "\n"
  1210. "\n"
  1211. "reference_value (ref, value) ->\n"
  1212. "reference_color(vcenter(rm(ref & \": \")) & value & hfill());\n"
  1213. "\n"
  1214. "\n"
  1215. "collapsed_reference_value () ->\n"
  1216. "reference_color(vcenter(rm(\"...\") & hfill()));\n"
  1217. "\n"
  1218. "\n"
  1219. "changed_value (value) ->\n"
  1220. "changed_color(it(value));\n"
  1221. "\n"
  1222. "\n"
  1223. "repeated_value (value, n) ->\n"
  1224. "value & vcenter(rm(\" <\" & dec(n) & \"\\327>\"));\n"
  1225. "\n"
  1226. "\n"
  1227. "display_box (title, value) ->\n"
  1228. "shadow(display_color(frame(title | hrule() | hwhite () | rm(value))));\n"
  1229. "\n"
  1230. "\n"
  1231. "display_box (value) ->\n"
  1232. "shadow(display_color(frame(rm(value))));\n"
  1233.