#!/usr/NeWS/bin/psh %+ % Copyright 1988, Eaton Corp., IMSD. % Module: printcolor % Author: colorwheel type program that prints out the hsbcolor on stdout % when clicked on. % Function: % Notes: a stub for the colormenu proc in LOCALNEWSHOME % Modification History: % Date Author Reason % ------------------------------------------------------------- % 10Jan88 MCH Initial Release. % ------------------------------------------------------------- %- %+ % runit: (/filename) => - % Function: run a postscript file in $LOCALNEWSHOME/lib % complain (in a msg window) and exit if it fails %- /runit { { 2 dict begin /fname exch def /dir (LOCALNEWSHOME) getenv (/lib) append def %/dir (/user/src/forms/forms) def dir fname append end %localscope run } stopped { dup (r) eq {pop} if % run error ; pop the (r) flag % make err msg (/user/bin/msg run_error cannot_run_or_find ) exch append forkunix pause quit } if } def %[ (/colormenu.ps) ] { runit } forall /flag ($1) def flag [ (n) { /newline () def } /Default { /newline (\n) def } ] case false colormenu { %% color is returned 3 -2 roll (% % %) sprintf newline append [] printf } { %% grayscale returned 10 string cvs ( ) append newline append printf } ifelse flush %% ======================================================================