[comp.sources.amiga] v90i027: dial.vt100 1.2 - ARexx "Dialing Directory" for use with VT100 2.9, Part01/01

Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator) (01/18/90)

Submitted-by: dwl10@uts.amdahl.com (Dave Lowrey)
Posting-number: Volume 90, Issue 027
Archive-name: comm/dial-1.2

dial.vt100 - An ARexx "Dialing Directory" script for use with VT100 (v2.9).

dial.vt100 allows the user to store up to 20 frequently called phone
numbers. When selected, dial.vt100 will have your modem automatically
call the desired number.

dial.vt100 requires the following:
  - VT100 terminal program (version 2.9 or higher)
  - ARexx
  - arp.library
  - rexxarplib.library

VT100, arp.library and rexxarplib.library are avaliable on various
archives, FISH disks, and other public sources.

Author: David W. Lowrey  (dwl10@uts.amdahl.com or amdahl!dwl10)

#!/bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 1)."
# Contents:  dial.doc dial.vt100
# Wrapped by tadguy@xanth on Wed Jan 17 19:51:58 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'dial.doc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'dial.doc'\"
else
echo shar: Extracting \"'dial.doc'\" \(2229 characters\)
sed "s/^X//" >'dial.doc' <<'END_OF_FILE'
X
X dial.vt100 - An ARexx "Dialing Directory" for use with VT100 (V2.9 or higher)
X
X Author: David W. Lowrey
X	 dwl10@uts.amdahl.com or amdahl!dwl10
X	 (713)-894-7447 (home)
X	 (713)-850-8828 (work)
X
X    Version 1.2: Jan 15, 1990
X
X    This program allows the user to save up to 20 frequently used
X    phone numbers. The program will dial the phone number, at the
X    request of the user. Each number has 7 fields associated with it.
X    They are:
X
X    Name:    An ascii string describing the number.
X    Phone:   The actual phone number to be dialed
X    Baud:    The Baud Rate that VT100 should be set to when dialing this number
X    Parity:  The Parity that VT100 should be set to when dialing this number
X    Prefix:  A string that is sent to the modem BEFORE dialing the number
X    Postfix: A string that is sent to the modem AFTER dialing the number,
X	     A carrige return is signified by "^M".
X    Script:  The name of an ARexx script to be called. This script is passed
X	     the above mentioned parameters. When a user's script is called,
X	     this script exit's. All dialing must be done by the user's script.
X	     This script launches the user's script via VT100's RX command.
X	     Therfore, the user's script must end in '.vt100'.
X
X    The phone file defaults to S:VT100.phones. If it doesn't exist, dial
X    will use default values for all fields.
X
X    To install: Copy dial.vt100 to REXX:dial.vt100
X		Makesure the following files are in LIBS:
X		 - arp.library
X		 - rexarplib.library
X
X    To run: either directly execute from the VT100 "REXX MACRO" menu, or
X    issue the "RX DIAL" script command.
X
X
X    This program requires:
X       VT100 Version 2.9 (Released October-89)
X       ARexx
X       arp.library	 (PD routines)
X       rexarplib.library (PD routines, necessary for windowing)
X
X    VT100, arp.library,  and rexarplib.library are avaliable in many
X    PD collections.
X
X    ARexx is a licensed program, written by William S. Hawes
X
X
X    Future enhancements?
X     - Adjust number of entries in list acording to the size of
X       the user's screen (more entries if using interlace).
X
X     - Be able to read the dialing directories of other terminal
X       programs.
X
X     - Any other suggestions would be welcome.
X
END_OF_FILE
if test 2229 -ne `wc -c <'dial.doc'`; then
    echo shar: \"'dial.doc'\" unpacked with wrong size!
