diff options
author | LKedward <laurence.kedward@bristol.ac.uk> | 2020-09-07 15:47:29 +0100 |
---|---|---|
committer | LKedward <laurence.kedward@bristol.ac.uk> | 2020-09-07 15:47:29 +0100 |
commit | 9bd9d3ff3b87fa28c7c731a977a934c88cb55503 (patch) | |
tree | b2700ea5c4c37bb526d91fb2603e83a88a1322a5 | |
parent | 35ae709c0fed91d40422942eb3b3d8003828ebe9 (diff) | |
download | fpm-9bd9d3ff3b87fa28c7c731a977a934c88cb55503.tar.gz fpm-9bd9d3ff3b87fa28c7c731a977a934c88cb55503.zip |
Fix: more trimming of split string output.
-rw-r--r-- | fpm/src/fpm_sources.f90 | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fpm/src/fpm_sources.f90 b/fpm/src/fpm_sources.f90 index fb6e57a..67d6fc5 100644 --- a/fpm/src/fpm_sources.f90 +++ b/fpm/src/fpm_sources.f90 @@ -236,7 +236,7 @@ function parse_f_source(f_filename) result(f_source) if (index(file_lines(i)%s,'::') > 0) then call split(file_lines(i)%s,line_parts,delimiters=':') - temp_string = line_parts(2) + temp_string = trim(line_parts(2)) call split(temp_string,line_parts,delimiters=' ,') mod_name = trim(lower(line_parts(1))) @@ -273,7 +273,7 @@ function parse_f_source(f_filename) result(f_source) if (pass == 2) then call split(file_lines(i)%s,line_parts,delimiters="'"//'"') - f_source%include_dependencies(n_include)%s = line_parts(2) + f_source%include_dependencies(n_include)%s = trim(line_parts(2)) end if end if @@ -322,12 +322,10 @@ function parse_f_source(f_filename) result(f_source) end if - ! Extract name of program if is program + ! Detect if is program if (f_source%unit_type == FPM_UNIT_UNKNOWN .and. & index(adjustl(lower(file_lines(i)%s)),'program') == 1) then - call split(file_lines(i)%s,line_parts,delimiters=' ') - f_source%unit_type = FPM_UNIT_PROGRAM end if @@ -433,7 +431,7 @@ function parse_c_source(c_filename) result(c_source) if (pass == 2) then call split(file_lines(i)%s,line_parts,delimiters='"') - c_source%include_dependencies(n_include)%s = line_parts(2) + c_source%include_dependencies(n_include)%s = trim(line_parts(2)) end if end if |