aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-12-31 06:35:55 +0100
committerTristan Gingold <tgingold@free.fr>2014-12-31 06:35:55 +0100
commit032a613b864bd0ff4c632cfb8541203abf1f4e59 (patch)
tree485963e7bf92b8e8c3497721c3d1295a53e949f4 /src/ghdldrv
parentdfff5cae5a4b336ba0cf797f4122cfcace474736 (diff)
downloadghdl-032a613b864bd0ff4c632cfb8541203abf1f4e59.tar.gz
ghdl-032a613b864bd0ff4c632cfb8541203abf1f4e59.tar.bz2
ghdl-032a613b864bd0ff4c632cfb8541203abf1f4e59.zip
Rename name_table.name_buffer and name_length to avoid clash.
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdllocal.adb46
-rw-r--r--src/ghdldrv/ghdlprint.adb14
-rw-r--r--src/ghdldrv/ghdlrun.adb4
3 files changed, 32 insertions, 32 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index 91bdfacf4..6b2a53e7c 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -494,17 +494,17 @@ package body Ghdllocal is
return;
end case;
Image (Id);
- Put (Name_Buffer (1 .. Name_Length));
+ Put (Nam_Buffer (1 .. Nam_Length));
case Get_Kind (Unit) is
when Iir_Kind_Architecture_Body =>
Put (" of ");
Image (Get_Entity_Identifier_Of_Architecture (Unit));
- Put (Name_Buffer (1 .. Name_Length));
+ Put (Nam_Buffer (1 .. Nam_Length));
when Iir_Kind_Configuration_Declaration =>
if Id = Null_Identifier then
Put ("<default> of entity ");
Image (Get_Entity_Identifier_Of_Architecture (Unit));
- Put (Name_Buffer (1 .. Name_Length));
+ Put (Nam_Buffer (1 .. Nam_Length));
end if;
when others =>
null;
@@ -565,12 +565,12 @@ package body Ghdllocal is
Basename : constant String := Get_Base_Name (File);
begin
Image (Libraries.Work_Directory);
- Name_Buffer (Name_Length + 1 .. Name_Length + Basename'Length) :=
+ Nam_Buffer (Nam_Length + 1 .. Nam_Length + Basename'Length) :=
Basename;
- Name_Length := Name_Length + Basename'Length;
- Name_Buffer (Name_Length + 1 .. Name_Length + Suffix'Length) := Suffix;
- Name_Length := Name_Length + Suffix'Length;
- return new String'(Name_Buffer (1 .. Name_Length));
+ Nam_Length := Nam_Length + Basename'Length;
+ Nam_Buffer (Nam_Length + 1 .. Nam_Length + Suffix'Length) := Suffix;
+ Nam_Length := Nam_Length + Suffix'Length;
+ return new String'(Nam_Buffer (1 .. Nam_Length));
end Append_Suffix;
@@ -1449,18 +1449,18 @@ package body Ghdllocal is
function Is_Bad_Unit_Name return Boolean is
begin
- if Name_Length = 0 then
+ if Nam_Length = 0 then
return True;
end if;
-- Don't try to handle extended identifier.
- if Name_Buffer (1) = '\' then
+ if Nam_Buffer (1) = '\' then
return False;
end if;
-- Look for suspicious characters.
-- Do not try to be exhaustive as the correct check will be done
-- by convert_identifier.
- for I in 1 .. Name_Length loop
- case Name_Buffer (I) is
+ for I in 1 .. Nam_Length loop
+ case Nam_Buffer (I) is
when '.' | '/' | '\' =>
return True;
when others =>
@@ -1473,26 +1473,26 @@ package body Ghdllocal is
function Is_A_File_Name return Boolean is
begin
-- Check .vhd
- if Name_Length > 4
- and then Name_Buffer (Name_Length - 3 .. Name_Length) = ".vhd"
+ if Nam_Length > 4
+ and then Nam_Buffer (Nam_Length - 3 .. Nam_Length) = ".vhd"
then
return True;
end if;
-- Check .vhdl
- if Name_Length > 5
- and then Name_Buffer (Name_Length - 4 .. Name_Length) = ".vhdl"
+ if Nam_Length > 5
+ and then Nam_Buffer (Nam_Length - 4 .. Nam_Length) = ".vhdl"
then
return True;
end if;
-- Check ../
- if Name_Length > 3
- and then Name_Buffer (1 .. 3) = "../"
+ if Nam_Length > 3
+ and then Nam_Buffer (1 .. 3) = "../"
then
return True;
end if;
-- Check ..\
- if Name_Length > 3
- and then Name_Buffer (1 .. 3) = "..\"
+ if Nam_Length > 3
+ and then Nam_Buffer (1 .. 3) = "..\"
then
return True;
end if;
@@ -1500,8 +1500,8 @@ package body Ghdllocal is
return False;
end Is_A_File_Name;
begin
- Name_Length := Name'Length;
- Name_Buffer (1 .. Name_Length) := Name.all;
+ Nam_Length := Name'Length;
+ Nam_Buffer (1 .. Nam_Length) := Name.all;
-- Try to identifier bad names (such as file names), so that
-- friendly message can be displayed.
@@ -1514,7 +1514,7 @@ package body Ghdllocal is
raise Option_Error;
end if;
Scanner.Convert_Identifier;
- return new String'(Name_Buffer (1 .. Name_Length));
+ return new String'(Nam_Buffer (1 .. Nam_Length));
end Convert_Name;
procedure Extract_Elab_Unit
diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb
index d4e0f5f8a..7917f7f88 100644
--- a/src/ghdldrv/ghdlprint.adb
+++ b/src/ghdldrv/ghdlprint.adb
@@ -602,17 +602,17 @@ package body Ghdlprint is
| Iir_Kind_Package_Declaration
| Iir_Kind_Package_Instantiation_Declaration =>
Image (Id);
- Append (Name_Buffer (1 .. Name_Length));
+ Append (Nam_Buffer (1 .. Nam_Length));
when Iir_Kind_Package_Body =>
Image (Id);
- Append (Name_Buffer (1 .. Name_Length));
+ Append (Nam_Buffer (1 .. Nam_Length));
Append ("-body");
when Iir_Kind_Architecture_Body =>
Image (Get_Entity_Identifier_Of_Architecture (Lib));
- Append (Name_Buffer (1 .. Name_Length));
+ Append (Nam_Buffer (1 .. Nam_Length));
Append ("-");
Image (Id);
- Append (Name_Buffer (1 .. Name_Length));
+ Append (Nam_Buffer (1 .. Nam_Length));
when others =>
raise Internal_Error;
end case;
@@ -1631,10 +1631,10 @@ package body Ghdlprint is
Dir := Get_Source_File_Directory (Cur_File);
if Dir /= Null_Identifier then
Image (Dir);
- Put (Name_Buffer (1 .. Name_Length));
+ Put (Nam_Buffer (1 .. Nam_Length));
end if;
Image (Get_File_Name (Cur_File));
- Put (Name_Buffer (1 .. Name_Length));
+ Put (Nam_Buffer (1 .. Nam_Length));
New_Line;
end if;
@@ -1696,7 +1696,7 @@ package body Ghdlprint is
null;
when others =>
Image (Get_Identifier (N));
- Put (Name_Buffer (1 .. Name_Length));
+ Put (Nam_Buffer (1 .. Nam_Length));
end case;
end Emit_Decl;
diff --git a/src/ghdldrv/ghdlrun.adb b/src/ghdldrv/ghdlrun.adb
index 4647e6c2e..d927b4d16 100644
--- a/src/ghdldrv/ghdlrun.adb
+++ b/src/ghdldrv/ghdlrun.adb
@@ -166,7 +166,7 @@ package body Ghdlrun is
when Foreign_Vhpidirect =>
declare
Name : constant String :=
- Name_Table.Name_Buffer (Info.Subprg_First
+ Name_Table.Nam_Buffer (Info.Subprg_First
.. Info.Subprg_Last);
begin
Res := Foreigns.Find_Foreign (Name);
@@ -181,7 +181,7 @@ package body Ghdlrun is
Name_Table.Image (Get_Identifier (Decl));
declare
Name : constant String :=
- Name_Table.Name_Buffer (1 .. Name_Table.Name_Length);
+ Name_Table.Nam_Buffer (1 .. Name_Table.Nam_Length);
begin
if Name = "untruncated_text_read" then
Def (Ortho, Grt.Files.Ghdl_Untruncated_Text_Read'Address);