Skip to content

Commit

Permalink
check meson
Browse files Browse the repository at this point in the history
  • Loading branch information
0382 committed May 4, 2024
1 parent ee85769 commit 1c0d26f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/
_build/
.vscode/
*.mod
*.exe
Expand Down
3 changes: 1 addition & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ argparse_f_src = files(
'src/argparse-f.f90'
)

argparse_f_lib = library(
argparse_f_lib = static_library(
meson.project_name(),
sources : argparse_f_src,
version : meson.project_version(),
install : true,
)

Expand Down
8 changes: 4 additions & 4 deletions src/argparse-f.f90
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ subroutine argp_parse(this)
if (argc /= this%argument_size) then
print '(A,I0,A,I0)', "(parse error) position argument number missmatching, give ", argc, ", but need ", this%argument_size
if (argc /= 0) then
write (*, '("unparsed arguments: ")', advance='no')
write (*, '("unparsed arguments: ")', advance='no')
do i = 1, argc
write (*, '(" ",A)', advance='no') trim(tokens(i))
end do
Expand Down Expand Up @@ -296,7 +296,7 @@ logical function try_parse_named_argument(line, arg) result(ans)
if (name /= arg%name) then
ans = .false.
else
arg%value = line(i + 1:line_size)
arg%value(1:line_size - i) = line(i + 1:line_size)
ans = .true.
end if
end if
Expand All @@ -319,7 +319,7 @@ subroutine argp_print_usage(this)
write (*, '(" [=",A,"]")', advance='no') trim(this%named_arguments(i)%name)
end do
do i = 1, this%argument_size
write (*, '(" [",A,"]")', advance='no') trim(this%arguments(i)%name)
write (*, '(" [",A,"]")', advance='no') trim(this%arguments(i)%name)
end do
print *, ""
end subroutine argp_print_usage
Expand All @@ -336,7 +336,7 @@ subroutine argp_print_help(this)
do i = 1, size(help_split)
print '(A)', trim(help_split(i))
end do
deallocate(help_split)
deallocate (help_split)
print '(/,A)', "options:"

! calculate the longest option name
Expand Down

0 comments on commit 1c0d26f

Please sign in to comment.