Organization: Networking & Computing Systems, Rice University
Newsgroups: bit.listserv.mailbook
Date:         Fri, 24 Jul 1992 15:00:15 CDT
From:         "Richard A. Schafer" <SCHAFER@RICEVM1.RICE.EDU>
Subject:      Making MAIL92 look like MAIL91
X-To:         MAIL/MAILBOOK Mailing list <MAILBOOK@ricevm1.rice.edu>

As I promised, I include below an exec which will largely change the
user interface of Mail92 back to that of Mail91.  Not everything
is reset (for example, colors), but the biggest set of things are,
I think.

I make *NO* claims about the correctness of this code, its suitability
for anything but the bitbucket, etc.  I will *NOT* support it, nor do
I guarantee that any future changes to the code will not interfere with
its operation.

I strongly believe that you do *NOT* want to run this code, and am supplying
it for only two reasons:

    1. To show the kinds of flexibility the package has
       and give examples of things like setting function keys.
    2. Some people have expressed a desire to do this for transition
       purposes.

Since this code only makes sense for people who've had the 91 or earlier
versions of the package, I will not distribute it as part of the package,
but simply post it to this list once.  To use it, insert something like

   Arg mode
   'MACRO OLDMAIL' mode

in your MAILSYS (or MAILUSER) XEDIT file.

Richard



/* OLDMAIL XEDIT
   Purpose: Set MAIL pf keys to their Mail91 state for those sites unwilling
            to accept the changed arrangement.
   Author: Richard A. Schafer
   Date: July 19, 1992
   Copyright: None

   Change Activity: None
*/
Address XEDIT
Arg mode

Select
  When mode = 'INITIAL' Then Do
    /* Allow PRE- calls.  We'll define the PF keys in the PRE calls   */
    /* to allow the user to change things with the Options menu.      */
    'SETMAIL EXIT.PREMENU YES'
    'SETMAIL EXIT.PREREAD YES'
    'SETMAIL EXIT.PRESEND YES'
    'SETMAIL CMS.WINDOWS NO'
    End
  When mode = 'PREMENU' Then Do
    /* Claim to use two function key lines                            */
    'SETMAIL KEY.LINES 2'
    /* Set Forward message key to F6                                  */
    'SETMAIL PF13 6'
    /* Set Sortup key to F10                                          */
    'SETMAIL PF15 10'
    /* Set Sortdown key to F11                                        */
    'SETMAIL PF16 11'
    /* Set Cancel key to F3                                           */
    'SETMAIL PF12 3'
    /* Unset Cursor Home key                                          */
    'SETMAIL PF14  '
    /* Unset Log key                                                  */
    'SETMAIL PF11  '
    /* Set Select key to F12                                          */
    'SETMAIL PF6 12'
    /* Unset Menubar key                                              */
    'SETMAIL PF10  '
    pf1 = "PF1=Help     PF2=Read       PF3=Quit    PF4 =Print  "||,
          "PF5 =Reply    PF6 =Forward"
    pf2 = "PF7=ScrollUp PF8=ScrollDown PF9=Discard PF10=SortUp"||,
          " PF11=SortDown PF12=Select"
    'SET RESERVED -1 HIGH' pf2
    'SET RESERVED -2 HIGH' pf1
    End
  When mode = 'PREREAD' Then Do
    /* Claim to use two function key lines                            */
    'SETMAIL KEY.LINES 2'
    /* Set Switch Send key to F10                                     */
    'SETMAIL PF6 10'
    /* Unset Menubar key                                              */
    'SETMAIL PF10  '
    /* Set Cancel key to F3                                           */
    'SETMAIL PF12 3'
    /* Set Forward Message key to F6                                  */
    'SETMAIL PF13 6'
    /* Set Cursor Home key to F12                                     */
    'SETMAIL PF14 12'
    /* Set Switch Send key to F10                                     */
    'SETMAIL PF6 10'
    pf1 = "PF1=Help     PF2=Next       PF3=Quit    PF4 =Print  "||,
          "PF5 =Reply    PF6 =Forward"
    pf2 = "PF7=ScrollUp PF8=ScrollDown PF9=Discard PF10=Switch"||,
          " PF11=Log      PF12=Cursor"
    'SET RESERVED -1 HIGH' pf2
    'SET RESERVED -2 HIGH' pf1
    End
  When mode = 'PRESEND' Then Do
    /* Claim to use two function key lines                            */
    'SETMAIL KEY.LINES 2'
    /* Set Switch Read key to F10                                     */
    'SETMAIL PF6 10'
    /* Set Cancel key to F3                                           */
    'SETMAIL PF12 3'
    /* Unset Menubar key                                              */
    'SETMAIL PF10  '
    /* Set Suspend key to F6                                          */
    'SETMAIL PF13 6'
    /* Set Cursor Home key to F12                                     */
    'SETMAIL PF14 12'
    pf1 = "PF1=Help     PF2=Addline    PF3=Quit    PF4 =Page   "||,
          "PF5 =Send     PF6 =Suspend"
    pf2 = "PF7=ScrollUp PF8=ScrollDown PF9=Delline PF10=Switch"||,
          " PF11=SpltJoin PF12=Cursor"
    'SET RESERVED -1 HIGH' pf2
    'SET RESERVED -2 HIGH' pf1
    End
  Otherwise Nop
  End
If Find('PREMENU PREREAD PRESEND',mode) ^= 0 Then Do
  cmd = Getmail('COMMAND')
  If cmd = 'MAILBOOK' Then cmd = 'MBOK'
  'GLOBALV SELECT' cmd'CMDS SET MAILCMDS.0 5'
  'GLOBALV SELECT' cmd'CMDS SETL MAILCMDS.1 MENUBAR OFF'
  'GLOBALV SELECT' cmd'CMDS SETL MAILCMDS.2 SET RESERVED -4 OFF'
  'GLOBALV SELECT' cmd'CMDS SETL MAILCMDS.3 SET RESERVED -3 OFF'
  'GLOBALV SELECT' cmd'CMDS SETL MAILCMDS.4 SET CMDLINE TOP'
  l = C2d(Substr(Diag(8C),5,2)) - 1
  'GLOBALV SELECT' cmd'CMDS SETL MAILCMDS.5 SET MSGLINE ON' l '2 OVERLAY'
  End
Exit 0
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU