#! /bin/sh
#
# @(#)setENABLEANSI	1.2	LPS_UNX_COM	2/19/95
#
# Copyright 1994   Digital Equipment Corporation, Maynard, MA
#
# setENABLEANSI
#
# A script that produces a value for attribute ENABLEANSI.
#
# Parameters:
#    $1 - LPS class identifier, one of {PC, MC, PS, ENV}
#    $2 - Operating system type identifier (eg: SV2, BSD, etc)
#    $3 - Print client type identifier (eg: AIX, BSD, SV3, etc)
#    $4 - PrintServer printer model (eg: LPS17, LPS20)
#    $5 - Default value for the attribute
#    $6 - Path of the output file to receive the final attribute value
#
# Global variables:
#    PAGER
#
# Exit values:
#    0 - Success, output file contains newly set attribute value.
#    1 - Error or interruption occurred, error messages go to stderr,
#	 contents of the output file are undefined.
###

CLASS=$1
OSTYPE=$2
PCTYPE=$3
PSMODEL=$4
DEFVAL=$5
OUTFILE=$6

if [ "$CLASS" = "ENV" ]
then
   NOTES="
Note carefully that this choice is used only as a default response
when you later define a Print Client; you will be able to override
this default value each time you create a Print Client queue.

Typically a site will not enable ANSI translation, in which case you
should simply press the RETURN key to choose the default response."
fi

showhelp true "
Do you need to translate ANSI escape sequences in print files?

The LPS Print Client software contains an optional capability of
automatically translating print files containing ANSI escape sequences.

Normally when a print file must be translated, it is assumed that the
print data contains only simple ASCII data.  However, some sites use
software that inserts ANSI escape sequences into generated output;
these escape sequences are not properly translated by the default
ASCII translation software.

You can use the ANSI translation software for all simple ASCII print
files.  However, the ANSI translator consumes more computing power
(CPU cycles and memory) than the default ASCII translation software.
$NOTES"

if yesno $DEFVAL "Enable ANSI translation"
then
    resp="Yes"
else
    resp="No"
fi

echo "$resp" > $OUTFILE

exit 0
