aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-01-18 20:33:32 +0100
committerTristan Gingold <tgingold@free.fr>2018-01-18 20:33:32 +0100
commit5aa171218d080bfbdfe28f68bf4ca82a4003896f (patch)
tree5ac1e0d670659bf2e93778a7586b5558e02a06eb
parent6e45f40a47afe5fd25254d3730a6f73256879a17 (diff)
downloadghdl-5aa171218d080bfbdfe28f68bf4ca82a4003896f.tar.gz
ghdl-5aa171218d080bfbdfe28f68bf4ca82a4003896f.tar.bz2
ghdl-5aa171218d080bfbdfe28f68bf4ca82a4003896f.zip
ghdldrv: remove most usages of Nam_Buffer.
-rw-r--r--src/ghdldrv/ghdldrv.adb13
-rw-r--r--src/ghdldrv/ghdllocal.adb9
-rw-r--r--src/ghdldrv/ghdlprint.adb21
3 files changed, 15 insertions, 28 deletions
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
index 2d3342b1b..5fe3912c0 100644
--- a/src/ghdldrv/ghdldrv.adb
+++ b/src/ghdldrv/ghdldrv.adb
@@ -1497,18 +1497,16 @@ package body Ghdldrv is
New_Line;
-- Put (" file: ");
-- File := Get_Design_File (Unit);
--- Image (Get_Design_File_Filename (File));
--- Put_Line (Nam_Buffer (1 .. Nam_Length));
+-- Put_Line (Image (Get_Design_File_Filename (File)));
end loop;
end if;
if Cmd.Flag_Depend_Unit then
Put_Line ("File analysis order:");
Files_It := List_Iterate (Files_List);
while Is_Valid (Files_It) loop
- File := Get_Element (Files_It);
- Image (Get_Design_File_Filename (File));
Put (" ");
- Put (Nam_Buffer (1 .. Nam_Length));
+ File := Get_Element (Files_It);
+ Put (Image (Get_Design_File_Filename (File)));
if Flag_Verbose then
Put_Line (":");
declare
@@ -1519,10 +1517,9 @@ package body Ghdldrv is
begin
Dep_It := List_Iterate_Safe (Dep_List);
while Is_Valid (Dep_It) loop
- Dep_File := Get_Element (Dep_It);
- Image (Get_Design_File_Filename (Dep_File));
Put (" ");
- Put_Line (Nam_Buffer (1 .. Nam_Length));
+ Dep_File := Get_Element (Dep_It);
+ Put_Line (Image (Get_Design_File_Filename (Dep_File)));
Next (Dep_It);
end loop;
end;
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index 52777ff26..2a231d693 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -461,18 +461,15 @@ package body Ghdllocal is
Put ("???");
return;
end case;
- Image (Id);
- Put (Nam_Buffer (1 .. Nam_Length));
+ Put (Image (Id));
case Get_Kind (Unit) is
when Iir_Kind_Architecture_Body =>
Put (" of ");
- Image (Get_Entity_Identifier_Of_Architecture (Unit));
- Put (Nam_Buffer (1 .. Nam_Length));
+ Put (Image (Get_Entity_Identifier_Of_Architecture (Unit)));
when Iir_Kind_Configuration_Declaration =>
if Id = Null_Identifier then
Put ("<default> of entity ");
- Image (Get_Entity_Identifier_Of_Architecture (Unit));
- Put (Nam_Buffer (1 .. Nam_Length));
+ Put (Image (Get_Entity_Identifier_Of_Architecture (Unit)));
end if;
when others =>
null;
diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb
index 0ace5ae50..5f13e39c3 100644
--- a/src/ghdldrv/ghdlprint.adb
+++ b/src/ghdldrv/ghdlprint.adb
@@ -612,18 +612,14 @@ package body Ghdlprint is
| Iir_Kind_Entity_Declaration
| Iir_Kind_Package_Declaration
| Iir_Kind_Package_Instantiation_Declaration =>
- Image (Id);
- Append (Nam_Buffer (1 .. Nam_Length));
+ Append (Image (Id));
when Iir_Kind_Package_Body =>
- Image (Id);
- Append (Nam_Buffer (1 .. Nam_Length));
+ Append (Image (Id));
Append ("-body");
when Iir_Kind_Architecture_Body =>
- Image (Get_Entity_Identifier_Of_Architecture (Lib));
- Append (Nam_Buffer (1 .. Nam_Length));
+ Append (Image (Get_Entity_Identifier_Of_Architecture (Lib)));
Append ("-");
- Image (Id);
- Append (Nam_Buffer (1 .. Nam_Length));
+ Append (Image (Id));
when others =>
raise Internal_Error;
end case;
@@ -1652,11 +1648,9 @@ package body Ghdlprint is
Put ("XFILE: ");
Dir := Get_Source_File_Directory (Cur_File);
if Dir /= Null_Identifier then
- Image (Dir);
- Put (Nam_Buffer (1 .. Nam_Length));
+ Put (Image (Dir));
end if;
- Image (Get_File_Name (Cur_File));
- Put (Nam_Buffer (1 .. Nam_Length));
+ Put (Image (Get_File_Name (Cur_File)));
New_Line;
end if;
@@ -1718,8 +1712,7 @@ package body Ghdlprint is
| Iir_Kind_Procedure_Body =>
null;
when others =>
- Image (Get_Identifier (N));
- Put (Nam_Buffer (1 .. Nam_Length));
+ Put (Image (Get_Identifier (N)));
end case;
end Emit_Decl;