aboutsummaryrefslogtreecommitdiffstats
path: root/src/files_map.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-10-02 20:45:43 +0200
committerTristan Gingold <tgingold@free.fr>2017-10-02 20:49:37 +0200
commit255fb07204db93a302305795c2220901cf7a883e (patch)
tree095d97ded9e57a481fb8ab93ab69b5caee3bf999 /src/files_map.ads
parentd97fd3b7db69c4268bf49b5b82fa00656020375a (diff)
downloadghdl-255fb07204db93a302305795c2220901cf7a883e.tar.gz
ghdl-255fb07204db93a302305795c2220901cf7a883e.tar.bz2
ghdl-255fb07204db93a302305795c2220901cf7a883e.zip
Add subprograms in Files_Map and Name_Table for interfacing.
Renames Fat_String_Acc to Thin_String_Ptr.
Diffstat (limited to 'src/files_map.ads')
-rw-r--r--src/files_map.ads12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/files_map.ads b/src/files_map.ads
index b3fa5b7fe..c7c5da447 100644
--- a/src/files_map.ads
+++ b/src/files_map.ads
@@ -88,6 +88,9 @@ package Files_Map is
-- Return a buffer (access to the contents of the file) for a file entry.
function Get_File_Source (File : Source_File_Entry) return File_Buffer_Acc;
+ -- Likewise but return a pointer. To be used only from non-Ada code.
+ function Get_File_Buffer (File : Source_File_Entry) return File_Buffer_Ptr;
+
-- Return the length of the file (which is the size of the file buffer).
function Get_File_Length (File : Source_File_Entry) return Source_Ptr;
@@ -129,6 +132,15 @@ package Files_Map is
procedure File_Add_Line_Number
(File : Source_File_Entry; Line : Natural; Pos : Source_Ptr);
+ -- Convert LOCATION to a source file. Return No_Source_File_Entry if
+ -- LOCATION is incorrect.
+ function Location_To_File (Location : Location_Type)
+ return Source_File_Entry;
+
+ -- Convert LOCATION and FILE to a position (offset) into the source file.
+ function Location_File_To_Pos
+ (Location : Location_Type; File : Source_File_Entry) return Source_Ptr;
+
-- Convert LOCATION into a source file FILE and an offset POS in the
-- file.
procedure Location_To_File_Pos (Location : Location_Type;