0 
%!
%
% Copyright(c) Tektronix, Incorporated. This program, or portions
% thereof, is protected as an unpublished work under the copyright
% laws of the United States.
%

% $Revision: 1.11 $

%  ESC-Del-0 needed to temporarily exit from HPGL mode.  Do not put
%  comments above that line.

%
% The following snippet changes the settings for the current input port
% so that it will automatically detect the job language.
%

%
% This snippet is only valid for Level 2 PostScript interpreters.
%
systemdict /languagelevel known
 { languagelevel 2 eq }
 { false } ifelse
not {quit} if

%
% Get the current input device name and replace the trailing "%" with "_NV%"
% to obtain the corresponding non-volatile parameter set name.
%
% To change the settings of a port other than the one being used to send
% this snippet, replace the following three lines of PostScript code with
% the name of the port to be set:
%    (%Serial_NV%)
%    (%Parallel_NV%)
%    (%LocalTalk_NV%)
%    (%EtherTalk_NV%)
%    (%TokenTalk_NV%)
%    (%LPR_NV%)
%    (%AppSocket_NV%)
%    (%PrintServer_NV%)
%
currentsystemparams /CurInputDevice get
dup length 3 add string dup 3 1 roll copy pop
dup dup length 4 sub (_NV%) putinterval
%
% Change this line to match your current system password.
%
<< /Password (0) >>
%
% The third parameter is device-dependent.  Serial and Parallel ports have
% a "Protocol" parameter; network ports may have a "Filtering" parameter.
% Determine which parameter (if any) is supported by this device and add
% the correct value to the dictionary.
%
1 index currentdevparams
dup /Interpreter known { 1 index /Interpreter /AutoSelect put } if
dup /Protocol known { 1 index /Protocol /Raw put } if
dup /Filtering known {
 %
 % For historical reasons, we set /Filtering to /InterpreterBased on the
 % PrintServer port of 2013-based products, and to /None on all other ports
 % and products.
 %
 2 index (%PrintServer_NV%) eq version cvi 2015 lt and
 { 1 index /Filtering /InterpreterBased put }
 { 1 index /Filtering /None put } ifelse
} if
dup /PrinterControl known { 1 index /PrinterControl /PSPrinter put } if
pop
%
% Now set the device parameters.
%
setdevparams