aboutsummaryrefslogtreecommitdiff
path: root/src/change_vectors.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/change_vectors.ads')
-rw-r--r--src/change_vectors.ads44
1 files changed, 20 insertions, 24 deletions
diff --git a/src/change_vectors.ads b/src/change_vectors.ads
index e325821..86048a9 100644
--- a/src/change_vectors.ads
+++ b/src/change_vectors.ads
@@ -19,58 +19,53 @@ package Change_Vectors is
type Change_Vector is tagged private;
-
- type Change is
- record
- Action : FLTK.Text_Buffers.Modification;
- Place : FLTK.Text_Buffers.Position;
- Length : Natural;
- Text : Unbounded_String;
- end record;
+ type Change is record
+ Action : FLTK.Text_Buffers.Modification;
+ Place : FLTK.Text_Buffers.Position;
+ Length : Natural;
+ Text : Unbounded_String;
+ end record;
Empty_Vector : constant Change_Vector;
+
+
procedure Push
(This : in out Change_Vector;
Item : in Change);
-
function Pop
(This : in out Change_Vector)
return Boolean;
-
procedure Pop
(This : in out Change_Vector);
-
function Peek
(This : in Change_Vector;
Item : out Change)
return Boolean;
-
procedure Peek
(This : in Change_Vector;
Item : out Change);
-
function Re_Push
(This : in out Change_Vector)
return Boolean;
-
procedure Re_Push
(This : in out Change_Vector);
+
+
function At_Start
(This : in Change_Vector)
return Boolean;
-
function At_End
(This : in Change_Vector)
return Boolean;
@@ -80,21 +75,22 @@ private
package Internal_Vectors is new Ada.Containers.Vectors
- (Index_Type => Positive, Element_Type => Change);
+ (Index_Type => Positive,
+ Element_Type => Change);
- type Change_Vector is tagged
- record
- Near, Far : Natural;
- List : Internal_Vectors.Vector;
- end record;
+ type Change_Vector is tagged record
+ Near, Far : Natural;
+ List : Internal_Vectors.Vector;
+ end record;
Empty_Vector : constant Change_Vector :=
- (Near => 0,
- Far => 0,
- List => Internal_Vectors.Empty_Vector);
+ (Near => 0,
+ Far => 0,
+ List => Internal_Vectors.Empty_Vector);
end Change_Vectors;
+