Commit Graph

3408 Commits

Author SHA1 Message Date
hubertf a9539cd876 Add a -b(ackup) flag to move any existing file(s) aside by renaming
them to file.old instead of simply deleting them. A different backup
suffix may be chosen with the -B option's argument.
1999-01-25 01:42:57 +00:00
lukem 0bd80459cb * -v enables verbose & progress, -V disables both
* set setvbuf(ttyout, NULL, _IOLBF, 0) and remove a bunch of fflush(ttyout).
* use fwrite() instead of write() for progressmeter (don't intermix stdio
  with non stdio ops)
1999-01-24 02:39:29 +00:00
lukem 5051fd95cb flush ttyout in togglevar() 1999-01-24 00:51:08 +00:00
lukem 0e87f1b53d support -f, which forces a cache flush for http xfers using either
`Pragma: no-cache' (http/1.0) or `Cache-Control: no-cache' (http/1.1)
1999-01-23 15:46:24 +00:00
simonb c3cbf60d0b Swap helpful/non-helpful messages in option table.
Fixes bin/5441 from der Mouse.
1999-01-22 12:43:43 +00:00
simonb fe0d28b4c5 Use lgetenv() for "LESS" and "MORE" variables. 1999-01-22 12:31:22 +00:00
hubertf 8139c5026d Allow filename at "begin" line to contain spaces. Patch submitted by
John F. Woods <jfw@jfwhome.funhouse.com> in PR 6854.
1999-01-20 15:59:00 +00:00
simonb 88c54c38e0 Add -{a,c,m}min to STANDARDS section (via Klaus Klein) 1999-01-19 23:22:27 +00:00
christos a492eb7eff Lint fixes:
- extend __GNUC__  if (0) hack for lint, make it use an unused
	  variable, and move it in reachable code.
	- fread and fwrite size_t casts.
	- use yy_size_t where appropriate.
1999-01-18 22:18:17 +00:00
simonb 810471468e Add GNU-style -{a,c,m}min primaries. 1999-01-16 13:27:30 +00:00
kml 783ac03fcf Added a verbose flag for route display that will show
the various route metrics.
1999-01-15 19:06:25 +00:00
lukem 72381e166d shut up `unused label' warning with %options yylineno, using a disgusting hack:
#ifdef __GNUC__
		if (0)
			goto find_label;
	#endif
:-)
1999-01-15 05:22:34 +00:00
lukem f860489a38 remove "unused function yy_flex_realloc()" warning if using %options yylineno 1999-01-14 06:58:40 +00:00
augustss ab8c44f6d2 Remove two garbage characters in the table. 1999-01-13 23:14:33 +00:00
hubertf 5cfd62b649 0 errors
1 error   <- handle this exception in reporting error(s :-)
2 errors
3 errors
1999-01-13 21:00:16 +00:00
fair 0a35ac96da Correct documentation of /etc/nologin to note that it does not
apply to the superuser, per PR#6328.
Correct some nroff nits in the process.
1999-01-13 10:51:07 +00:00
lukem 98ae72f685 Add support for -printx, which quotes pathnames in an xargs friendly way.
From [bin/6790] by Eric Fischer <eric@fudge.uchicago.edu>
1999-01-12 00:18:50 +00:00
lukem eb2918dbf7 bump date too 1999-01-12 00:07:20 +00:00
lukem a54d80797f update history, from [bin/6790] by Eric Fischer <eric@fudge.uchicago.edu> 1999-01-12 00:06:45 +00:00
thorpej 04767647ca Nuke all mentions of vmstat -t. PR #6433, Geoff Wing. 1999-01-11 23:03:06 +00:00
kleink 3ed4fcf61e In userland, pull in <errno.h> instead of <sys/errno.h> for the declaration
of errno.
1999-01-11 22:39:59 +00:00
kim 0c127d7cef Show year of last login. 1999-01-11 20:20:54 +00:00
mrg a112081f50 #ifndef SMALL changes. saves 30k on the sparc 1999-01-11 12:31:53 +00:00
abs 27107cb9f0 If up for one minute, report "1 min, " not "1 mins,". 1999-01-10 08:19:23 +00:00
abs 27134b4a8f Add Gtags support from shigio@wafu.netgate.net (PR 5978). Gtags are produced
by global (http://wafu.netgate.net/tama/unix/global.html)
1999-01-08 06:16:54 +00:00
kleink 75ff0c2532 Fix preprocessor logic bogon; from Michael Eriksson <eramer@era-t.ericsson.se>
in PR bin/6681.
1999-01-06 15:53:39 +00:00
lukem 0e36738ca6 add copyright 1999 1999-01-06 13:51:09 +00:00
abs e516980de2 Apply (slightly modified) patch from 5543 to fix -s behaviour for netatalk. 1999-01-06 05:57:29 +00:00
lukem a877181317 Fall back from passive to active if connect() fails. (from openbsd) 1999-01-05 23:33:44 +00:00
lukem 7a3ee4352c whitespace fix 1999-01-05 22:54:49 +00:00
lukem 6ae118efdb add missing braces (this is C not python...). fixes coredump on solaris 1999-01-05 00:31:20 +00:00
cjs 17652c59c0 Descend on obj, as well as clean, etc. 1999-01-03 21:57:49 +00:00
lukem adfde6fdc9 Add support for "-flags [-]flags", which matches the file flags in a
similar way that "-perm [-]mode" matches the file mode.
1999-01-03 14:54:27 +00:00
lukem 191498cad2 args to -perm are "-perm [-]mode" not "-perm [-mode]" 1999-01-03 14:11:54 +00:00
lukem f0dcae6433 highlight that ls -o lists the flags 1999-01-03 01:36:34 +00:00
lukem c5d402d13c fix bugs in handling of `!' operator:
* 'find . !' would coredump
* ! wouldn't correctly negate expressions in parenthesis

