subroutine help_version(l_version)
NAME
xauth_key(1f) - [M_random] generate magic cookies for xauth
(LICENSE:PD)
SYNOPSIS
xauth_key [characters] [ -n number_of_characters]
DESCRIPTION
xauth_key generates a random hexadecimal number
OPTIONS
characters Set of letters to compose string from.
Defaults to '0123456789abcdef'.
-n N Number of digits. Defaults to 128
-r N Number of cookies to generate
--version Display version information and exit.
--help Display help text and exit.
EXAMPLE
generate a value for use with the X authority system:
xauth add :0 . `xauth_key`
SEE ALSO
AUTHOR
LICENSE
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
logical,
|
intent(in) |
|
|
:: |
l_version |
|
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
character(len=:),
|
public, |
allocatable
|
:: |
help_text(:) |
|
|
|
integer,
|
public |
|
:: |
i |
|
|
|
character(len=*),
|
public, |
parameter
|
:: |
ident |
= |
"@(#)help_version(3f): prints version information" |
|
logical,
|
public |
|
:: |
stopit |
= |
.false. |
|
Source Code
subroutine help_version(l_version)
implicit none
character(len=*),parameter :: ident="@(#)help_version(3f): prints version information"
logical,intent(in) :: l_version
character(len=:),allocatable :: help_text(:)
integer :: i
logical :: stopit=.false.
stopit=.false.
if(l_version)then
help_text=[ CHARACTER(LEN=128) :: &
'@(#)PRODUCT: GPF (General Purpose Fortran) utilities and examples>',&
'@(#)PROGRAM: xauth_key(1)>',&
'@(#)DESCRIPTION: generate random strings such as magic cookies for xauth>',&
'@(#)VERSION: 1.0, 20171219>',&
'@(#)AUTHOR: John S. Urban>',&
'@(#)HOME PAGE: http://www.urbanjost.altervista.org/index.html>',&
'@(#)COMPILED: 2023-04-12 02:29:17 UTC-240>',&
'']
WRITE(*,'(a)')(trim(help_text(i)(5:len_trim(help_text(i))-1)),i=1,size(help_text))
stop ! if --version was specified, stop
endif
end subroutine help_version