Commit Graph

1184 Commits

Author SHA1 Message Date
knu
96265e088e Remove the printf builtin command from sh(1), which command is not
used so often that it's worth keeping it as a builtin.

Now that all the printf invocations from within the system startup
scripts, we can safely remove it.

Urged by:	sheldonh  :)

No MFC is planned so far because it may break compatibility and
violate POLA.
2001-11-20 18:33:59 +00:00
knu
9a58963b18 Fix style bugs I found, and add a comment. 2001-11-19 20:39:24 +00:00
knu
959d37723b Oops sorry, forgot to add a #include. 2001-11-19 20:15:10 +00:00
knu
0fe2ba5388 - Do not reference argv[1] if no argument is given.
Reported by:	brian

- Call error() instead of errx() if compiled as sh(1) builtin.
2001-11-19 19:57:45 +00:00
knu
b58a3e4078 Make test(1) a builtin command of our sh(1) for efficiency. The
binary size increase is 3,784 bytes (about 0.6%).

I don't drop the printf builtin while I'm here because some /etc/rc.*
scripts seem to use it before mounting /usr where printf(1) resides.

Reviewed by:	arch (sheldonh)
Inspired by:	NetBSD, ksh
Clued by:	ume (on how the printf builtin is used)
2001-11-17 19:10:11 +00:00
rwatson
cb22385a83 o Update licenses, comments.
Obtained from:	TrustedBSD Project
2001-11-16 15:59:46 +00:00
dd
bbce60529d Deuglify the usage message by putting the program name after the
"usage:" string.  This is how most (all?) other programs in the system
do it.

PR:		31596
Submitted by:	Cyrille Lefevre <clefevre@citeweb.net>
2001-11-15 15:46:45 +00:00
tegge
c98a8251e8 Don't call setvar() with the VTEXTFIXED flag. A copy is created by
setvar() and passed to setvareq(). When the VTEXTFIXED flag is set,
that copy is never freed, causing a memory leak.

PR:		31533
Submitted by:	maxim@macomnet.ru
2001-11-07 23:00:05 +00:00
dillon
4394f0950f Use a quad int conversion routine for time_t instead of ulong, capable of
decoding tar's full time buffer (12 digits).
2001-10-28 02:51:43 +00:00
dillon
6ce5111d95 Various string fields for certain cpio types are 11 rather then 8
characters.  Use quad conversion functions rather then long conversion
where appropriate to handle the available range.  Mainly fixes time_t
but there was also a st_size ulong conversion in there that has to be
quad or cpio cannot be used to copy files > 2G.

MFC after:	1 day
2001-10-28 02:45:04 +00:00
dillon
5bb0a362e0 Remove unnecessary casts in timeval.tv_sec load from st_*time 2001-10-28 02:42:26 +00:00
dillon
78601098af Remove assumption that time_t is an int
MFC after:	1 day
2001-10-28 02:28:04 +00:00
ru
b28c3d865f mdoc(7) police: join OS version with the corresponding macro. 2001-10-19 14:44:13 +00:00
tegge
e6528784cf Repair normally unused is_digit() macro. 2001-10-14 21:11:33 +00:00
obrien
d9494059c0 *** empty log message *** 2001-10-01 08:43:58 +00:00
ru
eb7cee6686 WARNSify. 2001-09-26 11:34:14 +00:00
ru
e43023b2d0 The "cat - -" feature was broken by the last commit.
Restore the code that avoided closing and reopening
stdin.  This is also required by POSIX.  As a bonus,
enable multiple stdin reads with the -benstv flags,
by resetting the EOF condition on stdin.
2001-09-26 11:32:23 +00:00
ru
7f833143d7 mdoc(7) police: fixed markup. 2001-09-25 18:10:18 +00:00
ru
f9bcfb7e53 mdoc(7) police: markup nits. 2001-09-21 07:04:47 +00:00
tegge
b0e7279ba2 Don't check uninitialized memory for having the shell control character
value CTLARI since this might break expansion of arithmetic expressions.

Don't access memory below start of stackblock.

Problem analyzed by hunt@iprg.nokia.com, slightly different patch applied.

