Commit Graph

6832 Commits

Author SHA1 Message Date
Tim J. Robbins
364d0a915c Implement the -c option correctly in locales with multibyte characters
instead of treating it as a synonym for -b.
2004-06-27 14:55:07 +00:00
Jens Schweikhardt
e3625e9c22 Fix problems with non-8 space tabs. New options for function
declarations with the opening brace on the same line as the declaration
of arguments all spaces and no tabs (a feature which exists in GNU's
indent). Man page update to follow RSN.

PR:		bin/67983
Submitted by:	Chip Norkus <wd@teleri.net>
Style guidance and bug for bug compatibility by:	bde
MFC after:	2 weeks
2004-06-27 10:58:37 +00:00
Tim J. Robbins
d900c38411 Make the handling of invalid multibyte sequences more robust by using
mbrlen() instead of mblen().
2004-06-27 10:35:28 +00:00
Tim Kientzle
d3d1a208cb Augment the -T handling:
* Add --null option (sort #defines here)
 * Add process_lines function to util.c that reads newline-terminated
   or null-terminated lines (with self-sizing buffers, etc) and iteratively
   invokes a provided function.  Use this to dramatically simplify:
   -T handling for -c, --exclude-from-file, and --include-from-file.
 * Add -T handling to -x (via include_from_file)

Hopefully, this will fix the openoffice port and a couple of
others that rely on -T and --null.
2004-06-27 06:29:03 +00:00
Tim Kientzle
d24e5e453e Fix "@-" which has apparently been broken for some time. <sigh>
While I'm here, add in a lot more error-checking around append_archive.
2004-06-27 03:28:13 +00:00
Tim Kientzle
4049589b28 Don't abort immediately on directory change errors.
Instead, display a warning, clean up, and let main() return the error.
In particular, this means that chdir() problems won't leave broken
archives, though they will prompt an error exit value.
2004-06-27 01:08:54 +00:00
Tim Kientzle
f758d316c0 Document the -W convention for accessing long options.
Also correct an old error: there was no tar command in Sixth Edition.
2004-06-26 22:58:29 +00:00
Tim Kientzle
0674dded37 Rename C=dir to -C dir, which is what people expect.
This requires some non-trivial surgery to the options parsing.

While here, let people who only have getopt() access long options
through the -W longopt=value convention.
2004-06-26 22:49:51 +00:00
Tim J. Robbins
0f10c7bbea Add support for multibyte characters in input files and delimiter
strings (arguments to the -d option.) This involves backing out paste.c
rev. 1.13 until we have a version of fgetln() that operates on wide
character streams.
2004-06-25 01:48:43 +00:00
Tim J. Robbins
e90e39d92f Document the fact that uniq(1) does not recognize multibyte characters. 2004-06-24 16:29:28 +00:00
Tim J. Robbins
2c3d390701 Document the fact that join(1) does not recognize multibyte characters. 2004-06-24 16:24:11 +00:00
Tim J. Robbins
7ea30a9c00 Copy the warning about incorrect multibyte character handling from vis(3). 2004-06-24 16:08:02 +00:00
Tim J. Robbins
831056382b Document the fact that comm(1) does not recognize multibyte characters
in its input. Although doing so would require only trivial changes,
it would be incompatible with the ordering used by sort(1), which is the
primary source of comm's input.
2004-06-24 15:57:56 +00:00
Tim J. Robbins
19657ec3b8 Add support for multibyte characters and characters that take up more
than one column position.
2004-06-24 15:12:29 +00:00
Tim J. Robbins
a2641fe8d7 Add support for multibyte characters and for characters that take up
more than one column position.
2004-06-24 13:48:28 +00:00
Dag-Erling Smørgrav
adce61f9b4 The description of the -S option in the man page says we won't fail if the
remote size is unknown, but we do.  Resolve this in the man page's favor.

Requested by:   Andre Albsmeier <andre.albsmeier@siemens.com>
MFC after:	1 week
2004-06-24 13:43:57 +00:00
Tim J. Robbins
e545e3c55c Add support for multibyte characters and for characters that take up
more than one column position.
2004-06-24 13:42:26 +00:00
Tim J. Robbins
ddc1eded85 Prefix the names of members of _RuneLocale and its sub-structures
with ``__'' to avoid polluting the namespace. This doesn't change the
documented rune interface at all, but breaks applications that accessed
_RuneLocale directly.
2004-06-23 07:01:44 +00:00
Stefan Farfeleder
8eece1e6eb Retire support for gprof's -c option. All our currently supported
architectures only provide a dummy implementation.

Silence on:	current@
2004-06-20 11:05:25 +00:00
Poul-Henning Kamp
f3732fd15b Second half of the dev_t cleanup.
The big lines are:
	NODEV -> NULL
	NOUDEV -> NODEV
	udev_t -> dev_t
	udev2dev() -> findcdev()

Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
2004-06-17 17:16:53 +00:00
Max Laier
22ac3ead26 Commit userland part of pf version 3.5 from OpenBSD (OPENBSD_3_5_BASE). 2004-06-16 23:39:33 +00:00
Bruce M Simpson
2b286ced87 Make netstat(1) more closely follow documented behaviour. If a TCP
socket in LISTEN state happens to be bound to an interface, it will
show up in netstat(1) output even without the -a switch.

As the definition of "sockets used by server processes" is a
difficult one to qualify with regards to UDP, do not change the
output behaviour for UDP sockets.

PR:		bin/26359
2004-06-16 07:00:50 +00:00
Mark Murray
b90e600892 Oops. My last commit included a bug that would make "su -m" always
use /bin/sh. Fix this.
2004-06-15 20:23:02 +00:00
Bruce M Simpson
538a4c1f75 mdoc(7) police
Submitted by:	ru
2004-06-15 16:48:42 +00:00
Tim Kientzle
d18eca7d48 Update some internal comments about the --no-same-permissions option.
Thanks to: Kris Kennaway for doing some gtar research for me.
2004-06-15 07:16:44 +00:00
Tim Kientzle
4150562c7b As near as I can tell, --no-same-permissions is a no-op in
gtar, so that makes it easy to implement.

Required by: audio/timidity port
Thanks to: Kris Kennaway
2004-06-15 06:44:41 +00:00
Tim Kientzle
d2286340c9 Oops. bsdtar's old -X option didn't take an argument; the new
(gtar-compatible) one does require an argument.
2004-06-15 06:24:54 +00:00
Tim Kientzle
b7ec47bb9f Add gtar-compatible -X/--exclude-from 2004-06-15 05:55:41 +00:00
Tim Kientzle
b9d38fa25a Fix build. 2004-06-15 01:51:45 +00:00
Tim Kientzle
24220f2890 Rename -X to --one-file-system, as GNU tar uses -X for
something else.  I would really like a short option for
this, but all of the obvious ones conflict with something else.
2004-06-15 00:28:34 +00:00
Tim Kientzle
5a57a7f095 Clean up usage message(s):
* Usage goes to stderr, not stdout
  * Use correct argument markup
  * bsdtar --help  no longer exits with an error return code
  * ensure that the word "bsdtar" appears in the first
    line output from "bsdtar --help" (even if the program is
    invoked as "tar")

In particular, scripts can now test for the presence of bsdtar.
For example, in /bin/sh:

if (tar --help 2>&1 | grep bsdtar >/dev/null 2>&1) then \
          echo bsdtar; else echo not bsdtar; fi
2004-06-15 00:07:23 +00:00
Bruce M Simpson
9d61853d9f Change the default behaviour of talk(1) to use "localhost" as the
"machine name" in ntalkd(8) request packets, when the destination
and source are local.

This should make talk(1) use much more pleasant for those security-
conscious individuals who have chosen to bind talkd to "localhost".

Previous to this change, talk(1) would require that the hostname of
the machine, as retrieved by gethostname(3), resolved to a valid and
reachable IPv4 address, using gethostbyname(3).

This makes talk(1) dependent on a valid host entry for "localhost"
in /etc/hosts (or the Domain Name System).

PR:		bin/23178
Submitted by:	angui.sh admin (with cleanups)
2004-06-14 22:34:13 +00:00
Robert Watson
97b88fbf30 Teach fstat(1) about new location for socket state flags relating to
socket buffer state.

Submitted by:	rik
Reminded by:	le
2004-06-14 20:54:18 +00:00
Bruce M Simpson
7714734ac9 Add -b to usage.
Pointed out by:	ceri
Pointy hat to:	bms
2004-06-14 19:29:37 +00:00
Bruce M Simpson
fb6dad913a Add whois.abuse.net to whois(1).
Submitted by:	ceri (with cleanups)
2004-06-14 17:30:46 +00:00
Bruce M Simpson
939fca9bea Date bump.
Nudged by:	ru
Pointy hat:	bms
2004-06-14 14:49:44 +00:00
Bruce M Simpson
7138e3fe15 Add whois.iana.org to the whois(1) utility, under the -I option.
PR:		bin/48914
Submitted by:	James Raftery
2004-06-14 14:03:10 +00:00
Bruce M Simpson
63fb96902c Fix unterminated RCSID.
Submitted by:	Liam J. Foy
2004-06-13 18:06:49 +00:00
Mark Murray
953cb3ecc8 Paranoia, WARNS fixes and lint. 2004-06-13 11:21:06 +00:00
David Malone
a5d31d1631 A first stab at truss support for amd64, basically cogged from i386.
It seems to work in my limited tests.
2004-06-12 22:49:06 +00:00
Marcel Moolenaar
74b010ebf2 Document the STRIPBIN environment variable. This includes adding a
forward reference from where strip(1) is being mention (-s option).

PR: bin/28620
2004-06-11 17:25:37 +00:00
Poul-Henning Kamp
01b8b4dc80 COMPAT_SUNOS is gone. 2004-06-11 11:58:07 +00:00
Tim Kientzle
c066ba2f01 Oops: gtar's --dereference should be a synonym for bsdtar's -L, not -H.
Pointed out by: devel/nspr port
Thanks to: Kris Kennaway
2004-06-11 01:35:56 +00:00
Tim Kientzle
a85e1b56bb Set program exit value to 1 if there are any of various errors when
creating an archive.

Pointed out by: Failure to complain when building certain broken packages
(Thanks again to Kris Kennaway for finding this!)
2004-06-07 07:19:04 +00:00
Tim Kientzle
af2ef563dd Fix the symlink-detection code. Don't squawk if we're just replacing
an existing symlink (as might happen if you extract an archive twice).
Also, if we remove the offending link, then we've removed the problem
and can safely go forward with the extraction.

Pointed out by: print/adobe-cmaps port (whose distfile has
	duplicate entries for the same symlinks)
Thanks to: Kris Kennaway (for using ports as a testbed for bsdtar)
2004-06-07 04:10:43 +00:00
Tim Kientzle
a55bfb25e7 The --include='pattern' option is the natural counterpart to
--exclude='pattern'.

I should have added this a long time ago, since it's so useful for testing.
In particular, it allows me to select a few entries from a troublesome
archive so that I can easily focus my debugging efforts:
   bsdtar -czf new.tgz --include='*foo*' @old.tgz
2004-06-07 03:49:48 +00:00
Tim Kientzle
b5642237fc Ooops! Previous commit added an over-zealous error check.
It is, in fact, perfectly legal to not specify a compression when
writing an archive. <sigh>
2004-06-07 03:38:17 +00:00
Tim Kientzle
e1f5ccf6fb If -b is specified, then force full padding for the last block. 2004-06-07 03:19:57 +00:00
Tim Kientzle
2225b76daf Per style(9), don't use double spaces in expressions.
Pointed out by: njl, des.
2004-06-07 03:16:18 +00:00
Brian Feldman
cac4b14c12 Do not use KERN_PROC_PROC with kvm_getproc(3); instead, if only process
(and not thread) scope is to be displayed, use KERN_PROC_ALL and
accrue CPU% ourselves, as the kernel makes no attempt to do so.

Of course, this doesn't make most stats any less bogus when displaying
threaded processes, but at least the CPU time is added up and not just
always 0.00%.  There are still issues with SCHED_ULE in top(1) that
cause other processes to display 0.00% CPU when they in fact have used
more.
2004-06-06 19:59:06 +00:00