home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume13 / lj2ps-1.2 / part10 < prev    next >
Encoding:
Text File  |  1990-07-09  |  48.4 KB  |  2,243 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v13i118: lj2ps 1.2 (10 of 13), a LaserJet to PostScript Translator
  3. From: lishka@uwslh.slh.wisc.edu (Chris Lishka (hang loose...) )
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 13, Issue 118
  7. Submitted-by: lishka@uwslh.slh.wisc.edu (Chris Lishka (hang loose...) )
  8. Archive-name: lj2ps-1.2/part10
  9.  
  10. ---- Cut Here and unpack ----
  11. #!/bin/sh
  12. # this is lj2ps.10 (part 10 of a multipart archive)
  13. # do not concatenate these parts, unpack them in order with /bin/sh
  14. # file doc/tscan.idr continued
  15. #
  16. if touch 2>&1 | fgrep '[-amc]' > /dev/null
  17.  then TOUCH=touch
  18.  else TOUCH=true
  19. fi
  20. if test ! -r @shar_seq_.tmp; then
  21.     echo "Please unpack part 1 first!"
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 10; then
  26.     echo "Please unpack part $Scheck next!"
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < @shar_seq_.tmp || exit 1
  32. echo "x - Continuing file doc/tscan.idr"
  33. sed 's/^X//' << 'SHAR_EOF' >> doc/tscan.idr &&
  34. X%I
  35. X288 357 398 400 Line
  36. XEnd
  37. X
  38. XBegin %I Line
  39. X%I b 65535
  40. X1 0 1 [] 0 SetB
  41. X%I cfg Black
  42. X0 0 0 SetCFg
  43. X%I cbg White
  44. X1 1 1 SetCBg
  45. X%I p
  46. X0 SetP
  47. X%I t
  48. X[ 0.959978 0 0 0.959978 657.527 46.7544 ] concat
  49. X%I
  50. X247 344 95 428 Line
  51. XEnd
  52. X
  53. XBegin %I Line
  54. X%I b 65535
  55. X1 0 1 [] 0 SetB
  56. X%I cfg Black
  57. X0 0 0 SetCFg
  58. X%I cbg White
  59. X1 1 1 SetCBg
  60. X%I p
  61. X0 SetP
  62. X%I t
  63. X[ 0.959978 0 0 0.959978 657.527 46.7544 ] concat
  64. X%I
  65. X314 210 89 421 Line
  66. XEnd
  67. X
  68. XBegin %I Line
  69. X%I b 65535
  70. X1 0 1 [] 0 SetB
  71. X%I cfg Black
  72. X0 0 0 SetCFg
  73. X%I cbg White
  74. X1 1 1 SetCBg
  75. X%I p
  76. X0 SetP
  77. X%I t
  78. X[ 0.959978 0 0 0.959978 657.527 46.7544 ] concat
  79. X%I
  80. X174 266 83 416 Line
  81. XEnd
  82. X
  83. XBegin %I Elli
  84. X%I b 65535
  85. X1 0 0 [] 0 SetB
  86. X%I cfg Gray80
  87. X0.2 0.2 0.2 SetCFg
  88. X%I cbg White
  89. X1 1 1 SetCBg
  90. X%I p
  91. X0 SetP
  92. X%I t
  93. X[ 0.959978 0 0 0.959978 909.041 54.4343 ] concat
  94. X%I
  95. X72 188 24 24 Elli
  96. XEnd
  97. X
  98. XBegin %I Elli
  99. X%I b 65535
  100. X1 0 0 [] 0 SetB
  101. X%I cfg Gray80
  102. X0.2 0.2 0.2 SetCFg
  103. X%I cbg White
  104. X1 1 1 SetCBg
  105. X%I p
  106. X0 SetP
  107. X%I t
  108. X[ 0.959978 0 0 0.959978 765.045 100.513 ] concat
  109. X%I
  110. X72 188 24 24 Elli
  111. XEnd
  112. X
  113. XBegin %I Elli
  114. X%I b 65535
  115. X1 0 0 [] 0 SetB
  116. X%I cfg Gray80
  117. X0.2 0.2 0.2 SetCFg
  118. X%I cbg White
  119. X1 1 1 SetCBg
  120. X%I p
  121. X0 SetP
  122. X%I t
  123. X[ 0.959978 0 0 0.959978 847.603 191.711 ] concat
  124. X%I
  125. X72 188 24 24 Elli
  126. XEnd
  127. X
  128. XBegin %I Elli
  129. X%I b 65535
  130. X1 0 0 [] 0 SetB
  131. X%I cfg Gray80
  132. X0.2 0.2 0.2 SetCFg
  133. X%I cbg White
  134. X1 1 1 SetCBg
  135. X%I p
  136. X0 SetP
  137. X%I t
  138. X[ 0.959978 0 0 0.959978 655.607 288.669 ] concat
  139. X%I
  140. X72 188 24 24 Elli
  141. XEnd
  142. X
  143. XBegin %I Text
  144. X%I cfg Gray80
  145. X0.2 0.2 0.2 SetCFg
  146. X%I f *-courier-medium-r-*-80-*
  147. X/Courier 8 SetF
  148. X%I t
  149. X[ 0.959978 0 0 0.959978 666.167 475.864 ] concat
  150. X%I
  151. X[
  152. X(Unknown)
  153. X(Command)
  154. X] Text
  155. XEnd
  156. X
  157. XBegin %I Text
  158. X%I cfg Black
  159. X0 0 0 SetCFg
  160. X%I f *-courier-medium-r-*-80-*
  161. X/Courier 8 SetF
  162. X%I t
  163. X[ 0.959978 0 0 0.959978 917.681 470.105 ] concat
  164. X%I
  165. X[
  166. X(Command)
  167. X(\()
  168. X] Text
  169. XEnd
  170. X
  171. XBegin %I Text
  172. X%I cfg Black
  173. X0 0 0 SetCFg
  174. X%I f *-courier-medium-r-*-80-*
  175. X/Courier 8 SetF
  176. X%I t
  177. X[ 0.959978 0 0 0.959978 1008.88 472.025 ] concat
  178. X%I
  179. X[
  180. X(Command)
  181. X(\))
  182. X] Text
  183. XEnd
  184. X
  185. XBegin %I Text
  186. X%I cfg Black
  187. X0 0 0 SetCFg
  188. X%I f *-courier-medium-r-*-80-*
  189. X/Courier 8 SetF
  190. X%I t
  191. X[ 0.959978 0 0 0.959978 915.761 544.023 ] concat
  192. X%I
  193. X[
  194. X(Command)
  195. X(\(s)
  196. X] Text
  197. XEnd
  198. X
  199. XBegin %I Text
  200. X%I cfg Black
  201. X0 0 0 SetCFg
  202. X%I f *-courier-medium-r-*-80-*
  203. X/Courier 8 SetF
  204. X%I t
  205. X[ 0.959978 0 0 0.959978 1012.72 542.103 ] concat
  206. X%I
  207. X[
  208. X(Command)
  209. X(\)s)
  210. X] Text
  211. XEnd
  212. X
  213. XBegin %I Text
  214. X%I cfg Black
  215. X0 0 0 SetCFg
  216. X%I f *-courier-medium-r-*-80-*
  217. X/Courier 8 SetF
  218. X%I t
  219. X[ 0.959978 0 0 0.959978 1135.6 112.033 ] concat
  220. X%I
  221. X[
  222. X(Command)
  223. X(&a)
  224. X] Text
  225. XEnd
  226. X
  227. XBegin %I Text
  228. X%I cfg Black
  229. X0 0 0 SetCFg
  230. X%I f *-courier-medium-r-*-80-*
  231. X/Courier 8 SetF
  232. X%I t
  233. X[ 0.959978 0 0 0.959978 1076.08 112.033 ] concat
  234. X%I
  235. X[
  236. X(Command)
  237. X(&d)
  238. X] Text
  239. XEnd
  240. X
  241. XBegin %I Text
  242. X%I cfg Black
  243. X0 0 0 SetCFg
  244. X%I f *-courier-medium-r-*-80-*
  245. X/Courier 8 SetF
  246. X%I t
  247. X[ 0.959978 0 0 0.959978 1020.4 111.073 ] concat
  248. X%I
  249. X[
  250. X(Command)
  251. X(&f)
  252. X] Text
  253. XEnd
  254. X
  255. XBegin %I Text
  256. X%I cfg Black
  257. X0 0 0 SetCFg
  258. X%I f *-courier-medium-r-*-80-*
  259. X/Courier 8 SetF
  260. X%I t
  261. X[ 0.959978 0 0 0.959978 1186.47 294.429 ] concat
  262. X%I
  263. X[
  264. X()
  265. X] Text
  266. XEnd
  267. X
  268. XBegin %I Text
  269. X%I cfg Black
  270. X0 0 0 SetCFg
  271. X%I f *-courier-medium-r-*-80-*
  272. X/Courier 8 SetF
  273. X%I t
  274. X[ 0.959978 0 0 0.959978 964.72 112.033 ] concat
  275. X%I
  276. X[
  277. X(Command)
  278. X(&k)
  279. X] Text
  280. XEnd
  281. X
  282. XBegin %I Text
  283. X%I cfg Black
  284. X0 0 0 SetCFg
  285. X%I f *-courier-medium-r-*-80-*
  286. X/Courier 8 SetF
  287. X%I t
  288. X[ 0.959978 0 0 0.959978 853.362 112.033 ] concat
  289. X%I
  290. X[
  291. X(Command)
  292. X(&p)
  293. X] Text
  294. XEnd
  295. X
  296. XBegin %I Text
  297. X%I cfg Black
  298. X0 0 0 SetCFg
  299. X%I f *-courier-medium-r-*-80-*
  300. X/Courier 8 SetF
  301. X%I t
  302. X[ 0.959978 0 0 0.959978 795.764 112.033 ] concat
  303. X%I
  304. X[
  305. X(Command)
  306. X(&s)
  307. X] Text
  308. XEnd
  309. X
  310. XBegin %I Text
  311. X%I cfg Black
  312. X0 0 0 SetCFg
  313. X%I f *-courier-medium-r-*-80-*
  314. X/Courier 8 SetF
  315. X%I t
  316. X[ 0.959978 0 0 0.959978 907.121 112.993 ] concat
  317. X%I
  318. X[
  319. X(Command)
  320. X(&l)
  321. X] Text
  322. XEnd
  323. X
  324. XBegin %I Text
  325. X%I cfg Black
  326. X0 0 0 SetCFg
  327. X%I f *-courier-medium-r-*-80-*
  328. X/Courier 8 SetF
  329. X%I t
  330. X[ 0.959978 0 0 0.959978 1181.67 482.584 ] concat
  331. X%I
  332. X[
  333. X(Command)
  334. X(=)
  335. X] Text
  336. XEnd
  337. X
  338. XBegin %I Text
  339. X%I cfg Black
  340. X0 0 0 SetCFg
  341. X%I f *-courier-medium-r-*-80-*
  342. X/Courier 8 SetF
  343. X%I t
  344. X[ 0.959978 0 0 0.959978 1182.63 416.346 ] concat
  345. X%I
  346. X[
  347. X(Command)
  348. X(9)
  349. X] Text
  350. XEnd
  351. X
  352. XBegin %I Text
  353. X%I cfg Black
  354. X0 0 0 SetCFg
  355. X%I f *-courier-medium-r-*-80-*
  356. X/Courier 8 SetF
  357. X%I t
  358. X[ 0.959978 0 0 0.959978 1184.55 358.747 ] concat
  359. X%I
  360. X[
  361. X(Command)
  362. X(Z)
  363. X] Text
  364. XEnd
  365. X
  366. XBegin %I Text
  367. X%I cfg Black
  368. X0 0 0 SetCFg
  369. X%I f *-courier-medium-r-*-80-*
  370. X/Courier 8 SetF
  371. X%I t
  372. X[ 0.959978 0 0 0.959978 1186.47 299.229 ] concat
  373. X%I
  374. X[
  375. X(Command)
  376. X(Y)
  377. X] Text
  378. XEnd
  379. X
  380. XBegin %I Text
  381. X%I cfg Black
  382. X0 0 0 SetCFg
  383. X%I f *-courier-medium-r-*-80-*
  384. X/Courier 8 SetF
  385. X%I t
  386. X[ 0.959978 0 0 0.959978 1186.47 238.75 ] concat
  387. X%I
  388. X[
  389. X(Command)
  390. X(E)
  391. X] Text
  392. XEnd
  393. X
  394. XBegin %I Text
  395. X%I cfg Black
  396. X0 0 0 SetCFg
  397. X%I f *-courier-medium-r-*-80-*
  398. X/Courier 8 SetF
  399. X%I t
  400. X[ 0.959978 0 0 0.959978 665.207 196.511 ] concat
  401. X%I
  402. X[
  403. X(Command)
  404. X(*t)
  405. X] Text
  406. XEnd
  407. X
  408. XBegin %I Text
  409. X%I cfg Black
  410. X0 0 0 SetCFg
  411. X%I f *-courier-medium-r-*-80-*
  412. X/Courier 8 SetF
  413. X%I t
  414. X[ 0.959978 0 0 0.959978 667.127 249.31 ] concat
  415. X%I
  416. X[
  417. X(Command)
  418. X(*r)
  419. X] Text
  420. XEnd
  421. X
  422. XBegin %I Text
  423. X%I cfg Black
  424. X0 0 0 SetCFg
  425. X%I f *-courier-medium-r-*-80-*
  426. X/Courier 8 SetF
  427. X%I t
  428. X[ 0.959978 0 0 0.959978 667.127 299.229 ] concat
  429. X%I
  430. X[
  431. X(Command)
  432. X(*p)
  433. X] Text
  434. XEnd
  435. X
  436. XBegin %I Text
  437. X%I cfg Black
  438. X0 0 0 SetCFg
  439. X%I f *-courier-medium-r-*-80-*
  440. X/Courier 8 SetF
  441. X%I t
  442. X[ 0.959978 0 0 0.959978 669.047 352.987 ] concat
  443. X%I
  444. X[
  445. X(Command)
  446. X(*c)
  447. X] Text
  448. XEnd
  449. X
  450. XBegin %I Text
  451. X%I cfg Black
  452. X0 0 0 SetCFg
  453. X%I f *-courier-medium-r-*-80-*
  454. X/Courier 8 SetF
  455. X%I t
  456. X[ 0.959978 0 0 0.959978 668.087 402.906 ] concat
  457. X%I
  458. X[
  459. X(Command)
  460. X(*b)
  461. X] Text
  462. XEnd
  463. X
  464. XBegin %I Text
  465. X%I cfg Black
  466. X0 0 0 SetCFg
  467. X%I f *-courier-medium-r-*-80-*
  468. X/Courier 8 SetF
  469. X%I t
  470. X[ 0.959978 0 0 0.959978 724.725 525.783 ] concat
  471. X%I
  472. X[
  473. X(STT)
  474. X] Text
  475. XEnd
  476. X
  477. XBegin %I Text
  478. X%I cfg Black
  479. X0 0 0 SetCFg
  480. X%I f *-courier-medium-r-*-80-*
  481. X/Courier 8 SetF
  482. X%I t
  483. X[ 0.959978 0 0 0.959978 1181.67 454.745 ] concat
  484. X%I
  485. X[
  486. X(CEQ)
  487. X] Text
  488. XEnd
  489. X
  490. XBegin %I Text
  491. X%I cfg Black
  492. X0 0 0 SetCFg
  493. X%I f *-courier-medium-r-*-80-*
  494. X/Courier 8 SetF
  495. X%I t
  496. X[ 0.959978 0 0 0.959978 1182.63 391.386 ] concat
  497. X%I
  498. X[
  499. X(C9)
  500. X] Text
  501. XEnd
  502. X
  503. XBegin %I Text
  504. X%I cfg Black
  505. X0 0 0 SetCFg
  506. X%I f *-courier-medium-r-*-80-*
  507. X/Courier 8 SetF
  508. X%I t
  509. X[ 0.959978 0 0 0.959978 1185.51 332.828 ] concat
  510. X%I
  511. X[
  512. X(CZ)
  513. X] Text
  514. XEnd
  515. X
  516. XBegin %I Text
  517. X%I cfg Black
  518. X0 0 0 SetCFg
  519. X%I f *-courier-medium-r-*-80-*
  520. X/Courier 8 SetF
  521. X%I t
  522. X[ 0.959978 0 0 0.959978 1186.47 276.189 ] concat
  523. X%I
  524. X[
  525. X(CY)
  526. X] Text
  527. XEnd
  528. X
  529. XBegin %I Text
  530. X%I cfg Black
  531. X0 0 0 SetCFg
  532. X%I f *-courier-medium-r-*-80-*
  533. X/Courier 8 SetF
  534. X%I t
  535. X[ 0.959978 0 0 0.959978 1186.47 217.63 ] concat
  536. X%I
  537. X[
  538. X(CE)
  539. X] Text
  540. XEnd
  541. X
  542. XBegin %I Text
  543. X%I cfg Black
  544. X0 0 0 SetCFg
  545. X%I f *-courier-medium-r-*-80-*
  546. X/Courier 8 SetF
  547. X%I t
  548. X[ 0.959978 0 0 0.959978 1147.12 93.7933 ] concat
  549. X%I
  550. X[
  551. X(CAa)
  552. X] Text
  553. XEnd
  554. X
  555. XBegin %I Text
  556. X%I cfg Black
  557. X0 0 0 SetCFg
  558. X%I f *-courier-medium-r-*-80-*
  559. X/Courier 8 SetF
  560. X%I t
  561. X[ 0.959978 0 0 0.959978 1085.68 93.7933 ] concat
  562. X%I
  563. X[
  564. X(CAd)
  565. X] Text
  566. XEnd
  567. X
  568. XBegin %I Text
  569. X%I cfg Black
  570. X0 0 0 SetCFg
  571. X%I f *-courier-medium-r-*-80-*
  572. X/Courier 8 SetF
  573. X%I t
  574. X[ 0.959978 0 0 0.959978 1030.96 93.7933 ] concat
  575. X%I
  576. X[
  577. X(CAf)
  578. X] Text
  579. XEnd
  580. X
  581. XBegin %I Text
  582. X%I cfg Black
  583. X0 0 0 SetCFg
  584. X%I f *-courier-medium-r-*-80-*
  585. X/Courier 8 SetF
  586. X%I t
  587. X[ 0.959978 0 0 0.959978 974.32 95.7133 ] concat
  588. X%I
  589. X[
  590. X(CAk)
  591. X] Text
  592. XEnd
  593. X
  594. XBegin %I Text
  595. X%I cfg Black
  596. X0 0 0 SetCFg
  597. X%I f *-courier-medium-r-*-80-*
  598. X/Courier 8 SetF
  599. X%I t
  600. X[ 0.959978 0 0 0.959978 916.721 96.6733 ] concat
  601. X%I
  602. X[
  603. X(CAl)
  604. X] Text
  605. XEnd
  606. X
  607. XBegin %I Text
  608. X%I cfg Black
  609. X0 0 0 SetCFg
  610. X%I f *-courier-medium-r-*-80-*
  611. X/Courier 8 SetF
  612. X%I t
  613. X[ 0.959978 0 0 0.959978 862.002 94.7533 ] concat
  614. X%I
  615. X[
  616. X(CAp)
  617. X] Text
  618. XEnd
  619. X
  620. XBegin %I Text
  621. X%I cfg Black
  622. X0 0 0 SetCFg
  623. X%I f *-courier-medium-r-*-80-*
  624. X/Courier 8 SetF
  625. X%I t
  626. X[ 0.959978 0 0 0.959978 804.404 94.7533 ] concat
  627. X%I
  628. X[
  629. X(CAs)
  630. X] Text
  631. XEnd
  632. X
  633. XBegin %I Text
  634. X%I cfg Black
  635. X0 0 0 SetCFg
  636. X%I f *-courier-medium-r-*-80-*
  637. X/Courier 8 SetF
  638. X%I t
  639. X[ 0.959978 0 0 0.959978 682.486 171.552 ] concat
  640. X%I
  641. X[
  642. X(CSt)
  643. X] Text
  644. XEnd
  645. X
  646. XBegin %I Text
  647. X%I cfg Black
  648. X0 0 0 SetCFg
  649. X%I f *-courier-medium-r-*-80-*
  650. X/Courier 8 SetF
  651. X%I t
  652. X[ 0.959978 0 0 0.959978 681.526 225.31 ] concat
  653. X%I
  654. X[
  655. X(CSr)
  656. X] Text
  657. XEnd
  658. X
  659. XBegin %I Text
  660. X%I cfg Black
  661. X0 0 0 SetCFg
  662. X%I f *-courier-medium-r-*-80-*
  663. X/Courier 8 SetF
  664. X%I t
  665. X[ 0.959978 0 0 0.959978 683.446 276.189 ] concat
  666. X%I
  667. X[
  668. X(CSp)
  669. X] Text
  670. XEnd
  671. X
  672. XBegin %I Text
  673. X%I cfg Black
  674. X0 0 0 SetCFg
  675. X%I f *-courier-medium-r-*-80-*
  676. X/Courier 8 SetF
  677. X%I t
  678. X[ 0.959978 0 0 0.959978 683.446 327.068 ] concat
  679. X%I
  680. X[
  681. X(CSc)
  682. X] Text
  683. XEnd
  684. X
  685. XBegin %I Text
  686. X%I cfg Black
  687. X0 0 0 SetCFg
  688. X%I f *-courier-medium-r-*-80-*
  689. X/Courier 8 SetF
  690. X%I t
  691. X[ 0.959978 0 0 0.959978 683.446 379.867 ] concat
  692. X%I
  693. X[
  694. X(CSb)
  695. X] Text
  696. XEnd
  697. X
  698. XBegin %I Text
  699. X%I cfg Black
  700. X0 0 0 SetCFg
  701. X%I f *-courier-medium-r-*-80-*
  702. X/Courier 8 SetF
  703. X%I t
  704. X[ 0.959978 0 0 0.959978 685.366 451.865 ] concat
  705. X%I
  706. X[
  707. X(UNK)
  708. X] Text
  709. XEnd
  710. X
  711. XBegin %I Text
  712. X%I cfg Black
  713. X0 0 0 SetCFg
  714. X%I f *-courier-medium-r-*-80-*
  715. X/Courier 8 SetF
  716. X%I t
  717. X[ 0.959978 0 0 0.959978 918.641 509.464 ] concat
  718. X%I
  719. X[
  720. X(CLs)
  721. X] Text
  722. XEnd
  723. X
  724. XBegin %I Text
  725. X%I cfg Black
  726. X0 0 0 SetCFg
  727. X%I f *-courier-medium-r-*-80-*
  728. X/Courier 8 SetF
  729. X%I t
  730. X[ 0.959978 0 0 0.959978 921.521 439.385 ] concat
  731. X%I
  732. X[
  733. X(CLP)
  734. X] Text
  735. XEnd
  736. X
  737. XBegin %I Text
  738. X%I cfg Black
  739. X0 0 0 SetCFg
  740. X%I f *-courier-medium-r-*-80-*
  741. X/Courier 8 SetF
  742. X%I t
  743. X[ 0.959978 0 0 0.959978 1012.72 440.345 ] concat
  744. X%I
  745. X[
  746. X(CRP)
  747. X] Text
  748. XEnd
  749. X
  750. XBegin %I Text
  751. X%I cfg Black
  752. X0 0 0 SetCFg
  753. X%I f *-courier-medium-r-*-80-*
  754. X/Courier 8 SetF
  755. X%I t
  756. X[ 0.959978 0 0 0.959978 1016.56 504.664 ] concat
  757. X%I
  758. X[
  759. X(CRs)
  760. X] Text
  761. XEnd
  762. X
  763. XBegin %I Text
  764. X%I cfg Black
  765. X0 0 0 SetCFg
  766. X%I f *-courier-medium-r-*-80-*
  767. X/Courier 8 SetF
  768. X%I t
  769. X[ 0.959978 0 0 0.959978 906.161 405.786 ] concat
  770. X%I
  771. X[
  772. X(CMD)
  773. X] Text
  774. XEnd
  775. X
  776. XBegin %I Text
  777. X%I cfg Black
  778. X0 0 0 SetCFg
  779. X%I f *-courier-medium-r-*-80-*
  780. X/Courier 8 SetF
  781. X%I t
  782. X[ 0.959978 0 0 0.959978 828.403 312.668 ] concat
  783. X%I
  784. X[
  785. X(CMS)
  786. X] Text
  787. XEnd
  788. X
  789. XBegin %I Text
  790. X%I cfg Black
  791. X0 0 0 SetCFg
  792. X%I f *-courier-medium-r-*-80-*
  793. X/Courier 8 SetF
  794. X%I t
  795. X[ 0.959978 0 0 0.959978 978.16 265.629 ] concat
  796. X%I
  797. X[
  798. X(CMA)
  799. X] Text
  800. XEnd
  801. X
  802. XBegin %I Elli
  803. X%I b 65535
  804. X1 0 0 [] 0 SetB
  805. X%I cfg Gray80
  806. X0.2 0.2 0.2 SetCFg
  807. X%I cbg White
  808. X1 1 1 SetCBg
  809. X%I p
  810. X0 SetP
  811. X%I t
  812. X[ 0.738444 0 0 0.738444 734.4 -76.8349 ] concat
  813. X%I
  814. X72 188 24 24 Elli
  815. XEnd
  816. X
  817. XBegin %I Elli
  818. X%I b 65535
  819. X1 0 0 [] 0 SetB
  820. X%I cfg Black
  821. X0 0 0 SetCFg
  822. X%I cbg White
  823. X1 1 1 SetCBg
  824. X%I p
  825. X0 SetP
  826. X%I t
  827. X[ 0.718325 0 0 0.718325 977.991 -77.2643 ] concat
  828. X%I
  829. X72 188 24 24 Elli
  830. XEnd
  831. X
  832. XBegin %I Text
  833. X%I cfg Black
  834. X0 0 0 SetCFg
  835. X%I f *-courier-medium-r-*-80-*
  836. X/Courier 8 SetF
  837. X%I t
  838. X[ 1.16487 0 0 1.16487 811.226 65.806 ] concat
  839. X%I
  840. X[
  841. X(= Intermediate State)
  842. X] Text
  843. XEnd
  844. X
  845. XBegin %I Text
  846. X%I cfg Black
  847. X0 0 0 SetCFg
  848. X%I f *-courier-medium-r-*-80-*
  849. X/Courier 8 SetF
  850. X%I t
  851. X[ 1.16487 0 0 1.16487 1053.52 61.1465 ] concat
  852. X%I
  853. X[
  854. X(= End State)
  855. X] Text
  856. XEnd
  857. X
  858. XBegin %I Text
  859. X%I cfg Black
  860. X0 0 0 SetCFg
  861. X%I f *-courier-medium-r-*-80-*
  862. X/Courier 8 SetF
  863. X%I t
  864. X[ 1 0 0 1 820 470 ] concat
  865. X%I
  866. X[
  867. X(^[)
  868. X] Text
  869. XEnd
  870. X
  871. XBegin %I Text
  872. X%I cfg Black
  873. X0 0 0 SetCFg
  874. X%I f *-courier-medium-r-*-80-*
  875. X/Courier 8 SetF
  876. X%I t
  877. X[ 1 0 0 1 967 478 ] concat
  878. X%I
  879. X[
  880. X(s)
  881. X] Text
  882. XEnd
  883. X
  884. XBegin %I Text
  885. X%I cfg Black
  886. X0 0 0 SetCFg
  887. X%I f *-courier-medium-r-*-80-*
  888. X/Courier 8 SetF
  889. X%I t
  890. X[ 1 0 0 1 1060 479 ] concat
  891. X%I
  892. X[
  893. X(s)
  894. X] Text
  895. XEnd
  896. X
  897. XBegin %I Text
  898. X%I cfg Black
  899. X0 0 0 SetCFg
  900. X%I f *-courier-medium-r-*-80-*
  901. X/Courier 8 SetF
  902. X%I t
  903. X[ 1 0 0 1 934 409 ] concat
  904. X%I
  905. X[
  906. X(\()
  907. X] Text
  908. XEnd
  909. X
  910. XBegin %I Text
  911. X%I cfg Black
  912. X0 0 0 SetCFg
  913. X%I f *-courier-medium-r-*-80-*
  914. X/Courier 8 SetF
  915. X%I t
  916. X[ 1 0 0 1 990 420 ] concat
  917. X%I
  918. X[
  919. X(\))
  920. X] Text
  921. XEnd
  922. X
  923. XBegin %I Text
  924. X%I cfg Black
  925. X0 0 0 SetCFg
  926. X%I f *-courier-medium-r-*-80-*
  927. X/Courier 8 SetF
  928. X%I t
  929. X[ 1 0 0 1 1028 407 ] concat
  930. X%I
  931. X[
  932. X(=)
  933. X] Text
  934. XEnd
  935. X
  936. XBegin %I Text
  937. X%I cfg Black
  938. X0 0 0 SetCFg
  939. X%I f *-courier-medium-r-*-80-*
  940. X/Courier 8 SetF
  941. X%I t
  942. X[ 1 0 0 1 1047 388 ] concat
  943. X%I
  944. X[
  945. X(9)
  946. X] Text
  947. XEnd
  948. X
  949. XBegin %I Text
  950. X%I cfg Black
  951. X0 0 0 SetCFg
  952. X%I f *-courier-medium-r-*-80-*
  953. X/Courier 8 SetF
  954. X%I t
  955. X[ 1 0 0 1 1049 353 ] concat
  956. X%I
  957. X[
  958. X(Z)
  959. X] Text
  960. XEnd
  961. X
  962. XBegin %I Text
  963. X%I cfg Black
  964. X0 0 0 SetCFg
  965. X%I f *-courier-medium-r-*-80-*
  966. X/Courier 8 SetF
  967. X%I t
  968. X[ 1 0 0 1 1046 320 ] concat
  969. X%I
  970. X[
  971. X(Y)
  972. X] Text
  973. XEnd
  974. X
  975. XBegin %I Text
  976. X%I cfg Black
  977. X0 0 0 SetCFg
  978. X%I f *-courier-medium-r-*-80-*
  979. X/Courier 8 SetF
  980. X%I t
  981. X[ 1 0 0 1 1047 285 ] concat
  982. X%I
  983. X[
  984. X(E)
  985. X] Text
  986. XEnd
  987. X
  988. XBegin %I Text
  989. X%I cfg Black
  990. X0 0 0 SetCFg
  991. X%I f *-courier-medium-r-*-80-*
  992. X/Courier 8 SetF
  993. X%I t
  994. X[ 1 0 0 1 950 310 ] concat
  995. X%I
  996. X[
  997. X(&)
  998. X] Text
  999. XEnd
  1000. X
  1001. XBegin %I Text
  1002. X%I cfg Black
  1003. X0 0 0 SetCFg
  1004. X%I f *-courier-medium-r-*-80-*
  1005. X/Courier 8 SetF
  1006. X%I t
  1007. X[ 1 0 0 1 1069 196 ] concat
  1008. X%I
  1009. X[
  1010. X(a)
  1011. X] Text
  1012. XEnd
  1013. X
  1014. XBegin %I Text
  1015. X%I cfg Black
  1016. X0 0 0 SetCFg
  1017. X%I f *-courier-medium-r-*-80-*
  1018. X/Courier 8 SetF
  1019. X%I t
  1020. X[ 1 0 0 1 1042 191 ] concat
  1021. X%I
  1022. X[
  1023. X(d)
  1024. X] Text
  1025. XEnd
  1026. X
  1027. XBegin %I Text
  1028. X%I cfg Black
  1029. X0 0 0 SetCFg
  1030. X%I f *-courier-medium-r-*-80-*
  1031. X/Courier 8 SetF
  1032. X%I t
  1033. X[ 1 0 0 1 1011 188 ] concat
  1034. X%I
  1035. X[
  1036. X(f)
  1037. X] Text
  1038. XEnd
  1039. X
  1040. XBegin %I Text
  1041. X%I cfg Black
  1042. X0 0 0 SetCFg
  1043. X%I f *-courier-medium-r-*-80-*
  1044. X/Courier 8 SetF
  1045. X%I t
  1046. X[ 1 0 0 1 982 188 ] concat
  1047. X%I
  1048. X[
  1049. X(k)
  1050. X] Text
  1051. XEnd
  1052. X
  1053. XBegin %I Text
  1054. X%I cfg Black
  1055. X0 0 0 SetCFg
  1056. X%I f *-courier-medium-r-*-80-*
  1057. X/Courier 8 SetF
  1058. X%I t
  1059. X[ 1 0 0 1 951 187 ] concat
  1060. X%I
  1061. X[
  1062. X(l)
  1063. X] Text
  1064. XEnd
  1065. X
  1066. XBegin %I Text
  1067. X%I cfg Black
  1068. X0 0 0 SetCFg
  1069. X%I f *-courier-medium-r-*-80-*
  1070. X/Courier 8 SetF
  1071. X%I t
  1072. X[ 1 0 0 1 924 188 ] concat
  1073. X%I
  1074. X[
  1075. X(p)
  1076. X] Text
  1077. XEnd
  1078. X
  1079. XBegin %I Text
  1080. X%I cfg Black
  1081. X0 0 0 SetCFg
  1082. X%I f *-courier-medium-r-*-80-*
  1083. X/Courier 8 SetF
  1084. X%I t
  1085. X[ 1 0 0 1 890 189 ] concat
  1086. X%I
  1087. X[
  1088. X(s)
  1089. X] Text
  1090. XEnd
  1091. X
  1092. XBegin %I Text
  1093. X%I cfg Black
  1094. X0 0 0 SetCFg
  1095. X%I f *-courier-medium-r-*-80-*
  1096. X/Courier 8 SetF
  1097. X%I t
  1098. X[ 1 0 0 1 787 226 ] concat
  1099. X%I
  1100. X[
  1101. X(t)
  1102. X] Text
  1103. XEnd
  1104. X
  1105. XBegin %I Text
  1106. X%I cfg Black
  1107. X0 0 0 SetCFg
  1108. X%I f *-courier-medium-r-*-80-*
  1109. X/Courier 8 SetF
  1110. X%I t
  1111. X[ 1 0 0 1 776 246 ] concat
  1112. X%I
  1113. X[
  1114. X(r)
  1115. X] Text
  1116. XEnd
  1117. X
  1118. XBegin %I Text
  1119. X%I cfg Black
  1120. X0 0 0 SetCFg
  1121. X%I f *-courier-medium-r-*-80-*
  1122. X/Courier 8 SetF
  1123. X%I t
  1124. X[ 1 0 0 1 775 278 ] concat
  1125. X%I
  1126. X[
  1127. X(p)
  1128. X] Text
  1129. XEnd
  1130. X
  1131. XBegin %I Text
  1132. X%I cfg Black
  1133. X0 0 0 SetCFg
  1134. X%I f *-courier-medium-r-*-80-*
  1135. X/Courier 8 SetF
  1136. X%I t
  1137. X[ 1 0 0 1 774 314 ] concat
  1138. X%I
  1139. X[
  1140. X(c)
  1141. X] Text
  1142. XEnd
  1143. X
  1144. XBegin %I Text
  1145. X%I cfg Black
  1146. X0 0 0 SetCFg
  1147. X%I f *-courier-medium-r-*-80-*
  1148. X/Courier 8 SetF
  1149. X%I t
  1150. X[ 1 0 0 1 781 343 ] concat
  1151. X%I
  1152. X[
  1153. X(b)
  1154. X] Text
  1155. XEnd
  1156. X
  1157. XBegin %I Text
  1158. X%I cfg Black
  1159. X0 0 0 SetCFg
  1160. X%I f *-courier-medium-r-*-80-*
  1161. X/Courier 8 SetF
  1162. X%I t
  1163. X[ 1 0 0 1 782 357 ] concat
  1164. X%I
  1165. X[
  1166. X({Other})
  1167. X] Text
  1168. XEnd
  1169. X
  1170. XBegin %I Text
  1171. X%I cfg Black
  1172. X0 0 0 SetCFg
  1173. X%I f *-courier-medium-r-*-80-*
  1174. X/Courier 8 SetF
  1175. X%I t
  1176. X[ 1 0 0 1 826 409 ] concat
  1177. X%I
  1178. X[
  1179. X({Other})
  1180. X] Text
  1181. XEnd
  1182. X
  1183. XBegin %I Text
  1184. X%I cfg Black
  1185. X0 0 0 SetCFg
  1186. X%I f *-courier-medium-r-*-80-*
  1187. X/Courier 8 SetF
  1188. X%I t
  1189. X[ 1 0 0 1 890 297 ] concat
  1190. X%I
  1191. X[
  1192. X({Other})
  1193. X] Text
  1194. XEnd
  1195. X
  1196. XEnd %I eop
  1197. X
  1198. XBegin %I Text
  1199. X%I cfg Black
  1200. X0 0 0 SetCFg
  1201. X%I f *-courier-medium-r-*-80-*
  1202. X/Courier 8 SetF
  1203. X%I t
  1204. X[ 1 0 0 1 236 761 ] concat
  1205. X%I
  1206. X[
  1207. X(lj2ps, version 1.1 \(release\))
  1208. X] Text
  1209. XEnd
  1210. X
  1211. XEnd %I eop
  1212. X
  1213. Xshowpage
  1214. X
  1215. X%%Trailer
  1216. X
  1217. Xend
  1218. SHAR_EOF
  1219. echo "File doc/tscan.idr is complete" &&
  1220. $TOUCH -am 0707112690 doc/tscan.idr &&
  1221. chmod 0644 doc/tscan.idr ||
  1222. echo "restore of doc/tscan.idr failed"
  1223. set `wc -c doc/tscan.idr`;Wc_c=$1
  1224. if test "$Wc_c" != "40749"; then
  1225.     echo original size 40749, current size $Wc_c
  1226. fi
  1227. # ============= errors.c ==============
  1228. echo "x - extracting errors.c (Text)"
  1229. sed 's/^X//' << 'SHAR_EOF' > errors.c &&
  1230. X/* Project:        lj2ps, LaserJet PCL to PostScript translator
  1231. X** File:       errors.c
  1232. X**
  1233. X** Author:       Christopher Lishka
  1234. X** Organization:   Wisconsin State Laboratory of Hygiene
  1235. X**           Data Processing Dept.
  1236. X**
  1237. X** Copyright (C) 1990 by Christopher Lishka.
  1238. X**
  1239. X** This program is free software; you can redistribute it and/or modify
  1240. X** it under the terms of the GNU General Public License as published by
  1241. X** the Free Software Foundation; either version 1, or (at your option)
  1242. X** any later version.
  1243. X**
  1244. X** This program is distributed in the hope that it will be useful,
  1245. X** but WITHOUT ANY WARRANTY; without even the implied warranty of
  1246. X** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1247. X** GNU General Public License for more details.
  1248. X**
  1249. X** You should have received a copy of the GNU General Public License
  1250. X** along with this program; if not, write to the Free Software
  1251. X** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1252. X*/
  1253. X
  1254. Xstatic char * ModuleID = "Module errors: v1.0, production";
  1255. X
  1256. X#include <stdio.h>
  1257. X#include "errors.h"
  1258. X#include "lj2ps.h"
  1259. X
  1260. X
  1261. X  /* Functions */
  1262. Xextern void  warning();
  1263. Xextern void  error();
  1264. Xextern void  fatal_error();
  1265. Xextern void  internal_error();
  1266. X
  1267. X
  1268. X
  1269. X  /* warning() prints a message to stderr about a minor problem.
  1270. X  */
  1271. Xvoid
  1272. Xwarning(message, argument)
  1273. X    char *message, *argument;
  1274. X{
  1275. X
  1276. X  if( warnings ){
  1277. X    fprintf(stderr, "%s %s (%s): WARNING\n", PROGRAM, VERSION, STATUS);
  1278. X    fprintf(stderr, "%s", message);
  1279. X    if( argument[0] != '\0' ) fprintf(stderr, " (%s)\n\n", argument);
  1280. X    else                      fprintf(stderr, "\n\n");
  1281. X  }
  1282. X
  1283. X} /* warning() */
  1284. X
  1285. X
  1286. X
  1287. X  /* error() prints a message to stderr about a major but recoverable problem.
  1288. X  */
  1289. Xvoid
  1290. Xerror(message, argument)
  1291. X    char *message, *argument;
  1292. X{
  1293. X
  1294. X  fprintf(stderr, "%s %s (%s): ERROR\n", PROGRAM, VERSION, STATUS);
  1295. X  fprintf(stderr, "%s", message);
  1296. X  if( argument[0] != '\0' ) fprintf(stderr, " (%s)\n\n", argument);
  1297. X  else                      fprintf(stderr, "\n\n");
  1298. X
  1299. X} /* error() */
  1300. X
  1301. X
  1302. X
  1303. X  /* fatal_error() prints a message to stderr about a major and
  1304. X  ** unrecoverable problem, then exits gracelessly.
  1305. X  */
  1306. Xvoid
  1307. Xfatal_error(message, argument)
  1308. X    char *message, *argument;
  1309. X{
  1310. X
  1311. X  fprintf(stderr, "%s %s (%s): FATAL ERROR\n", PROGRAM, VERSION, STATUS);
  1312. X  fprintf(stderr, "%s", message);
  1313. X  if( argument[0] != '\0' ) fprintf(stderr, " (%s)\n\n", argument);
  1314. X  else                      fprintf(stderr, "\n\n");
  1315. X
  1316. X  exit(1);
  1317. X
  1318. X} /* fatal_error() */
  1319. X
  1320. X
  1321. X
  1322. X  /* internal_error() reports an inconsistency in the program itself.
  1323. X  ** After the error message is reported, the program is killed
  1324. X  ** gracelessly.
  1325. X  */
  1326. Xvoid
  1327. Xinternal_error(message, argument)
  1328. X    char *message, *argument;
  1329. X{
  1330. X
  1331. X  fprintf(stderr, "%s %s (%s): INTERNAL ERROR\n", PROGRAM, VERSION, STATUS);
  1332. X  fprintf(stderr, "%s", message);
  1333. X  if( argument[0] != '\0' ) fprintf(stderr, " (%s)\n\n", argument);
  1334. X  else                      fprintf(stderr, "\n\n");
  1335. X
  1336. X  exit(2);
  1337. X
  1338. X} /* internal_error() */
  1339. X
  1340. SHAR_EOF
  1341. $TOUCH -am 0707112690 errors.c &&
  1342. chmod 0644 errors.c ||
  1343. echo "restore of errors.c failed"
  1344. set `wc -c errors.c`;Wc_c=$1
  1345. if test "$Wc_c" != "2950"; then
  1346.     echo original size 2950, current size $Wc_c
  1347. fi
  1348. # ============= errors.h ==============
  1349. echo "x - extracting errors.h (Text)"
  1350. sed 's/^X//' << 'SHAR_EOF' > errors.h &&
  1351. X/*
  1352. X** Project:        lj2ps
  1353. X** File:       errors.h
  1354. X**
  1355. X** Author:       Christopher Lishka
  1356. X** Organization:   Wisconsin State Laboratory of Hygiene
  1357. X**           Data Processing Dept.
  1358. X**
  1359. X** Copyright (C) 1990 by Christopher Lishka.
  1360. X**
  1361. X** This program is free software; you can redistribute it and/or modify
  1362. X** it under the terms of the GNU General Public License as published by
  1363. X** the Free Software Foundation; either version 1, or (at your option)
  1364. X** any later version.
  1365. X**
  1366. X** This program is distributed in the hope that it will be useful,
  1367. X** but WITHOUT ANY WARRANTY; without even the implied warranty of
  1368. X** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1369. X** GNU General Public License for more details.
  1370. X**
  1371. X** You should have received a copy of the GNU General Public License
  1372. X** along with this program; if not, write to the Free Software
  1373. X** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1374. X*/
  1375. X
  1376. X  /* Global functions */
  1377. Xextern void  warning();        /* Minor problem */
  1378. Xextern void  error();        /* Major but recoverable problem */
  1379. Xextern void  fatal_error();    /* Major unrecoverable problem */
  1380. Xextern void  internal_error();    /* Problem with the programs innards */
  1381. SHAR_EOF
  1382. $TOUCH -am 0707112690 errors.h &&
  1383. chmod 0644 errors.h ||
  1384. echo "restore of errors.h failed"
  1385. set `wc -c errors.h`;Wc_c=$1
  1386. if test "$Wc_c" != "1170"; then
  1387.     echo original size 1170, current size $Wc_c
  1388. fi
  1389. # ============= lj.c ==============
  1390. echo "x - extracting lj.c (Text)"
  1391. sed 's/^X//' << 'SHAR_EOF' > lj.c &&
  1392. X/* Project:        lj2ps
  1393. X** File:       lj.c
  1394. X**
  1395. X** Author:       Christopher Lishka
  1396. X** Organization:   Wisconsin State Laboratory of Hygiene
  1397. X**           Data Processing Dept.
  1398. X**
  1399. X** Copyright (C) 1990 by Christopher Lishka.
  1400. X**
  1401. X** This program is free software; you can redistribute it and/or modify
  1402. X** it under the terms of the GNU General Public License as published by
  1403. X** the Free Software Foundation; either version 1, or (at your option)
  1404. X** any later version.
  1405. X**
  1406. X** This program is distributed in the hope that it will be useful,
  1407. X** but WITHOUT ANY WARRANTY; without even the implied warranty of
  1408. X** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1409. X** GNU General Public License for more details.
  1410. X**
  1411. X** You should have received a copy of the GNU General Public License
  1412. X** along with this program; if not, write to the Free Software
  1413. X** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1414. X*/
  1415. X
  1416. Xstatic char * ModuleID = "Module lj: v1.0, production";
  1417. X
  1418. X  /* Include files
  1419. X  */
  1420. X#include <stdio.h>
  1421. X#include "lj.h"
  1422. X#include "ljcmds.h"
  1423. X#include "ljfonts.h"
  1424. X#include "scan.h"
  1425. X#include "lj2ps.h"
  1426. X
  1427. X  /* External definitions
  1428. X  */
  1429. X
  1430. X  /* Global variables
  1431. X  */
  1432. X  /* Front panel variables */
  1433. Xint    panel_copies;        /* Front panel: Copies */
  1434. Xint    panel_manual_feed;    /* Front panel: Manual Feed */
  1435. Xint    panel_font_source;    /* Front panel: Font Source */
  1436. Xint    panel_font_number;    /* Front panel: Font Number */
  1437. Xint    panel_orientation;    /* Front panel: Font Source, Font Number */
  1438. Xint    panel_form;        /* Front panel: Form (i.e. lines/page) */
  1439. X  /* Postscript specific variables */
  1440. Xdouble ps_scale_x;        /* PS: scale in x direction */
  1441. Xdouble ps_scale_y;        /* PS: scale in y direction */
  1442. Xdouble ps_offset_x;        /* PS: offset in x direction */
  1443. Xdouble ps_offset_y;        /* PS: offset in y direction */
  1444. X  /* Job control */
  1445. Xint     copies;            /* Number of copies */
  1446. X  /* Page control */
  1447. Xint     paper_source;        /* Where the paper is coming from */
  1448. Xint     orientation;        /* Portrait/landscape          (code)      */
  1449. Xpsize   page_size;        /* Type of paper being used   (structure) */
  1450. Xdouble  page_height;        /* Height of physical page    (inches)      */
  1451. Xdouble  page_width;        /* Width of physical page     (inches)      */
  1452. Xdouble  char_height;        /* Char height (~= VMI)          (inches)      */
  1453. Xdouble  char_width;        /* Char width  (~= HMI)          (inches)      */
  1454. Xdouble  margin_top;        /* Top margin                 (inches)      */
  1455. Xint     text_length;        /* Text length              (lines)      */
  1456. Xdouble  text_height;        /* Text height                (inches)      */
  1457. Xdouble  margin_left;        /* Left margin                (inches)    */
  1458. Xdouble  text_width;        /* Text width                 (inches)      */
  1459. Xint     perf_skip;        /* 1 if perforation skip is on */
  1460. Xint     line_term;        /* Current line termination mode */
  1461. X  /* Fonts */
  1462. Xljfont  font_p;            /* Primary font */
  1463. Xljfont  font_s;            /* Secondary font */
  1464. Xint     underline;        /* Underline mode */
  1465. X  /* Font management */
  1466. Xint     font_ID;        /* Current font ID */
  1467. Xint     char_code;        /* Current character code */
  1468. X  /* Raster graphics */
  1469. Xint     resolution;        /* Current graphics resolution */
  1470. Xint     margin_graphics;    /* Graphics left margin, in dots? */
  1471. X  /* Rectangular area fill */
  1472. Xint     rect_size_h;        /* Horizontal rectangle size */
  1473. Xint     rect_size_v;        /* Vertical rectangle size */
  1474. Xint     fill_ID;        /* Current area fill ID */
  1475. X  /* Macro */
  1476. Xint     macro_ID;        /* Current macro ID */
  1477. X  /* Troubleshooting commands */
  1478. Xint     eol_wrap;        /* End-of-line wrap on/off */
  1479. Xint     display_funcs;        /* Display functions on/off */
  1480. X  /* Implementation variables */
  1481. Xdouble  current_x;        /* Current X position         (inches)      */
  1482. Xdouble  current_y;        /* Current Y position         (inches)      */
  1483. Xint     current_line;        /* Current line being printed (lines)     */
  1484. Xint     current_font;        /* Primary or secondary          (code)      */
  1485. Xint     empty_line;        /* Ture if line is empty      (boolean)   */
  1486. Xint     empty_text;        /* True if text is empty      (boolean)   */
  1487. Xint     empty_page;        /* True if page is empty      (boolean)      */
  1488. Xdouble  compress_width;        /* Compression in x axis      (%)         */
  1489. Xdouble  compress_height;    /* Compression in y axis      (%)         */
  1490. Xdouble  offset_width;        /* Offset of x axis           (inches)    */
  1491. Xdouble  offset_height;        /* Offset of y axis           (inches)    */
  1492. X
  1493. X  /* Global function list
  1494. X  */
  1495. Xextern void  lj_factory_setup(); /* Reset to factory defaults */
  1496. Xextern void  lj_startup();    /* Do before the virtual LJ is ready... */
  1497. Xextern void  lj_shutdown();    /* Do after the virtual LJ is shutdown... */
  1498. Xextern void  lj_page_begin();    /* Start a new page */
  1499. Xextern void  lj_page_end();    /* End the current page */
  1500. X/*     macro lj_text_begin();*/ /* Start text */
  1501. X/*     macro lj_text_add(); */  /* Add text to buffer */
  1502. X/*     macro lj_text_end(); */  /* End text (i.e. flush the buffer) */
  1503. X/*     macro lj_cursor_move();*//* Move cursor to a new location */
  1504. X/*     macro lj_set_font(); */  /* Use a new font to print the text */
  1505. X/*     macro lj_undl_begin();*/    /* Start underlining */
  1506. X/*     macro lj_undl_flush();*/    /* Flush the current underline request */
  1507. X/*     macro lj_undl_end(); */    /* End underlining */
  1508. Xextern void  lj_nl();        /* Print a newline */
  1509. Xextern void  lj_reset();    /* Reset the printer to default state */
  1510. Xextern int   lj_paper_size();    /* Get the dimensions of paper and envelopes */
  1511. X
  1512. X  /* Local constants
  1513. X  */
  1514. X
  1515. X  /* Local structures and types
  1516. X  */
  1517. X
  1518. X  /* Local variables
  1519. X  */
  1520. X  /* Implementation variables */
  1521. Xstatic int     new_page;    /* Is the next page a new one? */
  1522. Xstatic int     page_number;    /* Which page we are currently printing */
  1523. X  /* Tables */
  1524. Xpsize   paper_size[] = {    /* Sizes (in inches) for paper and envelopes */
  1525. X  { LJ_PS_EXECUTIVE,         7.2500,  10.5000, 57,            /* Paper sizes */
  1526. X                             0.2000,   0.2000,  0.1667,  0.3333 }, 
  1527. X
  1528. X  { LJ_PS_LETTER,            8.5000,  11.0000, 60,
  1529. X                             0.2000,   0.2000,  0.1667,  0.3333 },
  1530. X
  1531. X  { LJ_PS_LEGAL,             8.5000,  14.0000, 78,
  1532. X                             0.2000,   0.2000,  0.1667,  0.3333 },
  1533. X
  1534. X  { LJ_PS_A4,                8.2677,  11.6929, 64,
  1535. X                             0.2000,   0.1933,  0.1667,  0.3067 },
  1536. X
  1537. X  { LJ_PS_MONARCH,           3.8750,   7.5000, 39,         /* Envelope sizes */
  1538. X                             0.2000,   0.2000,  0.1667,  0.3333 },
  1539. X
  1540. X  { LJ_PS_COMMERCIAL10,      4.1250,   9.5000, 51,
  1541. X                             0.2000,   0.2000,  0.1667,  0.3333 },
  1542. X
  1543. X  { LJ_PS_INTERNATIONALDL,   4.3307,   8.6614, 46,
  1544. X                             0.2000,   0.1933,  0.1667,  0.3067 },
  1545. X
  1546. X  { LJ_PS_INTERNATIONALC5,   6.3780,   9.0157, 48,
  1547. X                             0.2000,   0.1933,  0.1667,  0.3067 },
  1548. X
  1549. X  { 0,                       0.0000,   0.0000 }    /* The end must be all 0's */
  1550. X};
  1551. X
  1552. X
  1553. X  /* Local macro definitions
  1554. X  */
  1555. X
  1556. X  /* Local function list
  1557. X  */
  1558. X
  1559. X  /* Function bodies
  1560. X  */
  1561. X
  1562. X
  1563. Xvoid
  1564. Xlj_factory_setup()
  1565. X{
  1566. X
  1567. X  panel_copies = 1;
  1568. X  panel_manual_feed = LJ_PS_TRAY_1;
  1569. X  panel_form = 60;
  1570. X  panel_orientation = LJ_OR_PORTRAIT;
  1571. X  panel_font_source = LJ_FS_INTERNAL;
  1572. X  panel_font_number = 0;
  1573. X
  1574. X  ps_scale_x  = 1.0;
  1575. X  ps_scale_y  = 1.0;
  1576. X  ps_offset_x = 0.0;
  1577. X  ps_offset_y = 0.0;
  1578. X
  1579. X} /* lj_factory_setup() */
  1580. X
  1581. X
  1582. X
  1583. Xvoid
  1584. Xlj_startup(ofile)
  1585. X     FILE *ofile;
  1586. X{
  1587. X
  1588. X    /* Set the default laserjet variables by executing a reset (ljcmd_E) */
  1589. X  lj_reset(ofile);  
  1590. X
  1591. X    /*
  1592. X    ** The postscript prologue
  1593. X    **
  1594. X    ** Postscript naming conventions used here:
  1595. X    **
  1596. X    **   Note: X = uppercase letter; x = lowercase letter.
  1597. X    **
  1598. X    **   X, XX, XXX:  Functions
  1599. X    **
  1600. X    **   x, xx, xxx:  Global variables
  1601. X    **
  1602. X    **      Xx, Xxx:  Temporary variables
  1603. X    */
  1604. X
  1605. X    /* First write out the comments */
  1606. X  fprintf(ofile, "%%!PS-Adobe-1.0\n"); /* The standard header */
  1607. X  fprintf(ofile, "%%%%Creator: %s %s (%s)\n",
  1608. X      PROGRAM, VERSION, STATUS); /* Identify oneself! */
  1609. X  fprintf(ofile, "%%%%Pages: (atend)\n");
  1610. X  fprintf(ofile, "%%%%EndComments\n");
  1611. X  fprintf(ofile, "\n");
  1612. X
  1613. X    /* Next, write the prologue code */
  1614. X
  1615. X    /* Set the number of copies */
  1616. X  fprintf(ofile, "/#copies %d def\n", copies);
  1617. X
  1618. X    /* Use letter size paper (8.5"x11") */
  1619. X/*  fputs("letter\n", ofile);*/ /* XXX */
  1620. X
  1621. X    /* Set manual or automatic feed */
  1622. X  if(   (paper_source == LJ_PS_MANUAL)
  1623. X     || (paper_source == LJ_PS_MANUAL_ENVELOPE) ){
  1624. X    fprintf(ofile, "statusdict begin /manualfeed true def end\n");
  1625. X  }
  1626. X  else{
  1627. X    fprintf(ofile, "statusdict begin /manualfeed false def end\n");
  1628. X  }
  1629. X
  1630. X    /* Define variables for the current font, font size, and font width */
  1631. X  fputs("\n", ofile);
  1632. X  fprintf(ofile, "/cf /%s def\n", font_p.ps_name);
  1633. X  fprintf(ofile, "/cs %.4f def\n", pt2in(font_p.point_size));
  1634. X  fprintf(ofile, "/cw %.4f def\n", font_p.width);
  1635. X
  1636. X    /* Left margin */
  1637. X  fputs("\n", ofile);
  1638. X  fprintf(ofile, "/ml %.4f def\n", margin_left);
  1639. X
  1640. X    /* Variables for underlining */
  1641. X  fputs("\n", ofile);
  1642. X  fputs("/ux 0.0 def\n", ofile); /* X coord of underline beginning */
  1643. X  fputs("/uy 0.0 def\n", ofile); /* Y coord of underline beginning */
  1644. X
  1645. X    /* <String> S ->     % Show the string */
  1646. X  fputs("\n/S /show load def\n", ofile);
  1647. X
  1648. X    /* <X> <Y> ->      % Move to (<X>,<Y>) */
  1649. X  fputs("\n/M /moveto load def\n", ofile);
  1650. X
  1651. X    /* <DeltaX> HRM ->     % Move <DeltaX> horizontally (i.e. relative) */
  1652. X  fputs("\n\
  1653. X/HRM {\n\
  1654. X  0 rmoveto\n\
  1655. X} bind def\n\
  1656. X", ofile);
  1657. X
  1658. X    /* <Y> VM ->     % Move to <Y> (i.e. vertical absolute) */
  1659. X  fputs("\n\
  1660. X/VM {\n\
  1661. X  currentpoint pop exch moveto\n\
  1662. X} bind def\n\
  1663. X", ofile);
  1664. X
  1665. X    /* Set Right Margin -- uses clippath
  1666. X    ** Note: 25 is used as an arbitrary size.  The only requirement of this
  1667. X    ** number is that it must be outside the page boundaries
  1668. X    */
  1669. X  fputs("\n\
  1670. X/RM {\n\
  1671. X  /Tr exch def\n\
  1672. X  currentpoint  initclip\n\
  1673. X  newpath\n\
  1674. X    0  0 moveto  Tr 0 lineto  Tr 25 lineto  0 25 lineto\n\
  1675. X  closepath  clip\n\
  1676. X  moveto\n\
  1677. X} bind def\n\
  1678. X", ofile);
  1679. X
  1680. X    /* <typeface> <point-size> F ->
  1681. X    ** Set the font, given typeface and point size.
  1682. X    ** Note that the character-width is derived by having PostScript
  1683. X    ** provide the width of the *space* character (which is likely
  1684. X    ** the best character to use for a proportional font).
  1685. X    */
  1686. X  fputs("\n\
  1687. X/F {\n\
  1688. X  /Tp exch def  /Tf exch def\n\
  1689. X  Tf findfont Tp scalefont setfont\n\
  1690. X  /cf Tf def  /cs Tp def  /cw ( ) stringwidth pop def\n\
  1691. X} bind def\n\
  1692. X", ofile);
  1693. X
  1694. X    /* <typeface> <width> <height> FS ->
  1695. X    ** Set the font, given typeface, X scale factor, Y scale factor.
  1696. X    ** Note that the character-width is derived by having PostScript
  1697. X    ** provide the width of the *space* character (which is likely
  1698. X    ** the best character to use for a proportional font).
  1699. X    */
  1700. X  fputs("\n\
  1701. X/FS {\n\
  1702. X  /Ty exch def  /Tx exch def  /Tf exch def\n\
  1703. X  Tf findfont [Tx 0 0 Ty 0 0] makefont setfont\n\
  1704. X  /cf Tf def  /cs Ty def /cw ( ) stringwidth pop def\n\
  1705. X} bind def\n\
  1706. X", ofile);
  1707. X
  1708. X    /* US ->     Start a new underline */
  1709. X  fputs("\n\
  1710. X/US {\n\
  1711. X  currentpoint /uy exch def /ux exch def\n\
  1712. X} bind def\n\
  1713. X", ofile);
  1714. X
  1715. X    /* UE ->     Finish (i.e. draw!) the current underline
  1716. X    **
  1717. X    ** Note that this underlining does not yet work across separate lines,
  1718. X    ** so US and UE must be called on the same line.  Also, underlining does
  1719. X    ** not work backwards, so only use it if going forwards with the
  1720. X    ** underlines (yes, I know this is very limited, but tracking page motion
  1721. X    ** is a bit hard with underlining).
  1722. X    */
  1723. X  fputs("\n\
  1724. X/UE {\n\
  1725. X  /Tcx currentpoint pop def\n\
  1726. X  gsave\n\
  1727. X    newpath\n\
  1728. X    cf findfont cs scalefont dup\n\
  1729. X    /FontMatrix get 0 get /Ts exch def /FontInfo get dup\n\
  1730. X    /UnderlinePosition get Ts mul /To exch def\n\
  1731. X    /UnderlineThickness get Ts mul /Tt exch def\n\
  1732. X    ux uy To add moveto  Tcx uy To add lineto\n\
  1733. X    Tt setlinewidth stroke\n\
  1734. X  grestore\n\
  1735. X} bind def\n\
  1736. X", ofile);
  1737. X
  1738. X    /* TAB ->          Tab over to the next tab stop
  1739. X    ** For efficiency, this function gets the currentpoint, exch's to
  1740. X    ** get the current-x to the top-of-stack, works magic on the
  1741. X    ** current-x to figure out the position of the tab stop, exch's
  1742. X    ** again to get the arguments in the right sequence for the moveto
  1743. X    ** operator, and moves to the tab position.
  1744. X    **
  1745. X    ** Note that (1.0 + LJ_ERROR) is added to the calculation.  The 1.0
  1746. X    ** represents the movement to the next tab-stop.  LJ_ERROR is needed
  1747. X    ** insure that the value is within a certain error-margin in its proximity
  1748. X    ** to the tab-stop when the "cvi" (i.e. drop the decimal portion) is
  1749. X    ** performed.
  1750. X    */
  1751. X  fprintf(ofile, "\n\
  1752. X/TAB {\n\
  1753. X  currentpoint exch\n\
  1754. X  ml sub cw div %d div %f add cvi %d mul cw mul ml add\n\
  1755. X  exch moveto\n\
  1756. X} bind def\n\
  1757. X",
  1758. X      LJ_TAB_WIDTH,
  1759. X      (1.0 + LJ_ERROR),
  1760. X      LJ_TAB_WIDTH);
  1761. X
  1762. X    /* Initialization of the position stack would go here, if it was
  1763. X    ** implemented! */
  1764. X
  1765. X    /* Mark the end of the prolog */
  1766. X  fprintf(ofile, "\n%%%%EndProlog\n");
  1767. X
  1768. X    /* Start the first page */
  1769. X  new_page = 1;
  1770. X  page_number = 0;
  1771. X
  1772. X} /* lj_startup() */
  1773. X
  1774. X
  1775. X
  1776. Xvoid
  1777. Xlj_shutdown(ofile)
  1778. X     FILE *ofile;
  1779. X{
  1780. X
  1781. X  fprintf(ofile, "\nstatusdict begin /manualfeed false def end\n");
  1782. X  fprintf(ofile, "%%%%Trailer\n");
  1783. X  fprintf(ofile, "%%%%Pages: %d\n", page_number);
  1784. X
  1785. X} /* lj_shutdown() */
  1786. X
  1787. X
  1788. X
  1789. Xvoid
  1790. Xlj_page_begin(ofile)
  1791. X     FILE *ofile;
  1792. X{
  1793. X
  1794. X    /* Set starting position */
  1795. X  current_x    = margin_left;
  1796. X  current_y    = page_height - margin_top - char_height;
  1797. X  current_line = 1;
  1798. X
  1799. X    /* Print the PostScript page header */
  1800. X  if( new_page ){
  1801. X    page_number++;
  1802. X    fprintf(ofile, "\n%%%%Page: ? %d\n", page_number);
  1803. X  }
  1804. X
  1805. X    /* Save the current graphics state */
  1806. X  fputs("save\n", ofile);    
  1807. X
  1808. X    /* Note: the next three pieces of code must be in the following
  1809. X    ** order to insure that everything works correctly:
  1810. X    **
  1811. X    ** (1) Make inches the default measure
  1812. X    ** (2) Rotate the the page to landscape, if necessary
  1813. X    ** (3) Perform default offsets and page scaling
  1814. X    */
  1815. X
  1816. X    /* Make inches the default measure.  Note that this must be at the
  1817. X    ** beginning of every *page* (rather than in the prologue) because
  1818. X    ** the PostScript showpage function resets the graphics state.
  1819. X    */
  1820. X  fprintf(ofile, "72 72 scale\n");
  1821. X
  1822. X    /* Rotate the page to the proper orientation */
  1823. X  if( orientation == LJ_OR_LANDSCAPE ){
  1824. X    fprintf(ofile,
  1825. X        "90 rotate 0 %.4f translate\n",
  1826. X        -page_size.width);
  1827. X  }
  1828. X
  1829. X    /* Make sure everything fits in the printable region */
  1830. X  fprintf(ofile, "%.4f %.4f translate  %.4f %.4f scale\n",
  1831. X      offset_width,   offset_height,
  1832. X      compress_width, compress_height);
  1833. X
  1834. X    /* Make sure that a current point exists */
  1835. X  fputs("0 0 moveto\n", ofile);    
  1836. X
  1837. X    /* Set the initial font */
  1838. X  if( current_font == LJ_FT_PRIMARY )
  1839. X    lj_set_font(ofile, font_p);
  1840. X  else
  1841. X    lj_set_font(ofile, font_s);
  1842. X
  1843. X    /* Set the left margin */
  1844. X  fprintf(ofile, "/ml %.4f def ", margin_left);
  1845. X
  1846. X    /* Set the right margin */
  1847. X  fprintf(ofile, " %.4f RM ", 
  1848. X      margin_left + text_width);
  1849. X
  1850. X    /* Default position */
  1851. X  fprintf(ofile,        
  1852. X      "%.4f %.4f M\n", current_x, current_y);
  1853. X
  1854. X  empty_page = 1;
  1855. X  lj_undl_mark(ofile);
  1856. X  lj_text_begin();
  1857. X
  1858. X} /* lj_page_begin() */
  1859. X
  1860. X
  1861. X
  1862. Xvoid
  1863. Xlj_page_end(ofile)
  1864. X     FILE *ofile;
  1865. X{
  1866. X
  1867. X  lj_text_end(ofile);
  1868. X  lj_undl_flush(ofile);
  1869. X  fputs("\nrestore ", ofile);
  1870. X  if( empty_page ){
  1871. X      /* Clear the page without using erasepage! */
  1872. X    fputs("gsave newpath clippath 1 setgray fill grestore\n", ofile);
  1873. X    new_page = 0;        /* Still the same physical page */
  1874. X  }
  1875. X  else{
  1876. X    fputs("showpage\n", ofile); /* Print the page */
  1877. X    new_page = 1;        /* A new physical page is started */
  1878. X  }
  1879. X
  1880. X} /* lj_page_end() */
  1881. X
  1882. X
  1883. X
  1884. Xvoid
  1885. Xlj_nl(ofile)
  1886. X     FILE *ofile;
  1887. X{
  1888. X
  1889. X  lj_text_end(ofile);
  1890. X  lj_undl_flush(ofile);
  1891. X
  1892. X  current_x  = margin_left;
  1893. X  current_y -= char_height;
  1894. X  fprintf(ofile, "%% NL\n%.4f %.4f M ", current_x, current_y);
  1895. X
  1896. X  empty_line = 1;
  1897. X  lj_undl_mark(ofile);
  1898. X  lj_text_begin();
  1899. X
  1900. X} /* lj_nl() */
  1901. X
  1902. X
  1903. X
  1904. Xvoid
  1905. Xlj_reset(ofile)
  1906. X     FILE *ofile;
  1907. X{
  1908. X
  1909. X    /* ***** JOB CONTROL **************************************************
  1910. X    */
  1911. X  copies = panel_copies;    /* Number of copies, from the "front panel" */
  1912. X
  1913. X    /* ***** FONTS ********************************************************
  1914. X    **
  1915. X    ** Note: fonts must come before page control because the HMI (i.e.
  1916. X    **       char_width) is determined from the font.
  1917. X    */
  1918. X
  1919. X    /* Reset the primary font */
  1920. X  if( lj_find_font(panel_font_source, panel_font_number, &font_p) == 1 ){
  1921. X    fatal_error("could not find specified font", "");
  1922. X  }
  1923. X
  1924. X    /* Reset the secondary font */
  1925. X  if( lj_find_font(panel_font_source, panel_font_number, &font_p) == 1 ){
  1926. X    fatal_error("could not find specified font", "");
  1927. X  }
  1928. X
  1929. X    /* Underline, should be off */
  1930. X  underline = LJ_UL_OFF;
  1931. X
  1932. X
  1933. X    /* ***** PAGE CONTROL ************************************************
  1934. X    */
  1935. X
  1936. X    /* Paper source, from the "front panel" */
  1937. X  paper_source = panel_manual_feed;
  1938. X
  1939. X    /* Page orientation, from the "front panel" */
  1940. X  orientation = panel_orientation;
  1941. X
  1942. X    /* Determine the physical page size */
  1943. X  page_size.code = LJ_PS_LETTER; /* Letter size, by default */
  1944. X  if( lj_paper_size(&page_size) ){
  1945. X    internal_error("illegal page size", "");
  1946. X  }
  1947. X
  1948. X    /* Page width and height */
  1949. X  if( orientation == LJ_OR_PORTRAIT ){
  1950. X    page_width = page_size.width;
  1951. X    page_height = page_size.height;
  1952. X  }
  1953. X  else{
  1954. X    page_width = page_size.height;
  1955. X    page_height = page_size.width;
  1956. X  }
  1957. X
  1958. X    /* Top margin, text height (inches), and text length (lines).
  1959. X    ** Char width and height are set here as well due to the
  1960. X    ** inter-dependencies.
  1961. X    */
  1962. X  margin_top  = 0.5;        /* Top and bottom margins are 1/2" */
  1963. X  text_height = page_height - margin_top - 0.5;    /* 0.5 is for bottom margin */
  1964. X  char_height = text_height / panel_form;
  1965. X  char_width  = font_p.width;    /* inches per character */
  1966. X  text_length = text_height / char_height;
  1967. X
  1968. X    /* Left margin + text_width (= page width - right margin) */
  1969. X  margin_left = 0.0;
  1970. X    /* Initially, the right margin is not set.  To simulate this, the
  1971. X    ** text_width is set to be wider than any reasonable page width.
  1972. X    */
  1973. X  text_width  = 99.00;
  1974. X
  1975. X    /* Perforation skip */
  1976. X  perf_skip = 1;
  1977. X
  1978. X    /* Line termination: start with normal */
  1979. X  line_term = LJ_LT_NORM;
  1980. X
  1981. X
  1982. X    /* ***** FONT MANAGEMENT **********************************************
  1983. X    */
  1984. X
  1985. X    /* Current font ID, for soft fonts */
  1986. X  font_ID = 0;
  1987. X
  1988. X    /* Current character code, for soft fonts */
  1989. X  char_code = 0;
  1990. X
  1991. X
  1992. X    /* ***** RASTER GRAPHICS **********************************************
  1993. X    */
  1994. X
  1995. X    /* Graphics resolution, start at 300 dpi */
  1996. X  resolution = 75;
  1997. X
  1998. X    /* Graphics margin, start at 0 */
  1999. X  margin_graphics = 0;
  2000. X
  2001. X
  2002. X    /* ***** RECTANGULAR AREA FILL ****************************************
  2003. X    */
  2004. X
  2005. X    /* ID for filling areas (one ID used for both patterns and gray scales) */
  2006. X  fill_ID = LJ_FI_RULE;        /* *Black* greyscale! */
  2007. X
  2008. X    /* Horizontal and vertical graphics area sizes */
  2009. X  rect_size_h = 0;
  2010. X  rect_size_v = 0;
  2011. X
  2012. X
  2013. X    /* ***** MACRO ********************************************************
  2014. X    */
  2015. X
  2016. X    /* Current macro ID */
  2017. X  macro_ID = 0;
  2018. X
  2019. X
  2020. X    /* ***** TROUBLESHOOTING COMMANDS *************************************
  2021. X    */
  2022. X
  2023. X    /* End-of-line wrap: should be off */
  2024. X  eol_wrap = 0;
  2025. X
  2026. X    /* Display functions should be off */
  2027. X  display_funcs = 0;
  2028. X
  2029. X
  2030. X    /* ***** IMPLEMENTATION VARIABLES *************************************
  2031. X    */
  2032. X  current_x = margin_left;
  2033. X  current_y = page_height - margin_top - char_height;
  2034. X  current_line = 1;
  2035. X  current_font = LJ_FT_PRIMARY;
  2036. X  empty_line = 1;
  2037. X  empty_text = 1;
  2038. X  empty_page = 1;
  2039. X  compress_width  = ps_scale_x * LJ_DEFAULT_SCALE_X;
  2040. X  compress_height = ps_scale_y * LJ_DEFAULT_SCALE_Y;
  2041. X  offset_width    = ps_offset_x + LJ_DEFAULT_OFFSET_X;
  2042. X  offset_height   = ps_offset_y + LJ_DEFAULT_OFFSET_Y;
  2043. X
  2044. X} /* lj_reset() */
  2045. X
  2046. X
  2047. X
  2048. X  /* lj_paper_size() looks up the dimensions of the paper or envelope
  2049. X  ** passed in the code field of the argument.  If the code is legal, then
  2050. X  ** the width and height fields are filled and a 0 is returned.  If the
  2051. X  ** code does not exist, then the width and height fields are undefined and
  2052. X  ** a 1 is returned.
  2053. X  */
  2054. Xint
  2055. Xlj_paper_size(page_size)
  2056. X     psize *page_size;
  2057. X{
  2058. X  int found;
  2059. X  int counter;
  2060. X  
  2061. X  found = 0;
  2062. X  for( counter = 0; !found && !(paper_size[counter].code == 0); counter++ ){
  2063. X    if( page_size->code == paper_size[counter].code ){
  2064. X      found = 1;
  2065. X      page_size->width  = paper_size[counter].width;
  2066. X      page_size->height = paper_size[counter].height;
  2067. X    } /* if(...) */
  2068. X  } /* for(...) */
  2069. X
  2070. X  return( !found );
  2071. X} /* lj_paper_size() */
  2072. SHAR_EOF
  2073. $TOUCH -am 0707112690 lj.c &&
  2074. chmod 0644 lj.c ||
  2075. echo "restore of lj.c failed"
  2076. set `wc -c lj.c`;Wc_c=$1
  2077. if test "$Wc_c" != "20389"; then
  2078.     echo original size 20389, current size $Wc_c
  2079. fi
  2080. # ============= lj.h ==============
  2081. echo "x - extracting lj.h (Text)"
  2082. sed 's/^X//' << 'SHAR_EOF' > lj.h &&
  2083. X/*
  2084. X** Project:        lj2ps
  2085. X** File:       lj.h
  2086. X**
  2087. X** Author:       Christopher Lishka
  2088. X** Organization:   Wisconsin State Laboratory of Hygiene
  2089. X**           Data Processing Dept.
  2090. X**
  2091. X** Copyright (C) 1990 by Christopher Lishka.
  2092. X**
  2093. X** This program is free software; you can redistribute it and/or modify
  2094. X** it under the terms of the GNU General Public License as published by
  2095. X** the Free Software Foundation; either version 1, or (at your option)
  2096. X** any later version.
  2097. X**
  2098. X** This program is distributed in the hope that it will be useful,
  2099. X** but WITHOUT ANY WARRANTY; without even the implied warranty of
  2100. X** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2101. X** GNU General Public License for more details.
  2102. X**
  2103. X** You should have received a copy of the GNU General Public License
  2104. X** along with this program; if not, write to the Free Software
  2105. X** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2106. X*/
  2107. X
  2108. X#ifndef LJ_H
  2109. X#define LJ_H
  2110. X
  2111. X  /* Global constants
  2112. X  */
  2113. X  /* Implementation constraints */
  2114. X#define LJ_STRING_SIZE  256
  2115. X#define LJ_ERROR  0.00001    /* Accuracy of floating point numbers */
  2116. X  /* Default scaling constants */
  2117. X#define LJ_DEFAULT_SCALE_X   1.0000
  2118. X#define LJ_DEFAULT_SCALE_Y   0.99
  2119. X  /* Default offset constants */
  2120. X#define LJ_DEFAULT_OFFSET_X  0.2500
  2121. X#define LJ_DEFAULT_OFFSET_Y  0.0000
  2122. X  /* Measurements */
  2123. X#define in   1            /* Inches (base unit of measurement) */
  2124. X#define dt 300            /* Dots per inch */
  2125. X#define dp 720            /* Decipoints */
  2126. X#define hi 120            /* Horizontal Index Unit */
  2127. X#define vi  48            /* Vertical Index Unit */
  2128. X#define pt  72            /* Points */
  2129. X  /* Tab stops */
  2130. X#define LJ_TAB_WIDTH 8        /* Tabs occur every eight characters */
  2131. X  /* Internal codes */
  2132. X#define LJ_UL_OFF             100 /* Underline codes */
  2133. X#define LJ_UL_ON              101
  2134. X#define LJ_UL_FLOAT           102
  2135. X#define LJ_FI_RULE            200 /* Fill codes      Rule */
  2136. X#define LJ_FI_2               201 /*              2% gray */
  2137. X#define LJ_FI_10              202 /*             10% gray */
  2138. X#define LJ_FI_15              203 /*             15% gray */
  2139. X#define LJ_FI_30              204 /*             30% gray */
  2140. X#define LJ_FI_45              205 /*             45% gray */
  2141. X#define LJ_FI_70              206 /*             70% gray */
  2142. X#define LJ_FI_90              207 /*             90% gray */
  2143. X#define LJ_FI_100             208 /*            100% gray */
  2144. X#define LJ_FI_LINE_H          209 /*     Horizontal lines */
  2145. X#define LJ_FI_LINE_V          210 /*     Vertical lines */
  2146. X#define LJ_FI_DIAG_1          211 /*     Diagonals 1 */
  2147. X#define LJ_FI_DIAG_2          212 /*     Diagonals 2 */
  2148. X#define LJ_FI_GRID_SQ         213 /*     Square grid */
  2149. X#define LJ_FI_GRID_DIAG       214 /*     Diagonal grid */
  2150. X#define LJ_LT_NORM            301 /* Line termination    normal */
  2151. X#define LJ_LT_CR              302 /* cr=cr+lf lf=lf ff=ff */
  2152. X#define LJ_LT_LF_FF           303 /* cr=cr lf=cr+lf ff=cr+ff */
  2153. X#define LJ_LT_CR_LF_FF        304 /* cr=cr+lf lf=cr+lf ff=cr+ff */
  2154. X#define LJ_PS_TRAY_1          301 /* Paper source */
  2155. X#define LJ_PS_TRAY_2          302
  2156. X#define LJ_PS_MANUAL          303
  2157. X#define LJ_PS_MANUAL_ENVELOPE 304
  2158. X#define LJ_OR_PORTRAIT        401 /* Orientation */
  2159. X#define LJ_OR_LANDSCAPE       402
  2160. X#define LJ_SS_0B              501 /* Symbol set: bit vector entries */
  2161. X#define LJ_SS_0N              502
  2162. X#define LJ_SS_0U              503
  2163. X#define LJ_SS_1U              504
  2164. X#define LJ_SS_8U              505
  2165. X#define LJ_SS_10U             506
  2166. X#define LJ_SS_11U             507
  2167. X#define LJ_TF_HELV            601 /* Typefaces */
  2168. X#define LJ_TF_TIMES           602
  2169. X#define LJ_TF_PRES            603
  2170. X#define LJ_TF_LP              604
  2171. X#define LJ_TF_COUR            605
  2172. X#define LJ_SP_PROPORTIONAL    701 /* Spacing */
  2173. X#define LJ_SP_FIXED           702
  2174. X#define LJ_ST_UPRIGHT         801 /* Font style */
  2175. X#define LJ_ST_ITALIC          802
  2176. X#define LJ_FT_PRIMARY         901 /* Primary/secondary current font */
  2177. X#define LJ_FT_SECONDARY       902
  2178. X#define LJ_PS_EXECUTIVE       1001 /* Page size codes */
  2179. X#define LJ_PS_LETTER          1002
  2180. X#define LJ_PS_LEGAL           1003
  2181. X#define LJ_PS_A4              1004
  2182. X#define LJ_PS_MONARCH         1005
  2183. X#define LJ_PS_COMMERCIAL10    1006
  2184. X#define LJ_PS_INTERNATIONALDL 1007
  2185. X#define LJ_PS_INTERNATIONALC5 1008
  2186. X#define LJ_FS_INTERNAL        1101 /* Font sources */
  2187. X#define LJ_FS_LEFT            1102
  2188. X#define LJ_FS_RIGHT           1103
  2189. X#define LJ_FS_SOFT            1104
  2190. X
  2191. X  /* Global structure and type definitions
  2192. X  */
  2193. X
  2194. X  /* Data required for a laserjet font */
  2195. Xtypedef struct {
  2196. X    /* Identifier fields */
  2197. X  int     source;        /* Font source: where the font is located */
  2198. X  int     number;        /* Font number */
  2199. X     /* Scaling fields */
  2200. X  int     scale;        /* True if scaling should be performed */
  2201. X  double  scale_x;        /* % to scale in x direction */
  2202. X  double  scale_y;        /* % to scale in y direction */
  2203. X    /* LaserJet font ID fields */
  2204. X  int     symbol_set;        /* The symbol set of the font */
  2205. X  int     spacing;        /* Proportional/fixed */
  2206. X  double  pitch;        /* (Only valid for fixed width fonts!) */
  2207. X  double  point_size;        /* Height of the character */
  2208. X  int     style;        /* Upright/italic */
  2209. X  int     weight;        /* Stroke weight: -3 to +3 */
  2210. X  int     typeface;        /* Which typeface to use */
  2211. X  char    ps_name[LJ_STRING_SIZE]; /* The postscript font used for emulation */
  2212. X  double  width;        /* Width of a character */
  2213. X} ljfont;
  2214. X  /* Data required to determine paper size */
  2215. Xtypedef struct {
  2216. X  int     code;            /* Type of paper: letter, legal, A4, etc. */
  2217. X  double  width;        /* How wide (inches) */
  2218. X  double  height;        /* How high (inches) */
  2219. X  int     default_form;        /* Default value for form variable */
  2220. X  double  unprint_top;        /* Unprintable region - top */
  2221. X  double  unprint_bottom;    /* Unprintable region - bottom */
  2222. X  double  unprint_left;        /* Unprintable region - left */
  2223. X  double  unprint_right;    /* Unprintable region - right */
  2224. X} psize;
  2225. X
  2226. X  /* Global variables
  2227. X  */
  2228. X  /* Front panel variables */
  2229. Xextern int    panel_copies;    /*  Front panel: Copies */
  2230. Xextern int    panel_manual_feed; /* Front panel: Manual Feed */
  2231. Xextern int    panel_font_source; /* Front panel: Font Source */
  2232. Xextern int    panel_font_number; /* Front panel: Font Number */
  2233. Xextern int    panel_orientation; /* Front panel: Font Source, Font Number */
  2234. Xextern int    panel_form;    /*  Front panel: Form (i.e. lpi) */
  2235. X  /* Postscript specific variables */
  2236. SHAR_EOF
  2237. echo "End of  part 10"
  2238. echo "File lj.h is continued in part 11"
  2239. echo "11" > @shar_seq_.tmp
  2240. exit 0
  2241.  
  2242.