Dec 052017
 
The ultimate COMM package for UNIX systems. Similar to ProComm Plus, this highly rated freeware comes with very portable C source code.
File PCOMM.ZIP from The Programmer’s Corner in
Category UNIX Files
The ultimate COMM package for UNIX systems. Similar to ProComm Plus, this highly rated freeware comes with very portable C source code.
File Name File Size Zip Size Zip Type
ADMIN.C 2941 1300 deflated
CHG_DIR.C 1514 745 deflated
CONFIG.H 2280 1096 deflated
CURSES.C 8712 2460 deflated
DATA_LOG.C 1726 811 deflated
DIAL.C 8426 2777 deflated
DIAL_DIR.H 932 436 deflated
DI_DELAY.C 1978 712 deflated
DI_WIN.C 9250 3030 deflated
DOC 61335 18362 deflated
D_DELETE.C 2015 799 deflated
D_LIB.C 6938 2017 deflated
D_MANUAL.C 1944 886 deflated
D_MENU.C 7099 2208 deflated
D_PRINT.C 3958 1598 deflated
D_PROMPT.C 6130 1676 deflated
D_REVISE.C 4009 1442 deflated
EXPAND.C 2873 1285 deflated
EXTRNL.H 623 348 deflated
E_LIB.C 3928 1412 deflated
GETCWD.C 387 273 deflated
GETOPT.C 1055 453 deflated
HELP.C 2083 829 deflated
INFO.C 1549 702 deflated
INIT.C 3104 1365 deflated
INPUT.C 11133 3634 deflated
LIST_DIR.C 1635 755 deflated
LS_MENU.C 4816 1198 deflated
MACRO.C 5251 1316 deflated
MAIN.C 7822 3122 deflated
MAKEFILE 5730 1567 deflated
MATCHES.1 635 376 deflated
MATCHES.C 754 420 deflated
MISC.H 1549 540 deflated
MODEM.H 1538 524 deflated
MODEM_BR.1 836 482 deflated
MODEM_BR.C 489 258 deflated
M_LIB.C 9951 2557 deflated
N_SHELL.C 1336 669 deflated
PARAM.H 2757 972 deflated
PASSTHRU.C 2489 1115 deflated
PCOMM.1 8649 3265 deflated
PCOMM.DIA 321 202 deflated
PCOMM.EXT 79 46 deflated
PCOMM.MOD 598 247 deflated
PCOMM.PAR 453 272 deflated
PEXIT.C 2579 1098 deflated
PORT.C 10342 3553 deflated
P_LIB.C 7259 1874 deflated
README 9723 4307 deflated
REDIAL.C 2252 973 deflated
RELEASE.NOT 8624 3595 deflated
SAMPLE 994 527 deflated
SCREEN.C 2024 831 deflated
SCRIPT.C 3743 1533 deflated
SHAR 0 0 stored
PCOMM.PAT 2464 934 deflated
PCOMM01.SH 63404 18700 deflated
PCOMM02.SH 59051 18363 deflated
PCOMM03.SH 58562 13968 deflated
PCOMM04.SH 57652 15483 deflated
PCOMM05.SH 60598 15525 deflated
PCOMM06.SH 55408 12728 deflated
PCOMM07.SH 56625 14913 deflated
PCOMM08.SH 44769 11114 deflated
STATUS.H 808 421 deflated
STRINGS.C 4200 1573 deflated
ST_LINE.C 2115 925 deflated
S_AXFER.C 3835 1166 deflated
S_EXTRNL.C 4086 1387 deflated
S_GEN.C 4402 1265 deflated
S_MENU.C 3269 1105 deflated
S_MODEM.C 6656 1671 deflated
S_PROMPT.C 3089 1009 deflated
S_TERM.C 3145 1128 deflated
S_TTY.C 4903 1728 deflated
TERMINAL.C 10681 3527 deflated
TTY_ATT.C 5066 1769 deflated
TTY_UCB.C 4869 1657 deflated
UNIXPC.SHA 17190 5722 deflated
VCS.C 11031 3562 deflated
VCS.H 330 190 deflated
WAITFOR.1 871 506 deflated
WAITFOR.C 2025 922 deflated
XMODEM.C 7952 2983 deflated
XMODEM.H 561 258 deflated
X_ASCII.C 6450 2277 deflated
X_BATCH.C 8808 2775 deflated
X_EXTRNL.C 2906 1249 deflated
X_MENU.C 7594 2374 deflated
X_RCV.C 12045 3512 deflated
X_SEND.C 11650 3273 deflated
X_WIN.C 2315 1021 deflated

Download File PCOMM.ZIP Here

