[comp.os.minix] Whereis modemcap.h ?

glenn@extro.ucc.su.oz (G. Geers [ext 3241]) (07/04/89)

Have I missed something in the UUPC (sic.) postings ? I can't seem to find
modemcap.h anywhere. If someone has this could they please send it to me or
post it to the net please.
It would also be nice to have a manifest so we could tell what files we are
supposed to have. Just being picky.
UUPC should be very useful.
				Thanks,
					Glenn
glenn@extro.ucc.su.oz

housel@en.ecn.purdue.edu (Peter S. Housel) (07/05/89)

Oops. I've made this exact same mistake before; you'd think I'd learn.

Firstly, the shar files were split up without regard to the directory
structure, and things can get messed up if you're not careful. Strip
off the headers of parts 2-5, concatenate them together (in order), and
then extract using sh.

Secondly, the modemcap Makefile was out of date and modemcap.h was
omitted entirely. Both are included below.

The directory structure should look something like this:
total 84
-rw-r--r--  1 housel       1364 Jul  4 11:15 Makefile
-rw-r--r--  1 housel       2032 Jul  4 11:15 README
-rw-r--r--  1 housel         33 Jul  4 11:15 cleanlog
-rw-r--r--  1 housel       7485 Jul  4 11:15 dcp.c
-rw-r--r--  1 housel       3207 Jul  4 11:15 dcp.h
-rw-r--r--  1 housel      12869 Jul  4 11:15 dcpsys.c
-rw-r--r--  1 housel       2659 Jul  4 11:15 dcpunix.c
-rw-r--r--  1 housel       4039 Jul  4 11:15 dcputil.c
-rw-r--r--  1 housel       7390 Jul  4 11:15 dcpxfer.c
drwxr-xr-x  2 housel       1024 Jul  4 11:16 lib.uucp/
drwxr-xr-x  2 housel       1024 Jul  4 17:10 modemcap/
-rw-r--r--  1 housel      17625 Jul  4 11:16 newgpkt.c
-rw-r--r--  1 housel        693 Jul  4 11:16 qmail
-rw-r--r--  1 housel         39 Jul  4 11:16 uuclean
-rw-r--r--  1 housel       8743 Jul  4 11:16 uux.c

lib.uucp:
total 6
-rw-r--r--  1 housel         88 Jul  4 11:15 L-devices
-rw-r--r--  1 housel         71 Jul  4 11:16 L.sys
-rw-r--r--  1 housel          0 Jul  4 11:16 LOGFILE
-rw-r--r--  1 housel          2 Jul  4 11:16 SPOOLSEQ

modemcap:
total 50
-rw-r--r--  1 housel        949 Jul  4 17:09 Makefile
-rw-r--r--  1 housel       7597 Jul  4 11:16 README
-rw-r--r--  1 housel        200 Jul  4 11:16 README.housel
-rw-r--r--  1 housel        963 Jul  4 11:16 call.c
-rw-r--r--  1 housel       5759 Jul  4 11:16 dial.c
-rw-r--r--  1 housel       1126 Jul  4 11:16 dial.h
-rw-r--r--  1 housel       1178 Jul  4 11:16 dialvars.c
-rw-r--r--  1 housel       1079 Jul  4 11:16 hangup.c
-rw-r--r--  1 housel       1004 Jul  4 11:16 initmodem.c
-rw-r--r--  1 housel       1452 Jul  4 11:16 makefile.unix
-rw-r--r--  1 housel       1296 Jul  4 11:16 mdial.c
-rw-r--r--  1 housel        591 Jul  4 11:16 merror.c
-rw-r--r--  1 housel       1689 Jul  4 11:16 mgetent.c
-rw-r--r--  1 housel        817 Jul  4 11:16 mgetflag.c
-rw-r--r--  1 housel        945 Jul  4 11:16 mgetnum.c
-rw-r--r--  1 housel       2549 Jul  4 11:16 mgetstr.c
-rw-r--r--  1 housel       2017 Jul  4 11:16 modemcap
-rw-r--r--  1 housel       2343 Jul  4 17:06 modemcap.h

