%  TOPS-20 change file for PKtype by Tomas Rokicki.  Send bug reports to
%  ROKICKI@SU-SCORE.  The majority of these changes eliminate the sign-bit
%  manipulations necessary on 32-bit machines, but unnecessary on the 36-bit
%  TOPS-20.

@x [1]
\pageno=\contentspagenumber \advance\pageno by 1
@y
\pageno=\contentspagenumber \advance\pageno by 1
\let\maybe=\iffalse
\def\ttw{{\mc TOPS-20}}
\def\title{PKtype changes for \ttw}
@z

@x [4]
@d banner=='This is PKtype, Version 2.2'
@y
@d banner=='This is PKtype, Version 2.2'
@d output==tty
@z

@x [6]
@p program PKtype(input, output);
@y
@p program PKtype;
@z

@x [56]
@p procedure open_typ_file; {prepares to write text data to the |typ_file|}
begin rewrite(typ_file,typ_name);
end;
@#
procedure open_pk_file; {prepares the input for reading}
begin reset(pk_file,pk_name);
pk_loc := 0 ;
end;
@y
@p procedure open_typ_file; {prepares to write text data to the |typ_file|}
begin rewrite(typ_file,typ_name,'/O');
end;
@#
procedure open_pk_file; {prepares the input for reading}
begin reset(pk_file,pk_name,'/O/B:8');
pk_loc := 0 ;
end;
@z

@x [92]
@d get_line(#) == if eoln(input) then read_ln(input) ;
   i := 1 ;
   while not (eoln(input) or eof(input)) do begin
      #[i] := input^ ;
      incr(i) ;
      get(input) ;
   end ;
   #[i] := ' '
@y
@d get_line(#) == if eoln(tty) then read_ln(tty) ;
   i := 1 ;
   while not (eoln(tty) or eof(tty)) do begin
      #[i] := tty^ ;
      incr(i) ;
      get(tty) ;
   end ;
   #[i] := ' '
@z