bde
f340aa750e
Fixed a printf format error that was fatal on alphas. Adding WFORMAT=0
...
to the Makefile didn't affect this bug because WFORMAT only controls
higher- level format checking (not the -Wformat that is implicit in
-Wall).
Fixed a nearby printf format error that was benign and 3 nearby style bugs.
2002-07-11 17:28:29 +00:00
sheldonh
aa9de7efae
Set WFORMAT=0, because our compiler currently complains about NULL
...
arg 2 to err() and friends, and warnings are promoted to errors.
This allows the following revisions to be reverted:
rev 1.39 src/bin/cp/cp.c
rev 1.26 src/bin/chmod/chmod.c
rev 1.40 src/bin/rm/rm.c
The following revisions can already be reverted, because they were
already covered by WFORMAT=0:
rev 1.8 src/bin/ls/lomac.c
rev 1.63 src/bin/ls/ls.c
rev 1.8 src/bin/ps/lomac.c
rev 1.34 src/bin/rcp/rcp.c
2002-07-11 08:45:38 +00:00
tjr
b8a53fb638
Don't assume the shell's controlling terminal is attached to file descriptor
...
2. Instead, open /dev/tty. This problem stopped commands in subshells from
being executed correctly if standard error was redirected.
PR: 36671
Obtained from: NetBSD (but simplified)
2002-07-11 06:42:11 +00:00
tjr
b6bd829347
Remove support for the "old" tty driver by unifdef -UOLD_TTY_DRIVER;
...
many other parts of the shell are no longer compatible with this, and it
makes jobs.c quite cluttered with #ifdef's.
2002-07-11 06:26:48 +00:00
tjr
0087ce2988
When growing the job table, don't relocate the jobmru pointer if it's NULL.
2002-07-11 04:22:41 +00:00
dillon
3adf63f81d
err() is documented as allowing NULL for the format string but GCC isn't
...
happy about it any more so change the usage to make buildworld work again.
2002-07-10 20:44:55 +00:00
dillon
d5291af616
err() is documented as allowing NULL for the format string but GCC isn't
...
happy about it any more so change the useage so buildworld works again.
2002-07-10 20:36:25 +00:00
johan
c7b5c353d2
Update usage for the addition of -n in rev 1.35 of mv.c.
...
Approved by: obrien, sheldonh (mentor).
2002-07-09 17:45:13 +00:00
tjr
df20e19b27
Close file descriptors when [n]>&- and [n]<&- redirections are used.
...
This was broken by rev. 1.16.
PR: 40334
MFC after: 1 week
2002-07-09 08:55:46 +00:00
tjr
284f7b1851
Print out commands with NTOFD/NFROMFD redirections that close the
...
descriptors (">&-" or similar) correctly in the jobs(1) command.
2002-07-09 03:26:47 +00:00
jmallett
15fec8826f
Bring back WFORMAT=0.
2002-07-08 15:48:39 +00:00
robert
47f9f58c0a
- Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able to
...
(-)remove the inclusions of <utmp.h>.
2002-07-08 09:08:51 +00:00
jmallett
b246443071
Make printval() take a 'void *' thus negating any assumptions the compiler
...
may try to make about the alignment of the dereferenced datum.
2002-07-07 21:45:59 +00:00
charnier
26da445d07
The .Nm utility
2002-07-06 19:13:21 +00:00
mike
27f3da3573
Don't depend on pollution in <limits.h> for the definition of
...
<stdint.h> macros.
2002-07-05 15:58:27 +00:00
maxim
9dbbde57e6
Fix a memory leak.
...
PR: bin/40177
MFC after: 1 week
2002-07-05 10:27:34 +00:00
ru
7a7a1e7da8
mdoc(7) police: a bit of tidying.
2002-07-04 13:22:22 +00:00
markm
837d0142a4
Fix some low-hanging lint-fruit: endianness and staticness warnings.
2002-07-03 16:35:20 +00:00
dillon
7340de44e8
Fix type-o in last commit in preparation for MFC.
2002-07-02 19:06:33 +00:00
ru
5179f05e33
Reimplemented bsd.nls.mk using bsd.files.mk and bsd.links.mk.
...
Provided the (previously missing) dependency on source files
for intermediate .msg files.
Provided the default for NLSSRCDIR (defaults to .CURDIR).
Slightly changed the API: NLS should now list plain locale
names, without the .msg suffix.
When included from bsd.prog.mk, NLSNAME defaults to PROG.
2002-07-02 12:37:09 +00:00
dwmalone
3c634774fa
Remove double #include <sys/cdef.h> and __FBSDID.
...
PR: 40053
Submitted by: Dan Lukes <dan@obluda.cz>
2002-07-01 10:46:39 +00:00
tjr
41d2a14ec1
Put documentation of the -m option's argument in its list tag in the
...
Description section for consistency with other manpages.
2002-06-30 06:50:16 +00:00
obrien
bc61fc95d8
Consistently use FBSDID
2002-06-30 05:25:07 +00:00
obrien
f6f518b207
Consistently use FBSDID
2002-06-30 05:15:05 +00:00
obrien
c84c569bd1
Consistently use __FBSDID
2002-06-30 05:13:54 +00:00
tjr
2ca2fb4fa3
Avoid truncating the pathname to UNIX Domain Sockets with snprintf(),
...
giving a more sensible warning when the (relatively meagre) sun_path
limit is exceeded.
2002-06-29 04:52:33 +00:00
tjr
c2f443c824
Check that snprintf() does not truncate the destination pathname when
...
linking into a directory.
2002-06-29 04:10:40 +00:00
sheldonh
8e1ca9d76c
Document addition of RLIMIT_VMEM support, added in rev 1.26 of miscbltin.c.
2002-06-27 16:56:45 +00:00
dillon
8e4f3ae5f1
Add support for RLIMIT_VMEM. The #ifdef's were already there but getopt()
...
needed to be adjusted.
2002-06-26 00:29:53 +00:00
tjr
c239ae84e2
ln(1)'s symbolic link handling conforms to IEEE Std. 1003.1-2001, note
...
this in the Standards section.
2002-06-25 10:02:12 +00:00
tjr
18ad02fa6d
Correctly mark up the final command line arguments with the Ar macro for
...
the last two synopsis forms.
2002-06-25 09:58:29 +00:00
keramida
a564153d5c
Add a description of the restrictions that red(1) imposes to users,
...
and a warning that this "restricted mode" can be bypassed easily by
using symlinks, so that users don't depend too much on it.
PR: docs/35940
Submitted by: Gary W. Swearingen <swear@blarg.net>
Reviewed by: jmallett
MFC after: 1 week
2002-06-24 22:06:47 +00:00
sobomax
8e683e45ef
Don't try to decode old-style options if the argv[1] begins with `-' and the
...
second character represents some option taking an argument. This fixes
problem when ps(1) is invoked for examply as follows:
$ ps -Ufoobar1234
the above example results in option string being interpreted as
-U foobarp1234 - note extra `p'.
Reported by: Vladimir Sotnikov <vovan@kyivstar.net>
MFC after: 2 weeks
2002-06-20 14:55:53 +00:00
jmallett
50fc04895e
Bogusness may have happened using a variable assignment here before, but
...
proper parens mean that fd is always set by open(2) [in any part of C],
and so we can accurately check for it returning -1, without feeling like
we need to initialise fd to -1 in its declaration.
In other words, fix a stylistic/bogus nit.
2002-06-20 07:15:55 +00:00
jmallett
f49002f4f6
Use size_t consistently and complete some uncompleted code resulting in a
...
memory leak by assigning and freeing a variable appropriately as well as
keeping track of the amount of allocated ram properly.
MFC after: 1 month
2002-06-20 06:00:51 +00:00
jmallett
368a18f96b
We have a place for extern declarations of global variables in ed.h, do not
...
use main() to do it locally.
2002-06-20 05:28:02 +00:00
jmallett
0c56b95c32
Remove two unused variables.
2002-06-20 05:21:43 +00:00
jmallett
2b674f32f6
Minor const cleanup.
...
Don't discard qualifiers we don't need to discard.
2002-06-20 05:20:50 +00:00
tjr
6b197bb764
Bring documentation on CDPATH and its effects on cd(1) back into sync with
...
reality (and POSIX): current directory isn't searched unless CDPATH has
a "." element or is unset.
PR: 38442
Submitted by: oleg dashevskii <be9@be9.ru>
MFC after: 1 week
2002-06-19 12:04:22 +00:00
tjr
63d8853dda
When trying to emulate a cross-device move operation with cp and rm, add
...
a "--" argument after the options so filenames with leading dashes are
handled correctly.
PR: 39318
Submitted by: Serge van den Boom <svdb@stack.nl>
MFC after: 1 week
2002-06-16 04:06:58 +00:00
jmallett
f46221a82d
Use an usage() rather than doing the fprintf inside option parsing.
2002-06-14 09:54:48 +00:00
tjr
041d0fbbd9
When -R is not specified, fail to copy the contents of dangling symlinks
...
instead of making a copy of the link itself (SUSv3)
Obtained from: NetBSD
2002-06-13 15:48:36 +00:00
tjr
2f568aeb91
Print the "$" symbol on blank lines when the -s and -e options are used
...
together.
Obtained from: OpenBSD (millert, Denis Afonin)
2002-06-13 14:05:26 +00:00
tjr
dea5473747
Remove bogus "-" operand from usage message. There is no restriction on
...
where it may be placed, it is treated the same as the file arguments.
2002-06-13 13:45:14 +00:00
tjr
0a94f3b05f
Markup nits: use the Ar macro when describing the -signal_name and
...
-signal_number options, and for referring to the "pid" argument.
2002-06-13 08:46:01 +00:00
tjr
632d0deae4
Add examples and diagnostics sections
2002-06-13 08:40:01 +00:00
tjr
313635fc7e
Support the "--" end of options marker, useful to disambiguate between
...
signal numbers and process groups (negative pid arguments), and
required by SUSv3.
2002-06-13 08:07:20 +00:00
tjr
08e98db385
Don't list shell builtins when the hash command is used (SUSv3)
2002-06-13 07:50:50 +00:00
jmallett
d40b17fd5d
ps(1) appeared in v4
...
Submitted by: grog
2002-06-10 22:48:51 +00:00
tjr
b9ecc7e16c
Sort sections, use Ex macro in Diagnostics section, point out that the first
...
example only works with csh(1).
2002-06-10 09:33:15 +00:00