Commit Graph

158 Commits

Author SHA1 Message Date
perry 29dc02e572 delinting. more needed. (lint found some real bugs that I haven't fixed yet.) 2006-04-03 04:25:30 +00:00
perry b43b6e6666 Merge a few of the OpenBSD manual page changes. Not yet close to
finished but I have to break for now and Thor will probably pick up
from where I left off.
2006-04-03 03:46:34 +00:00
tls 125606b781 Wwwwwwww! Do not remove variables from the vtable in vars.c without
changing the indices in tip.h -- what a terrible design.

Okay, "design".  Fine.  Whatever. ;-)  Now we don't dump core all the time.
2006-04-03 03:13:10 +00:00
perry 31f14bb93a Clean up a bit. 2006-04-03 02:33:19 +00:00
perry d71f683e39 Remove vestiges of the ACULOG support. It depended on the suid support
(which is now gone) and it is woefully obsolete -- if something
analogous is ever needed in the future, syslog is the way to do it.
2006-04-03 02:25:27 +00:00
tls bc4c5be2bf Now we use tip-as-cu, not Taylor UUCP cu.
These programs are no longer setuid, and now lock devices with flock,
not file locks in /var/spool/.  They will no longer lock against UUCP
itself unless we modify UUCP to lock with flock, but this seems highly
unlikely to be an issue in the present day.
2006-04-03 02:21:13 +00:00
perry 8a1d2efb73 remove refs to uucp locking and aculog 2006-04-03 02:14:26 +00:00
tls 6bd8b21472 The ~C / ~+ command is no longer optional. 2006-04-03 02:06:44 +00:00
perry eee85da04c Remove support for uucp style locking.
This means we can get rid of the suid/sgid parts of the code (which
have been removed). The program is now installed with normal permissions.

To prevent accidents, we now flock the tty line, attempting to get an
exclusive lock.

Reviewed by: tls
2006-04-03 02:01:28 +00:00
tls 896b79dbc8 If we're not given a phone number or system name to dial, use "direct
connect" mode -- in other words, set CLOCAL so the user can talk to the
device before CD.
2006-04-03 01:48:22 +00:00
tls bed8070daa Whoops. We don't *use* log.o, so don't *build* it. 2006-04-03 01:47:20 +00:00
perry 58c2151f1e ANSIfy decls, de-__P, clean trailing whitespace 2006-04-03 00:51:13 +00:00
tls 4c0b53d7b4 At Luke Mewburn's suggestion, disable "force" by default, too. Those using
the tip frontend who really want ^P used for "send literal" can turn it on
in tiprc or remote.
2006-04-02 23:25:35 +00:00
tls edddcc4ac8 Add another Taylor compat option, --nostop to disable software flow control
(a.k.a. "tandem" mode).  While we're here, fix a buglet with --halfduplex,
and add --flow {hard, soft, none}.  Note that you can't get *both* hard and
soft flow control using the command-line option; if you want that, you
have to set the variables in tiprc or with ~s once tip is running.

Move all setting of vars.c named variables to *after* the call to vinit().
2006-04-02 22:19:26 +00:00
tls da6a898cf6 Oddly enough, smashing CRTSCTS into the terminal input flags doesn't do
much; it is a control flag.

Now toggling hardware flow control works.
2006-04-02 20:44:20 +00:00
tls 6b0f06d935 Fix the conditional compilation on ACULOG so it actually works.
Turn it off by default -- it hardly saves any space, but it's
one of the reasons why the executable is installed setuid, and
other versions of tip/cu don't write a log file anyway.  We can
add syslog support later if we ever really want this back, the
file-writing is all encapsulated in log.c.
2006-04-02 19:16:22 +00:00
tls ad69069bcc New 'cu' command-line handling, derived from Todd Miller's in OpenBSD,
but with some long options added for Taylor 'cu' compatibility, and
with some bugs fixed (in particular, the handling of -# now works as
documented and does not overwrite argv).
2006-04-02 19:04:24 +00:00
tls 0b7476a655 Remove extra \n from call to warn() 2006-04-02 19:03:55 +00:00
tls b3de57c6bf Don't build any of the dialers except Hayes. If anyone is using any of
the others (maybe "Courier", but I doubt it) we can easily enough turn
them back on.