discovered and fixed by Dave Sainty <dave@dtsp.co.nz> in [bin/6412]
1999-01-02 02:34:15 +00:00
lukem 234fb36cc6 support http/1.1's `transfer-encoding: chunked' mode. [noted by hubertf & bad] 1999-01-01 13:26:31 +00:00
lukem 1f3ec47c0f * implement auth_url(); given a challenge, decode it, ask the user for
a response, and return the base64 encoded response. only the `Basic'
  scheme is supported.
* implement base64_enc(), which base64 encodes the given buffer
* add support for http response codes 401 "authorization required" and 407
  "proxy authorization required", using auth_url(). [requested by veego@]
1999-01-01 10:00:46 +00:00
lukem 11154508d4 improve previous, so that display rounding is done to binary boundaries
(1024 not 1000) because the prefix determination is done that way.
tested on various boundary conditions.
1999-01-01 03:55:26 +00:00
lukem 8557ede465 add two digits of precision to the transfer rate, and always show at
least KB/s. instead of printing `5414 B/s' now print `5.41 KB/s'.
1999-01-01 02:05:05 +00:00
lukem 974dee5975 use uname(3) to determine info to send in User-agent: header. (suggested by cgd) 1998-12-31 02:10:34 +00:00
lukem cc66a8544e * major code reorg; gut auto_fetch() and url_get() into a smaller auto_fetch(),
do_fetch() - which retrieves one file calling fetch_url() or fetch_ftp()
  as necessary.
