Skip to content

Commit

Permalink
change syntax for ifx fix
Browse files Browse the repository at this point in the history
  • Loading branch information
perazz committed Dec 26, 2024
1 parent eb77455 commit 74b6ebe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/stdlib_system.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module stdlib_system
!! - `process_open_cmd`: Opens a process using a command string.
!! - `process_open_args`: Opens a process using an array of arguments.
!!
module type(process_type) function process_open_cmd(cmd, wait, stdin, want_stdout, want_stderr) result(process)
module function process_open_cmd(cmd, wait, stdin, want_stdout, want_stderr) result(process)
!> The command line string to execute.
character(*), intent(in) :: cmd
!> Optional input sent to the process via standard input (stdin).
Expand All @@ -88,9 +88,11 @@ module type(process_type) function process_open_cmd(cmd, wait, stdin, want_stdou
logical, optional, intent(in) :: want_stdout
!> Whether to collect standard error output.
logical, optional, intent(in) :: want_stderr
!> The output process handler.
type(process_type) :: process
end function process_open_cmd

module type(process_type) function process_open_args(args, wait, stdin, want_stdout, want_stderr) result(process)
module function process_open_args(args, wait, stdin, want_stdout, want_stderr) result(process)
!> List of arguments for the process to execute.
character(*), intent(in) :: args(:)
!> Optional input sent to the process via standard input (stdin).
Expand All @@ -101,6 +103,8 @@ module type(process_type) function process_open_args(args, wait, stdin, want_std
logical, optional, intent(in) :: want_stdout
!> Whether to collect standard error output.
logical, optional, intent(in) :: want_stderr
!> The output process handler.
type(process_type) :: process
end function process_open_args
end interface run

Expand Down
8 changes: 6 additions & 2 deletions src/stdlib_system_subprocess.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module subroutine sleep(millisec)
end subroutine sleep

!> Open a new process
module type(process_type) function process_open_cmd(cmd,wait,stdin,want_stdout,want_stderr) result(process)
module function process_open_cmd(cmd,wait,stdin,want_stdout,want_stderr) result(process)
!> The command and arguments
character(*), intent(in) :: cmd
!> Optional character input to be sent to the process via pipe
Expand All @@ -91,13 +91,15 @@ module type(process_type) function process_open_cmd(cmd,wait,stdin,want_stdout,w
logical, optional, intent(in) :: wait
!> Require collecting output
logical, optional, intent(in) :: want_stdout, want_stderr
!> The output process handler
type(process_type) :: process

process = process_open_args([cmd],wait,stdin,want_stdout,want_stderr)

end function process_open_cmd

!> Open a new process
module type(process_type) function process_open_args(args,wait,stdin,want_stdout,want_stderr) result(process)
module function process_open_args(args,wait,stdin,want_stdout,want_stderr) result(process)
!> The command and arguments
character(*), intent(in) :: args(:)
!> Optional character input to be sent to the process via pipe
Expand All @@ -106,6 +108,8 @@ module type(process_type) function process_open_args(args,wait,stdin,want_stdout
logical, optional, intent(in) :: wait
!> Require collecting output
logical, optional, intent(in) :: want_stdout, want_stderr
!> The output process handler
type(process_type) :: process

real(RTICKS) :: count_rate
logical :: asynchronous, collect_stdout, collect_stderr, has_stdin
Expand Down

0 comments on commit 74b6ebe

Please sign in to comment.