fi
# end of 'dial.doc'
fi
if test -f 'dial.vt100' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'dial.vt100'\"
else
echo shar: Extracting \"'dial.vt100'\" \(17156 characters\)
sed "s/^X//" >'dial.vt100' <<'END_OF_FILE'
X/*
X * dial.vt100 - An ARexx script for use with VT100 (V2.9 or higher)
X *
X *    This program allows the user to save up to 20 frequently used
X *    phone numbers. The program will dial the phone number, at the
X *    request of the user. Each number has 7 fields associated with it.
X *    They are:
X *
X *    Name:    An ascii string describing the number.
X *    Phone:   The actual phone number to be dialed
X *    Baud:    The Baud Rate that VT100 should be set to when dialing this number
X *    Parity:  The Parity that VT100 should be set to when dialing this number
X *    Prefix:  A string that is sent to the modem BEFORE dialing the number
X *    Postfix: A string that is sent to the modem AFTER dialing the number,
X *	       A carrige return is signified by "^M".
X *    Script:  The name of an ARexx script to be called. This script is passed
X *	       the above mentioned parameters. When a user's script is called,
X *	       this script exit's. All dialing must be done by the user's script.
X *	       This script launches the user's script via VT100's RX command.
X *	       Therfore, the user's script must end in '.vt100'.
X *
X *    The phone file defaults to S:VT100.phones. If it doesn't exist, dial
X *    will use default values for all fields.
X *
X *    To install: just copy this file to REXX:dial.vt100
X *
X *    To run: either directly execute from the VT100 "REXX MACRO" menu, or
X *    issue the "RX DIAL" script command.
X *
X *
X *    This program requires:
X *	 VT100 Version 2.9 (Released October-89)
X *	 ARexx
X *	 arp.library	   (PD routines)
X *	 rexarplib.library (PD routines, necessary for windowing)
X *
X *    VT100, arp.library,  and rexarplib.library are avaliable in many
X *    PD collections.
X *
X *    ARexx is a licensed program, written by William S. Hawes
X *
X ****************************************************************************
X *    dial.vt100 - Copyright 1989 by Starbound Computing, a division of
X *		   Starbound Enterprizes.
X *
X *		 - Written by David W. Lowrey (USENET: amdahl!dwl10)
X *
X *	       THIS PROGRAM IS NOT IN THE PUBLIC DOMAIN!!!
X *
X *  All Rights Reserved. This program may be freely used and copied, as long
X *  as no fee, other than a "reasonable" copying charge, is charged for
X *  it's use.
X *
X *  Permission is granted to include this program in various user group PD
X *  collections, the FISH PD collection, or private PD collections.
X *
X *  Inclusion in and commercial PD disk collections, including Magazine
X *  disks, requires written permission from the author.
X *
X *  Any use for comercial purposes requires written permission
X *  from the author.
X *
X */
X
X/*
X * Version 1.2:  Striped off extra blanks from dial strings before sending
X *		 them to VT100 (the modem).
X *
X * Version 1.1:  Cleaned up code.
X *
X * Version 1.0:  Initial public release
X */
X
X/*
X * default values
X *
X * feel free to change any of these
X * Note that the default name must be exactly 25 characters long
X */
Xdefault.name = "                         "
Xdefault.phone = " "
Xdefault.baud = "2400"
Xdefault.parity = "NONE"
Xdefault.prefix = "ATDT"
Xdefault.postfix = "^M"     /* carrage return after dial string */
Xdefault.script = " "
X
X/*
X * Make sure the required libraries have been loaded
X */
Xif ~show('l', "rexxarplib.library") then do
X   check = addlib('rexxarplib.library',0,-30,0)
X   if ~check then do
X      say "Can't load rexxarplib.library!"
X      exit -1
X   end
X   else nop
Xend
Xelse nop
X
Xif ~show('l', "rexxsupport.library") then do
X   check = addlib('rexxsupport.library',0,-30,0)
X   if ~check then do
X      say "Can't load rexxsupport.library!"
X      exit -1
X   end
X   else nop
Xend
Xelse nop
X
X/*
X * Create the window manager process
X */
Xaddress command run "rx 'call CreateHost(DIALWIN,DIALPORT)'"
Xaddress command "waitforport DIALWIN" /* wait for port to come active */
X
X/*
X *   Window sizes
X */
Xwindow.leftedge = 50
Xwindow.topedge	= 0
Xwindow.width	= 470
Xwindow.height	= 200
X
X/*
X * Initialize data values
X */
Xnames.	    = default.name
Xphones.     = default.phone
Xbaud.	    = default.baud
Xparity.     = default.parity
Xprefix.     = default.prefix
Xpostfix.    = default.postfix
Xscript.     = default.script
X
Xsavefile    = "S:VT100.phones"
X
Xmod.=""
X
Xgadget.previous=0
Xmodified=0
X
Xcall OpenWin1
X
X/* Open our host port */
Xcall openport(DIALPORT)
X
X/*
X * read in the phone directory
X */
Xcall ReadPhone
X
Xcall DrawScreen1
X
X/*
X *   Wait for messages at DIALPORT
X */
Xquitflag = 0
Xdo forever until quitflag
X   call waitpkt(DIALPORT)
X   p = getpkt(DIALPORT)
X   if p ~== '0000 0000'x then
X      do
X
X      thisarg = getarg(p)
X      gadgetnum = getarg(p,1)
X      t=reply(p, 0)
X
X/*
X * Decode the IDCMP message
X */
X
X      select
X      /*
X       *   Messages are either CLOSEWINDOW
X       */
X	 when thisarg == 'CLOSEWINDOW' then do
X	    if modified=1 then reply=Request(140, 40,"NOTICE: There are unsaved\changes. Click 'Cancel' to abort.\Click 'Okay' to continue, and\loose all changes.",,"Okay","Cancel")
X	    else reply="OKAY"
X	    if reply == "OKAY" then do
X	       call CloseWindow(DIALWIN)
X	       quitflag = 1
X	    end
X	    else nop
X	 end
X      /*
X       *   ...or one of the Phone Number gadgets has been selected
X       */
X	 when thisarg == 'Gadget' then do
X	    gadget.current = gadgetnum
X
X	    if gadget.current == gadget.previous then do
X	       call SetGadget(DIALWIN, gadget.current, "OFF")
X	       gadget.previous=0
X	       gadget.current=0
X	    end
X	    else do
X	       call SetGadget(DIALWIN, gadget.current, "ON")
X	       if gadget.previous ~== 0 then call SetGadget(DIALWIN, gadget.previous, OFF)
X	       gadget.previous=gadget.current
X	    end
X
X	 end
X      /*
X       *   ...or the LOAD Gadget has been selected
X       */
X
X	 when thisarg == 'Load' then do
X	    if modified=1 then reply=Request(140, 40,"NOTICE: There are unsaved\changes. Click 'Cancel' to abort.\Click 'Okay' to continue, and\loose all changes.",,"Okay","Cancel")
X	    else reply="OKAY"
X	    if reply == "OKAY" then do
X	       newsave=Request(140,40,"     LOAD PHONE FILE\\Enter name of phone file",savefile,"Okay","Cancel")
X	       if newsave ~= "" then do
X		  if exists(newsave) then do
X		     savefile=newsave
X		     call ReadPhone
X		     call CloseWindow(DIALWIN,"CONTINUE")
X		     call OpenWin1
X		     call DrawScreen1
X		     modified=0
X		  end
X		  else do
X		     t=Request(140,40,"Phone file not found\Load request canceled",,"Okay",)
X		  end
X	       end
X	       else nop
X	    end
X	    else nop
X	 end
X
X      /*
X       * ...or the SAVE gadget has been selected
X       */
X
X	 when thisarg == 'Save' then do
X	    newsave=Request(140,40,"     SAVE PHONE FILE\\Enter name of phone file",savefile,"Okay","Cancel")
X	    if newsave ~= "" then do
X	       savefile=newsave
X	       call SavePhone
X	       modified=0
X	    end
X	    else nop
X	 end
X      /*
X       *   ...or the DELETE gadget has been selected
X       */
X
X	 when thisarg == 'Delete' then do
X	    if gadget.current ~= 0 then do
X	       index=gadget.current
X	       t=Request(140,40,"     DELETE ENTRY\\"names.index"\\is about to be deleted\Please confirm:",,"Okay","Cancel")
X	       if t == "OKAY" then do
X		  names.index="                         "
X		  phones.index="                         "
X		  baud.index="2400"
X		  parity.index="NONE"
X		  prefix.index="                         "
X		  postfix.index="                         "
X		  script.index="                         "
X		  call CloseWindow(DIALWIN,"CONTINUE")
X		  call OpenWin1
X		  call DrawScreen1
X		  gadget.current=0
X		  gadget.previous=0
X		  modified=1
X	       end
X	       else nop
X	    end
X	    else nop
X	 end
X
X      /*
X       *   ...or MODIFY has been selected
X       */
X
X      when thisarg == 'Modify' then do
X	 if gadget.current ~= 0 then do
X	    result=modify(gadget.current)
X	    if result == 'Okay' then do
X	       i = gadget.current
X	       names.i = mod.names
X	       phones.i = mod.phones
X	       baud.i = mod.baud
X	       parity.i = mod.parity
X	       prefix.i = mod.prefix
X	       postfix.i = mod.postfix
X	       script.i = mod.script
X	       modified = 1
X	    end
X	    else nop
X
X	    call CloseWindow(DIALWIN,"CONTINUE")
X	    call OpenWin1
X	    call DrawScreen1
X	    call SetGadget(DIALWIN,gadget.current, "ON")
X	 end
X	 else nop
X      end
X
X      /*
X       *   ...or the Dial gadget
X       */
X	 when thisarg == 'Dial' then do
X	    if gadget.current ~= 0 then do
X	       if modified=1 then reply=Request(140, 40,"NOTICE: There are unsaved\changes. Click 'Cancel' to abort.\Click 'Okay' to continue, and\loose all changes.",,"Okay","Cancel")
X	       else reply="OKAY"
X	       if reply == "OKAY" then do
X		  i=gadget.current
X		  if strip(script.i) = "" then do
X		     dial.prefix=strip(prefix.i)
X		     dial.phones=strip(phones.i)
X		     dial.postfix=strip(postfix.i)
X		     'BAUD 'baud.i
X		     'PARITY 'parity.i
X		     'SEND "'dial.prefix||dial.phones||dial.postfix'"'
X		  end
X		  else do
X		  /*
X		   * Launch user's script as a seperate task
X		   * we will end this script now.
X		   */
X		     'rx 'script.i names.i" "phones.i" "baud.i" "parity.i" "prefix.i" "postfix.i
X		  end
X		  quitflag = 1
X		  call CloseWindow(DIALWIN)
X	       end
X	       else nop
X	    end
X	    else nop
X	 end
X
X      /*
X       *   ...or an unknown IDCMP msg has been received
X       */
X
X	 otherwise do
X	    say thisarg
X	 end
X      end
X   end
X   else nop
Xend
X
Xexit
X
X/*
X *   Open a window
X */
XOpenWin1:
Xidcmp = 'CLOSEWINDOW+GADGETUP'
Xflags = 'WINDOWCLOSE+WINDOWDRAG+WINDOWDEPTH'
Xcall OpenWindow(DIALWIN, window.leftedge, window.topedge, window.width, ,
X		window.height, idcmp, flags)
XCall ModifyHost(DIALWIN, 'CLOSEWINDOW',"CLOSEWINDOW%1DUMMY")
Xreturn
X
X/*
X *    Draw the phone book screen
X */
XDrawScreen1: PROCEDURE expose names.
Xcall SetAPen(DIALWIN, 1)
Xcall AddGadget(DIALWIN, 15, 15, 1, names.1, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 30, 2, names.2, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 45, 3, names.3, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 60, 4, names.4, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 75, 5, names.5, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 90, 6, names.6, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 105, 7, names.7, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 120, 8, names.8, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 135, 9, names.9, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 15, 150, 10, names.10, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 15, 11, names.11, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 30, 12, names.12, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 45, 13, names.13, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 60, 14, names.14, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 75, 15, names.15, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 90, 16, names.16, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 105, 17, names.17, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 120, 18, names.18, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 135, 19, names.19, "Gadget%1%d")
Xcall AddGadget(DIALWIN, 245, 150, 20, names.20, "Gadget%1%d")
Xcall Move(DIALWIN,0,165)
Xcall SetAPen(DIALWIN, 3)
Xcall Draw(DIALWIN, 470, 165)
Xcall Flood(DIALWIN, 1, 13, 13)
Xcall Move(DIALWIN,50,175)
Xcall SetAPen(DIALWIN, 1)
Xcall Text(DIALWIN, "Select a destination, then select a function.")
Xcall AddGadget(DIALWIN, 30,180, 21, "DIAL", "Dial%1dummy")
Xcall AddGadget(DIALWIN, 100, 180, 22, "MODIFY", "Modify%1dummy")
Xcall AddGadget(DIALWIN, 175, 180, 23, "DELETE", "Delete%1dummy")
Xcall AddGadget(DIALWIN, 250, 180, 24, "LOAD", "Load%1dummy")
Xcall AddGadget(DIALWIN, 325, 180, 25, "SAVE", "Save%1dummy")
Xcall AddGadget(DIALWIN, 400, 180, 26, "CANCEL", "CLOSEWINDOW%1dummy")
Xreturn
X
X/*
X * Routine to read a Phonebook File
X */
XReadPhone: procedure expose names. phones. baud. parity. prefix. postfix.,
X			    script. savefile sys.
X
Xif exists(savefile) then do
X   t=open(phonebook,savefile,'Read')
X   do index=1 to 20
X      entry=readln(phonebook);
X      parse var entry names.index '\' phones.index '\' baud.index '\',
X		      parity.index '\' prefix.index '\' postfix.index '\',
X		      script.index
X      names.index=center(names.index,25)
X   end
X   t=close(phonebook)
Xend
Xreturn
X
X/*
X * Routine to write a Phonebook File
X */
XSavePhone: procedure expose names. phones. baud. parity. prefix. postfix.,
X			    script. savefile sys.
X
Xt=open(phonebook,savefile,'Write')
Xdo index=1 to 20
X   names.index=strip(names.index)
X   t=writeln(phonebook,names.index'\'phones.index'\'baud.index'\'parity.index'\'prefix.index'\'postfix.index'\'script.index)
Xend
Xt=close(phonebook)
Xreturn
X
X/*
X * modify: Add/Modify a phone entry
X */
Xmodify: procedure expose names. phones. baud. parity. prefix. postfix.,
X			    script. mod. window.
X
Xparse arg index
X
Xmod.names   = names.index
Xmod.phones  = phones.index
Xmod.baud    = baud.index
Xmod.parity  = parity.index
Xmod.prefix  = prefix.index
Xmod.postfix = postfix.index
Xmod.script  = script.index
X
Xcall formatmod
X/*
X * Get rid of old window and draw our own
X */
Xcall CloseWindow(DIALWIN, "CONTINUE")
Xcall OpenWin1
X
Xcall AddGadget(DIALWIN, 100, 30,  1, mod.names,   "names%1%g",   208)
Xcall AddGadget(DIALWIN, 100, 50,  2, mod.phones,  "phones%1%g",  208)
Xcall AddGadget(DIALWIN, 100, 70,  3, mod.baud,    "baud%1%g",    40)
Xcall AddGadget(DIALWIN, 100, 90,  4, mod.parity,  "parity%1%g",  48)
Xcall AddGadget(DIALWIN, 100, 110, 5, mod.prefix,  "prefix%1%g",  208)
Xcall AddGadget(DIALWIN, 100, 130, 6, mod.postfix, "postfix%1%g", 208)
Xcall AddGadget(DIALWIN, 100, 150, 7, mod.script,  "script%1%g",  208)
Xcall AddGadget(DIALWIN, 20,  180, 8, "OKAY",      "Okay%1%dummy")
Xcall AddGadget(DIALWIN, 400, 180, 9, "CANCEL",    "CLOSEWINDOW%1dummy")
Xcall SetAPen(DIALWIN, 1)
Xcall Move(DIALWIN,8, 37)
Xcall Text(DIALWIN, "     Name:")
Xcall Move(DIALWIN,8, 57)
Xcall Text(DIALWIN, "    Phone:")
Xcall Move(DIALWIN,8, 77)
Xcall Text(DIALWIN, "     Baud:")
Xcall Move(DIALWIN,8, 97)
Xcall Text(DIALWIN, "   Parity:")
Xcall Move(DIALWIN,8, 117)
Xcall Text(DIALWIN, "   Prefix:")
Xcall Move(DIALWIN,8, 137)
Xcall Text(DIALWIN, "  Postfix:")
Xcall Move(DIALWIN,8, 157)
Xcall Text(DIALWIN, "   Script:")
Xcall Move(DIALWIN, 132, 16)
Xcall Text(DIALWIN, "Modify Desired fields")
Xcall Move(DIALWIN, 50, 24)
Xcall Text(DIALWIN, "You must press "RETURN" to save each field")
X
Xcall ActivateGadget(DIALWIN, 1)
X
X/*
X *   Wait for messages at DIALPORT
X */
Xquitflag = 0
Xgadnum.names = 1
Xgadnum.phones = 2
Xgadnum.baud = 3
Xgadnum.parity = 4
Xgadnum.prefix = 5
Xgadnum.postfix = 6
Xgadnum.script = 7
X
Xdo forever until quitflag
X   call waitpkt(DIALPORT)
X   p = getpkt(DIALPORT)
X   if p ~== '0000 0000'x then
X      do
X
X      thisarg = getarg(p)
X      string = getarg(p,1)
X      t=reply(p, 0)
X
X/*
X * Decode the IDCMP message
X */
X
X      select
X      /*
X       *   Messages are either CLOSEWINDOW ...
X       */
X	 when thisarg == 'CLOSEWINDOW' then do
X	    if modified = 1 then reply=Request(140, 40,"NOTICE: There are unsaved\changes. Click 'Cancel' to abort.\Click 'Okay' to continue, and\loose all changes.",,"Okay","Cancel")
X	    else reply="OKAY"
X	    if reply == "OKAY" then do
X	       ret="Not Modified"
X	       quitflag = 1
X	    end
X	    else nop
X	 end
X
X      /*
X       * ...or "Quit" (exit with new values)
X       */
X	 when thisarg == 'Okay' then do
X	    if modified == 1 then do
X	       call formatmod
X	       mod.names=center(strip(mod.names),25)
X	       ret = 'Okay'
X	    end
X	    else ret = 'Not Modified'
X	    quitflag = 1
X	 end
X
X      /*
X       *   ...or one of the free formstring gadgets has been selected
X       */
X	 when thisarg=='names' | thisarg=='phones' | thisarg=='prefix' ,
X	      | thisarg=='postfix' | thisarg=='script' then do
X	    upperarg=upper(thisarg)
X	    if mod.upperarg ~= string then do
X	       mod.upperarg = string
X	       modified = 1
X	    end
X	    else nop
X	    nextgad = gadnum.upperarg + 1
X	    if nextgad == 8 then nextgad = 1
X	    else nop
X	    call ActivateGadget(DIALWIN, nextgad)
X	 end
X
X      /*
X       *   ...or baud has been selected
X       */
X	 when thisarg == 'baud' then do
X	    if string=300 | string=1200 | string=2400 | string=4800 | string=9600 then do
X	       mod.baud = string
X	       modified = 1
X	       call ActivateGadget(DIALWIN, gadnum.baud+1)
X	    end
X	    else do
X	       r=Request(140, 40, "Invalid Baud rate. Baud rate must be\one of the following:\300, 1200, 2400, 4800, 9600",,"Okay")
X	       call ActivateGadget(DIALWIN, gadnum.baud)
X	    end
X	 end
X      /*
X       *   ...or Parity has been selected
X       */
X	 when thisarg == 'parity' then do
X	    string = upper(string)
X	    if string='NONE' | string='MARK' | string='SPACE' | string='EVEN' | string='ODD' then do
X	       mod.parity = string
X	       modified = 1
X	       call ActivateGadget(DIALWIN, gadnum.parity+1)
X	    end
X	    else do
X	       r=Request(140, 40, "Invalid Parity. Parity must be\one of the following:\NONE, MARK, SPACE, EVEN, ODD",,"Okay")
X	       call ActivateGadget(DIALWIN, gadnum.parity)
X	    end
X	 end
X
X	 otherwise do
X	    say thisarg
X	 end
X      end
X   end
X   else nop
Xend
Xreturn ret
X
X/*
X * Format fields
X */
X
Xformatmod: procedure expose mod.
Xmod.names   = left(strip(mod.names), 25)
Xmod.phones  = left(strip(mod.phones), 25)
Xmod.baud    = left(strip(mod.baud), 4)
Xmod.parity  = left(strip(mod.parity), 5)
Xmod.prefix  = left(strip(mod.prefix), 25)
Xmod.postfix = left(strip(mod.postfix), 25)
Xmod.script  = left(strip(mod.script), 25)
Xreturn
END_OF_FILE
if test 17156 -ne `wc -c <'dial.vt100'`; then
    echo shar: \"'dial.vt100'\" unpacked with wrong size!
fi
# end of 'dial.vt100'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have the archive.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
Submissions to comp.sources.amiga and comp.binaries.amiga should be sent to:
	amiga@cs.odu.edu	
or	amiga@xanth.cs.odu.edu	( obsolescent mailers may need this address )
or	...!uunet!xanth!amiga	( very obsolescent mailers need this address )

Comments, questions, and suggestions s should be addressed to ``amiga-request''
(only use ``amiga'' for submissions) at the above addresses.