! $Id: help.sqh,v 1.3 2003/11/30 23:59:36 rayo Exp $
!
! sqrsh (sqr shell)
! Copyright (C) 1997 Ray Ontko & Company
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
!
!------------------------------------------------------------------- help

!++
!
! help <command>
!
! prints a help message for the command given
!
! if the help file isn't found, you may need to define the
! variable SQRSHDIR in your environment.
!
!--
!
! Modification History
!
! $Log: help.sqh,v $
! Revision 1.3  2003/11/30 23:59:36  rayo
! added help message
! added RCS heading
!
!

begin-procedure help local
   let $p1 = lower(ltrim(rtrim($_p1,' '),' '))
   if not isnull($p1)
      let $fn = getenv('SQRSHDIR') || substr($p1,1,8) || '.hlp'
   else
      let $fn = getenv('SQRSHDIR') || 'sqrsh.hlp'
   end-if
   do more_file( $fn , #status )
   if #status <> 0
      show 'sqrsh: Unable to open help file "' $fn '"'
   end-if
end-procedure ! help
