diff options
author | tgingold <tgingold@users.noreply.github.com> | 2016-08-03 21:22:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-03 21:22:00 +0200 |
commit | ffc92a8cd7e71cc8c87be28580bd2fe0fbda0095 (patch) | |
tree | 9a9a47915bdab9b2612ccd13f31ad4573ae11001 /src | |
parent | 2a59efdd6dfbebd18394d76a13fc8f90e2f49f32 (diff) | |
parent | 5906b80a3c2f21f8b717cb92bd18958aa7be3871 (diff) | |
download | ghdl-ffc92a8cd7e71cc8c87be28580bd2fe0fbda0095.tar.gz ghdl-ffc92a8cd7e71cc8c87be28580bd2fe0fbda0095.tar.bz2 ghdl-ffc92a8cd7e71cc8c87be28580bd2fe0fbda0095.zip |
Merge pull request #131 from Jonsba/jonsba/signals_selection
Jonsba/signals selection
Diffstat (limited to 'src')
-rw-r--r-- | src/grt/grt-options.adb | 8 | ||||
-rw-r--r-- | src/grt/grt-wave_opt_file-parse.adb | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/grt/grt-options.adb b/src/grt/grt-options.adb index 31bd3b45c..6c3f333d3 100644 --- a/src/grt/grt-options.adb +++ b/src/grt/grt-options.adb @@ -165,6 +165,7 @@ package body Grt.Options is P (" --no-run do not simulate, only elaborate"); P (" --unbuffered disable buffering on stdout, stderr and"); P (" files opened in write or append mode (TEXTIO)."); + P (" --wave-opt-file=FILENAME read a wave option file"); -- P (" --threads=N use N threads for simulation"); P ("Additional features:"); P (" --has-feature=X test presence of feature X"); @@ -481,14 +482,13 @@ package body Grt.Options is end if; Last_Generic_Override := Over; end; - elsif Option'Length >= 19 - and then Option (1 .. 19) = "--wave-option-file=" - then - Wave_Opt_File.Parse.Start (Option (20 .. Option'Last)); elsif Option = "--unbuffered" then Unbuffered_Writes := True; setbuf (stdout, NULL_voids); setbuf (stderr, NULL_voids); + elsif Option'Length >= 16 and then Option (1 .. 16) = "--wave-opt-file=" + then + Wave_Opt_File.Parse.Start (Option (17 .. Option'Last)); elsif not Grt.Hooks.Call_Option_Hooks (Option) then Error_C ("unknown option '"); Error_C (Option); diff --git a/src/grt/grt-wave_opt_file-parse.adb b/src/grt/grt-wave_opt_file-parse.adb index 18d29fe37..7c6537b4f 100644 --- a/src/grt/grt-wave_opt_file-parse.adb +++ b/src/grt/grt-wave_opt_file-parse.adb @@ -330,11 +330,14 @@ package body Grt.Wave_Opt_File.Parse is is Mode : constant String := "rt" & ASCII.Nul; Stream : FILEs; + Option_File_C : String (1 .. Option_File'Length + 1); begin - Stream := fopen (Option_File'Address, Mode'Address); + Option_File_C (1 .. Option_File'Length) := Option_File; + Option_File_C (Option_File_C'Last) := ASCII.Nul; + Stream := fopen (Option_File_C'Address, Mode'Address); if Stream = NULL_Stream then Error_C ("cannot open '"); - Error_C (Option_File (Option_File'First .. Option_File'Last - 1)); + Error_C (Option_File); Error_E ("'"); end if; return Stream; |