Commit Graph

7041 Commits

Author SHA1 Message Date
glebius
658e7039ff Print link level address on vlan interfaces using ether_ntoa(), to make
output on bare ethernet and vlan interfaces the same.

PR:		bin/69674
Submitted by:	Pawel Malachowski <pawmal-posting@freebsd.lublin.pl>
Reviewed by:	ru
Approved by:	julian (mentor)
MFC after:	1 week
2004-07-28 18:18:47 +00:00
stefanf
7cdc27d942 Use the length modifier 'll' instead of 'q' to print long longs. 2004-07-28 16:03:13 +00:00
kan
e0af363c57 Remove local malloc prototypes, which are incorrect and conflict with
both GCC builtin and system declared ones.
2004-07-28 07:12:30 +00:00
kan
aa7daeefe5 Do not predeclare __inline functions, this makes no sense and generates
a warning with gcc 3.4.x.
2004-07-28 07:10:03 +00:00
cperciva
c8b0bad675 Start new sentence on new line.
Pointed out by:	simon
2004-07-27 22:17:26 +00:00
cperciva
b7c0ab3f94 Add a BUGS entry pointing out that -mindepth and -maxdepth are global
options even though they look like primaries.  (This is already documented
in the options themselves, but is sufficiently astonishing that I think it
deserves a BUGS entry as well.)
2004-07-27 21:22:14 +00:00
cperciva
ca80d9a017 Merge the "multibyte not supported" BUG into the pre-existing BUGS
section.

Move the HISTORY section to place it before BUGS rather than after BUGS,
in order to minimize the chance of this error being reproduced in the
future.  (Both mdoc(7) and 63% of manual pages have these sections listed
in this order.)
2004-07-27 21:13:04 +00:00
des
12cbe81d02 Don't strip trailing linear whitespace from passwords.
MFC after:	2 weeks
2004-07-27 11:34:25 +00:00
des
f67167048a Style nits. 2004-07-27 11:30:35 +00:00
charnier
30b155abbb No capital letter after : 2004-07-26 20:24:59 +00:00
charnier
cd48a1d32b Add __FBSDID. Replace local variable sin by sockin to not conflict with sin(3).
Use warnx() instead of warn() when error message is not of any interest. Add
prototypes.
2004-07-26 20:18:11 +00:00
charnier
0a8bce8ca9 Introduce options list the standard way. Correct style(9) in FILES section. 2004-07-26 19:59:29 +00:00
charnier
678c84eeca Introduce options list the standard way. 2004-07-26 19:53:44 +00:00
charnier
13fd5c281a Remove useless .Pp. Typo: gcos -> gecos (as spelled in passwd(5)). 2004-07-26 19:49:29 +00:00
stefanf
4cf0522899 Assign the result of getopt() to an int rather than to a char (which is
possibly unsigned).
2004-07-26 15:04:57 +00:00
kientzle
1bb05b6e53 Add a --version option to bsdtar that prints the versions of
both bsdtar and libarchive.  Of course, this requires that bsdtar
have a version number.  Let's call this 1.00, shall we? ;-)
2004-07-26 03:21:41 +00:00
andreas
bcc926918c wrong order, not 10/03 -> 03/10 2004-07-25 08:45:57 +00:00
kientzle
c2fb7a1b2d A bunch of style and security fixes (error checking return values, etc),
mostly from: Tim J Robbins
2004-07-25 04:15:50 +00:00
kientzle
da493b4820 Of course, I meant POSIX.1-1996, not 1997.
Thanks to: Andrey Chernov
2004-07-25 00:31:24 +00:00
kientzle
4eaecd41f3 A bunch of stuff from Christoph Mellon:
* Whitespace fixes
  * Check some malloc calls
  * Simplify long_help formatting
  * Spell "LINUX" -> "linux"
  * A few other miscellaneous style improvements
2004-07-24 22:13:44 +00:00
ssouhlal
d9e9fab7f1 Add my birthday.
Approved by:	grehan (mentor)
2004-07-24 15:02:56 +00:00
tjr
11aa416bcb Document incorrect handling of multibyte characters. 2004-07-23 06:56:38 +00:00
tjr
61bafd2e3d Tweak markup of quoted strings and characters: use Dq instead of enclosing
strings in ``obsolete quotes''. Use Li and Ql where appropriate.
2004-07-23 06:06:58 +00:00
tjr
2322892e0b Add a lengthy discussion of why "tr a-z A-Z" and "tr A-Z a-z" are not the
right way to perform case-conversion.
2004-07-23 05:44:04 +00:00
le
8295db9038 Make size suffix case insensitive.
PR:            bin/27604
Submitted by:  David Xu <davidx@viasoft.com.cn>
2004-07-22 13:38:10 +00:00
johan
f895222e81 display.c:
- 'savech' is only used if it is set a few lines above where
	  it is used, initialize it to silence warning.

	- 'length' is either -1 or greater than 0, hence it is safe to cast it
	  to unsigned when comparing it here.

odsyntax.c:
	- 'p' is assigned either (*argvp)[0] or (*argvp)[1] which both are
	  char *. 'num' and 'end' are assigned values based on 'p'.
	  Hence use char * instead of unsigned char * for these variables.

	  '&end' as the second argument to strtoll does not need to be casted
	  to char** any more.

	  This solves a
	  'dereferencing type-punned pointer will break strict-aliasing rules'
	  warning when compiling with -O2.

parse.c:
	- 'prec' is only used when sokay == USEPREC and sokay = USEPREC
	  when 'prec' is assigned. Hence 'prec' is not used uninitialized,
	  initialize it to silence warning.

	- The code involving 'nextpr' is hard to follow, but I belive
	  'nextpr' will not be used unless it is initialized.
	  Anyway, IF 'nextpr' is used uninitialized it is better to
	  get a consistant error (seg fault, when dereferencing a NULL pointer)
	  than potentially accessing some random memory.

