aboutsummaryrefslogtreecommitdiffstats
path: root/src/files_map-editor.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-06 19:25:48 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-06 19:25:48 +0100
commit3a49c7ff29374c6f085e2d9dc46b200afbfc9a2c (patch)
treece3a3827b3a75f9a4114323c7f9dfc9e8d004204 /src/files_map-editor.ads
parente1696a45ccf414f0c22d64176a71f8f64472a1d6 (diff)
downloadghdl-3a49c7ff29374c6f085e2d9dc46b200afbfc9a2c.tar.gz
ghdl-3a49c7ff29374c6f085e2d9dc46b200afbfc9a2c.tar.bz2
ghdl-3a49c7ff29374c6f085e2d9dc46b200afbfc9a2c.zip
files_map-editor: turn Replace_Text to a function.
Diffstat (limited to 'src/files_map-editor.ads')
-rw-r--r--src/files_map-editor.ads29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/files_map-editor.ads b/src/files_map-editor.ads
index a2e3175e1..d45e83c45 100644
--- a/src/files_map-editor.ads
+++ b/src/files_map-editor.ads
@@ -17,20 +17,23 @@
-- 02111-1307, USA.
package Files_Map.Editor is
- procedure Replace_Text (File : Source_File_Entry;
- Start_Line : Positive;
- Start_Off : Natural;
- End_Line : Positive;
- End_Off : Natural;
- Text : File_Buffer);
+ -- Replace [START; END) by TEXT. Return True in case of success, False
+ -- in case of failure (the gap is too small).
+ function Replace_Text (File : Source_File_Entry;
+ Start_Line : Positive;
+ Start_Off : Natural;
+ End_Line : Positive;
+ End_Off : Natural;
+ Text : File_Buffer) return Boolean;
- procedure Replace_Text_Ptr (File : Source_File_Entry;
- Start_Line : Positive;
- Start_Off : Natural;
- End_Line : Positive;
- End_Off : Natural;
- Text_Ptr : File_Buffer_Ptr;
- Text_Len : Source_Ptr);
+ -- Likewise, but with pointer + length string.
+ function Replace_Text_Ptr (File : Source_File_Entry;
+ Start_Line : Positive;
+ Start_Off : Natural;
+ End_Line : Positive;
+ End_Off : Natural;
+ Text_Ptr : File_Buffer_Ptr;
+ Text_Len : Source_Ptr) return Boolean;
-- Replace the content of FILE with TEXT.
procedure Fill_Text_Ptr (File : Source_File_Entry;