⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hardcopy.rc

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 RC
字号:
#!/bin/rc# Generate paper output from the data that a PostScript program normally# sends back to a host computer using file output operators.#POSTLIB=/sys/lib/postscript/prologuesPROLOGUE=$POSTLIB/hardcopy.psOPTIONS=MODE=portraitNONCONFORMING='%!PS'ENDPROLOG='%%EndProlog'BEGINSETUP='%%BeginSetup'ENDSETUP='%%EndSetup'TRAILER='%%Trailer'SETUP=HardcopySetupDONE='(%stdout)(w) file -1 write'while (! ~ $#* 0 && ~ $1 -*) {	switch ($1) {	case -c;  shift; OPTIONS=$OPTIONS' /#copies '$1' store'	case -c*; OPTIONS=$OPTIONS' /#copies `{echo $1 | sed s/-c//}' store'	case -f;  shift; OPTIONS=$OPTIONS' /font '/$1' def'	case -f*; OPTIONS=$OPTIONS' /font '/`{echo $1 | sed s/-f//}' def'	case -p;  shift; MODE=$1	case -p*; MODE=`{echo $1 | sed s/-p//}	case -m;  shift; OPTIONS=$OPTIONS' /magnification '$1' def'	case -m*; OPTIONS=$OPTIONS' /magnification '`{echo $1 | sed s/-m//}' def'	case -s;  shift; OPTIONS=$OPTIONS' /pointsize '$1' def'	case -s*; OPTIONS=$OPTIONS' /pointsize '`{echo $1 | sed s/-s//}' def'	case -x;  shift; OPTIONS=$OPTIONS' /xoffset '$1' def'	case -x*; OPTIONS=$OPTIONS' /xoffset '`{echo $1 | sed s/-x//}' def'	case -y;  shift; OPTIONS=$OPTIONS' /yoffset '$1' def'	case -y*; OPTIONS=$OPTIONS' /yoffset '`{echo $1 | sed s/-y//}' def'	case -L;  shift; PROLOGUE=$1	case -L*; PROLOGUE=`{echo $1 | sed s/-L//}	case --;	case -*;  echo '$0: illegal option $1' >&2; exit 1	}	shift}switch ($MODE) {	case l*; OPTIONS=$OPTIONS' /landscape true def'	case *;  OPTIONS=$OPTIONS' /landscape false def'}echo $NONCONFORMINGcat $PROLOGUEecho $ENDPROLOGecho $BEGINSETUPecho $OPTIONSecho $SETUPecho $ENDSETUPcat $*echo $TRAILERecho $DONE

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -