Commit Graph

3115 Commits

Author SHA1 Message Date
christos bc1be752a1 whitespace fixes 2014-01-01 19:50:44 +00:00
christos 316fbf0f9f There was a case where \n did not increase plinno 2014-01-01 19:06:45 +00:00
christos 87802d4338 clarify further. 2014-01-01 18:29:39 +00:00
christos 724ab0808b explain the previous fix. 2014-01-01 16:55:28 +00:00
christos 9bcdabb166 allow case statement without any patterns. 2013-12-31 22:53:57 +00:00
apb 81b1fb1df7 In all man pages that say:
The -H, -L and -P options are ignored unless the -R option is
    specified.  In addition, these options override each other and the
    command's actions are determined by the last one specified.

Add:

    The default is as if the -P option had been specified.
2013-12-17 09:54:08 +00:00
dholland 473e706d2d Remove entirely bogus /* NOTREACHED */ annotation. 2013-12-11 06:00:11 +00:00
spz 7ae9a70dc6 more complete fix for Coverity issue 976653 2013-12-08 08:32:13 +00:00
spz 78fc912d0b Coverity complaint fixes:
bin/cat/cat.c 976654 Argument cannot be negative
                     (missing check for fileno result, stdout)
bin/cat/cat.c 976653 Improper use of negative value
                     (missing check for fileno result, stdin)
2013-12-03 17:06:51 +00:00
wiz 8df34715d2 Stop hissing. 2013-11-14 07:45:05 +00:00
christos e028f49d87 add --gnu for pax. 2013-11-14 04:00:48 +00:00
christos 5c83aa644a PR/48312: Dieter Roelands: According to TOG, unset should not return an error
for functions are variables that were not previously set:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
2013-11-01 16:49:02 +00:00
mrg 5a3d1851d6 #ifdef a variable decl/setting with it's use. 2013-10-30 08:38:40 +00:00
christos 3dd8ce9f5e Fixed unused warnings. 2013-10-18 19:53:34 +00:00
ast 83d9b54597 Fix PR bin/48202 [non-critical/low]:
sh +nounset and `for X; do` iteration fails if parameter set empty
by applying and testing FreeBSD's patch of Oct 24 2009 for this; see
  http://svnweb.freebsd.org/base/head/bin/sh/expand.c?r1=198453&r2=198454
Also created an ATF test in tests/bin/sh/t_expand.sh for this error and
corrected a space->tabs problem there as well.
2013-10-06 21:05:50 +00:00
christos b258a62a64 add stdio.h 2013-10-02 21:48:55 +00:00
christos ca8473e079 document LINENO
XXX: someone should fix all the .Ev stuff because some of them are just
shell variables .Va and are not really exported to the environment. See
the FreeBSD man page.
2013-10-02 20:42:56 +00:00
christos 018a6f7864 add crude $LINENO support for FreeBSD 2013-10-02 19:52:58 +00:00
christos 700d3ab22a - print the line discipline using the new ioctl
- print the queue size
2013-09-12 19:47:23 +00:00
christos eca938ae97 CID 1060854: Wrong sizeof argument (SIZEOF_MISMATCH) 2013-08-06 05:42:43 +00:00
christos e164b1463b PR/48095: NAKAJIMA Yoshihiro: remove casts from time_t to long 2013-07-29 17:46:36 +00:00
christos 248e8c4711 fix error handling. 2013-07-19 15:53:00 +00:00
wiz 29c72c8d8a Sort. 2013-07-19 11:19:23 +00:00
roy 579c771490 Add the following options
-A Display the FQDN of each address on all interfaces.
-a Display alias name(s) of the host.
-d Display the DNS domain.
-f Display the FQDN for the hostname.
-I Display each IP address on all interfaces.
-i Display the IP address(es) for the hostname.
2013-07-19 10:34:51 +00:00
christos 37a296c0b9 PR/48057: psi: skip and msgfmt cannot be used together. Looks like a pasto;
fixed.
2013-07-17 12:55:48 +00:00
christos 37e3924882 WARNS=6 [-Wconversion] 2013-07-16 17:47:43 +00:00
joerg 9e69720425 Fix violations of the sequence point rule. 2013-06-28 15:04:35 +00:00
yamt 44f7683783 fix descriptor leaks. PR/47805
this fix was taken from FreeBSD SVN rev 199953 (Jilles Tjoelker)
    ------------------------------------------------------------------------
    r199953 | jilles | 2009-11-30 07:33:59 +0900 (Mon, 30 Nov 2009) | 16 lines

    Fix some cases where file descriptors from redirections leak to programs.

    - Redirecting fds that were not open before kept two copies of the
      redirected file.
	sh -c '{ :; } 7>/dev/null; fstat -p $$; true'
	(both fd 7 and 10 remained open)
    - File descriptors used to restore things after redirection were not
      set close-on-exec, instead they were explicitly closed before executing
      a program normally and before executing a shell procedure. The latter
      must remain but the former is replaced by close-on-exec.
	sh -c 'exec 7</; { exec fstat -p $$; } 7>/dev/null; true'
	(fd 10 remained open)

    The examples above are simpler than the testsuite because I do not want to
    use fstat or procstat in the testsuite.
