
#include	"bob$talk:talk.h"

cmd_help(n, p)  /* display help for user */
        int     n;      /* number of parameters entered */
        char    *p;     /* parameter entered */

{
static char *help_text[] = {
" ",
"For more information, enter one of the following:",
" ",
"   /COMMANDS          for a list of TALK commands.",
"   /HELP,introduction for an introduction to TALK.",
"   /HELP,commands     for an explanation of the TALK commands.",
"   /HELP,flags        for an explanation of the TALK flags.",
"   /HELP,status       for an explanation of the TALK status messages.",
"   /HELP,summary      for a TALK command summary.",
"   /HELP,author       if you are curious.",
"   /HELP,command name for help on a command. Do not include the '/'.",
" ",
"" };

static char *introduction_text[] = {
" ",
"   TALK is a program that allows you to interactively exchange messages with",
"other users. Each user enters his message, and all users in his 'conference'",
"can read what he was written. Also, a user may direct a message to a specific",
"user. In this case, the message is referred to as a 'private' message, as it",
"is private between the two users.",
" ",
"   When you enter TALK, you are asked to enter your nickname. This is the",
"name that other users will refer to you as. You may use your real name, or",
"you may use a nickname of some sort.",
" ",
"   TALK has two modes of operation: Single-line mode and Essay mode. In",
"single line mode, you can send a one line message at a time. Simply type",
"the line and press the <Return> key, and everyone in your conference will",
"see your message. You will receive messages from other users at any time",
"when you have not typed anything on a line.",
" ",
"   In Essay mode, you may enter multiple-line messages. You may also direct",
"your message to a specific user, whether he/she is in your conference or",
" a different one. When you want to send your message, you can either press",
"<Return> on a blank line, or use the /SEND command.",
" ",
"   TALK has special commands which allow you to perform functions other than",
"sending messages. A TALK command starts with a '/' (slash) character,",
"followed by the command name. Some commands need parameters to tell the",
"command what to do. If the command needs parameters, use a ',' (comma) to",
"separate the command and its parameters.",
" ",
"   TALK supports multiple 'conferences'. A conference is a place where a",
"group of users get together and talk about a specific subject. When you",
"first enter TALK, you are put into the conference 'Limbo'. Limbo is a",
"conference that always exists and is a conference for general use. You can",
"create your own conference with the /CREATE command.",
" ",
"   The person who creates a conference becomes the conference controller for",
"that conference. If they leave the conference, then there is no conference",
"controller and anyone else in the conference may become the controller. The",
"conference controller has the ability to perform specific tasks relating",
"to their conference, such as putting a password on it so that only users who",
"know the password may join.",
" ",
"   Use the command /HELP to get information about the various TALK features.",
"Use /HELP,COMMANDS to get help on all the commands.",
"" };

static char *commands_text[] = {
" ",
"   The following commands are valid while using talk. The command names are",
"shown in uppercase only to stress that they are TALK commands; You may use",
"upper, lower, or mixed case for the commands.",
" ",
"   Parameters shown in square brackets ([ ]) are optional and are not",
"always required.",
" ",
"   /CREATE,conf name[,password]",
"   /MAKE,conf name[,password]",
"        These commands create a conference and make you the controller. If",
"        you supply a password, then the conference is locked and only those",
"        who use the password may join it. Note that upper and lowercase",
"        in passwords is significant. If you write an essay before creating",
"        the conference, the essay will be used as the conference description",
"        which may be viewed by using the /DESCRIBE command.",
" ",
"   /JOIN,conf name[,password]",
"        This command moves you to a new conference. If the conference is",
"        locked, you must supply the correct password. Note that upper and",
"        lower case in passwords is significant.",
" ",
"   /MODERATE",
"        This command will cause the conference to become a moderated",
"        conference. In a moderated conference, only the controller and",
"        those designated by the controller are allowed to speak publically.",
"        There is also a speak request queue to allow users to enter a",
"        request to speak. Related commands are /ALLOW, /DISALLOW, /SPEAK",
"        and /NEXT.",
" ",
"   /UNMODERATE",
"        This command returns the conference to the normal, unmoderated",
"        status.",
" ",
"   /ALLOW,user name",
"        This command will allow the conference controller of a moderated",
"        conference to give a user the privelege to speak publically. This",
"        can be used to allow guest speakers to speak freely.",
" ",
"   /DISALLOW,user name",
"   /SILENCE,user name",
"        These commands will take away the privelge to speak freely from a",
"        user within a moderated conference. Only the conference controller",
"        may issue this command.",
" ",
"   /ENABLEQ",
"        The conference controller can use this command to open the speaker",
"        request queue for entries. If the queue is not enables, users cannot",
"        use the /SPEAK command to request a turn to speak.",
" ",
"   /DISABLEQ",
"        This command allows the controller to close the speaker request",
"        queue to any further /SPEAK commands.",
" ",
"   /SPEAK",
"        Enteres a request into the speaker queue in a moderated conference.",
"        If you have been designated as a speaker by the conference controller",
"        you do not need to (and cannot) use the command.",
" ",
"   /QUEUE",
"        This command will display the speaker request queue in a moderated",
"        conference.",
" ",
"   /NEXT",
"        This command allows the controller of a moderated conference to",
"        give the next person in the speaker request queue their turn to",
"        speak. The current speaker in the queue (if there is one) will",
"        automatically be silenced.",
" ",
"   /DESCRIBE[,conf name]",
"        This command will display the description of a conference that you",
"        specify. If you do not specify a conference name, the conference you",
"        are in will be described.",
" ",
"   /NEWDESC",
"        This command allows you to create a new description for your confer-",
"        ence. Create an essay, and instead of sending it, use the /NEWDESC",
"        command. You must be the conference controller to use this command.",
"        if there is no conference controller, you will be come the controller.",
" ",
"   /RENAME,new name",
"        This command will change the current conference name to the new",
"        name specified. You must be the conference controller to use this",
"        command. If there is no controller, you will become the controller.",
" ",
"   /MONITOR[,conf name[,password]]",
"        This command allows you to monitor another conference. The members",
"        of the other conference will be aware that you are monitoring their",
"        conference. If you want to monitor a locked conference, you must",
"        specify the conference password. If you do not specify any conference",

"        name, monitoring will be shut off. You can only monitor one conference"
,
"        at a time.",
" ",
#if !DATASEEK
"   /EAVESDROP[,user name[,password]]",
"        This command allows you to monitor anotehr user's messages. The user",
"        will not be aware that you are monitoring their messages. If you",
"        want to eavesdrop on a user that is in a locked conference, you must",
"        supply the correct password for that conference. If you don't specify",
"        any user name, eavesdropping will be shut off. Note that you can only",
"        eavesdrop on one user at a time, and you can only read that user's",
"        public messages, NOT their private ones.",
" ",
#endif
"   /SQUELCH[,user name]",
"        Squelching allows you to ignore public and private messages from",
"        selected users. If you do not specify a user name, a list of the",
"        current users you have squelched will be shown.",
" ",
"   /UNSQUELCH,user name",
"        This command allows you to resume receiving messages from a user",
"        that you have previously squelched.",
" ",
"   /ALERT[,system name]",
"        This command will set up an alert to tell you when the specified",
"        user enters TALK. If you do not specify a user name, the current",
"        alert will be cancelled. You may only have one active alert at a",
"        time. Once you have received your alert, the alert will auto-",
"        matically be cancelled.",
" ",
#if !DATASEEK
"   /NOTIFY[,user name]",
"        This command will set up a 'notify' to tell you when the specified",
"        user logs onto the VAX. If you do not specify a user name, the",
"        current notify will be cancelled. You may only have one active",
"        notify at a time. Once you have received your notify, the notify",
"        will automatically be cancelled.",
" ",
"   /CALL,user name[,message]",
"        This command will notify the user specified that they are being",
"        requested to join TALK by you. You can also include an optional",
"        message that will appear on the second line of the call. If you use",
"        an optional message of asterisk (*), a message telling the user how",
"        to enter the TALK system will be displayed.",
" ",
#endif
"   /LOCK,password",
"        With this command, you can lock a conference. You can only lock a",
"        conference if you are the conference controller, or if no one is",
"        the conference controller. If no one is the conference controller",
"        then you will be made the conference controller upon locking the",
"        conference. If the conference is already locked, using the /LOCK",
"        command will change the password users must supply to enter the",
"        conference.",
" ",
"   /UNLOCK",
"        This command will unlock a locked conference. You can only unlock",
"        a locked conference if you are the conference controller, or if no",
"        one is the conference controller. If no one is the conference",
"        controller, you will be made the controller upon using the /UNLOCK",
"        command.",
" ",
"   /TRANSCRIBE[,file name]",
"        This command will cause all the public conversations in the current",
"        conference to be transcribed to the specified file. If you do not",
"        speicfy a file name, the current transcription will be stopped. Each",
"        conference may only have one transcription active at a time, and only",

"        the creator of the transcription may stop it. If you start a tran-",
"        scription and then exit TALK, that transcription will remain active",
"        until the conference is dispersed.",
" ",
"   /EVICT,user name",
"        This command allows the conference controller to evict a user from",
"        his conference. The user that is evicted is placed in the Limbo",
"        conference. You may only evict someone if you are the conference",
"        controller, or if there is no controller of your conference. You",
"        cannot evict anyone from Limbo.",
" ",
"   /NOMONITOR",
"        If any users are monitoring your conference, this command will",
"        turn their monitoring off. You may only issue this command if you",
"        are the conference controller or if there is no conference control-",
"        ler. If there is no conference controller, you will become the",
"        controller. This command is useful if you wish to isolate your",
"        conference from the public. First, use the /LOCK command to give",
"        your conference a password, then use the /NOMONITOR command to",
"        insure that no users are currently monitoring it. Any users who",
"        subsequently wish to join or monitor your connference will need to",
"        supply the correct password.",
" ",
"   /RELINQUISH",
"        This command allows you to give up control of your conference. Once",
"        you relinquish control, anyone else may become the conference",
"        controller.",
" ",
"   /CONTROL",
"        This command will allow you to take control of a conference if",
"        there is no controller.",
" ",
"   /ESSAY",
"        This command puts you into 'essay' mode, where you may write a",
"        multi-line message. Send the message with a blank line or with",
"        the /SEND command.",
" ",
"   /LIST",
"        This command lists your current essay on the screen. It is useful",
"        if you have received some messages and lost track of what you were",
"        saying.",
" ",
"   /KILL",
"        This command will erase your current essay.",
" ",
"   /SEND[,user name]",
"        This command will send your 'essay'. If you specify a user name",
"        your message will be sent to only that person. If you do not",
"        specify a user name, your message will be sent to everyone in",
"        your conference.",
" ",
"   /RESEND[,user name]",
"        This command works exactly like /SEND except that it re-sends your",
"        last 'essay'. If you have entered at least one line of a new",
"        'essay', this command will not work.",
" ",
"   /WHISPER,user name",
"        This command will send your 'essay' to a specific user. Only the",
"        user you specify will receive the message.",
" ",
"   /TO[,user name]",
"        This command will direct the current message to the specified user",
"        when it is sent with the /SEND command or a blank line. Specifying",
"        a name on the /SEND or /WHISPER command will override the /TO",
"        setting. Use /TO with no parameter to clear the setting. /TO is",
"        only active for the current essay, and is reset when the essay",
"        is sent.",
" ",
"   /REPLY",
"        This command will initiate the sending of a private message to the",
"        sender of the last whisper message you received. After issuing the",
"        /REPLY command, you will receive a message telling who the message",
"        will be directed to. Enter your message, and press <return> on a",
"        blank line, and the message will be sent. If the message is not",
"        directed to the person that you wished, use the /SEND or /WHISPER,",
"        or /TO commands to direct your message to the proper place.",
" ",
"   /HOLD",
"        This command will take your current essay and place it on hold.",
"        You may continue to talk, as usual. When you would like to",
"        retreive the essay you have on hold, use the /UNHOLD command.",
" ",
"   /UNHOLD",
"        This command will take the essay you have placed on hold and",
"        restore it as your current essay. The hold buffer is cleared.",
" ",
"   /USERS[,conf name]",
"        This command will show you the users on TALK. If a conference name",
"        is specified, only the users in that conference will be shown. A",
"        conference name of * will cause a list of users in your curent",
"        conference to be displayed.",
" ",
"   /SUMMARY",
"        This command is similar to /USERS, but in a more abbreviated form.",
" ",
"   /COMMANDS",
"        This command gives a brief listing of all the TALK commands.",
" ",
"   /LOG[,number]",
"        This command displays TALK's userlog. This log shows the users that",
"        have used TALK in the past. Specify the number of entries you would",
"        like to be displayed. If you do not specify a number, the entire log",
"        will be displayed.",
" ",
"   /NEWS",
"        This command will display any news about Talk that has been posted",
"        by the system manager.",
" ",
"   /FACE[,face style]",
"        This command will allow you to change your face style displayed with",
"        your messages. Use the /FACE,LIST command to get a list of the",
"        allowable face styles, or /FACE to clear your face style.",
" ",
"   /NAME,new name",
"        This command allows you to change your nickname. Specify your new",
"        name as the parameter to the command.",
" ",
"   /STATUS",
"        This command will show you a detailed status and description about",
"        your current session on TALK.",
" ",
"   /ACTIVITY",
"        This command will show you an activity summary of the TALK system",
"        since it was last started.",
" ",
"   /LIMITS",
"        Displays Talk's current limits. These limits are set by the system",
"        manager.",
" ",
"   /CLS",
"        This command will clear your terminal screen. If you have the",
"        ansicrt flag set, the ANSI sequence will be used to clear your",
"        screen, otherwise blank lines will be used to scroll your screen.",
" ",
"   /MAIL[,vax user[,subject]]",
"        This command will allow you to access the VAXmail system. If you",
"        do not specify any parameters, you will be placed directly into",
"        VAXmail. When you exit from VAXmail, you will return to TALK without",
"        losing any messages sent to you. If you specify a VAX username,",
"        your current essay will be mailed to that user. You can optionally",
"        specify a subject to be attached to your message.",
" ",
"   /DCL[,command]",
"        This command will allow you to access DCL. If you specify a command",
"        that command will be executed as if you entered it at the DCL prompt.",
"        If you do not specify a command, you will get the DCL prompt. You",
"        return to TALK with the LOGOUT command.",
" ",
"   /GRIPE",
"        This command will use your current essay as a gripe message. It will",
"        be sent to the person responsible for handing gripes about TALK.",
"        You can also use the /GRIPE command for compliments or suggestions",
"        regarding the TALK system.",
" ",
"   /SHOW[,flag name]",
"        This command will display you flag settings. If you supply a flag",
"        name, that flag's setting will be displayed. Otherwise, all flag",
"        settings will be displayed.",
" ",
"   /SET,flag name",
"        This command sets (turns on) the flag you specify.",
" ",
"   /CLEAR,flag name",
"        This command clears (turns off) the flag you specify.",
" ",
"   /BYE[,comment]",
"   /DONE[,comment]",
"   /EXIT[,comment]",
"   /QUIT[,comment]",
"        Any of these commands will exit you from talk. If you specify a",
"        comment, it will be displayed in the log next to your name.",
" ",
"" };

static char *flags_text[] = {
" ",
"   You may set or clear certain 'flags' which allow you to customize TALK",
"to your personal preferences. Use the /SET command to set a flag (turn it",
"on) and the /CLEAR command to clear a flag (turn it off). The following are",
"descriptions of the flags you can use:",
" ",
"   alarm            With this flag set, you will hear a beep every time you",
"                    receive a message from a user. This flag can be useful",
"                    if the conversation on TALK is slow and you want to look",
"                    away from the screen while waiting for a message.",
" ",
"   ansicrt          Set this flag if you have an ANSI compatable terminal",
"                    (such as a VT100, VT220, Visual 102, etc). This will",
"                    allow TALK to take advantage of your terminal's special",
"                    features. >NOT FULLY IMPLEMENTED IN THIS VERSION<",
" ",
"   autoact          This flag will cause an /ACTIVITY comamnd to be executed",
"                    you enter TALK.",
" ",
"   autoflags        This flag will cause your current flag settings to be",
"                    shown when you enter TALK. It is the equivalent of doing",
"                    a /SHOW command when you enter TALK.",
" ",
"   autousers        This flag will cause a /USERS command to be executed when",
"                    you enter TALK.",
" ",
"   autosum          This flag will cause a /SUMMARY command to be executed",
"                    when you enter Talk.",
" ",
"   clock            This flag controls weather the time is displayed next",
"                    to received messages. With this flag set, the time will",
"                    be shown. With this flag clear, the time will not be",
"                    shown.",
" ",
"   essaylock        This flag will cause you to permanently stay in essay",
"                    mode, as if you had typed /ESSAY after each message.",
"                    To get out of this mode, use /CLEAR,essaylock.",
" ",
"   faces            Setting this flag will show the face next to the sender's",
"                    name in a message. Clearing this flag will cause the",
"                    faces to be shown only in the /users command.",
" ",
"   fullessay        If this flag is set, you will not be interrupted with",
"                    messages until you have finished a full essay and sent",
"                    it. If this flag is clear, you will be able to receive",
"                    messages inbetween lines of an essay. Note that you",
"                    will never receive messages while you are in the middle",
"                    of typing a line.",
" ",
"   hearbells        When set, this flag allows bell characters to be heard",
"                    on the terminal. Clearing this flag will permit quiet",
"                    operation of TALK.",
" ",
#if !DATASEEK
"   invisible        Setting this flag will allow you to be invisible while",
"                    inside a locked conference. If you are the conference",
"                    controller, you will always be seen.",
" ",
#endif
"   privates         Setting this flag will allow you to receive private",
"                    or whisper messages send with the /WHISPER or /SEND",
"                    commands. Clearing this flag will not allow you to",
"                    receive any of these messages.",
" ",
"   prompt           The prompt flag will cause TALK to give you prompts for",
"                    each line of input. In 'Essay' mode you will get a prompt",
"                    telling you which line you are on. Otherwise you will get",
"                    a '>' prompt. If you set the prompt flag off, you will",
"                    not get any prompts for input.",
" ",
"   readown          Setting this flag will allow you to see your own messages",
"                    that you send. With this flag set, you can see how your",
"                    messages look within the context of all the other users'",
"                    messages. Note that you will not see messages which you",
"                    direct at a specific user with the /SEND command.",
" ",
"   seebells         This flag will show bells as <BELL> on the terminal.",
"                    It is useful if the hearbells flag is cleared. Note that",
"                    this flag does not affect the sounding of bells on the",
"                    terminal.",
" ",
"   singlesp         With some terminals, writing essays with prompt clear",
"                    will cause the essay to appear double space. Set this",
"                    flag if your essays appear double spaceed with prompt",
"                    clear, then set this flag. Otherwise, leave it clear.",
" ",
"   verbose          This flag will cause TALK to display a more wordy form",
"                    of it's messages.",
" ",
"   watch            This flag allows you to watch who enters and leaves",
"                    Talk.",
" ",
"   wordwrap         Setting this flag while in essay mode will wrap words",
"                    around to the next line as you are typing.",
" ",
"" };

static char *status_text[] = {
" ",
"   At times throughout a TALK session, you may see 'status' messages from",
"a user. A status message has the form:",
" ",
"     < message >  user name",
" ",
"where 'message' gives the status for the user 'user name'. The following",
"is a list of possible status messages:",
" ",
" < Entering >        The user is entering the TALK system.",
" ",
" < Leaving >         The user is leaving the TALK system.",
" ",
" < Joining >         The user is joining your conference from another one.",
" ",
" < Moving >          The user is leaving your conference and moving to",
"                     another one.",
" ",
" < Moderating >      The user has changed the conference into moderated",
"                     status. Users may not speak publically unless designated",
"                     by the controller.",
" ",
" < Unmoderating >    The confernce has been returned to normal, unmoderated",
"                     status.",
" ",
" < Speaker >         The user has been designated as a speaker by the",
"                     conference controller. The user may speak publically",
"                     until silenced.",
" ",
" < Silenced >        The user may no longer speak publically within the",
"                     moderated conference.",
" ",
" < Logged In >       The user was the one you specified in a /NOTIFY command",
"                     and the user has logged into the VAX.",
" ",
" < Monitoring >      The user is monitoring your conference. He can read all",
"                     the messages (except for private messages) which are",
"                     sent in your conference.",
" ",
" < Not Monitoring >  The user is not monitoring your conference anymore.",
" ",
" < Evicted >         This means that the user has been evicted or 'kicked'",
"                     out of the conference by the conference controller.",
"                     The user that is evicted is moved to Limbo.",
" ",
" < Locking >         This message means that the conference controller has",
"                     locked the conference. If the conference was already",
"                     locked, then he is changing the password.",
" ",
" < Unlocking >       This means that the conference controller has unlocked",
"                     the conference. The conference is now available for",
"                     public access.",
" ",
" < Ghosted Out >     This means that the user has somehow left TALK by not",
"                     going through the normal means. TALK has just discovered",
"                     that this person is no longer using TALK, so they are",
"                     'ghosted out'.",
" ",
" < Timed Out >       This means that the user has timed out of Talk.",
" ",
" < Controlling >     The user has taken control of the conference.",
" ",
" < Relinquishing >   This means that the user is relinquishing control of",
"                     his conference.",
" ",
"" };

static char *summary_text[] = {
" ",
"   /ACTIVITY                          Show an activity summary of TALK",
"   /ALERT[,system name]               Alert when user enters TALK",
"   /ALLOW,user name                   Allow a user to speak",
"   /BYE[,comment]                     Exit TALK",
#if !DATASEEK
"   /CALL,user name[,message]          Call a user to TALK",
#endif
"   /CLEAR,flag name                   Clear a flag",
"   /CLS                               Clear terminal screen",
"   /COMMANDS                          Lists TALK commands.",
"   /CONTROL                           Take control of the conference",
"   /CREATE,conf name[,password]       Create a conference",
"   /DCL[,command]                     Access DCL from TALK",
"   /DESCRIBE[,conf name]              Print a conference description",
"   /DISABLEQ                          Disables the speaker request queue.",
"   /DISALLOW,user name                Disallow a user to speak",
"   /DONE[,comment]                    Exit TALK",
#if !DATASEEK
"   /EAVESDROP[user name[,password]]   Eavesdrop on a usewr",
#endif
"   /ENABLEQ                           Enables the speaker request queue.",
"   /ESSAY                             Enter a multi-line message",
"   /EVICT,user name                   Evict a user from a conference",
"   /EXIT[,comment]                    Exit TALK",
"   /FACE[,style]                      Change face style",
"   /GRIPE                             Submit a gripe about TALK.",
"   /HOLD                              Puts the current essay on hold.",
"   /JOIN,conf name[,password]         Join a conference",
"   /KILL                              Erase current essay",
"   /LIMITS                            Displays Talk's current limits.",
"   /LIST                              List current essay",
"   /LOCK,password                     Lock a conference",
"   /LOG[,number]                      Display userlog",
"   /MAIL[,vax user[,subject]]         Access the VAXmail system",
"   /MAKE,conf name[,password]         Create a conference",
"   /MODERATE                          Make the current conference moderated",
"   /MONITOR[,conf name[,password]]    Monitor a conference",
"   /NAME,new name                     Change nickname",
"   /NEXT                              Let the next person in the queue speak",
"   /NEWS                              Shows Talk news",
"   /NODES                             Shows a list of nodes linked to Talk.",
"   /NOMONITOR                         Stop users from monitoring conference.",
#if !DATASEEK
"   /NOTIFY[,vax username]             Notify when user logs into VAX",
#endif
"   /QUEUE                             Display the speaker request queue",
"   /QUIT[,comment]                    Exit TALK",
"   /RELINQUISH                        Relinquish control of your conference",
"   /RENAME                            Give the conference a new name",
"   /REPLY                             Reply to the last private message",
"   /RESEND[,user name]                Resend last multi-line message",
"   /SEND[,user name]                  Send a multi-line message",
"   /SET,flag name                     Set a flag",
"   /SHOW[,flag name]                  Show flag settings",
"   /SILENCE,user name                 Disallow a user to speak",
"   /SPEAK                             Enter a request into the speaker queue",
"   /SQUELCH[,user name]               Squelch (ignore) a user",
"   /STATUS                            Show status about yourself.",
"   /SUMMARY                           Show a summary of Talk users",
"   /TO[,user name]                    Direct a message to a user",
"   /TRANSCRIBE[,file name]            Transcribe conference to file",
"   /UNHOLD                            Take essay off hold",
"   /UNLOCK                            Unlock a conference",
"   /UNMODERATE                        Unmoderates the conference",
"   /UNSQUELCH,user name               Unsquelch a user",
"   /USERS[,conf name]                 Show users on TALK",
"   /WHISPER,user name                 Send a message to a specific user",
" ",
"" };

static char *author_text[] = {
" ",
"   TALK was written in VAX C by Bob Lafleur. TALK was inspired from my",
"use of  many 'TALK' systems, including, but not limited to 'TALK',",
"'Twinkle' and 'Confer' at U-Mass/Amherst, 'DIALOG' by Mike Hurst, and",
"CompuServe's CB Simulator.",
" ",
"   If you have any ideas for this TALK program, please send them to me,",
"as I am continually interested in making this program the BEST talk program",
"around! I can be contacted at:",
" ",
"     Bob Lafleur",
"     45 Ionia Street",
"     Springfield, MA  01109-2519",
" ",
"     Phone:      (413) 737-8503",
"     CompuServe: 75146,3122",
"     GEnie:      SKID",
"     Dataseek:   SKID",
"     Bitnet:     Skid@Umass.Bitnet",
"     Packet:     NQ1C @ W1NY",
" ",
"   Enjoy!",
" ",
"" };

        int     i;
        int     start;
        char    param[80];

        if (n > 0) {
           printf("Invalid mumber of parameters.\r\n");
           return;
        } /* end of if */

        if (n == -1)    /* no parameter... show topics */
           prn_hlp(help_text);
        else { /* figure out what they wanted */
           strcpy(param, p);
           for (i = 0; i < strlen(param); i++)
              param[i] = tolower(param[i]);

           if (!strncmp(param, "introduction", strlen(param)))
              prn_hlp(introduction_text);
           else if (!strncmp(param, "commands", strlen(param)))
              prn_hlp(commands_text); 
           else if (!strncmp(param, "flags", strlen(param)))
              prn_hlp(flags_text);
           else if (!strncmp(param, "status", strlen(param)))
              prn_hlp(status_text);
           else if (!strncmp(param, "summary", strlen(param)))
              prn_hlp(summary_text);
           else if (!strncmp(param, "author", strlen(param)))
              prn_hlp(author_text);
           else single_help(commands_text, param, help_text);

        } /* end of else */

}

prn_hlp(ptr)
        char    *ptr[]; /* the help to print */

{
        int     i = 0;

        while (*ptr[i])
           printf("%s\r\n", ptr[i++]);

}
single_help(ptr, param, ht)
        char *ptr[];
        char param[];
        char *ht[];
{
        int     start;
        int     i;

                for (i = 0; i < strlen(param); i++)
                   param[i] = toupper(param[i]);

                start = -1;
                for (i = 0; *ptr[i]; i++)
                   if(strlen(ptr[i]) > 4)
                     if(!strncmp(param, ptr[i]+4, strlen(param)))
                      start = i;
                if (start != -1) { /* found some text */
                   printf("\r\n", start);
                   while (strcmp(ptr[start-1], " ")) /* beginning */
                      start--;
                   while (strcmp(ptr[start], " "))
                      printf("%s\r\n", ptr[start++]);
                   printf("\r\n");
                   }
                else prn_hlp(ht); /* he screwed up... tell him what to do */

}