The above changes makes hexdump WARNS=6 clean even when compiled with
-O2. Hence bump WARNS to keep it clean.

Tested by:	CFLAGS='-O2 -pipe' make universe
2004-07-22 13:14:42 +00:00
harti
f85b318ed6 Fix handling of comments on .elif lines. The patch given in a followup
to the PR failed, because the line skipping function is actually called
from two places in the code to do quite different things (this should
be two functions probably): in a false .if to skip to the next line
beginning with a dot and to collect .for loops. In the seconds case we
should not skip comments, because they are actually harder to handle than
we need for the .if case and should defer this to the main code.

PR:		bin/25627
Submitted by:	Seth Kingsley (original patch)
2004-07-22 11:12:01 +00:00
kientzle
88f0f4dce8 My bad: /dev/sa0, no 'r'
Thanks (and many apologies) to: Cristoph Mallon
2004-07-21 06:43:10 +00:00
silby
fcc8d7f6f1 Slide pipe.h include after the _KERNEL define in preparation for disallowing
non-_KERNEL inclusions of pipe.h
2004-07-21 03:07:50 +00:00
harti
ee1888d896 Improve make's diagnostic of mistmatched .if-.endif. This patch is
slightly different from the patch in the PR. The problem is, that
make handles .if clauses inside false .if clauses simply by
counting them - it doesn't put them onto the conditional stack, nor even
parses them so we need an extra line number stack for these ifs.

PR:		bin/61257
Submitted by:	Mikhail Teterin <mi@aldan.algebra.com>
2004-07-20 07:42:06 +00:00
kientzle
adcf12a12b Guard against argv[0] being NULL.
Thanks to: Tim J Robbins
2004-07-19 14:54:38 +00:00
harti
4265ad1914 Make it clearer what means 'won't work' for .if string == ${VAR}.
Replace the use of '=' in conditionals in the examples
by the more correct '=='.

Clarify the example explaining that .for expansion takes place before
.if handling by showing the correct code instead of saying 'the other
way around'. Change a variable name there so the example is more parseable
to the human reader.

PR:		docs/65400
Submitted by:	Roman Neuhauser <neuhauser@chello.cz>
2004-07-19 14:42:57 +00:00
tjr
a83177cdc3 Avoid passing negative values to tolower() on machines with signed chars. 2004-07-19 12:57:24 +00:00
tjr
a42d6290e1 Sort sections. 2004-07-19 11:21:34 +00:00
tjr
cc45ee6ba4 Move exit status information into a DIAGNOSTICS section. Add an ENVIRONMENT
section. Re-add a sentence from the BUGS section that went missing in
the previous commit.
2004-07-19 11:18:56 +00:00
tjr
9e984856c2 Add support for multibyte characters. While here, fix a longstanding bug in
the implementation of the -d option: we were skipping too many characters
when a non-alphanumeric character was encountered.
2004-07-19 11:12:02 +00:00
tjr
532da3de2f Point out in the BUGS section that look expects input files to have
been sorted with LC_COLLATE=C.
2004-07-19 10:03:38 +00:00
glebius
396445cb71 Today is a good day to add myself here :)
Approved by:	julian (mentor)
2004-07-19 08:21:17 +00:00
kientzle
f05f002393 Fix some misspellings, document the TAPE environment
variable and the default tape device.
2004-07-19 05:24:41 +00:00
stefanf
e3ed14c7c1 Don't forget the arguments for -M and -N in the DESCRIPTION section. 2004-07-18 23:05:31 +00:00
keramida
0084d7c454 Remove the dependency of the :C/regexp/replacement/ variable modifier
from the :S modifier which follows a bit further below.  This way the
reader can read each of these two descriptions without having to jump
back and forth in the manpage.

PR:		docs/26943
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
2004-07-18 02:26:30 +00:00
johan
2eb7ae1cf0 Revert WARNS bump until I figure out why this does not work. 2004-07-17 20:10:23 +00:00
alfred
f770c48d15 Support readlink(2) better. Readlink does not nul terminate the
result buffer, so we need to format it ourselves.  The problem is
that the length is stored as the return value from readlink, so we
need to pass the return value from our syscall into print_arg.

Motivated by: truss garbage on my screen from reading /etc/malloc.conf.
2004-07-17 19:48:49 +00:00
alfred
4c16bbdae3 When reporting reciept of a signal, print the signal's name. 2004-07-17 19:19:36 +00:00
kientzle
8b3e9f1e03 Remove unused user_uname variable.
Add range-checking to argument of -b.

Thanks to: Tim J Robbins
2004-07-17 18:21:00 +00:00
kientzle
c25602666f Make bsdtar the default system tar. This makes /usr/bin/tar a symlink
pointing to /usr/bin/bsdtar by default.  To make it point to /usr/bin/gtar,
you can define WITH_GTAR.
2004-07-17 06:03:47 +00:00
kientzle
7f77b9d9fb Validate -o usage. Strictly speaking, -o only makes sense with -x,
of course, but I make an effort to accomodate GNU tar scripts that
use -o with -c (with a meaning that totally contradicts SUSv2) by
only issuing a benign warning message in that case.
2004-07-17 04:17:50 +00:00
tjr
e867ac8953 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
tjr
a4d61babee Document incorrect handling of multibyte characters. 2004-07-17 04:04:30 +00:00
tjr
096572d313 Document the limitation that multibyte characters cannot be used as
delimiters with the 's' and 'y' commands.
2004-07-17 03:37:31 +00:00