Commit Graph

7790 Commits

Author SHA1 Message Date
charnier
6cd34f4d90 Reduce compiler warning: variable might be used uninitialized, by giving
an initial value.
2005-05-29 16:04:46 +00:00
charnier
00bccc99ec Move variable initialization to reduce compiler warning. 2005-05-29 15:52:48 +00:00
charnier
45f96a1a02 Reduce compiler warning: variable might be used uninitialized, by giving
an initial value.
2005-05-29 15:49:53 +00:00
charnier
3d484d1c7a Move FreeBSD Id outside of copyright. Initialize variable. 2005-05-29 15:47:31 +00:00
rwatson
f5b0199972 Modify vmstat(8)'s domem() routine, which is responsible for extracting
malloc(9) statistics from kernel memory or a kernel coredump, to catch
up with recent changes to adopt per-CPU malloc(9) statistics.  The new
routines walk the per-CPU statistics pools and coalesce them for
presentation to the user.
2005-05-29 13:40:00 +00:00
rwatson
8cf16b63df dd a '-n' option to ministat, which causes it to display only summary
statistics, not graph and statistical test output.  Useful for automated
processing.
2005-05-27 17:52:56 +00:00
eivind
bf8bf9051e Remove an errno reset that became unnecessary.
Noticed by: juli
2005-05-26 22:49:08 +00:00
alfred
67f16567dc decode utimes, lutimes, futimes, chflags, lchflags. 2005-05-26 22:49:06 +00:00
eivind
64e1569cd3 Document a couple of gotchas. 2005-05-26 22:30:12 +00:00
eivind
1a8a2d84cd We are past 4.4BSD - use our new-found stat flags for pipes and fifos. 2005-05-26 22:14:37 +00:00
alfred
2754f60f30 decode mkdir args. 2005-05-26 20:06:57 +00:00
keramida
dd13f28b17 Interlink systat(1), iostat(8) and vmstat(8) through their SEE ALSO
sections, so that users of one can learn about the others easily.
2005-05-26 17:54:16 +00:00
thompsa
572561b265 Add myself to the calendar.
Approved by: bms (mentor)
2005-05-26 03:21:16 +00:00
harti
ec3ee28e7c Under certain conditions the condition parser would go one past end of
the string. Until now this caused no harm, because the buffer code used
to tack two NULs onto buffers. With the new, soon to come, parsing code
this isn't the case anymore in all cases, so fix this.
2005-05-25 16:06:14 +00:00
harti
0a769c1e2e Document why there is a dependency of certain object files from the
Makefile.

Requested by:	ru
2005-05-25 08:46:31 +00:00
csjp
377408df64 If sysctlbyname fails for kernel related reasons, tag the errno
string to the end of the error message. I think we used errx()
there when we really wanted an err().

MFC after:	1 week
2005-05-24 23:42:09 +00:00
harti
dd5f450e83 The caller of Var_Value() should not change the variable value. Make
this clear by constifying the return value.

Obtained from:	DragonFlyBSD
2005-05-24 16:05:51 +00:00
harti
79613308dc Get rid of the third argument to Var_Value() the pointer it pointed
to has always been set to NULL for some time now.

Obtained from:	DragonFlyBSD
2005-05-24 15:58:35 +00:00
harti
910dc606b9 Make shell.o dependend on the Makefile just in case someone changes
the default shell in the Makefile.
2005-05-24 15:48:10 +00:00
harti
145a7e51b4 Bump the warning level to 6. 2005-05-24 15:46:50 +00:00
harti
def2e7bba0 Fix a 64-bit warning by casting an int64_t to intmax_t and printing it
with %jd.
2005-05-24 15:45:11 +00:00
harti
30f40a9f33 Factor out ProcExec() into its own file and rename it to Proc_Exec() for
consistency with the rest of make.

Obtained from:	DragonFlyBSD (except for the rename)
2005-05-24 15:41:34 +00:00
harti
a5cd5bc554 Factor out all the .SHELL parsing related stuff into its own file and
rename the function to be consistent with the naming scheme in the rest
of make. No functional changes.

Obtained from:	DragonFlyBSD (idea and most of shell.h)
2005-05-24 15:30:03 +00:00
harti
b6ff4ff920 Use the name of the default shell instead of a numeric index to select
the default shell.

Idea from:	DragonFlyBSD
2005-05-24 13:19:40 +00:00
harti
6c1f15aa0b Another shell attribute 'unsetenv' that will cause to unsetenv("ENV")
before executing the shell. Until now this was done when the default
shell was the ksh. This failed if the default shell was sh or csh and
the user switched to ksh.
2005-05-24 13:14:24 +00:00
harti
e6576c2ddf Describe the meta and builtins attributes for the .SHELL special
target.
2005-05-24 10:59:08 +00:00
harti
8cf013ca66 Describe the -x option and the .WARN pseudo-target. 2005-05-24 10:55:00 +00:00
harti
37b9e8f42f Before doing any parsing parse the builtin shell specifications and
set the current shell to DEFSHELL. Put all these specifications into
a list. Add user specified new shells to this list. If the user
just selects one of the already know shells just pick the right one
off the list. This let's one do something like:

# Full specification of the user's shell. This also selects the shell.
.SHELL: name=myshell path=/somewhere/foo echo=loud ...

FOO != bar		# use myshell here

.SHELL: name=sh

BAR != baz		# use /bin/sh here

.SHELL: name=myshell	# no need for full spec here.

