Modulefpreviousupnextcontents[BIG][Normal][small]
Next: H Example of environment file: Up: Part IV: Appendices Prev: F List of graphic peripherals available Contents


Print command: prf_f3d

 



#!/bin/sh
# prf_f3d  
#
#  Command file to send output to a printer
#  =========================================
#
# Command parameters:
# --------------------
#  
# ** $1 type of file or print
#  ps            --> black and white laser w.r.t. the environment variable PRINTER
#  ps_color      --> nuri colour laser in building 30  (paper output)
#  ps_colors     --> nuri colour laser  in building 30 (slide output)
#  hardcopyX11   --> black and white laser w.r.t. variable PRINTER
#  Hardcopy on HP/Apollo, these values will not have any effect if the
#  Apollo graphic peripherals are not selected.
#  bmf_bw        --> black and white laser  (dessin)
#  bmf_color     --> tektronix 4693 (colour hardcopy only)
#  gmf           --> black and white laser (dessin)  (hardcopy only)
# ** $2 copy option -nc | -c 
# ** $3 delete option -d | -nd
# ** $4 file name or id window X if hardcopyX11
# ** $5.. --- not use 
#
echo $0 $*
#
######## 1) If not already done in your curent environment,
#      initialise variable PRINTER
#
#   PRINTER="printer name" ; export $PRINTER
#            -------------------
#
#  -- interface with lpr and prf -----
#
#      Initialisation of variables:
#
# copy or delete option of the file to print
lpr_cd=''                    # for command lpr (unix)
prf_cd=''                    # for command prf (aegis)
#
#    
######## 2) Select the printer names
#   According to the name of your printer, modify the values of variables
#   imp_couleur et imp_apollo
#
imp_couleur=colorps   # name of the colour laser printer
imp_apollo_nb=dessin  # name of the black and white laser printer
#                       for apollo output
remove=''
chmode=''
#
case "$2$3" in
    -nc-d) lpr_cd=-rs ;  prf_cd="-nc -d" ; chmode="chmod 777 $4" ;;
   -nc-nd) lpr_cd=-s  ;  prf_cd="-nc"    ; chmode="chmod 777 $4" ;;
     -c-d) remove="rm $4" ;;
        *)  ;;
esac
set -x
${chmode}
case $1 in
            -ps) lpr $lpr_cd $4  ;;
      -ps_color) lpr $lpr_cd -P${imp_couleur} $4 ;;
     -ps_colors) lpr $lpr_cd -P${imp_couleur} $4 ;;
  -hardcopyX11*) xwd -xy -id $4 | xpr -device ps -rv | lpr ;;  
        -bmf_bw) /com/prf $prf_cd -pr ${imp_apollo_nb} -magn -1 -plot -orient land $4 ;;
     -bmf_color) /com/prf $prf_cd -pr t4693d  -magn -1 -plot -orient land $4 ;;
           -gmf) /com/prf $prf_cd -pr ${imp_apollo_nb} -magn -1 -plot -orient land $4 ;;
              *) echo $0 $* '(interface inconnu)';;
esac
${remove}


Modulefpreviousupnextcontents[BIG][Normal][small]
Next: H Example of environment file: Up: Part IV: Appendices Prev: F List of graphic peripherals available Contents