head     1.1;
access   ;
symbols  ;
locks    bin:1.1;
comment  @@;


1.1
date     91.04.11.15.04.10;  author bin;  state Exp;
branches ;
next	;


desc
@init ver pulled from mango
@



1.1
log
@Initial revision
@
text
@This package is a modem independent dial(3) package.  It provides a device
independent method for dialing and manipulating modems.  The format of the
description file is the ever present ;-) termcaps format.  You may want to
read the modemcap file to see just what capabilities are present.

This is Release 1.1 of this software.  Please bear in mind that I haven't
released this to the public before this release.

--< Start of the legal conditions of this software >--

This software is copyright 1987 John F. Haugh II, all rights reserved.
Use, duplication and disclosure subject to the terms and conditions of
the license agreement below.  This notice is intended to have legal
significance, and not to be taken lightly.  If you have any questions,
please contact the author at the address below.  This copyright covers
the entire software distribution it is enclosed with.  Removing this
copyright is a violation of federal copyright law.  Please consult an
attorney if you have any questions regarding the legal ramifications of
this agreement.

This software is licensed subject to the following terms and conditions.
In order that this product may expand into the universe to fill the current
(void) in this area, it is my intention that this software be widely
distributed, and maintained in a consistent fashion.  To this end, you
are authorized to redistribute this software in either source or binary
format, provided that, this agreement is retained as part of the release,
no direct profit is realized from the sale or transfer of this software,
and that credit is given the author for this work.  To facilitate this
package coming into acceptance, you must provide library versions of this
software and any documentation included with this package when distributing
binary versions embedded in your products.  Paying royalties would be
nice and you won't do it anyway, so don't even pretend to be nice people
unless you really want me to stay on top of this thing.  Author retains
all rights to derived works, and as a condition to your making modifications
to the source code, you are required by this agreement to provide detailed
notes concerning the actual modifications and the motivation behind the
modification itself.  Making the documentation look better is a nice idea
also.  And since I'm very lazy, please send me your documentation.  You
don't have to, but standardized documentation is a Good Thing.

The author provides this software without warrantee.  The user accepts by
use all responsibility for the performance (or lack thereof ;-) of this
software, including loss of profits, reputation, or job.

--< End of the legal stuff, now for the documentation. >--

call.c - a test program.  do a `make all' to create the library and compile
the call program.  read all the documentation before trying it out.

dial(3L) - a version of the standard dial(3) command which should be fairly
compatible with the one in your manual ...  has both dial() and undial()
routines.  see your manpage for more details.

hangup.c/hangup(3L) - a routine that attempts to absolutely hangup a modem.
it uses the modem capabilities database to figure out the best way to
hangup a modem.  it supports both hangup on DTR and hangup on command.

initmodem.c/initmodem(3L) - this routine takes a character pointer to a
modem name as it appears in the database and a file descriptor from a
open() call, and loads the database information.  after the database is
loaded, the modem is placed in the command mode.  beware, initmodem()
may make an alarm(2) call if the InitializationDelay requirement is present.

mdial.c/mdial(3L) - this routine builds a dial command string to give
to the dialer.  this is the weakest routine in the package, because i don't
have that many different modems around here, and hayes is pretty damned
common, so i don't see many others.  the first argument is a character string
telephone number, digits only, or if you understand your modem (boo on me)
you can put in pause commands.  the second argument is a file descriptor
from an open() call. this routine _will_ be the first to get fixed.

merror.c/merror(3L) - this routine is a modemcap replacement for perror.
an `int merrno' variable is maintained by the routines.  after an error
return, you can call merror with a character pointer just like perror(3)
and have a message printed on your standard error output.

mgetent.c/mgetent(3L) - this is a low level routine you shouldn't be
calling anyway.  it works like tgetent(3), only different.  mostly, it
doesn't have the neat things.  the first argument is a pointer to a
character buffer where the entry will be placed.  the second argument
is a pointer to the modem name.

mgetflag.c/mgetflag(3L) - just like tgetflag.  this is a low level
routine you might just want to use.  in particular, `if (mgetflag ("hc"))'
tests for modem hanging up on DTR being negated.  `if (HC)' does the
same thing after mgetent() ...

mgetnum.c/mgetnum(3L) - just like tgetnum.  don't see much use for using
it.

mgetstr.c/mgetstr(3L) - just like tgetstr, except it has a few quirks.
octal escapes are all three digits.  the format '^c' where 'c' is some
character, only works with upper case letters.  correctly at least.
ain't no way to get a null into the string, no how.

/etc/modemcap - a modem capabilities database.  read the file for more
details.

/etc/modemtype - a modem/port mapping table.  look at the example file.

you will need to make entries for your devices in the L-devices file.
the speed listed must be a legal speed according to the modemcap file.
any compilation errors or warnings should be brought to my attention. i
didn't get any the last time i compiled all this stuff.

the source is well enough (i'm lieing) documented for anyone to fix.
please don't add your local improvement.  if you insist, make the mods
and send me context diffs.  i'll tell you what i think about the change.
remember, according to the license you must let me in on what you are
doing.  this is in everyones best interest.

--< End of the documentation, now for my personal philosophical b.s. >--

It is not my intention to limit the use of this software or your profits,
except where such use is inconsistent with the spirit of humanity, whatever
the hell that means.  I don't care how much money you make selling your
new terminal program, just don't go jacking the price up because you
have added this thing.  I will only work on this package if I get feedback
and I have some motivation, other than being a nice guy.  I think I've been
nice enough by putting this thing out there.  If what you want makes sense
in a real way, I will probably include your suggestions, and if you are
polite, I might just give you credit ;-)  So don't be a jerk and pretend
that anyone actually works for free.  I have a car note just like you.

By way of this license and the legal mumbo-jumbo, I hope to keep people
from ripping me off, and totally trashing and perverting the integrity
of the code.  Please, don't construe this agreement to be limiting in
a negative way.  I hope to provide just enough limits to keep the code
consistent and portable across all machine environments, and hopefully,
you will use this thing enough that it becomes better and more useful
and fills the need for such a thing.  Who knows, we both might just make
some money off of this thing.

--
John F. Haugh II		QUOTE: "The important thing is to not stop
7825 McCallum Blvd.			questioning" -- Albert Einstein
Apt. 510			TELCO: (214) 250-3311
Dallas, TX 75252		UUCP:  { backbone } !ihnp4!killer!jfh


----------------------------------------------------------------------

All of this stuff is modified from jfh@@rpp368.dallas.tx.us's package,
so that it more closely follows the dial(3) manual page. Some things
were changed just because I wanted them to be done that way.
@