# continue to use the user's special shell.
2005-05-24 09:14:46 +00:00
harti
cd8de662c8 Allow the .SHELL target to specify the list of shell meta characters and
the list of shell builtins. Both of these are needed for the compat
mode where make directly executes commands if the command line contains
neither a shell meta character nor a shell builtin. The list of builtins
is not changed, but csh has '@' added as a meta-character.

Initialize the default shell by parsing a string as one would specify
to the .SHELL target. So we get rid of the CShell clone of struct Shell which
just contained const char * where struct Shell had char *.

Add a debugging function for dumping a parsed shell description to
stdout.
2005-05-24 07:45:49 +00:00
harti
6e1ae33f12 Make the ArgArray_Init() function visible to the rest of make.
It will soon be needed for the .SHELL parsing code.
2005-05-23 13:27:52 +00:00
ru
8b6774c605 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 10:14:11 +00:00
ru
0491ba1f63 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
harti
e6b2d317a9 Get rid of global variables for argument vectors produced by brk_string()
introduce a struct that holds all the information about an argument
vector and pass that around.

Author:		Max Okumoto <okumoto@ucsd.edu>
Obtained from:	DragonFlyBSD
2005-05-18 14:50:35 +00:00
keramida
dec56f1548 (1) Revert unnecessary indentation changes I committed as part of the
last version and (2) remove a disabled debugging fprintf() that I
accidentally committed here.

Noticed by:	simon (2)
2005-05-18 13:42:51 +00:00
keramida
0f9725e09b Merge the CPU and WCPU columns in a single %6.2f column, add a new 'C'
command that toggles between the two and update the ORDER_PCTCPU()
macro to sort correctly by the visible "cpu" value.

This saves 6 more columns in 80-column terminals, making things a lot
better for the COMMAND column.

Tested on:	i386, sparc64 (panther), amd64 (sledge)
Approved by:	davidxu (in principle)
2005-05-18 13:30:08 +00:00
harti
94c62408e0 Get rid of the ReturnStatus obscuration that was anyway used only
in two places. While here don't bother returning anything from
Lst_Replace - nobody ever checks the return code.

Suggested by:	jmallet
2005-05-18 06:50:39 +00:00
kan
dbfc528c1e Unbreak r1.11 by delhij. Blind change from unsigned to signed char
pointer causes problems with sign extension and leads to compress(1)
dumping core on any non-trivial incoming data.
2005-05-18 05:24:08 +00:00
ru
7727dbb6af Add temporary patches to make one-true-awk respect locale's collating order
in [a-z] bracket expressions, until a more complete fix (like handing BREs)
is ready.

Prodded by:	ache
OK'ed by:	tjr
2005-05-17 14:54:33 +00:00
ru
d975010767 Correct the script name to be "zless.sh". This avoids an extra cp/chmod
(from the sys.mk rule) while still installing it under the "zless" name.
2005-05-17 11:41:01 +00:00
des
b51b7d4a0f Add a zless script which invokes less using the lesspipe script. This is
similar to the zmore script that comes with gzip (and in fact, in most
Linux distros, zless is a symlink to that very same zmore script) but has
the advantage that you get the correct file name on the less status line,
and can use :n and :p to navigate back and forth between multiple files.

MFC after:	1 week
2005-05-17 11:14:11 +00:00
des
4622341945 Handle presumably uncompressed files with cat; exec the handlers.
MFC after:	1 week
2005-05-17 11:08:11 +00:00
obrien
4689881298 Hardcode username to 8 characters. This makes top(1) output sane when
there are users on the system (even if not running a single process)
with a login > 8 chars.
I'm not all that happy limiting the username width like this, but it
restores sanity to top(1) output.

Discussed with:	keramida
2005-05-16 18:17:38 +00:00
ru
86758e8895 Make <runefile.h> internal to libc.
Suggested by:	phantom
2005-05-16 09:32:41 +00:00
marcel
bd9685053c o Add option -n. The -n option takes a count and breaks the line
after that many values have been printed. The line length is not
   considered anymore.
o  Add option -x. The -x option will cause the byte values to be
   printed in hexadecimal instead of decimal.
o  Bump WARNS to 6.
o  Update the manpage accordingly.
2005-05-15 06:26:59 +00:00
marcel
af76c232de Reindent and improve style(9) comformance. 2005-05-15 01:07:36 +00:00
ume
e33ba03345 NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.
2005-05-13 16:31:11 +00:00
harti
c52091a829 Use the print_flags function to print the OP_ flags of a target.
Give the function one more argument to decide whether it should
print the flags like a C-expression or just space-delimited.
2005-05-13 13:47:41 +00:00
harti
4340f9015f Move the Boolean and ReturnStatus stuff from sprite.h to util.h and
get rid of sprite.h.

Obtained from:	DragonFlyBSD
2005-05-13 08:53:00 +00:00
harti
591461b255 Make Shell_Init() static - it's only used here.
Make sure we don't end up with shellPath beeing non-zero, but shellName
beeing zero in the error case - back out cleanly from the error.
When executing a command for macro assignment in Cmd_Exec() stuff the
path of the shell into argv[0], not the name. This makes no difference
from the functionality point of view, but allows the regression tests to
determine whether make executes the correct shell.
2005-05-13 06:31:45 +00:00
jmallett
85f5689fb5 Add a flag (-q) which prints no header for the file and which doesn't indent the
match text; it also doesn't warn() for files which can't be opened.  Remove
global variables.  Use bool.  fopen(3) the files instead of freopen(3)ing stdin.
2005-05-12 18:57:37 +00:00