procedure lwriteln; removed trailing blanks from output.
authorPaul M. Aoki <aoki@ucbvax.Berkeley.EDU>
Thu, 29 Dec 1983 03:34:00 +0000 (19:34 -0800)
committerPaul M. Aoki <aoki@ucbvax.Berkeley.EDU>
Thu, 29 Dec 1983 03:34:00 +0000 (19:34 -0800)
SCCS-vsn: usr.bin/pascal/pxref/pxref.p 1.3

usr/src/usr.bin/pascal/pxref/pxref.p

index 4a185f7..3364520 100644 (file)
@@ -165,19 +165,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 };