/*
@BPDrawGenie.hlp@P
Copyright Gold Disk Inc., February, 1992
This genie reads the comment field in other genies and informs the user of the genies uses
*/
parse arg genie
if ~show(l, "rexxsupport.library") then
   if ~addlib("rexxsupport.library",0,-30) then
      exit_msg("Please install the rexxsupport.library in your libs: directory before running this Genie.!")

if ~open(file, genie, "r") then exit_msg("Unable to open: "genie)

string = ''
do while ~eof(file)
    line = readln(file)
    if strip(line) = '' then iterate
    if pos("/*", line) ~= 0 then
       do
       parse var line '/*' line
       if strip(line) = '' then iterate
       end
    if pos("*/", line) ~= 0 then
       do
       parse var line line '*/'
       if strip(line) ~= '' then
     do
     string = string||'0a'x||"@L"||line
     end
       leave
       end
    else
       string = string||'0a'x||"@L"||line
end

close(file)
if string = '' then exit_msg("No Help Available.")

fline = pos('@N', string) + 1
if fline > 1 then
do
   fstate = "@B"genie" @I Copyright © 1992 Gold Disk Inc."
   string = insert(fstate" ", string, fline)
end

fline = pos('@I', string) + 1
if fline > 1 then
do
   fstate = '['||word(statef(genie), 2)||']'
   string = insert(fstate" ", string, fline)
end

call pdm_Inform(1,substr(string,2),)
exit

exit_msg: procedure
do
    arg message
    if message ~= '' then call pdm_Inform(1,message,)
    exit
end
