Files
fit/gen/fit_help.f_old
2022-08-19 15:22:33 +02:00

37 lines
806 B
Plaintext

subroutine fit_help(topic)
c --------------------------
implicit none
character*(*) topic
integer lun, l, tl, iostat
character line*132, tpc*32
print *
call str_upcase(tpc, topic)
if (tpc .eq. ' ') tpc='MAIN'
call str_trim(tpc, tpc, tl)
call sys_get_lun(lun)
call sys_getenv('FIT_HELP_FILE', line)
call sys_open(lun, line, 'r', iostat)
if (iostat .ne. 0) goto 991
1 rewind lun
10 read(lun, '(a)',end=90) line
call str_trim(line, line, l)
if (line(1:1) .ne. '=') goto 10
call str_upcase(line, line)
if (index(line,'='//tpc(1:tl)) .eq. 0) goto 10
11 read(lun, '(a)',end=80) line
call str_trim(line, line, l)
if (line(1:1) .ne. '=') then
print *,line(1:l)
goto 11
endif
80 goto 99
90 print *,'no help available on keyword: ',topic
99 close(lun)
991 call sys_free_lun(lun)
end