Saves 20-30K depending on platform.  Not totally insignificant, since this
often goes on install media, or very small systems.
2006-04-02 19:00:40 +00:00
tls b8dc57b8d9 If we might have two links, we'd better print our program name when we
emit an error -- and it would be nice if it were the *right* program name.
Since it's convenient, change most perror calls to warn, and a lot of
fprintf ...  exit to errx.  Fix at least one fprintf that could run off
the end of its arguments (%s but no argument, how did we never catch this?).
2006-04-02 06:11:45 +00:00
tls 82222cd3ac Default to no parity instead of even parity. OpenBSD made this change
long ago, and I think it makes sense.
2006-04-02 04:28:38 +00:00
tls 685d2e5048 Default the "raisechar" value (for the insane old case-mapping) to NULL.
As the same change in the OpenBSD tree says, "if you are crazy enough
to want it, then it can be turned on in /etc/remote."
2006-04-02 04:25:36 +00:00
tls 8139858166 Default baud rate to 9600 (was 1200) to match Taylor cu. 2006-04-02 04:10:54 +00:00
tls 7d1bef10da Add the rest of the speeds listed in termios.h. This is not, perhaps, as
sensible as the way OpenBSD supports arbitrary speeds; but we hardly add
new speeds often and this change is a lot less invasive.
2006-04-02 04:02:00 +00:00
tls 40bdc77642 Change manual page (as OpenBSD did) to reflect the actual arrangement of
file descriptors with ~C, instead of some weird ancient arrangement.

Document ~+ as a synonym for ~C.
2006-04-02 03:15:02 +00:00
tls b389579aca Add "~+" as a synonym for "~C" for Taylor cu compatibility. 2006-04-02 03:10:54 +00:00
yamt 01ef02441c pull the following change from OpenBSD
and bump date of the manpage.

    date: 2003/09/20 18:15:32;  author: millert;  state: Exp;  lines: +4 -2
    Implement hardwareflow varable in tip(1) like Solaris and hf in /etc/remote.
    Based on PR 3411 from Matthew Gream
    Also document "tandem" variable (XON/XOFF) in tip man page.
2006-03-29 12:37:59 +00:00
christos d8a5b3caf5 warns=4 2006-03-16 23:25:17 +00:00
gavan f1f29c8b8d Treat EOF the same as EIO. Prevents spinning if an EOF condition is
encountered, such as a USB serial device being unplugged.

