subroutinefold_regionpureprivate
pure subroutine fold_region(text, b)
Fold each line of text.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| text | character(len=*) | in | the text | |
| b | type(buffer_t) | inout | where it goes |
Calls
Source
Show the code
pure subroutine fold_region(text, b)
character(len=*), intent(in) :: text !! the text
type(buffer_t), intent(inout) :: b !! where it goes
integer :: start, e
start = 1
do while (start <= len(text))
e = end_of_line(text, start)
call fold_line(text(start:e - 1), b)
if (e <= len(text)) call add(b, NL)
start = e + 1
end do
end subroutine fold_region