Skip to content

Commit

Permalink
Reformatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Sep 23, 2024
1 parent 2a1216e commit db12638
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
39 changes: 20 additions & 19 deletions src/dm_string.f90
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ module dm_string
character(len=:), allocatable :: data
end type string_type

interface dm_to_lower
!! Alias for procedure.
module procedure :: dm_string_to_lower
end interface dm_to_lower

interface dm_to_upper
!! Alias for procedure.
module procedure :: dm_string_to_upper
end interface dm_to_upper

interface dm_lower
!! Alias for procedure.
module procedure :: dm_string_lower
Expand All @@ -35,13 +25,15 @@ module dm_string
module procedure :: dm_string_upper
end interface dm_upper

interface dm_string_to
!! Generic string to number converter.
module procedure :: string_to_int32
module procedure :: string_to_int64
module procedure :: string_to_real32
module procedure :: string_to_real64
end interface dm_string_to
interface dm_to_lower
!! Alias for procedure.
module procedure :: dm_string_to_lower
end interface dm_to_lower

interface dm_to_upper
!! Alias for procedure.
module procedure :: dm_string_to_upper
end interface dm_to_upper

interface dm_string_from
!! Generic number to string converter.
Expand All @@ -51,14 +43,23 @@ module dm_string
module procedure :: string_from_real64
end interface dm_string_from

interface dm_string_to
!! Generic string to number converter.
module procedure :: string_to_int32
module procedure :: string_to_int64
module procedure :: string_to_real32
module procedure :: string_to_real64
end interface dm_string_to

! Public procedures.
public :: dm_lower
public :: dm_upper

public :: dm_to_lower
public :: dm_to_upper
public :: dm_upper

public :: dm_string_to
public :: dm_string_from
public :: dm_string_to

public :: dm_string_count_char
public :: dm_string_count_lines
Expand Down
6 changes: 3 additions & 3 deletions src/dm_sync.f90
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ pure elemental integer function dm_sync_type_from_name(name) result(type)
!! Returns synchonisation type from given name.
character(len=*), intent(in) :: name !! Sync type name.

character(len=SYNC_TYPE_NAME_LEN) :: n
character(len=SYNC_TYPE_NAME_LEN) :: name_

! Normalise name.
n = dm_to_lower(name)
name_ = dm_to_lower(name)

select case (n)
select case (name_)
case (SYNC_TYPE_NAMES(SYNC_TYPE_NODE))
type = SYNC_TYPE_NODE
case (SYNC_TYPE_NAMES(SYNC_TYPE_SENSOR))
Expand Down

0 comments on commit db12638

Please sign in to comment.