Skip to content

Commit

Permalink
Reformatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Jul 14, 2024
1 parent 1667315 commit 5e87ed9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
18 changes: 9 additions & 9 deletions src/dm_geocom_api.f90
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,13 @@ pure subroutine dm_geocom_api_request_delete(request, device_type, file_type, da
character(len=*), parameter :: REQUEST_PATTERN = GRC_PATTERN // ',(?<nfiles>\d+)'
integer, parameter :: REQUEST_CODE = 23309

type(request_type), intent(out) :: request !! Prepared request.
integer, intent(in) :: device_type !! Internal memory or memory card (`GEOCOM_FTR_DEVICETYPE`).
integer, intent(in) :: file_type !! Type of file (`GEOCOM_FTR_FILETYPE`).
integer, intent(in) :: day !! Day (`DD`).
integer, intent(in) :: month !! Month (`MM`).
integer, intent(in) :: year !! Year (`YY`).
character(len=*), intent(in) :: file_name !! Name of file to delete.
type(request_type), intent(out) :: request !! Prepared request.
integer, intent(in) :: device_type !! Internal memory or memory card (`GEOCOM_FTR_DEVICETYPE`).
integer, intent(in) :: file_type !! Type of file (`GEOCOM_FTR_FILETYPE`).
integer, intent(in) :: day !! Day (`DD`).
integer, intent(in) :: month !! Month (`MM`).
integer, intent(in) :: year !! Year (`YY`).
character(len=*), intent(in) :: file_name !! Name of file to delete.

character(len=80) :: args
type(response_type) :: responses(2)
Expand Down Expand Up @@ -619,7 +619,7 @@ pure subroutine dm_geocom_api_request_download(request, block_number)

responses = [ &
response_type('grc', type=RESPONSE_TYPE_INT32), &
response_type('blockval', type=RESPONSE_TYPE_BYTE), &
response_type('blockval', type=RESPONSE_TYPE_BYTE), &
response_type('blocklen', type=RESPONSE_TYPE_INT32) &
]

Expand Down Expand Up @@ -2129,7 +2129,7 @@ pure subroutine dm_geocom_api_request_get_signal(request)
responses = [ &
response_type('grc', unit=' ', type=RESPONSE_TYPE_INT32), &
response_type('sigint', unit='%', type=RESPONSE_TYPE_REAL64), &
response_type('sigtime', unit='ms', type=RESPONSE_TYPE_INT32) &
response_type('sigtime', unit='ms', type=RESPONSE_TYPE_INT32) &
]

call dm_geocom_api_request(request, REQUEST_NAME, REQUEST_CODE, pattern=REQUEST_PATTERN, responses=responses)
Expand Down
12 changes: 4 additions & 8 deletions src/dm_plot.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ module dm_plot
integer, parameter, public :: PLOT_TERM_NAME_LEN = 8 !! Max. terminal name length.

character(len=*), parameter, public :: PLOT_TERM_NAMES(PLOT_TERM_NONE:PLOT_TERM_LAST) = [ &
character(len=PLOT_TERM_NAME_LEN) :: 'none', 'ansi', 'ascii', 'gif', 'png', &
'pngcairo', 'sixelgd', 'svg', 'x11' ] !! Gnuplot terminal names.
character(len=PLOT_TERM_NAME_LEN) :: 'none', 'ansi', 'ascii', 'gif', 'png', 'pngcairo', 'sixelgd', 'svg', 'x11' &
] !! Gnuplot terminal names.

character(len=*), parameter, public :: PLOT_GNUPLOT = 'gnuplot' !! Gnuplot binary.
character(len=*), parameter, public :: PLOT_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S' !! Datetime format.
Expand Down Expand Up @@ -382,9 +382,7 @@ integer function plot_set_term(plot) result(rc)
if (n > 0) args = 'font "' // plot%font(1:n) // '" ' // trim(args)

! Set terminal type with additional arguments.
rc = plot_write(plot, 'set term ' // &
trim(PLOT_TERM_NAMES(plot%term)) // ' ' // &
trim(args))
rc = plot_write(plot, 'set term ' // trim(PLOT_TERM_NAMES(plot%term)) // ' ' // trim(args))
if (dm_is_error(rc)) return

! Set output file path (if present).
Expand All @@ -405,9 +403,7 @@ integer function plot_set_term(plot) result(rc)
if (plot%persist) args = 'persist ' // trim(args)

! Set term type with additional arguments.
rc = plot_write(plot, 'set term ' // &
trim(PLOT_TERM_NAMES(plot%term)) // ' ' // &
trim(args))
rc = plot_write(plot, 'set term ' // trim(PLOT_TERM_NAMES(plot%term)) // ' ' // trim(args))

case default
return
Expand Down
8 changes: 4 additions & 4 deletions src/dm_tty.f90
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,10 @@ integer function dm_tty_set_attributes(tty) result(rc)
c_cflag = iand(c_cflag, not(int(CSIZE, kind=i8))) ! Unset byte size.
c_cflag = iand(c_cflag, not(int(CSTOPB, kind=i8))) ! Unset stop bits.
c_cflag = iand(c_cflag, not(int(PARENB + PARODD, kind=i8))) ! Unset parity.
c_cflag = ior (c_cflag, int(byte_size, kind=i8)) ! Set byte size.
c_cflag = ior (c_cflag, int(stop_bits, kind=i8)) ! Set stop bits.
c_cflag = ior (c_cflag, int(parity, kind=i8)) ! Set parity.
c_cflag = ior (c_cflag, int(CLOCAL + CREAD, kind=i8)) ! Ignore modem controls, enable reading.
c_cflag = ior (c_cflag, int(byte_size, kind=i8)) ! Set byte size.
c_cflag = ior (c_cflag, int(stop_bits, kind=i8)) ! Set stop bits.
c_cflag = ior (c_cflag, int(parity, kind=i8)) ! Set parity.
c_cflag = ior (c_cflag, int(CLOCAL + CREAD, kind=i8)) ! Ignore modem controls, enable reading.

! Local modes.
c_lflag = iand(c_lflag, not(int(ECHO + ECHOE + ECHONL, kind=i8))) ! No echo.
Expand Down

0 comments on commit 5e87ed9

Please sign in to comment.