-Peter S. Housel	housel@ecn.purdue.edu		...!pur-ee!housel

#!/bin/sh
#cd modemcap
echo 'x - Makefile'
sed 's/^X//' <<'**-Makefile-EOF-**' >Makefile
X# Your library directory.
XLIBDIR=/usr/lib
X# Your local command directory.
XLBIN=/usr/housel/bin
X# OSFLAG=-DUNIX_S5	# For System V machines.
XOSFLAG=-DUNIX_V7	# For Version 7 machines.
X# For those poor people who need ranlib
X# RANLIB=ranlib $(LIBDIR)/libmodemcap.a
X# Standard Bourne shell.
XSHELL=/bin/sh
X
XCFLAGS=$(OSFLAG) -LIB
X# CFLAGS=-O
X# LDFLAGS=-s
X
XOFILES=mgetent.s mgetstr.s mgetflag.s mgetnum.s mdial.s merror.s \
X	initmodem.s hangup.s dial.s dialvars.s
X
XCFILES=mgetent.c mgetstr.c mgetflag.c mgetnum.c mdial.c merror.c \
X	initmodem.c hangup.c dial.c dialvars.c
X
XLFILES=	hangup.s\
X	dial.s\
X	dialvars.s\
X	initmodem.s\
X	mgetent.s\
X	mgetstr.s\
X	mgetflag.s\
X	mgetnum.s\
X	mdial.s\
X	merror.s\
X
Xall:	libmodemcap.a
X
Xlibmodemcap.a: $(LFILES)
X	ar r libmodemcap.a $(LFILES)
X
Xinstall:	all
X	cp modemcap /etc/modemcap
X	cp libmodemcap.a $(LIBDIR)
X	chmod 644 /etc/modemcap $(LIBDIR)/libmodemcap.a
X
Xinitmodem.s:	initmodem.c modemcap.h
Xmdial.s:	mdial.c modemcap.h
**-Makefile-EOF-**
echo 'x - modemcap.h'
sed 's/^X//' <<'**-modemcap.h-EOF-**' >modemcap.h
X/* 
X *      @(#)modemcap.h  1.0
X *
X *      names of variables and whatnots for modemcap file
X */
X
Xextern
Xchar    AS, /* True if numbers dialed in ASCII, False for binary digits     */
X        DI, /* True if modem can dial numbers, False otherwise              */
X        HC, /* True if modem hangs up when DTR drops, False otherwise       */
X        TT; /* True if modem uses touchtone by default, False for pulse     */
Xextern
Xchar    *AT, /* Enter command state when online                             */
X        *CS, /* Command start string                                        */
X        *CE, /* Command end string - must be present if CS is               */
X        *DS, /* Dial command string                                         */
X        *DE, /* End of dial command string - must be present if DS is       */
X        *CO, /* Connection made at primary baud rate                        */
X        *CL, /* Connection made at secondary (lower) baud rate              */
X        *IS, /* Initialization string - reset modem to onhook and ready     */
X	*HU; /* Hangup command                                              */
Xextern
Xint     AD, /* Delay after AT string before next command                    */
X        BD, /* Highest communications baud rate                             */
X        BL, /* Another, lower baud rate                                     */
X        ID; /* Delay time after initialization                              */
X
X/*
X * The dial command is the principle string that must be built.
X * The routines will build a dial command as follows:
X *
X *      <CS><DS><phone-number><DE><CE>
X *
X * Note that the DE and CE strings are present ALWAYS.
X * This procedure will be used to dial phone numbers if the DI flag is true.
X * If this isn't the way to dial numbers,
X * DO NOT SET DI IN THE MODEMCAP FILE!!!
X */
X
X/*
X * a hangup command will be performed as follows:
X *
X *      1). any attention string (AT) will be sent followed by the delay (AD)
X *      2). modem should now be in command state, send hangup (HU) command
X *      3). send initialization string (IS) followed by the delay (ID)
X *
X * It is important that you determine a correct AT and HU string
X *  to perform this function.
X * If the modem hangs up when DTR falls (even if there is a HU string),
X *  declare the flag HC (for Hangup on Close).
X */
**-modemcap.h-EOF-**
#cd ..