BSD 4_3 release
[unix-history] / usr / src / ucb / pascal / utilities / pxref.p
index dbf71af..f3a6325 100644 (file)
@@ -1,9 +1,16 @@
+(*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)pxref.p     5.4 (Berkeley) 6/21/85
+ *)
+
 {$t-,p-,b2,w+}
 program xref(input, output);
 label
     99, 100;
 const
 {$t-,p-,b2,w+}
 program xref(input, output);
 label
     99, 100;
 const
-    { sccsid = '@(#)pxref.p    1.2 (Berkeley) 3/5/82'; }
     alfasize = 18;
     linesize = 10;
     namesize = 64;
     alfasize = 18;
     linesize = 10;
     namesize = 64;
@@ -165,19 +172,15 @@ var
     inp :file of char;
     
     procedure lwriteln;
     inp :file of char;
     
     procedure lwriteln;
-    var
-       i :linptr;
     begin
        if list then begin
     begin
        if list then begin
-           { actually should use ...
-           for i:=1 to lineptr do
-               write(line[i]);
-           }
-           line[lineptr+1]:=chr(0);
-           writeln(line);
+           { write sans trailing blanks }
+           if lineptr > 0 then
+               writeln(line: lineptr)
+           else
+               writeln;
        end;
        get(inp);
        end;
        get(inp);
-       line:=blanks;
        lineptr:=0
     end { lwriteln };
 
        lineptr:=0
     end { lwriteln };