Commit graph

35 commits

Author SHA1 Message Date
Gleb Smirnoff 0de6400b1c Fix write(1) to support wide characters.
Submitted by:	amdmi3
PR:		bin/164317
2012-02-13 14:40:15 +00:00
Joel Dahl da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Ed Schouten ab90a4d1e2 Perform all trivial ports to utmpx for usr.bin/.
They were already converted to use libulog, so it's easy to convert them
to utmpx.
2010-01-13 18:09:54 +00:00
Ed Schouten b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Ed Schouten 5095053036 Let wall(1) use utmpx.
Because our implementation guarantees the strings inside struct utmpx to
be null terminated, we don't need to copy everything out, which makes
the code nicer to read.

Also set WARNS to 6 and add $FreeBSD$ to keep SVN happy.
2009-12-05 20:22:26 +00:00
John Baldwin a4cc298ac9 write(1) needs to strip off the leading /dev/ from the tty name for the
current tty as returned from ttyname(3) so it can try to avoid writing to
the current tty if possible.  Previously, it did this by trimming off any
leading directory (effectively performing a basename(3) on the path
returned from ttyname(3)).  However, this chopped off too much of the path
for ttys who have directories in their name such as pts(4).  Instead, just
strip off the leading /dev/ from the path returned by ttyname(3).  This
fixes write(1) when using pts(4).

MFC after:	1 week
Reported by:	rwatson
2007-11-12 20:02:21 +00:00
Ruslan Ermilov f682f10c76 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
Ruslan Ermilov 36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Olivier Houchard e4bac6b864 Fix a typo in comment.
Reviewed by:	mux (mentor)
2005-01-05 11:52:40 +00:00
Tim J. Robbins 70ad92ab84 Mention in the BUGS section that write and wall bogusly use the sender's
LC_CTYPE setting instead of the receiver's when determining which
characters are printable.
2004-07-17 04:15:27 +00:00
Tim J. Robbins 4f45d81178 Document missing multibyte character support in utilities specified
by POSIX.
2004-07-03 01:28:21 +00:00
David Malone f4ac32def2 ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
2002-09-04 23:29:10 +00:00
Tim J. Robbins 759484bacd Use getopt() to reject any options and skip "--" arguments. 2002-05-29 13:14:51 +00:00
Philippe Charnier e8937ba009 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
Warner Losh 3f330d7d1a remove __P 2002-03-22 01:42:45 +00:00
David Malone 421dfbcfdd 1) Move FreeBSD tag to after vendor ID, #if 0 vendor ID.
2) Add missing include of stdlib.h for exit(), spotted by gcc3.
2002-02-27 14:40:09 +00:00
Mark Murray 9ba3a235b1 WARNS=2 fixes, use __FBSDID(), kill register keyword. 2001-12-11 22:34:38 +00:00
Ruslan Ermilov fc414536e7 Add xref to wall(1).
PR:		docs/32128
Submitted by:	Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> (partially)
2001-11-20 15:39:58 +00:00
Ruslan Ermilov 8fe908ef0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
Peter Wemm c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Bill Fumerola 9ef5c48bef Clean up some ambiguous nested if/elses. 1999-07-04 17:26:16 +00:00
Andrey A. Chernov fe38e2f8f4 Allow backspace too 1997-09-15 00:42:04 +00:00
Andrey A. Chernov 07484d1f24 Oops, fix upper controls test 1997-09-15 00:17:38 +00:00
Andrey A. Chernov 77caf2118f Localize it. High controls disabled in any case.
Shut compiler warning about signal argument.
PR: 4466
1997-09-15 00:08:19 +00:00
Philippe Charnier 29909ffecc Use err(3). Add usage() and prototypes. 1997-08-26 11:23:37 +00:00
Mike Pritchard 0b6f152321 Remove the text that says nroff and pr automatically disable
writing to the tty while they are running because they don't.
1997-03-22 17:19:32 +00:00
Peter Wemm c115df18cd Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Alexander Langer 0adcbd83f1 Replace hardcoded length of "/dev/" with strlen(_PATH_DEV).
Pointed out by:	bde
1996-10-26 15:29:24 +00:00
Alexander Langer 2d754ac864 sprintf --> snprintf
Use _PATH_DEV instead of hard coded "/dev/"

Obtained from:	OpenBSD, Jason Downs <downsj@OpenBSD.ORG>
1996-10-26 04:08:57 +00:00
Wolfram Schneider b8923d4cc0 [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
Andrey A. Chernov dbc57b8da7 Do unctrl in right way
Handle '\377' properly
1995-11-05 09:02:10 +00:00
Andrey A. Chernov b6c671c7ba Remove char->int promotion.
Fix uncontrol function for 8bit chars.
1995-10-29 10:33:26 +00:00
Andrey A. Chernov ee15822acd Now works with 8bit chars... 1995-10-28 22:48:27 +00:00
Rodney W. Grimes 9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00