aboutsummaryrefslogtreecommitdiff
path: root/src/fpm_filesystem.f90
diff options
context:
space:
mode:
authorJohn S. Urban <urbanjost@comcast.net>2021-07-09 15:05:04 -0400
committerJohn S. Urban <urbanjost@comcast.net>2021-07-09 15:05:04 -0400
commit9aae783e6877a8648d93a1e7b95459e6967f8c6b (patch)
tree88a9c2f68f8897ae7aeb0e626ccc4fe74fc6a861 /src/fpm_filesystem.f90
parent5617e65751193afb3c88fbc6cb8a32822ff52ffa (diff)
downloadfpm-9aae783e6877a8648d93a1e7b95459e6967f8c6b.tar.gz
fpm-9aae783e6877a8648d93a1e7b95459e6967f8c6b.zip
check name used for package, executable, test, or example
Diffstat (limited to 'src/fpm_filesystem.f90')
-rw-r--r--src/fpm_filesystem.f9018
1 files changed, 3 insertions, 15 deletions
diff --git a/src/fpm_filesystem.f90 b/src/fpm_filesystem.f90
index e6226b4..8f61f96 100644
--- a/src/fpm_filesystem.f90
+++ b/src/fpm_filesystem.f90
@@ -10,7 +10,7 @@ use,intrinsic :: iso_fortran_env, only : stdin=>input_unit, stdout=>output_unit,
implicit none
private
public :: basename, canon_path, dirname, is_dir, join_path, number_of_rows, read_lines, list_files, env_variable, &
- mkdir, exists, get_temp_filename, windows_path, unix_path, getline, delete_file, to_fortran_name
+ mkdir, exists, get_temp_filename, windows_path, unix_path, getline, delete_file
public :: fileopen, fileclose, filewrite, warnwrite, parent_dir
public :: which
@@ -306,8 +306,7 @@ subroutine mkdir(dir)
end select
if (stat /= 0) then
- print *, 'execute_command_line() failed'
- error stop
+ stop 'execute_command_line() failed'
end if
end subroutine mkdir
@@ -344,8 +343,7 @@ recursive subroutine list_files(dir, files, recurse)
end select
if (stat /= 0) then
- print *, 'execute_command_line() failed'
- error stop
+ stop 'execute_command_line() failed'
end if
open (newunit=fh, file=temp_file, status='old')
@@ -612,16 +610,6 @@ character(len=256) :: message
end subroutine filewrite
-!> Returns string with special characters replaced with an underscore.
-!! For now, only a hyphen is treated as a special character, but this can be
-!! expanded to other characters if needed.
-pure function to_fortran_name(string) result(res)
- character(*), intent(in) :: string
- character(len(string)) :: res
- character, parameter :: SPECIAL_CHARACTERS(*) = ['-']
- res = replace(string, SPECIAL_CHARACTERS, '_')
-end function to_fortran_name
-
function which(command) result(pathname)
!>
!!##NAME