@@ -7,7 +7,7 @@ module fpm_filesystem
77 OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_WINDOWS, &
88 OS_CYGWIN, OS_SOLARIS, OS_FREEBSD, OS_OPENBSD
99 use fpm_environment, only: separator, get_env, os_is_unix
10- use fpm_strings, only: f_string, replace, string_t, split, split_first_last , dilate, str_begins_with_str
10+ use fpm_strings, only: f_string, replace, string_t, split, split_lines_first_last , dilate, str_begins_with_str
1111 use iso_c_binding, only: c_char, c_ptr, c_int, c_null_char, c_associated, c_f_pointer
1212 use fpm_error, only : fpm_stop, error_t, fatal_error
1313 implicit none
@@ -51,10 +51,6 @@ end function c_is_dir
5151 end interface
5252#endif
5353
54- character , parameter :: CR = achar (13 )
55- character , parameter :: LF = new_line(' A' )
56- character (* ), parameter :: eol = CR// LF
57-
5854contains
5955
6056! > Extract filename from path with/without suffix
@@ -321,7 +317,7 @@ function read_lines_expanded(filename) result(lines)
321317 return
322318 end if
323319
324- call split_first_last (content, eol, first, last) ! TODO: \r (< macOS X), \n (>=macOS X/Linux/Unix), \r\n (Windows)
320+ call split_lines_first_last (content, first, last)
325321
326322 ! allocate lines from file content string
327323 allocate (lines(size (first)))
@@ -346,7 +342,7 @@ function read_lines(filename) result(lines)
346342 return
347343 end if
348344
349- call split_first_last (content, eol, first, last) ! TODO: \r (< macOS X), \n (>=macOS X/Linux/Unix), \r\n (Windows)
345+ call split_lines_first_last (content, first, last)
350346
351347 ! allocate lines from file content string
352348 allocate (lines(size (first)))
0 commit comments