Skip to content

Commit

Permalink
Removed redundancy.
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Sep 21, 2024
1 parent 07ed567 commit 3d0664b
Show file tree
Hide file tree
Showing 22 changed files with 1 addition and 47 deletions.
2 changes: 0 additions & 2 deletions app/dmbackup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ integer function read_args(app) result(rc)

type(arg_type) :: args(5)

rc = E_NONE

args = [ &
arg_type('database', short='d', type=ARG_TYPE_DB, required=.true.), & ! -d, --database <path>
arg_type('backup', short='b', type=ARG_TYPE_STRING, required=.true.), & ! -b, --backup <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmbeat.f90
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ integer function read_args(app) result(rc)
character(len=:), allocatable :: version
type(arg_type) :: args(13)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <id>
arg_type('config', short='c', type=ARG_TYPE_FILE), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmdb.f90
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ integer function read_args(app) result(rc)
character(len=:), allocatable :: version
type(arg_type) :: args(8)

rc = E_NONE

! Required and optional command-line arguments.
args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <id>
Expand Down
2 changes: 0 additions & 2 deletions app/dmdbctl.f90
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,6 @@ integer function read_args(app) result(rc)
logical :: mask(OP_LAST) ! CRUD operation mask.
type(arg_type) :: args(19)

rc = E_NONE

! Required and optional command-line arguments.
args = [ &
arg_type('create', short='C', type=ARG_TYPE_STRING), & ! -C, --create <type>
Expand Down
2 changes: 0 additions & 2 deletions app/dmexport.f90
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ integer function read_args(app) result(rc)
character(len=6) :: format_name, type_name
type(arg_type) :: args(12)

rc = E_NONE

args = [ &
arg_type('database', short='d', type=ARG_TYPE_DB, required=.true.), & ! -d, --database <path>
arg_type('output', short='o', type=ARG_TYPE_STRING), & ! -o, --output <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmfeed.f90
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ integer function read_args(app) result(rc)
character(len=:), allocatable :: version
type(arg_type) :: args(16)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <id>
arg_type('config', short='c', type=ARG_TYPE_FILE), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmfs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ integer function read_args(app) result(rc)
type(app_type), intent(out) :: app !! App settings.
type(arg_type) :: args(9)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <id>
arg_type('config', short='c', type=ARG_TYPE_FILE, required=.true.), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmgrc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ integer function read_args(app) result(rc)
integer :: i
type(arg_type) :: args(8)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <id>
arg_type('config', short='c', type=ARG_TYPE_FILE), & ! -c, --config <path>
Expand Down
6 changes: 1 addition & 5 deletions app/dminfo.f90
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ integer function output_info(app) result(rc)
if (has_db) then
sz = dm_file_size(app%database)
rc = dm_db_open(db, app%database, read_only=.true.)

if (dm_is_error(rc)) then
call dm_error_out(rc, 'failed to open database ' // app%database)
return
end if
if (dm_is_error(rc)) call dm_error_out(rc, 'failed to open database ' // app%database, fatal=.true.)
end if

! Compiler and build options.
Expand Down
2 changes: 0 additions & 2 deletions app/dminit.f90
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ integer function read_args(app) result(rc)
character(len=TYPE_NAME_LEN) :: type
type(arg_type) :: args(5)

rc = E_NONE

args = [ &
arg_type('type', short='t', type=ARG_TYPE_STRING, required=.true.), & ! -t, --type [beat|log|observ]
arg_type('database', short='d', type=ARG_TYPE_STRING, required=.true.), & ! -d, --database <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmlog.f90
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ integer function read_args(app, log) result(rc)
type(log_type), intent(out) :: log
type(arg_type) :: args(10)

rc = E_NONE

! Required and optional command-line arguments.
args = [ &
arg_type('logger', short='l', type=ARG_TYPE_ID), & ! -l, --logger <id>
Expand Down
2 changes: 0 additions & 2 deletions app/dmlogger.f90
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ integer function read_args(app) result(rc)
character(len=:), allocatable :: version
type(arg_type) :: args(7)

rc = E_NONE

! Required and optional command-line arguments.
args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <id>
Expand Down
2 changes: 0 additions & 2 deletions app/dmlua.f90
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ integer function read_args(app) result(rc)
type(app_type), intent(out) :: app
type(arg_type) :: args(8)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <id>
arg_type('config', short='c', type=ARG_TYPE_FILE), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmmbctl.f90
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ integer function read_args(app) result(rc)
logical :: has_read, has_write
type(arg_type) :: args(13)

rc = E_NONE

args = [ &
arg_type('path', short='p', type=ARG_TYPE_STRING), & ! -p, --path <string>
arg_type('baudrate', short='B', type=ARG_TYPE_INTEGER), & ! -B, --baudrate <n>
Expand Down
2 changes: 0 additions & 2 deletions app/dmpipe.f90
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ integer function read_args(app) result(rc)
type(app_type), intent(out) :: app
type(arg_type) :: args(9)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <id>
arg_type('config', short='c', type=ARG_TYPE_FILE, required=.true.), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmplot.f90
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ integer function read_args(app) result(rc)
character(len=:), allocatable :: version
type(arg_type) :: args(17)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <string>
arg_type('config', short='c', type=ARG_TYPE_FILE), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmrecv.f90
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ integer function read_args(app) result(rc)

type(arg_type) :: args(12)

rc = E_NONE

! Required and optional command-line arguments.
args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -N, --name <string>
Expand Down
2 changes: 0 additions & 2 deletions app/dmreport.f90
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ integer function read_args(app) result(rc)
type(report_log_type), pointer :: log
type(report_plot_type), pointer :: plot

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <string>
arg_type('config', short='c', type=ARG_TYPE_FILE), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmsend.f90
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ integer function read_args(app) result(rc)
type(app_type), intent(out) :: app
type(arg_type) :: args(11)

rc = E_NONE

! Required and optional command-line arguments.
args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <string>
Expand Down
2 changes: 0 additions & 2 deletions app/dmserial.f90
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ integer function read_args(app) result(rc)
type(app_type), intent(out) :: app
type(arg_type) :: args(17)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <string>
arg_type('config', short='c', type=ARG_TYPE_FILE, required=.true.), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmsync.f90
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ integer function read_args(app) result(rc)
character(len=:), allocatable :: version
type(arg_type) :: args(16)

rc = E_NONE

args = [ &
arg_type('name', short='n', type=ARG_TYPE_ID), & ! -n, --name <string>
arg_type('config', short='c', type=ARG_TYPE_FILE), & ! -c, --config <path>
Expand Down
2 changes: 0 additions & 2 deletions app/dmuuid.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ integer function read_args(app) result(rc)
type(app_type), intent(out) :: app
type(arg_type) :: args(3)

rc = E_NONE

args = [ &
arg_type('convert', short='C', type=ARG_TYPE_LOGICAL), & ! -C, --convert
arg_type('count', short='n', type=ARG_TYPE_INTEGER), & ! -n, --count
Expand Down

0 comments on commit 3d0664b

Please sign in to comment.