Contents of the README file



Pcomm
A Unix Telecommunication Program

Things to do first:

1) Figure out what files you need. There is a shell archive
called "Unixpc.shar" that contains additional (and replacement)
files for users of the AT&T Unix PC 7300/3b1.

2) Create a default directory where the Pcomm support files will
go. A good location might be /usr/local/lib/pcomm.

3) Copy (and rename to change the upper case 'P' to lower case)
the four sample support files Pcomm.dial_dir, Pcomm.extrnl,
Pcomm.modem, and Pcomm.param to the default directory. The
files should *not* have write permission to all. Please
remember these are just sample files...

4) Copy (and rename to change the upper case letters to lower
case) the on-line manual pages Pcomm.1, Waitfor.1, Matches.1,
and Modem_break.1 to the proper /usr/man directory.

5) Print the Doc file by piping the output of the Unix "pr"
command with the title separated by lots of white space (to help
center it), for example:

pr -h " Pcomm Reference Manual " Doc | lp

How to configure Pcomm:

1) Edit the "config.h" file to suit your system's needs and your
personal taste. Sites running HoneyDanBer (HDB) UUCP should pay
particular attention to the LOCK_DIR, ASCII_PID, and SETUGID
definitions. The definitions in config.h are:

BSDDefine if you're using a Berkeley flavor of Unix.
You will have to edit the Makefile in several
places.

UNIXPCIf defined, use the dial(3) routines specific
to the AT&T Unix PC 7300/3b1. Useful only if
the On Board Modem (OBM) is to be used.

OLDCURSESIf defined, use the older version of curses(3).
(uses termcap in lieu of terminfo).

SHAREDMEMIf defined, keeps the virtual screen area in
shared memory rather than in a file.

NOPROMOTEIf defined, do not promote missing video
attributes to standout. Normally, curses(3)
attempts to compensate for missing attributes.

SETUGIDIf defined, extra precautions are taken before
opening files or doing a shell escape to restore
the real UID/GID. Useful if Pcomm is installed
as a set-user-id or get-group-id program. HDB
programs often are set-user-id to uucp.

LOG_CALLSIf defined, Pcomm will keep an administrative log
of all calls. The log contains the name of the
person making the call, the phone number, and a
date/time stamp. Useful for verifying long
distance phone bills.

LOGFILEThe path to the log file (if LOG_CALLS is
defined). It should have write permission to
all or be writeable under set-user/group-id
conditions.

LIMIT_LDIf defined, Pcomm will limit long distance
(toll) calls to a privileged group. The file
"admin.c" may require tweaking to detect long
distance numbers.

GROUP_NAMEThe name of the group that is allowed to make
long distance calls (if LIMIT_LD is defined).

LPRThe path to the line printer program (this is
not the name of the device).

LPRINTThe path to the "pretty" line printer program.
Typically a program that performs a "pr | lp"
function. If none exist, use "pr | lp".

DEFAULT_DIRThe path to the directory that contains the
default Pcomm support files.

LOCK_DIRThe path to the directory where the UUCP lock
files are found. On HDB systems this could
be /usr/spool/locks or /usr/spool/uucp.

ASCII_PIDIf defined, the lock files will contain an ASCII
encoded process id (PID). On HDB systems this
is the default.

XENIX_LOCKSIf defined, the last letter of the device name
is folded to lower case when creating the lock
file. Newer version of XENIX may require this.

KEEP_PORTIf defined, the port will be kept open between
dialing attempts to save time. Some systems
may require the modem to be closed and reopened
every time.

XMC_BROKEDoes the status line scroll up when using "magic
cookie" terminals? Some Pyramid and AT&T
systems may require this to be defined. Find a
magic cookie terminal (a Wyse 50 for example),
and see what happens.

WGETCH_BROKEDoes the alarm() system call work correctly with
the wgetch() function? Some Masscomp systems
will require this to be defined. Symptom: the
initial screen doesn't go away by itself after 5
seconds.

CLIST_SIZThe size of the serial port character buffer.
The default is 64.

INPUT_BUFThe size of the input buffer (should be about the
same size as CLIST_SIZ). The default is 64.

OUTPUT_BUFThe size of the output buffer (should be about
one half INPUT_BUF). The default is 32. Systems
without dedicated I/O processors may require a
very small INPUT_BUF value to avoid the problem
of a "choppy" display.

MEMMOVEThe name of the memory copy routine (if none,
then use "#undef MEMMOVE"). The default is
"memmove", although quite a few versions of
"memcpy" will work (if they correctly handle
target and source overlap).