* don't http redirect more than 5 times for a given url
* send `User-Agent: NetBSD-ftp/1.4' header in http requests. (suggested
  by Christoph Badura <bad@ora.de>)
* cleanup http return code parser, and add support for:
    - 300 `Multiple Choices' - but only if the server returns a
      preferred url in a Location: header because i'm *not* adding
      a html parser to provide the user with options.
    - 305 `Use Proxy [given in Location: header]'. (XXX: not tested)
* support http redirects to non-proxied ftp://urls. (bug discovered by
  Chris Demetriou <cgd@netbsd.org>)
* auto-login to an ftp site (using the FTP protocol) if an ftp://host/dir/
  style url is given and ftp_proxy is set. whilst this is less orthoganol
  with other ftp://host/file urls it's *much* more convenient.
1998-12-29 14:59:04 +00:00
lukem 28007f54ca be consistent with return (foo) style 1998-12-29 14:27:59 +00:00
lukem ee32f5a96b be saner about the method to determine which $proxy to use 1998-12-27 05:49:53 +00:00
marc e803638497 since the return from swapctl can change from call to call, print the
"Disk" column each time.  Also, use sep->se_path, not
devname(sep->se_dev).
1998-12-26 07:05:08 +00:00
marc a97b85feaf display the seconds in the timestamp in the corner, too. 1998-12-26 06:38:42 +00:00
ross c7790fec57 Punctuation character are magic to -mdoc and can't be used directly
as macro arguments unless combined with \&.
1998-12-24 02:07:36 +00:00
mcr c441f5e810 Added an #undef. This, and previous revision fixes PR bin/5374 1998-12-22 05:27:35 +00:00
mcr 851f23b927 fixed call to select to keep track of the highest numbered file
descriptor. Also removed some redundant code that was #ifdef TN3270
	(the code was the same on both sides of the #ifdef)
1998-12-22 05:26:22 +00:00
mrg 227ed1e3ff add another caveat entry. 1998-12-21 13:41:38 +00:00
christos 487c013c51 char -> unsigned char 1998-12-20 19:05:19 +00:00
christos 2f6a33d29c char -> unsigned char 1998-12-20 15:07:46 +00:00
christos 0e43b47410 _NSIG -> NSIG 1998-12-20 15:06:53 +00:00
christos 18d277be6d char -> unsigned char 1998-12-20 15:04:40 +00:00
christos 6e19ececef BADSIG -> SIG_ERR 1998-12-20 15:03:15 +00:00
christos 3c894f223c setpgrp -> setpgid 1998-12-20 15:02:57 +00:00
christos e0007e4751 union wait -> int 1998-12-20 15:02:17 +00:00
christos 9c41bfb9f4 include unistd.h 1998-12-20 15:01:43 +00:00
christos 5a0d53715e braces 1998-12-20 15:01:30 +00:00
christos 911f0fccb0 cast field sizes to ints. 1998-12-20 14:53:24 +00:00
christos f9688c3369 Make sure termio is defined to termios. 1998-12-20 14:48:33 +00:00
kristerw 9dc9e902a5 Disable strip 1998-12-19 23:57:52 +00:00
christos e415908344 char -> unsigned char
_start -> x_start
_escaped -> x_escaped

_start is the start symbol in solaris libc!
1998-12-19 23:41:53 +00:00
christos 9622cbbfb5 char -> unsigned char 1998-12-19 23:37:14 +00:00
christos 86fc76a0a6 remove local decl of errno. 1998-12-19 23:36:07 +00:00
christos b4c8a47030 appease gcc-2.8.1 1998-12-19 23:35:24 +00:00
christos ad5d7c5f6d char -> unsigned char 1998-12-19 23:22:51 +00:00
christos 23933685ff braces 1998-12-19 23:21:24 +00:00
christos af1827b7df char -> unsigned char 1998-12-19 23:19:45 +00:00
christos 1b5e48e426 char -> unsigned char 1998-12-19 23:02:21 +00:00
christos 4dadb162f6 sigvec->sigaction
sigblock->sigprocmask
sigpause->sigsuspend
XXX: code could be shared here.
1998-12-19 23:02:02 +00:00
christos 1a8acb42c1 <sys/dir.h> -> <dirent.h>
<sys/file.h> -> <fcntl.h>
1998-12-19 23:00:43 +00:00
christos a6f820700b remove unused variable
char -> unsigned char
1998-12-19 23:00:18 +00:00
christos b5e27b660d creat->open O_CREAT 1998-12-19 22:59:21 +00:00
christos e42e202cfb char -> unsigned char
<fcntl.h> instead of <sys/file.h>
compensate for different types in th_stuff
1998-12-19 22:41:21 +00:00
christos 719b192026 sigvec->sigaction 1998-12-19 22:36:11 +00:00
christos eb4463abfe KNF 1998-12-19 22:27:54 +00:00
christos 24a4a811e5 char -> unsigned char 1998-12-19 22:26:13 +00:00
christos 664c0d224c ifdef the pw_change and pw_expire stuff with BSD4_4 1998-12-19 22:24:18 +00:00
christos f6d2541fc5 portability in printf args.
char -> unsigned char
1998-12-19 22:18:00 +00:00
christos f6a7c3e2b3 portable printf args. 1998-12-19 22:14:30 +00:00
christos ea2df27a8f char -> unsigned char
compensate for not having REG_STARTEND
1998-12-19 22:12:32 +00:00
christos 431b0659ba char -> unsigned char 1998-12-19 22:12:11 +00:00
christos 861d7d0674 don't use union wait; an int is good enough. 1998-12-19 21:53:56 +00:00
christos 377fe973b8 include <fcntl.h> for O_RDONLY, and remove decls of optind and optarg. 1998-12-19 21:52:00 +00:00
christos d374d91f3d small cast. 1998-12-19 21:50:45 +00:00
christos cfb06221ce brace police 1998-12-19 21:44:31 +00:00
christos 20a2ed5105 revert previous cast. 1998-12-19 21:31:37 +00:00
christos 681ecbf381 a few casts, and char -> unsigned char 1998-12-19 21:27:40 +00:00
christos e4ac7024d0 extra braces, char -> unsigned char 1998-12-19 21:19:11 +00:00
christos 9126a73f7f Overhaul...
- check numeric arguments properly.
- fix usage.
- add -n increment option.
1998-12-19 21:07:12 +00:00
christos 7b232cdf19 char -> unsigned char 1998-12-19 20:34:53 +00:00
christos b751ad2c5c de-ja-vous
This thing was still using <sys/dir.h> and struct direct.
Get rid of the time warp.
1998-12-19 20:32:17 +00:00
christos 76f0fa8f60 brace pollution, and char -> unsigned char 1998-12-19 20:21:44 +00:00
christos 2136635414 char -> unsigned char 1998-12-19 20:11:20 +00:00
christos 1b399e6819 char -> unsigned char and portable printf formats. 1998-12-19 20:10:08 +00:00
christos fc8ac77abf we don't have d_namlen in svr4, and char -> unsigned char 1998-12-19 20:08:03 +00:00
christos d594b7c039 char -> unsigned char 1998-12-19 20:03:49 +00:00
christos b812d45035 char -> unsigned char 1998-12-19 19:54:26 +00:00
christos e8ab739a14 char -> unsigned char 1998-12-19 19:45:09 +00:00
christos e2d09d7f42 portability in printf format, and support for svr4 timezone. 1998-12-19 19:30:57 +00:00
christos 76e23f8bdc Braces to the altar of gcc-2.8.1 1998-12-19 17:46:08 +00:00
christos 8f5ca4eed0 char -> unsigned char 1998-12-19 17:44:22 +00:00
christos 6e0fa105be Avoid bogus warnings produced by gcc-2.8.1 where it wants field widths to be
ints and copmplains if they are unsigned ints!
1998-12-19 17:38:39 +00:00
christos 24eea87b54 Allow system path to be overriden in the Makefile 1998-12-19 17:26:12 +00:00
christos 844b3dce90 char -> unsigned char 1998-12-19 17:06:20 +00:00
christos 0d9bacd536 gcc-2.8.1 wants more braces 1998-12-19 17:05:30 +00:00
christos 8caf9db03c portability in printf args. 1998-12-19 17:04:11 +00:00
christos be59268229 char -> unsigned char, braces for gcc-2.8.1 1998-12-19 17:00:08 +00:00
christos 6ccac2c3b8 use sysconf to get the max number of groups instead of NGROUPS. 1998-12-19 16:55:21 +00:00
christos 9794a7e065 char -> unsigned char 1998-12-19 16:37:28 +00:00
christos ec1efbf3e5 Fix ifdef mess. 1998-12-19 16:35:10 +00:00
christos 2d72555862 char -> unsigned char 1998-12-19 16:34:38 +00:00
christos 288075599a union wait -> int 1998-12-19 16:34:04 +00:00
christos b1d8c6168d index -> strchr 1998-12-19 16:33:24 +00:00
christos 681c2d939c char -> unsigned char, index -> strchr 1998-12-19 16:33:08 +00:00
christos dcc0ef7552 char -> unsigned char 1998-12-19 16:32:52 +00:00
christos 9189a0e37d char -> unsigned char, index -> strchr, s.w_termsig -> WTERMSIG(s) 1998-12-19 16:32:34 +00:00
christos bd077f6919 char -> unsigned char 1998-12-19 16:31:57 +00:00
christos 09edb00354 char -> unsigned char, s.w_coredump -> WCOREDUMP(s) 1998-12-19 16:31:41 +00:00
christos 25b1fd1911 char -> unsigned char, index -> strchr, rindex -> strrchr 1998-12-19 16:30:52 +00:00
christos 489005fa65 char -> unsigned char 1998-12-19 16:01:21 +00:00
christos 5d6b49ea05 gcc-2.8.1 printf format and brace warnings. 1998-12-19 16:01:01 +00:00
christos 4fe7015c6d SVR4 timezone portability 1998-12-19 16:00:33 +00:00
christos b4775af2e3 index -> strchr 1998-12-19 15:59:50 +00:00
drochner 09eb0ffc9c avoid integer overflow in free memory report 1998-12-19 14:34:40 +00:00
thorpej af7b5d4d71 Set close-on-exec on all opened files. Partially from OpenBSD. 1998-12-19 02:23:46 +00:00
thorpej fef2d92ecd Better error message if opening the temp file fails. 1998-12-19 02:13:43 +00:00
thorpej d78de2f0ad Build ldd.1, and make it work with the extra directory depth. 1998-12-17 22:34:55 +00:00
thorpej f6895d1c2d Get ldd.1 from the previous level. 1998-12-17 22:34:09 +00:00
thorpej 27518b942e Move the manual page up one level via repository copy. 1998-12-17 22:33:46 +00:00
pk 137577af03 Remove ldd from special clean list 1998-12-17 15:33:57 +00:00
thorpej e4cbfbfb44 getopt() returns -1, not EOF. 1998-12-16 23:14:02 +00:00
thorpej 2e04232a96 Prototypes. 1998-12-16 23:13:02 +00:00
pk 96868862ca Move ldd special case one level down. 1998-12-15 22:08:53 +00:00
pk 21e1fe821f Move a.out version of ldd(1) to the usr.bin tree; elf and a.out
reside in separate subdirectories (various source moved by
repository copying). Adapt Makefiles to new situation.
1998-12-15 22:07:11 +00:00
christos 8f9762f2e2 pass -CC instead of -C to cpp so that we preserve macro comments in place. 1998-12-09 12:28:36 +00:00
drochner 20b876f326 avoid malloc(0) 1998-12-08 14:08:50 +00:00
fair a7b28c97e7 This trivial and computationally useless pointer initialization makes
gcc 2.7.2.2 happy on m68k again.
1998-12-07 04:10:13 +00:00
mycroft 33360720ab Add missing braces, so PUTRATE() works correctly as an if clause. 1998-12-06 16:53:44 +00:00
pk 66bc493d73 Make a network number by shifting out host bits in octet units.
This is currently required still to get correct lookups in `/etc/networks'.
1998-12-05 13:14:04 +00:00
perry ff669e2e1a Small bug fix from Soren S. Jorvang (soren@t.dk) 1998-12-04 17:47:06 +00:00
augustss ef51366cb7 Handle flags better. 1998-12-03 20:46:10 +00:00
augustss 8cababe387 Fix typo. 1998-12-02 16:37:48 +00:00
simonb 552d6a2ac5 Truncate the output file before writing to it, and silence the verbose
output.
1998-11-27 05:09:49 +00:00
augustss 9726cfd1fb Make the copyright header conform to the NetBSD template. 1998-11-25 22:17:06 +00:00
christos 9ca5ef57d6 more is not less on the systems that don't have less. Make "more" the default
pager if $PAGER is not set in the name of portability.
1998-11-25 16:55:10 +00:00
hubertf 3ddc74e157 Add "mp3" audio file information to file(1)/magic
per PR 6497 by C Kane <ckane@best.com>
1998-11-25 07:54:21 +00:00
kim 2d1bb4511d Allow port number for the server to be specified ("-h server:port").
This makes it possible to query rwhois servers at non-standard ports.
1998-11-24 01:33:47 +00:00
christos d79deccee9 Unfortunately lint uses c-style comments as directives and these get parsed
at the lexical analysis stage not at the syntax parsing stage. The upshot
is that:
	if (expr) {
		stmt1;
	}
	/* LINTED */
	stmt2;

stmt2 is the look-ahead token for the parser to choose between and if-then-else
statement as opposed to an if-then statement. Unfortunately the side effect
is that the LINTED directive gets reset before stmt2 gets parsed. We fix this,
by remembering the the linted directive during the if statement parsing and
restoring it at the appropriate time.
1998-11-23 14:37:08 +00:00