Home » Archimedes archive » Zipped Apps » Impression Publisher » !Publisher/Resources/ps/SepCode
!Publisher/Resources/ps/SepCode
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Zipped Apps » Impression Publisher |
Filename: | !Publisher/Resources/ps/SepCode |
Read OK: | ✔ |
File size: | 0576 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
/SPdict 40 dict def SPdict begin /cycol 3 def /mgcol 2 def /ylcol 1 def /kycol 0 def /colour kycol def /UCRB .5 def /UCRM .31 def /UCRY .48 def /setgray {colour 0 eq {systemdict begin setgray end} {pop systemdict begin 1 setgray end} ifelse }def /bd{bind def}bind def /setrgbcolor{colour 0 eq{3 copy 1 index eq 3 1 roll eq and {pop pop systemdict begin setgray end} {do_ucrblack systemdict begin setgray end pop pop pop}ifelse} {3 copy 1 index eq 3 1 roll eq and{pop pop pop systemdict begin 1 setgray end} {do_ucrblack pop do_correct colour 1 sub index systemdict begin setgray end pop pop pop }ifelse}ifelse}def currentdict /setcmykcolor known not{ /setcmykcolor{dup 5 -1 roll add dup 1 gt{pop 1}if 1 exch sub 4 1 roll dup 4 -1 roll add dup 1 gt{pop 1}if 1 exch sub 3 1 roll add dup 1 gt{pop 1}if 1 exch sub setrgbcolor}bd}if /sethsbcolor{systemdict begin sethsbcolor currentrgbcolor end userdict begin setrgbcolor end}def /do_correct{cvtrgbcym 1 index UCRY mul sub 3 1 roll 1 index UCRM mul sub 3 1 roll 3 1 roll cvtrgbcym}def /do_ucrblack{cvtrgbcym min 3 index min /mincolour exch def pop pop /ucramt mincolour UCRB sub dup 0 lt {pop 0}if def ucramt sub 3 1 roll ucramt sub 3 1 roll ucramt sub 3 1 roll cvtrgbcym ucramt 1.25 mul 1 exch sub}def /cvtrgbcym{ 1 exch sub 3 1 roll 1 exch sub 3 1 roll 1 exch sub 3 1 roll}def /min{2 copy lt{1}{0}ifelse index}def end
00000000 2f 53 50 64 69 63 74 20 34 30 20 64 69 63 74 20 |/SPdict 40 dict | 00000010 64 65 66 20 0a 53 50 64 69 63 74 20 62 65 67 69 |def .SPdict begi| 00000020 6e 0a 0a 2f 63 79 63 6f 6c 20 33 20 64 65 66 0a |n../cycol 3 def.| 00000030 2f 6d 67 63 6f 6c 20 32 20 64 65 66 0a 2f 79 6c |/mgcol 2 def./yl| 00000040 63 6f 6c 20 31 20 64 65 66 0a 2f 6b 79 63 6f 6c |col 1 def./kycol| 00000050 20 30 20 64 65 66 0a 2f 63 6f 6c 6f 75 72 20 6b | 0 def./colour k| 00000060 79 63 6f 6c 20 64 65 66 0a 2f 55 43 52 42 20 2e |ycol def./UCRB .| 00000070 35 20 64 65 66 0a 2f 55 43 52 4d 20 2e 33 31 20 |5 def./UCRM .31 | 00000080 64 65 66 0a 2f 55 43 52 59 20 2e 34 38 20 64 65 |def./UCRY .48 de| 00000090 66 0a 2f 73 65 74 67 72 61 79 20 7b 63 6f 6c 6f |f./setgray {colo| 000000a0 75 72 20 30 20 65 71 0a 20 7b 73 79 73 74 65 6d |ur 0 eq. {system| 000000b0 64 69 63 74 20 62 65 67 69 6e 20 73 65 74 67 72 |dict begin setgr| 000000c0 61 79 20 65 6e 64 7d 0a 20 7b 70 6f 70 20 73 79 |ay end}. {pop sy| 000000d0 73 74 65 6d 64 69 63 74 20 62 65 67 69 6e 20 31 |stemdict begin 1| 000000e0 20 73 65 74 67 72 61 79 20 65 6e 64 7d 0a 20 69 | setgray end}. i| 000000f0 66 65 6c 73 65 0a 7d 64 65 66 0a 2f 62 64 7b 62 |felse.}def./bd{b| 00000100 69 6e 64 20 64 65 66 7d 62 69 6e 64 20 64 65 66 |ind def}bind def| 00000110 0a 2f 73 65 74 72 67 62 63 6f 6c 6f 72 7b 63 6f |./setrgbcolor{co| 00000120 6c 6f 75 72 20 30 20 65 71 7b 33 20 63 6f 70 79 |lour 0 eq{3 copy| 00000130 20 31 20 69 6e 64 65 78 20 65 71 20 33 20 31 20 | 1 index eq 3 1 | 00000140 72 6f 6c 6c 20 65 71 20 61 6e 64 0a 20 20 20 7b |roll eq and. {| 00000150 70 6f 70 20 70 6f 70 20 73 79 73 74 65 6d 64 69 |pop pop systemdi| 00000160 63 74 20 62 65 67 69 6e 20 73 65 74 67 72 61 79 |ct begin setgray| 00000170 20 65 6e 64 7d 0a 20 20 20 7b 64 6f 5f 75 63 72 | end}. {do_ucr| 00000180 62 6c 61 63 6b 20 73 79 73 74 65 6d 64 69 63 74 |black systemdict| 00000190 20 62 65 67 69 6e 20 73 65 74 67 72 61 79 20 65 | begin setgray e| 000001a0 6e 64 20 70 6f 70 20 70 6f 70 20 70 6f 70 7d 69 |nd pop pop pop}i| 000001b0 66 65 6c 73 65 7d 0a 20 20 20 7b 33 20 63 6f 70 |felse}. {3 cop| 000001c0 79 20 31 20 69 6e 64 65 78 20 65 71 20 33 20 31 |y 1 index eq 3 1| 000001d0 20 72 6f 6c 6c 20 65 71 20 61 6e 64 7b 70 6f 70 | roll eq and{pop| 000001e0 20 70 6f 70 20 70 6f 70 20 73 79 73 74 65 6d 64 | pop pop systemd| 000001f0 69 63 74 20 62 65 67 69 6e 20 31 20 73 65 74 67 |ict begin 1 setg| 00000200 72 61 79 20 65 6e 64 7d 0a 20 20 20 7b 64 6f 5f |ray end}. {do_| 00000210 75 63 72 62 6c 61 63 6b 20 70 6f 70 20 64 6f 5f |ucrblack pop do_| 00000220 63 6f 72 72 65 63 74 20 63 6f 6c 6f 75 72 20 31 |correct colour 1| 00000230 20 73 75 62 20 69 6e 64 65 78 20 73 79 73 74 65 | sub index syste| 00000240 6d 64 69 63 74 20 62 65 67 69 6e 20 73 65 74 67 |mdict begin setg| 00000250 72 61 79 20 65 6e 64 0a 20 20 20 70 6f 70 20 70 |ray end. pop p| 00000260 6f 70 20 70 6f 70 20 7d 69 66 65 6c 73 65 7d 69 |op pop }ifelse}i| 00000270 66 65 6c 73 65 7d 64 65 66 0a 63 75 72 72 65 6e |felse}def.curren| 00000280 74 64 69 63 74 20 2f 73 65 74 63 6d 79 6b 63 6f |tdict /setcmykco| 00000290 6c 6f 72 20 6b 6e 6f 77 6e 20 6e 6f 74 7b 0a 20 |lor known not{. | 000002a0 2f 73 65 74 63 6d 79 6b 63 6f 6c 6f 72 7b 64 75 |/setcmykcolor{du| 000002b0 70 20 35 20 2d 31 20 72 6f 6c 6c 20 61 64 64 20 |p 5 -1 roll add | 000002c0 64 75 70 20 31 20 67 74 7b 70 6f 70 20 31 7d 69 |dup 1 gt{pop 1}i| 000002d0 66 0a 20 20 31 20 65 78 63 68 20 73 75 62 20 34 |f. 1 exch sub 4| 000002e0 20 31 20 72 6f 6c 6c 20 64 75 70 20 34 0a 20 2d | 1 roll dup 4. -| 000002f0 31 20 72 6f 6c 6c 20 61 64 64 20 64 75 70 20 31 |1 roll add dup 1| 00000300 20 67 74 7b 70 6f 70 20 31 7d 69 66 0a 20 20 31 | gt{pop 1}if. 1| 00000310 20 65 78 63 68 20 73 75 62 20 33 20 31 20 72 6f | exch sub 3 1 ro| 00000320 6c 6c 20 61 64 64 20 64 75 70 20 31 20 67 74 7b |ll add dup 1 gt{| 00000330 70 6f 70 20 31 7d 69 66 0a 20 20 31 20 65 78 63 |pop 1}if. 1 exc| 00000340 68 20 73 75 62 20 73 65 74 72 67 62 63 6f 6c 6f |h sub setrgbcolo| 00000350 72 7d 62 64 7d 69 66 0a 2f 73 65 74 68 73 62 63 |r}bd}if./sethsbc| 00000360 6f 6c 6f 72 7b 73 79 73 74 65 6d 64 69 63 74 20 |olor{systemdict | 00000370 62 65 67 69 6e 20 73 65 74 68 73 62 63 6f 6c 6f |begin sethsbcolo| 00000380 72 0a 20 20 63 75 72 72 65 6e 74 72 67 62 63 6f |r. currentrgbco| 00000390 6c 6f 72 20 65 6e 64 20 75 73 65 72 64 69 63 74 |lor end userdict| 000003a0 20 62 65 67 69 6e 20 73 65 74 72 67 62 63 6f 6c | begin setrgbcol| 000003b0 6f 72 20 65 6e 64 7d 64 65 66 0a 2f 64 6f 5f 63 |or end}def./do_c| 000003c0 6f 72 72 65 63 74 7b 63 76 74 72 67 62 63 79 6d |orrect{cvtrgbcym| 000003d0 20 31 20 69 6e 64 65 78 20 55 43 52 59 20 6d 75 | 1 index UCRY mu| 000003e0 6c 20 73 75 62 20 33 20 31 20 72 6f 6c 6c 20 31 |l sub 3 1 roll 1| 000003f0 0a 20 20 69 6e 64 65 78 20 55 43 52 4d 20 6d 75 |. index UCRM mu| 00000400 6c 20 73 75 62 20 33 20 31 20 72 6f 6c 6c 20 33 |l sub 3 1 roll 3| 00000410 20 31 20 72 6f 6c 6c 20 63 76 74 72 67 62 63 79 | 1 roll cvtrgbcy| 00000420 6d 7d 64 65 66 0a 2f 64 6f 5f 75 63 72 62 6c 61 |m}def./do_ucrbla| 00000430 63 6b 7b 63 76 74 72 67 62 63 79 6d 20 6d 69 6e |ck{cvtrgbcym min| 00000440 20 33 20 69 6e 64 65 78 20 6d 69 6e 0a 2f 6d 69 | 3 index min./mi| 00000450 6e 63 6f 6c 6f 75 72 20 65 78 63 68 20 64 65 66 |ncolour exch def| 00000460 20 70 6f 70 20 70 6f 70 0a 2f 75 63 72 61 6d 74 | pop pop./ucramt| 00000470 20 6d 69 6e 63 6f 6c 6f 75 72 20 55 43 52 42 20 | mincolour UCRB | 00000480 73 75 62 20 64 75 70 20 30 20 6c 74 0a 7b 70 6f |sub dup 0 lt.{po| 00000490 70 20 30 7d 69 66 20 64 65 66 20 75 63 72 61 6d |p 0}if def ucram| 000004a0 74 20 73 75 62 20 33 20 31 20 72 6f 6c 6c 20 75 |t sub 3 1 roll u| 000004b0 63 72 61 6d 74 20 73 75 62 20 33 20 31 20 72 6f |cramt sub 3 1 ro| 000004c0 6c 6c 20 75 63 72 61 6d 74 20 73 75 62 20 33 20 |ll ucramt sub 3 | 000004d0 31 20 72 6f 6c 6c 0a 63 76 74 72 67 62 63 79 6d |1 roll.cvtrgbcym| 000004e0 20 75 63 72 61 6d 74 20 31 2e 32 35 20 6d 75 6c | ucramt 1.25 mul| 000004f0 20 31 20 65 78 63 68 20 73 75 62 7d 64 65 66 0a | 1 exch sub}def.| 00000500 2f 63 76 74 72 67 62 63 79 6d 7b 0a 31 20 65 78 |/cvtrgbcym{.1 ex| 00000510 63 68 20 73 75 62 20 33 20 31 20 72 6f 6c 6c 0a |ch sub 3 1 roll.| 00000520 31 20 65 78 63 68 20 73 75 62 20 33 20 31 20 72 |1 exch sub 3 1 r| 00000530 6f 6c 6c 0a 31 20 65 78 63 68 20 73 75 62 20 33 |oll.1 exch sub 3| 00000540 20 31 20 72 6f 6c 6c 7d 64 65 66 0a 2f 6d 69 6e | 1 roll}def./min| 00000550 7b 32 20 63 6f 70 79 20 6c 74 7b 31 7d 7b 30 7d |{2 copy lt{1}{0}| 00000560 69 66 65 6c 73 65 20 69 6e 64 65 78 7d 64 65 66 |ifelse index}def| 00000570 0a 0a 65 6e 64 0a |..end.| 00000576