home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
intelmdsb
/
mdshlp.p80
< prev
next >
Wrap
Text File
|
1988-08-15
|
4KB
|
163 lines
$TITLE ('HELP MODULE')
help$module:
/* COPYRIGHT (C) 1985, Trustees of Columbia University in the City of New */
/* York. Permission is granted to any individual or institution to use, */
/* copy, or redistribute this software so long as it is not sold for */
/* profit, provided this copyright notice is retained. /*
/* HELP: Display help information to the terminal user */
do;
declare lf literally '0AH';
declare cr literally '0DH';
declare null literally '000H';
declare crlf literally 'cr,lf,null';
declare escchar byte external;
print: procedure(msg) external;
declare msg address;
end print;
co: procedure(char) external;
declare char byte;
end co;
ctl: procedure(char) byte external;
declare char byte;
end ctl;
newline: procedure external; end newline;
token: procedure address external;
end token;
varcmp: procedure (s1, s2) byte external;
declare (s1,s2) address;
end varcmp;
upcase: procedure (addr) external;
declare addr address;
end upcase;
/* Display help for the BYE command */
byehelp: procedure external;
end byehelp;
/* Display help for the CONNECT command */
conhelp: procedure external;
end conhelp;
/* Display help for the EXIT command */
exhelp: procedure external;
end exhelp;
/* Display help for the FINISH command */
finhelp: procedure external;
end finhelp;
/* Display help for the GET command */
gethelp: procedure external;
end gethelp;
/* Display help for the HELP command */
helphelp:procedure;
call print(.('\HELP\\$'));
call print(.(' The HELP command offers help about Kermit commands $'));
call print(.('and related information.\\$'));
call print(.('Syntax:\\$'));
call print(.(' HELP [topic]\\$'));
call print(.('If the HELP command is entered without an operand, $'));
call print(.('a list of topics\$'));
call print(.('will be displayed.\\$'));
end helphelp;
/* Display help for the LOGOUT command */
loghelp: procedure external;
end loghelp;
/* Display help for the RECEIVE command */
rechelp: procedure external;
end rechelp;
/* Display help for the SEND command */
senhelp: procedure external;
end senhelp;
/* Display help for the SET command */
sethelp: procedure external;
end sethelp;
/* Display help for the SHOW command */
shohelp: procedure external;
end shohelp;
/* Display help for the TAKE command */
takehelp: procedure external;
end takehelp;
/* Display help on Kermit syntax */
synhelp: procedure;
call print(.('\ISIS Kermit syntax uses the following rules:\\$'));
call print(.('Kermit commands can be entered in any combination $'));
call print(.('of upper and lower case.\$'));
call print(.('A command keyword can be shortened to as few $'));
call print(.('characters as are necessary\$'));
call print(.('to distinguish it from other keywords.\\$'));
end synhelp;
/* Give general help about HELP */
gen$help: procedure;
call print(.('\ISIS-KERMIT has help for the following $'));
call print(.('topics:\\$'));
call print(.(' BYE CONNECT EXIT $'));
call print(.('FINISH GET\$'));
call print(.(' HELP LOGOUT RECEIVE $'));
call print(.('SEND SET\$'));
call print(.(' SHOW Syntax TAKE\\$'));
call print(.('To ask for help on a specific topic, $'));
call print(.('enter "HELP topic".\\$'));
end gen$help;
help:
procedure public;
declare tokptr address;
tokptr = token;
if tokptr = 0 then call gen$help; /* if no keyword, give help summary */
else
do;
call upcase(tokptr); /* Translate to upper case */
if (varcmp(tokptr,.('BYE',null)) >= 1) then call byehelp;
else
if (varcmp(tokptr,.('CONNECT',null)) >= 1) then call conhelp;
else
if (varcmp(tokptr,.('EXIT',null)) >= 1) then call exhelp;
else
if (varcmp(tokptr,.('FINISH',null)) >= 1) then call finhelp;
else
if (varcmp(tokptr,.('GET',null)) >= 1) then call gethelp;
else
if (varcmp(tokptr,.('HELP',null)) >= 1) then call helphelp;
else
if (varcmp(tokptr,.('LOGOUT',null)) >= 1) then call loghelp;
else
if (varcmp(tokptr,.('RECEIVE',null)) >= 1) then call rechelp;
else
if (varcmp(tokptr,.('SEND',null)) >= 3) then call senhelp;
else
if (varcmp(tokptr,.('SET',null)) >= 3) then call sethelp;
else
if (varcmp(tokptr,.('SHOW',null)) >= 2) then call shohelp;
else
if (varcmp(tokptr,.('SYNTAX',null)) >= 2) then call synhelp;
else
if (varcmp(tokptr,.('TAKE',null)) >= 1) then call takehelp;
else
call gen$help;
end;
end help;
end help$module;