SETUID_BROKEDoes your version of Unix allow you to flip-flop
back and forth between the real and effective
user (or group) ID? Some Masscomp systems will
require this to be set.

2) Edit the Makefile. There are provisions in the Makefile to
include getcwd(3) and getopt(3) routines if they are missing
from your system. You may want to customize the CFLAGS,
LDFLAGS, and BIN assignments to suit your needs.

If compiling under Berkeley Unix, you will have to edit the
Makefile on the following lines:

#for old curses(3) or Berkeley systems
CURSES = -lcurses -ltermcap
TERMLIB = -ltermcap
#CURSES = -lcurses
#TERMLIB = -lcurses

#for System V or Berkeley worlds
BSD = -DBSD
TTY = tty_ucb.o
#BSD =
#TTY = tty_att.o

All the defaults in config.h assume a AT&T flavor of Unix, sorry
about that...

3) Compile pcomm and pcomm_input. Type "make". The "make
install" option will attempt to copy "pcomm" and "pcomm_input"
into the BIN directory given in the Makefile. However, those
sites running HDB UUCP software may require that you to change
the mode of "pcomm" to be set-user-id to uucp. DO NOT CHANGE
THE SET-UID/GID BITS ON THE "pcomm_input" PROGRAM.

Three external programs (waitfor, matches, and modem_break) are
included in the distribution to help in creating auto-login
shell scripts.

4) Update the sample modem/TTY database. I know I'm asking the
impossible, but... Read section 3 and the Appendices of the Doc
file first, then run Pcomm to update the modem/TTY database by
using the TTY Setup and the Modem Setup menues. You will need
to know:

o The types and number of modems available for dial out
o The TTY ports attached to the modems
o The range of baud rates at which the modems operate
o How to initialize the modems to suit Pcomm's needs
o How to make the modems dial

During this step, you will need write permission on the support
files in the default directory. RESIST THE TEMPTATION TO EDIT
THE SUPPORT FILES DIRECTLY.

Portability considerations:

1) Pcomm makes use of the bold, blinking and standout video
attributes. My concept of "standout" and "reverse" might be
different than yours (I like "standout" to be a brighter version
of "reverse"). Some very old versions of curses will ignore the
standout mode if you're on a magic cookie terminal.

2) The "port.c" file has a place where you can include your own
routine to toggle the getty process on a port (if required).

3) If you compile Pcomm with LOG_CALLS defined, you'll have to
look at the code in "admin.c" to see if the long distance
detection routine is correct for your site.

4) Compilers that adhere to the ANSI C Standard will complain at
the declarations of perror(), malloc(), fread(), fwrite(), etc.
There is a "typedef SIG_TYPE" in the config.h file to help
silence the compiler's warning messages about the signal()
return value.

Notes for Sun users... There are several problems that apparently only
surface with SunOS. Here are some notes to help out.

1) Pcomm was really designed to work in an AT&T world. If you
compile the code with the /usr/5bin/cc compiler, you'll end up
with a better product. To do so, you'll need to use default
config.h parameters (undef OLDCURSES and undef BSD) plus the
default Makefile parameters (CURSES, TERMLIB, and TTY).

2) Patch #5 introduced a new pre-processor definition in dial.c
called USLEEP. SunOS no longer supports the AT&T version of the
times() system call, so usleep() should be used to generate the
delay.

3) Some Sun users report that their version of curses (perhaps
limited to the sys5 version?) has a bug that henders the quick
transition between the "curses mode" and "terminal mode". If
you have troubles with Pcomm getting out-of-sync after a file
transfer here is hack to bludgeon the code into submission. I
have no idea why this works...

change line 53 in terminal.c:
while (1) {
read(0, &c, 1);
c &= 0x7f;
to read:
while (1) {
c = getch();
c &= 0x7f;

Please don't use this unless you're having a problem!

Note for some 4.2BSD and Ultrix 1.2 systems:

Apparently, there is a bug in the /usr/include/curses.h file on
some systems that does not define the nl() and nonl() macros
correctly. If this is the case with your system, edit
/usr/include/curses.h to include the following:

#undef nl
#undef nonl
#define nl()(_tty.sg_flags |= CRMOD,_pfast = _rawmode,stty(_tty_ch, &_tty))
#define nonl()(_tty.sg_flags &= ~CRMOD, _pfast = TRUE, stty(_tty_ch, &_tty))

Emmet P. GrayUS Army, HQ III Corps & Fort Hood
...!uunet!uiucuxc!fthood!egrayAttn: AFZF-DE-ENV
[email protected] of Engineering & Housing
Environmental Management Office
Fort Hood, TX 76544-5057


 December 5, 2017  Add comments

Leave a Reply