@@ -7,7 +7,7 @@ module fpm_filesystem
7
7
OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_WINDOWS, &
8
8
OS_CYGWIN, OS_SOLARIS, OS_FREEBSD, OS_OPENBSD
9
9
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
11
11
use iso_c_binding, only: c_char, c_ptr, c_int, c_null_char, c_associated, c_f_pointer
12
12
use fpm_error, only : fpm_stop, error_t, fatal_error
13
13
implicit none
@@ -51,10 +51,6 @@ end function c_is_dir
51
51
end interface
52
52
#endif
53
53
54
- character , parameter :: CR = achar (13 )
55
- character , parameter :: LF = new_line(' A' )
56
- character (* ), parameter :: eol = CR// LF
57
-
58
54
contains
59
55
60
56
! > Extract filename from path with/without suffix
@@ -321,7 +317,7 @@ function read_lines_expanded(filename) result(lines)
321
317
return
322
318
end if
323
319
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)
325
321
326
322
! allocate lines from file content string
327
323
allocate (lines(size (first)))
@@ -346,7 +342,7 @@ function read_lines(filename) result(lines)
346
342
return
347
343
end if
348
344
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)
350
346
351
347
! allocate lines from file content string
352
348
allocate (lines(size (first)))
0 commit comments