PR:		24443
Submitted by:	hunt@iprg.nokia.com
2001-09-19 20:16:38 +00:00
tegge
0c39138a0b BASESYNTAX, DQSYNTAX, SQSYNTAX and ARISYNTAX handles negative indexes.
Allow those to be used to properly quote characters in the shell
control character range.
2001-09-19 20:07:47 +00:00
tegge
221fff6437 Adjust some type checks to include CTLQUOTEMARK in the range of
shell control characters.
2001-09-19 19:58:09 +00:00
dillon
0718b5e9ed Give /bin/cat the ability to connect to and read unix-domain sockets
MFC after:	1 week
2001-09-15 00:39:14 +00:00
julian
5596676e6c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
peter
8b50e616bf UPAGES as a constant is gone in KSE. We are going to have to trust
and/or fix ki_rssize.
2001-09-10 07:19:26 +00:00
mp
1674546f60 Enable BSD style color ls support.
PR:		23161
Submitted by:	Anand Ranganathan <anand@blandings.com>
2001-09-05 22:56:58 +00:00
mp
99362cccf4 Update to the tcsh-6.11 version.
This file could be removed as the alpha changes have been incorporated into
the base release. However, it is probably best to leave this here since there
are additional FreeBSD architectures in the pipeline that should be added.
2001-09-05 21:11:56 +00:00
mp
e74bda1062 Add new tcsh-6.11 NLS sets for Estonian and Russian.
(Polish was also included in tcsh-6.11 but the set1 and set3 files are broken)
2001-09-05 18:10:29 +00:00
ache
df6c6c6c15 File positions are off_t nowdays, not long, so:
fseek -> fseeko
  ftell -> ftello

  NOTE: that fseek/ftell not works for >long offsets per POSIX:

  [EOVERFLOW] For fseek( ), the resulting file offset would be a value which
  cannot be represented correctly in an object of type long.

  [EOVERFLOW] For ftell ( ), the current file offset cannot be represented
  correctly in an object of type long.
2001-09-01 23:26:40 +00:00
dd
088dc2ef52 The file_descriptor argument to -t isn't optional, so don't mark it up so. 2001-08-31 15:38:53 +00:00
peter
c05ab921af On today's kernels masking with ~KERNBASE is turning out to be less
than useful.  It still hits at least 8 digits. Adjust for reality.

This is still not satisfactory for the alpha if you add "-O paddr".
2001-08-24 09:56:44 +00:00
peter
de99d815fd Handle kvm_getprocs() returning nothing. Dont pass -1 to a size
for malloc().
2001-08-24 09:53:26 +00:00
dd
b5c6e30e9c Implement stty ek as documented.
PR:		24063
Submitted by:	Seth Kingsley <sethk@osd.bsdi.com>
2001-08-23 22:31:13 +00:00
brian
9efa99824a Only capitalise the last `t' in ps's first argument when it's
actually part of an option argument.

Submitted by:	Chris Costello <chris@calldei.com>
MFC after:	6 weeks
2001-08-16 02:41:42 +00:00
ru
bde8ec1b70 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
ru
24c7b0a61d mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
peter
a28e7a866a Initialize infp at main() 2001-08-13 21:55:04 +00:00
peter
d58a143b4f Initialize listf at main() 2001-08-13 21:54:47 +00:00
ru
e8e5635e4a Spell "FreeBSD" with "F" and "BSD" in uppercase. 2001-08-13 16:33:00 +00:00
ru
95ce4d2cdc Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
ru
f858dca3dc mdoc(7) police: join split punctuation to macro calls. 2001-08-10 17:35:21 +00:00
sheldonh
7950d85ec2 can not -> cannot 2001-08-08 18:32:06 +00:00
ru
4345758876 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
mike
eced21209c o Correctly define rcsid.
o Add consts where appropriate.
o Rename some variables that were shadowing global declarations.
o Remove register storage-classes.
o Make errmsg a const, so we can just set error messages instead
  of using sprintf/strcpy.
o Set WARNS=2

Reviewed by:	bde, des
2001-08-06 22:01:31 +00:00
obrien
b8605bc696 style(9) 2001-08-01 05:12:39 +00:00
obrien
cd3f6b3b20 Remove a misplaced space. 2001-08-01 02:09:09 +00:00
sheldonh
9bfb9eedcd Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.

Submitted by:   David Hill <david@phobia.ms>
2001-07-26 11:02:39 +00:00
sheldonh
8eba0410f0 Break the list of parameter expansions into two lists so that
the paragraph introducing the prefix and suffix pattern expansions
does not appear as part of the explanation for the string length
expansion.
2001-07-23 10:18:05 +00:00
dd
ccce8005b4 Don't use the pronoun "you".
Reviewed by:	sheldonh, mpp
2001-07-23 09:46:17 +00:00
dd
ae62c846d3 Don't put a shell prompt in the example since none of the other man
pages do it.  Also, don't use brackets to indicate optional options in
the example; instead, add a paragraph below the example explaining it.
2001-07-22 10:33:31 +00:00