Instead of spinning, the process reading from the serial line will exit,
leaving the process reading from the local terminal to exit when it notices
that its child has gone away.
2005-12-09 03:15:42 +00:00
dsl 293eff3495 Add (unsigned char) cast to ctype functions
islower() can be true for 0x80..0xff
2004-11-04 07:29:09 +00:00
jrf 190b2e4c51 Replaced strncpy with strlcpy. Thanks to Peter Postma who
pointed them our in PR #25762. Approved by christos@NetBSD.org.
2004-09-07 13:20:39 +00:00
snj b706bc6de5 English fix. 2004-05-09 18:59:52 +00:00
christos ecd199b9f5 deal in a saner way with const strings. 2004-04-23 22:24:34 +00:00
christos 4f6045fcb4 constify and warns = 3 2004-04-23 22:11:44 +00:00
uebayasi 9d002ba501 getfl() and cu_take() write a file locally. Open a file with O_RDWR. 2004-03-11 03:47:13 +00:00
uebayasi 7f507fd263 Use O_WRONLY / O_RDWR instead of bare integers. 2004-03-11 03:33:19 +00:00
wiz f582138c1b Uppercase CPU. 2004-02-13 10:11:56 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz c76c6378b5 Comment out a line again. 2002-10-13 00:25:16 +00:00
grant be8ae688ae New sentence, new line. 2002-09-30 11:08:56 +00:00
mjl 5484738f3c s/appeared command/command appeared/ 2002-05-03 22:43:59 +00:00
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz 0346d7eca3 Sort SEE ALSO. 2001-12-08 19:18:39 +00:00
wiz daa5d204e4 synchron*, not sychron* 2001-07-08 17:41:14 +00:00
wiz 464b353034 Add section to xref. Whitespace fixes. 2001-04-04 09:48:11 +00:00
is 135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
bjh21 628bc101f2 Fix missing space 2000-05-29 19:49:48 +00:00
simonb 299578ebd5 Spell "privilege" correctly (correct spelling from Jonathan Stone). 1999-08-16 02:59:22 +00:00
garbled 9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
mycroft 4300219122 Fix minor formatting error. 1999-03-06 11:51:48 +00:00
christos 1b5e48e426 char -> unsigned char 1998-12-19 23:02:21 +00:00
christos 4dadb162f6 sigvec->sigaction
sigblock->sigprocmask
sigpause->sigsuspend
XXX: code could be shared here.
1998-12-19 23:02:02 +00:00
christos 1a8acb42c1 <sys/dir.h> -> <dirent.h>
<sys/file.h> -> <fcntl.h>
1998-12-19 23:00:43 +00:00
christos a6f820700b remove unused variable
char -> unsigned char
1998-12-19 23:00:18 +00:00
christos b5e27b660d creat->open O_CREAT 1998-12-19 22:59:21 +00:00
ross f670fa10c5 Add { and } to shut up egcs. Reformat the more questionable code. 1998-08-25 20:59:36 +00:00
mycroft a405bce56c const poisoning. 1998-07-26 22:26:29 +00:00
mrg 923d7551ba - KNF
- use snprintf
- be safe with buffers (change prompt() to take a size_t len arg for this)
1998-07-12 09:59:29 +00:00
mrg 97eafd5059 KNF. ensure buffers are not overrun. 1998-07-12 09:14:19 +00:00
thorpej d48673ce4c Rename an internal function who's name collides w/ pwrite(2). 1998-06-30 23:42:08 +00:00
kleink 09349a90b3 Include <time.h>, needed for various definitions. Also, per KNF, don't include
both <sys/param.h> and <sys/types.h>; the former is sufficient.
1998-04-02 11:31:43 +00:00
mrg 9de7446997 use static int instead of static 1998-03-30 02:31:44 +00:00
mellon 851bf413cd Only turn off the O_NONBLOCK flag if DC flag is set. 1997-12-17 17:09:33 +00:00
mellon e0a22c4659 Turn off the O_NONBLOCK flag after CLOCAL is set. 1997-12-17 16:56:30 +00:00
mrg 04abeda6db fix compile warnings on the alpha. 1997-11-23 04:03:04 +00:00
lukem 6b9d2f6aae * fix a long-term annoyance with tip: if raisechar or force are set to
"", (usually in .tiprc with lines like `raisechar='), don't activate
  feature if NUL (\0) is the received character
* on a related note, don't barf if the following variables are defined
  to "": disconnect, log, parity, record
1997-11-22 08:29:58 +00:00
lukem e37283e126 WARNSify, KNFify, using ANSI string functions, cleanup .Nm usage 1997-11-22 07:28:39 +00:00
lukem 8ba07ab0b3 use CPPFLAGS instead of CFLAGS 1997-10-24 09:00:17 +00:00
mrg 4f4ba42ae8 disable WARNS here for now. 1997-10-20 03:35:06 +00:00
mycroft af65e81265 Make these executables world-readable. 1997-10-11 11:05:28 +00:00
kleink 66105c37fc Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
use SEEK_SET/SEEK_CUR/SEEK_END instead.
1997-08-25 19:31:43 +00:00
pk b55c3729fe NULL => 0 (Arne Juul; PR#3629) 1997-05-17 20:09:26 +00:00
mellon 6aaccda600 DC is not a user-settable variable, but was being partially confused with one 1997-05-14 00:20:01 +00:00
gwr 10e180cc49 Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr 012e528f2e Use .PATH.c: ... 1997-05-06 20:44:56 +00:00
mellon 11be63105a Set CLOCAL if dc flag is set 1997-04-20 00:03:05 +00:00
mellon b6e16df6f2 Add boolean for dc flag 1997-04-20 00:02:45 +00:00
mellon d9be4478ec Set O_NONBLOCK if dc flag is set. Don't set HUPCL if dc flag is set. 1997-04-20 00:02:10 +00:00
thorpej 972c977c65 Change booleans from char to int so that comparisons against negative
values work as expected on systems with unsigned chars.
1997-04-19 06:06:06 +00:00
thorpej 4e82c2acc2 getopt() returns:
- an int, not a char, and
- -1 upon completion, not EOF.
1997-04-19 06:04:54 +00:00
mrg 53fddda6b9 give buffers lengths; use strdup. 1997-02-11 09:24:03 +00:00
cgd 89dcb48dfb fix up -ansi -pedantic warnings produced because of static function
declarations nested in other functions.  The solution: declare the
static functions at the top level.
1996-12-29 10:41:53 +00:00
cgd 8e2918a81c make evenpartab be of type 'unsigned char' to avoid -ansi -pedantic errors 1996-12-29 10:38:20 +00:00
cgd 879c890af2 add -ansi -pedantic to CFLAGS, so that people won't try to use the behaviour
of the old zzhack-access macros, which with the current macro definitions
would cause a cast value to be used as an lvalue, which is a gcc extension,
but _not_ what we want.
1996-12-29 10:36:37 +00:00
cgd 88caf985e6 replace old zzhack structure (YUCK!) and number(), boolean(), character(),
and address() macros with new macros of the same names (to get values),
and macros with those names but with "set" prepended and which take a
second argument (to set values).  The new macros use type casts to do
type conversion, which is much cleaner than using a union and making
endianness-related hacks to get the right 'short's and 'char's from
the right array indices.  (YUCK! again, for good measure.)
1996-12-29 10:34:03 +00:00
cgd b7e69ffbd5 translate '=' in phone number strings into ',' (to generate delays),
as is done for couriers and t3000s.  Ahh, the wonders of being in
a hotel room with source.
1996-11-01 23:56:33 +00:00
jtc 95151c4196 unused file 1996-03-07 06:52:51 +00:00
pk 258108ce0f Convert to termios (from Scott Reynolds; PR#1621).
8-bit patches (from Matthieu Herrb; PR#1384).
1995-10-29 00:49:38 +00:00
jtc 0b470f4f06 Fix crash with null eofwrite capabilityand lseek/off_t bug; PR #1346 1995-09-26 06:02:08 +00:00
jtc 71c33981ab Fix parity calculation; PR #1325 1995-08-11 00:10:40 +00:00
cgd f795659ece headers, casts, and use of time_t 1994-12-24 17:56:23 +00:00
jtc 39801cccde Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
1994-12-08 09:30:36 +00:00
jtc 3075e8d6b7 imported from 4.4lite 1994-12-08 08:57:40 +00:00
mycroft 69587fec56 Make lock directory match the code. 1994-09-19 12:26:18 +00:00
pk a52f16e93a setre[gu]id conversion. 1994-04-20 17:21:28 +00:00
jtc 70a4f3c1c1 Fix spelling errors. 1994-01-11 18:49:16 +00:00
jtc ae444cb091 We're have a real cu now, so break the link between cu and tip. 1993-08-04 20:17:26 +00:00
jtc 3d353466ea Fix formatting bug. 1993-08-04 19:52:59 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00