2013-06-27 23:22:04 +00:00
yamt 071e965c48 constify 2013-06-12 01:36:52 +00:00
simonb 3a5cb7b1be Document that a here-document can finish at an EOF as well as at the
delimiter.
2013-05-09 11:43:27 +00:00
uebayasi 02829a8ca7 test(1): Compare timestamp in nsec scale in -nt/-ot. 2013-05-04 06:26:44 +00:00
zafer 51b7448f79 remove whitespace from end of file.
introduced by erh in 1.49
2013-05-02 22:43:55 +00:00
dholland 7e346d08a4 Add const. 2013-04-28 17:01:28 +00:00
wiz eb5604b032 Sort sections. 2013-04-26 19:34:34 +00:00
christos aab67d5210 PR/47770: Eitan Adler: add x flag to rm to avoid cross mount points 2013-04-26 18:43:22 +00:00
christos 2227ba4bf1 Make shifting variables reflect their environment counterparts. Makes
"shift path" work as expected.
2013-04-03 17:32:24 +00:00
christos 2135348107 PR/47608: Robert Elz: ``var=value func-call'' does not export var in the
function (+FIX)
2013-03-02 22:02:32 +00:00
he 85e98624ed When using -ledit, also use -lterminfo, to allow static linking. 2013-01-25 19:07:14 +00:00
christos 0961e62ab9 Obey SMALLPROG and don't enable the editor 2013-01-25 14:20:57 +00:00
christos 54f7a5dbf7 Recognize extended attribute headers and warn about them since we are not
currently handling them.
2013-01-24 17:43:44 +00:00
christos 185136779b make history kind of work :-), turn libedit support on. 2013-01-23 16:39:03 +00:00
christos 9263138f08 fix compilation without -DEDIT 2013-01-22 22:40:31 +00:00
wiz cefd6eea55 Bump date for previous. 2013-01-22 21:20:26 +00:00
christos 5e9a2dddf3 Add a little libedit front end. Could be used as someone's pet project to
learn how to program. It is not enabled in the Makefile, and it states why
there.
2013-01-22 20:35:29 +00:00
christos cd0ed5aa5a Remove alloc builtin, it did not work anyway since most modern malloc
implementation use a combination of sbrk/mmap.
2013-01-22 19:28:00 +00:00
dsl 0e82f4eb77 include limits.h for CHAR_MIN 2013-01-02 22:28:42 +00:00
dsl 658a58d038 Add support for '%n' being a shorthand for 'fg %n'. 2012-12-31 14:10:15 +00:00
christos 55853dd5e1 sprinkle const, no functional change intended. 2012-12-27 21:19:20 +00:00
dsl 7d60739ae7 Fix the expansion of "$(foo-$bar}" so that IFS isn't applied when
expanding $bar.
Noted by Greg Troxel on tech-userlevel running some 'git' tests.
Should fix PR bin/47361
2012-12-22 20:15:22 +00:00
wiz dbb168824f - Remove unneeded consecutive argument in `.Nm' macros;
- rename `GRAMMAR AMBIGUITY' section to `CAVEATS', and move it to
  correct location;
- bump date.

From Bug Hunting.
2012-12-16 17:57:49 +00:00