Skip to content

Commit

Permalink
replace CR/LF with space
Browse files Browse the repository at this point in the history
  • Loading branch information
zoziha committed Sep 1, 2023
1 parent ea84821 commit 3a0abd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fpm_filesystem.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!!
module fpm_filesystem
use,intrinsic :: iso_fortran_env, only : stdin=>input_unit, stdout=>output_unit, stderr=>error_unit
use,intrinsic :: iso_c_binding, only: c_new_line
use,intrinsic :: iso_c_binding, only: c_new_line, c_carriage_return
use fpm_environment, only: get_os_type, &
OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_WINDOWS, &
OS_CYGWIN, OS_SOLARIS, OS_FREEBSD, OS_OPENBSD
Expand Down Expand Up @@ -324,6 +324,8 @@ function read_lines_expanded(fh) result(lines)
if (content(i:i) == c_new_line) then
count = count + 1
idx(count + 1) = i + 1
content(i:i) = " "
if (content(i-1:i-1) == c_carriage_return) content(i-1:i-1) = " "
end if
end do

Expand Down Expand Up @@ -355,6 +357,8 @@ function read_lines(fh) result(lines)
if (content(i:i) == c_new_line) then
count = count + 1
idx(count + 1) = i + 1
content(i:i) = " "
if (content(i-1:i-1) == c_carriage_return) content(i-1:i-1) = " "
end if
end do

Expand Down

0 comments on commit 3a0abd0

Please sign in to comment.