summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Fix most cases where the address of an int is passed to a function expecting astefanf2005-02-141-1/+1
| | | | socklen_t * argument.
* Expand contractions.ru2005-02-135-6/+6
|
* Expand *n't contractions.ru2005-02-1335-49/+49
|
* New order after _netcat has been changed to _nc: sort the list.delphij2005-02-131-1/+1
| | | | | Submitted by: ru Pointy hat to: me
* Back out the previous commit. There is an obvious bug in it.harti2005-02-131-12/+10
| | | | Pointy hat to: harti
* Spell the variable as underscore plus their possible value, to followdelphij2005-02-131-2/+2
| | | | | | the style nearby. Submitted by: ru
* Forgotten to commit this file during the last commit. Connect nc(1)delphij2005-02-131-0/+5
| | | | to build.
* Stylistic fixes: push variable into a local context (this part is goingharti2005-02-111-10/+12
| | | | | | | | to be split out into a function soon). Also there is no need to write back the colon that we have NUL-ed - the string is going to be freed anyway. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Convert several instances of negative logic to positive logic.harti2005-02-111-85/+84
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Buffers are already NUL-terminated so there is no need to explicitely addharti2005-02-101-1/+0
| | | | | | a NULL. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Mostly stylistic nits in preparation for splitting up Var_Parse:harti2005-02-101-15/+19
| | | | | | | | use a more consistent style with regard to *str and str[0]; simplify code by introducing a temporary variable; shift a break around and add braces where appropriate. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Fixed usage().ru2005-02-101-2/+3
|
* Require at least one argument.ru2005-02-102-10/+6
|
* Let the buffer just use the default size by specifying 0 as the sizeharti2005-02-101-1/+1
| | | | | | instead of specifying the default size explicitely. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Mark the modification of the input string (which should really be const)harti2005-02-101-1/+1
| | | | | | with a comment. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Style nits:harti2005-02-101-7/+13
| | | | | | | | Move some assignments nearer to where they actually used. Convert a loop from a for() to a while() to make it clearer and add braces to the long body of it. Split assignment from variable declaration. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Describe a pre-condition of Var_Parse().harti2005-02-101-0/+3
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Remove a comment that's not actual anymore.harti2005-02-101-3/+0
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Fix spacing by converting mixes of space and tab to tab. Also add a numberharti2005-02-104-41/+46
| | | | | | of empty lines in appropriate places. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Initialise the status variable. W_SETTERMSIG uses its value.harti2005-02-101-0/+1
| | | | Submitted by: stefanf
* Lst_Append returns void, so the other case of the ? statementharti2005-02-101-1/+1
| | | | | | should also be void. Submitted by: stefanf
* back out 1.7 changes, unneeded and possibly wrong.alfred2005-02-101-9/+6
|
* Turn K&R functions into prototypes.stefanf2005-02-101-17/+6
|
* Let the generated code include <string.h> instead of <memory.h>.stefanf2005-02-101-2/+2
|
* Use defines for character constants for open and closing braces andharti2005-02-091-11/+22
| | | | | | | parantheses. This helps editors to find its way through the horrible mess of Var_Parse. Rewrite a for() loop into a while() to make it clearer. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Fixed the misplaced $FreeBSD$.ru2005-02-092-23/+25
|
* While working on constification temporarily disable -Werror. Things are tooharti2005-02-091-0/+1
| | | | twisted.
* Untangle VarFind and, while rewriting most of the function, fix theharti2005-02-091-45/+51
| | | | intendation. (A large part of the function was already at intendation 8).
* Introduce VarCreate and VarDestroy functions and used them whereharti2005-02-091-58/+51
| | | | | | appropriate. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Include missing headers.stefanf2005-02-094-0/+6
|
* Avoid usage of implicit int.stefanf2005-02-071-1/+2
|
* Include <stdlib.h> for exit().stefanf2005-02-071-0/+1
|
* Add a prototype for localupdate().stefanf2005-02-071-0/+1
|
* Remove an unneeded check.harti2005-02-071-1/+4
|
* Introduce a typedef for variable value modifation functions and use itharti2005-02-072-14/+12
| | | | | | where appropriate. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Make the intention of a loop clearer.harti2005-02-071-4/+5
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Introduce Buf_StripNewLines() and use it where appropriate.harti2005-02-076-58/+70
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Fix bugs in the previous commit.ru2005-02-071-2/+2
|
* Invent a Buf_AppendRange function that appends a non-NUL-terminated stringharti2005-02-076-12/+22
| | | | | | | given by a pointer to the start of the string and a pointer one behind the end. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Invent a Buf_Append function to append a NUL-terminated stringharti2005-02-077-39/+43
| | | | | | and use it thoughout the code. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Revamp several Makefile nits:delphij2005-02-071-2/+3
| | | | | | | | | | - .PATH: is spelled ``.PATH: '' - Don't forget to use DPADD so ``make checkdpadd'' is not broken. - LDADD should not come with + as it's empty in the first place Suggested by: ru
* Finish the import of nc(1) from OpenBSD. This includes:delphij2005-02-061-0/+11
| | | | | | | | | | | | | | | | | | - Bring IPsec support from the ports collection [1]. - Bring -o ("once only") option from the ports collection [2]. - Adopt the Makefile framework into usr.bin/nc/Makefile. - Add a knob to control whether to build nc(1), NO_NETCAT. - Bump __FreeBSD_version so ports collection can detect this change. Original patchset are contributed to the ports collection by: [1] nectar, [2] joerg. Note: WARNS?=6 patchset spined off in this commit, in order not to take too many files off the vendor branch.
* Where the returned line length from Buf_GetAll is not used just passharti2005-02-042-6/+3
| | | | | | a NULL to the function. Delete the now unused local variables. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Rewrite of the buf code:harti2005-02-042-169/+95
| | | | | | | | | | - convert Buf_AddByte from a macro to a function - move #define's into the header file - remove unused field in struct Buffer - remove size fields - they can be easily computed - inline Buf_OvAddByte Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Save last displayed file by having the "last" pointer global and save itdelphij2005-02-041-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | during we show the first file's tail. Instead of: tarsier% tail -f 1 2 ==> 1 <== foo bar ==> 2 <== bar foo ==> 2 <== bar2 foo2 Now with this change, we have: tarsier% tail -f 1 2 ==> 1 <== foo bar ==> 2 <== bar foo bar2 foo2 While I'm there, move a comment to where it should belong to. Also, const'ify the "last" static because we will never need to change the contents it points to. MFC After: 1 week
* None of the users of Buf_Discard used it to get rid of only a part ofharti2005-02-044-28/+13
| | | | | | | the buffer. So replace Buf_Discard by Buf_Clear which just gets rid of the entire contents. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Inline the ADDWORD() macro in the two places where it is used. It justharti2005-02-041-10/+11
| | | | | | obfuscates the code. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Use _exit() instead of exit() when the exec() after a vfork() fails.harti2005-02-041-1/+1
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Move PrintAddr() from util.c into suff.c - the only file where it isharti2005-02-043-12/+17
| | | | | | actuall used, and make it static. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* General whitespace cleanup: remove mixes of tabs and spaces, removeharti2005-02-047-86/+85
| | | | | | space after function names, remove spaces on emtpy lines. Submitted by: Max Okumoto <okumoto@ucsd.edu>
OpenPOWER on IntegriCloud