mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-31 21:57:12 +00:00
141cc629a2
distributed systems in Ada. PR: ports/18374 Submitted by: Samuel Tardieu <sam@inf.enst.fr>
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
--- Garlic/split.adb.orig Wed May 3 19:43:33 2000
|
|
+++ Garlic/split.adb Wed May 3 19:45:24 2000
|
|
@@ -38,8 +38,20 @@
|
|
|
|
procedure Split is
|
|
|
|
- Column : Natural := 0;
|
|
- Max_Column : constant := 50;
|
|
+ Column : Natural := 0;
|
|
+ Max_Column : constant := 65;
|
|
+ Hard_Max_Column : constant := 78;
|
|
+ Was_Space : Boolean := False;
|
|
+
|
|
+ procedure Print_Space_Maybe;
|
|
+
|
|
+ procedure Print_Space_Maybe is
|
|
+ begin
|
|
+ if Was_Space and then Column /= 0 then
|
|
+ Put (' ');
|
|
+ Was_Space := False;
|
|
+ end if;
|
|
+ end Print_Space_Maybe;
|
|
|
|
begin
|
|
if Argument_Count /= 1 then
|
|
@@ -50,9 +62,20 @@
|
|
if Argument (1) (I) = ' ' and then Column >= Max_Column then
|
|
New_Line;
|
|
Column := 0;
|
|
+ elsif Argument (1) (I) = ' ' and then Column = 0 then
|
|
+ null;
|
|
+ elsif Column >= Hard_Max_Column then
|
|
+ New_Line;
|
|
+ Put ("-- " & Argument (1) (I));
|
|
+ Column := 5;
|
|
+ elsif Argument (1) (I) = ' ' then
|
|
+ Was_Space := True;
|
|
else
|
|
if Column = 0 then
|
|
Put ("-- ");
|
|
+ Column := 4;
|
|
+ else
|
|
+ Print_Space_Maybe;
|
|
end if;
|
|
Put (Argument (1) (I));
|
|
Column := Column + 1;
|