# # Module filter/ascii for apsfilter # # Copyright 1996 S.u.S.E. GmbH # Author: Werner Fink # # # findfilter () is defined in handler/functions called by apsfilter # # print ascii using a2ps # if [ "$USE_RECODE_NOT_A2PS" = "yes" ] ; then findfilter recode RECODE HAVE_RECODE="$HAVE_RECODE -q latin1:ibmpc" print_stdin() { # # recode returns no PostScript but IBM[tm] compatible text # $DECOMPRESS $HAVE_RECODE | eval $PRINT_PS } else findfilter a2ps A2PS print_stdin() { case $PRINTER in cdj*|*desk*|djet*) A2PS_MARGIN=1.6 ;; *) A2PS_MARGIN=1.4 ;; esac # # For a detailed description of the a2ps commandline options # please look up the manpage # # # If title is given in cf file then use it # A2PS_NAME="-H\"\"" [ "$NAME" = "stdin" -o "$NAME" = "(stdin)" ] || A2PS_NAME="-H\"$NAME\"" [ -n "$TITLE" ] && A2PS_NAME="-H\"$TITLE\"" # # If full name is given in cf file then use it # A2PS_PERSON="-Q$PERSON" [ -n "$LPERSON" ] && A2PS_PERSON="-Q\"$LPERSON\"" # A2PS_BASIC_OPTIONS=" -8 -nP -X$PAPERSIZE -M$A2PS_MARGIN" A2PS_BASIC_OPTIONS="$A2PS_BASIC_OPTIONS $A2PS_NAME $A2PS_PERSON -Z$HOST" # A2PS_STD_OPTIONS="-r -ns -nu" # FEATURE: see in /etc/apsfilterrc case $FEATURE in 1) A2PS_FEATURES="-p -1 -F9.0" ;; 2) A2PS_FEATURES="-l -2 -F6.9" ;; 1n) A2PS_FEATURES="-p -1 -F9.0 -nH -nL" ;; 2n) A2PS_FEATURES="-l -2 -F6.9 -nH -nL" ;; 1l) A2PS_FEATURES="-l -1 -F9.0" ;; 1ln) A2PS_FEATURES="-l -1 -F9.0 -nH -nL" ;; *) A2PS_FEATURES=" -F6.9 -nH" ;; esac # if no user defined options then take the one we provide # if user defined A2PS_OPTS, we have to keep the A2PS_BASIC_OPTIONS !!! if [ -z "$A2PS_OPTS" ]; then A2PS_OPTS="${A2PS_STD_OPTIONS} ${A2PS_FEATURES}" fi A2PS_OPTS="${A2PS_BASIC_OPTIONS} ${A2PS_OPTS}" $DECOMPRESS eval $HAVE_A2PS ${A2PS_OPTS} | eval $PRINT_PS } fi # # Declare for export # declare -xf print_stdin # # End #