Commit Graph

4091 Commits

Author SHA1 Message Date
kleink c23c312a55 * Fix a display buglet: if the process list is exhausted before the window's
bottom is reached, clear the remaining lines, lest there be stale process
  entries if the process list shrinks.
* Implement a top(1)-like `user' command in the ps display.
1999-12-22 14:46:14 +00:00
kleink 1a2a0445fa Implement XCU5 prompt mode (-p). 1999-12-22 14:41:00 +00:00
kleink 4ce1b28f8c Initialize locale on startup. 1999-12-22 14:39:18 +00:00
lukem 80b66e48af change references from draft-ietf-ipngwg-url-literal-01.txt to RFC 2732 1999-12-21 13:00:18 +00:00
fair 37d4a35950 A gencat(1) manual page, which satisfies PR 4749 1999-12-21 09:25:43 +00:00
jwise 850fb37f89 Fix error handling throughout. First off, it is not true as claimed in swap.c
that `systat doesn't handle errors'.  Second off, errx should not be used directly, since
the terminal should be cleaned up before bailing.  Third off, whatever we do we need
to be consistent.

There, I feel better now.
1999-12-20 23:11:50 +00:00
fair aff3242363 fix trivial nroff source bug, per PR 8724 1999-12-20 22:53:44 +00:00
jwise bc8f4e2f46 Be consistent about whether to block SIGALRM before calling command() -- don't
ever do so, as the first thing command() does is block SIGALRM.
1999-12-20 21:59:29 +00:00
lukem 00a4e0e7ce need <string.h> for strlen() 1999-12-20 21:49:11 +00:00
jwise 24b9ee353a Nuke assignment unneeded after last commit 1999-12-20 21:46:10 +00:00
jwise b037ddd3b7 More cleanup -- use strtok() rather than rolling our own not-quite-correct version. 1999-12-20 21:42:50 +00:00
jwise 5a69f1bd85 Block alarm signals while displaying -- there's no reason to allow recursive
display at all.
1999-12-20 21:04:41 +00:00
jwise d0e3cec262 1.) Clean up keystroke processing
2.)  Add the all-time most requested feature:  hitting space or CR while
     not in command mode now causes an instant refresh
1999-12-20 20:49:06 +00:00
jwise 299c3534d3 TNF copyright -- I will do the paperwork to give these over asap. 1999-12-20 19:31:47 +00:00
itojun 8471c4a69a fix "netstat numbers". 1999-12-20 17:26:50 +00:00
jwise 81ed25dba3 Knee-jerk snprintf()-ism. 1999-12-20 17:08:52 +00:00
kleink ece19a5225 Report disabled control characters as <undef> (like stty(1) does); fixes
PR bin/9019 from SAKAI Atsushi <a-sakai@echo.nuee.nagoya-u.ac.jp>.
1999-12-20 14:36:11 +00:00
jwise be9a446256 G/C function used in old command parsing 1999-12-20 04:06:25 +00:00
jwise 4c0fbd4c92 Two things:
1.) fix a bug which caused coredumps when starting with no mode arguments
  2.) move to table-lookup for mode-specific command parsing as well.
      all command matching is now table-driven.
1999-12-20 03:45:01 +00:00
bouyer 7616130d51 Explicitely cast to (u_quad_t) calls to btodb() and dbtob() to avoid
int overflow. It's now possible to add/display quotas of more than
4G.
XXX I'm sure there is a PR open on this but I couln't find it with the
usual search engines. If someone knows it's number ...
1999-12-16 17:29:52 +00:00
jwise 30af11dbd4 Sigh... this is the missing part of last night's final commit -- perform
the same simplification on mode parsing for the command line as for user
commands.

My apologies to anyone who tried to build systat this morning.
1999-12-16 17:15:48 +00:00
jwise 099afa1959 End special-casing of `start' and `interval' global commands.
Vastly simplify handling of mode switches, and short-syntax interval
changes.  Substring matching of mode names and commands will come
shortly, however the previous method of substring matching modes (it was
not available for commands) is currently not working.

TODO: implement table lookups for mode-specific commands.
1999-12-16 06:16:16 +00:00
jwise 420c21c43c Handle arguments to global commands. Note that the `interval' and
`start' global commands are still special cased, which will change
1999-12-16 04:49:32 +00:00
jwise b5f0c03b3a Backout unintended change 1999-12-16 04:41:49 +00:00
jwise 7fc29b6116 Add a file missed in last commit 1999-12-16 04:40:03 +00:00
jwise 06f376613f Rototill global command matching -- switch from ad-hoc tomfoolery to a
table lookup.  This will make prefix matching and so on easier.

Expect a similar change for mode-specific commands before too long.

While there, rename some structures with misleading names.

Watch this space for more changes soon.
1999-12-16 04:02:22 +00:00
thorpej 2b9d9a9499 Make this compile on the Alpha again. 1999-12-16 00:58:17 +00:00
bouyer 18e200396c Bump a static char array from 8 to 255. Avoids rpcgen core dumps on some
long struct name.
XXX There are a lot of static arrays in there, bounds should be checked
XXX more carrefuly. All of them seems big enouth (>100) for normal use, though.
1999-12-15 16:47:35 +00:00
itojun 033763d6c9 per-interface statistics.
bring in and enable KAME scopeid hack.
lots of cleanups.
(sync with latest KAME)
1999-12-13 15:22:55 +00:00
christos 51d639caed Enable hints processing so that we can see the mappings. 1999-12-13 09:10:16 +00:00
itojun 1e75e9ee55 remove setuid(getuid()). they are unnecessary as noone is going to
setuid telnet(1).

i'm not sure why it is here (maybe someone reused this code from
other setuid'ed program, or someone cut-and-pasted the code from
somewhere else?), it was from revision 1.1 (= 4.4BSD).

briefly discussed in: tech-net?
1999-12-13 04:52:20 +00:00
itojun 62b5e94d25 [host]:filename syntax for IPv6 case. 1999-12-13 04:44:55 +00:00
lukem f442e9dbbd add dependency on version.h 1999-12-12 02:14:53 +00:00
lukem eee70cc0f0 crank version 1999-12-12 02:12:29 +00:00
lukem d30bdcd79c separate out the main `data pump' loop into two: one that supports
rate limiting and one that doesn't. simplifies the code, and speeds
up the latter case a bit, at the expense of duplicating a few lines...
1999-12-11 02:02:21 +00:00
lukem 3851d504a7 Fix chunked support; probably broke after rate limiting was added.
Problem noticed/debugging assisted by giles lean <giles@nemeton.com.au>.

XXX: rate limiting with chunked xfers might not limit correctly (i.e,
the limit may be too high or too low); fixing this is non trivial,
and will probably occur if i ever rototill fetch_url()
1999-12-11 00:56:13 +00:00
ad 0ac257319d Create link to newsyslog.conf.5. 1999-12-07 11:28:13 +00:00
aidan 5375ac8703 Made login continue without kerberos when there is no krb5.conf present
(and KERBEROS5 is defined).
1999-12-05 23:39:11 +00:00
lukem ef03015b86 move version into separate file to reduce recompilation after version crank. 1999-12-05 22:54:35 +00:00
lukem bcd625e612 crank version 1999-12-05 22:50:06 +00:00
lukem e36391c2c9 * remove unnecessary freeaddrinfo(res), since res0 was changed to be
freed earlier in itojun's last commit. fixes [bin/8948].
* remove `const char *reason'; it was being assigned but not used.
1999-12-05 22:49:27 +00:00
fredb 2cfe71bc9a More fallout from CL* purge. 1999-12-05 18:54:34 +00:00
mason 02a7de3c63 Fixed wording error. 1999-12-03 15:09:24 +00:00
fair b426e15b59 The never-sufficiently-damned Network Solutions has whacked around
the WHOIS service, again. New target: whois.networksolutions.com

This program should be replaced with one that does WHOIS++ so that it
can hit all the registries for data.
1999-12-03 08:22:09 +00:00
itojun 6ceceb260b clarify getaddrinfo() loop. try to contact all possible addresses
unless we experience fatal error.
XXX changed location of setuid(getuid()), may need someone's review.
1999-12-03 06:52:13 +00:00
itojun 4b402f1483 clarify reverse address lookup (-N). AI_NUMERICHOST is for forward lookup.
XXX RFC2553 does not say that AI_CANONNAME means reverse lookup.
we need to check if getaddrinfo(3) implementation is correct.
1999-12-03 06:34:24 +00:00
itojun 05e574f6a9 fix memory leak in fetch_url (no freeaddrinfo was there).
sync with recent KAME.
1999-12-03 06:10:01 +00:00
tron b11e523694 Define "_KERNEL" not "KERNEL" before including "netinet6/ip6_mroute.h". 1999-12-02 14:31:22 +00:00
lukem 0826be2b88 cleanup formatting, improve example 1999-12-01 12:03:16 +00:00
ad 22ee5fa9d2 Shiny new manpage for newsyslog(8), based on that from FreeBSD. 1999-11-30 12:04:14 +00:00
ad 604db10508 - Add '-F' option which forces rotation of logs (from FreeBSD).
- Add 'sigtype' field specifying signal to be sent (from FreeBSD).
- Add 'N' flag which specifies that no signal should be sent.
- Fix some breakage.
1999-11-30 12:03:24 +00:00
pk 9c865e3e82 No need for <machine/cpu.h> here. 1999-11-29 11:15:13 +00:00
lukem d0090fb777 * implement xsl_init() and xsl_add(); error checking forms of sl_{init,add}()
* fix bug where the second press of <TAB> on an empty word (i.e, list
  all options) may have resulted in an strncmp() against NULL.  (detected
  by _DIAGASSERT())
1999-11-28 06:32:04 +00:00
mrg ef2d33cbd1 add some percentages in here. 1999-11-27 05:58:04 +00:00
soren 819a9c5fd3 Print Internet6 header properly without -f. 1999-11-27 02:19:34 +00:00
lukem 21da08ce70 in cleanuppeer(), reset username to NULL after free()ing it.
fixes [bin/8870] by Wolfgang Rupprecht <wolfgang@wsrcc.com>
1999-11-27 01:00:06 +00:00
lukem 7047fe4a36 bump version 1999-11-26 23:26:05 +00:00
lukem f25449279d * complete_remote(): use remglob("", ...) instead of remglob(".", ...),
for listings of the current working directory; some ftp servers don't
  like `NLST .'.
  [noted by Giles Lean <giles@nemeton.com.au>]
* recvrequest(): treat remote=="" as remote==NULL when calling command().
  (to support the above change)
* support `[user@]' in `[user@]host' and `[user@]host[:][path]'.
  [based on idea (and initial code) from David Maxwell <david@fundy.ca>]
* `idle' may be invoked without any args
* reformat some comments
* reformat usage string in program and man page
* call updateremotepwd() after successful login, not after successful connect
* always call setsockopt(, IPPROTO_IP, IP_TOS, ) (et al); using #if
  defined(IPPROTO_IP) doesn't work on certain foreign systems where
  enums instead of #defines are used...
  [noted by Matthias Pfaller <leo@dachau.marco.de>]
1999-11-26 21:41:55 +00:00
msaitoh 6f52aeb8d1 cdplay now uses libedit! 1999-11-26 18:34:58 +00:00
msaitoh 17b68982ad crunchide for coff (COFF executables not currently supported!) 1999-11-26 13:47:52 +00:00
msaitoh 44181778bd fix following sequence:
telnet localhost
	cat (no argument)
	control-C
	(not returned to the shell prompt)
	(push enter key)
	(returned to prompt)
1999-11-26 07:33:52 +00:00
mrg f22d12ed49 back out rev 1.23 (don't stat PHONY targets). it broken the libcrypto
build by causing everything to be remade everytime.  this fixes PR#8419.
1999-11-25 22:34:16 +00:00
itojun d8470360b1 more clarification to field width of netstat -rn -f inet6. 1999-11-24 08:45:43 +00:00
itojun 22758aaba3 use old WID_{DST,GW} value (field width for netstat -rn) for non-INET6
address families (see tech-net discussion).
1999-11-22 14:13:53 +00:00
chopps 13232a2f19 Don't restore the tag file name's trailing '/' until after the length
is taken.  This fixes relative paths in tags files.
1999-11-22 05:53:58 +00:00
kristerw e71aea426d Typos (from OpenBSD) 1999-11-19 22:29:24 +00:00
bouyer f7e8e4aebd Change printf formats for 64bit counters. 1999-11-19 10:44:33 +00:00
enami 82d7115cf2 Don't pass so many args to .Nd macro. It just overflows. 1999-11-19 01:12:39 +00:00
simonb 7f7397e603 Don't free "buf" in closebufcache() - initbufcache() only gets called
once per systat invocation, not each time we switch to the bufcache
display.

Fixes core dump noted by Andy Doran when switching back and forth to
bufcache display.
1999-11-15 23:39:33 +00:00
sommerfeld f25cd19a6a Improve summary line so jhawk can find this command using apropos 1999-11-15 14:48:32 +00:00
mrg 9042b087c4 avoid using CLBYTES (which is based on NBPG). 1999-11-15 10:54:40 +00:00
simonb b80f4eaf1d - Add `bufcache' display which shows buffer cache usage per filesystem,
ala the monitor(1) command for Ultrix.
- Allow `h' or `?' to show the command list (same as `:help').
- Sort commands in cmdtab.c and systat.1
1999-11-15 06:16:56 +00:00
lukem ecb8a0755a - implement `set rprompt'; right side version of `set prompt'. depends on
EL_RPROMPT support i added to editline(3).
- allow $FTPPROMPT and $FTPRPROMPT to override defaults for the relevant
  prompts
- move `%' formatting code from prompt() to expandbuf().
- implement `%.' and `%c', similar to the same % codes in tcsh(1)
  (functionality I added to tcsh nearly 6 years ago), except that `%.'
  always does `...trailing' and `%c' always does `/<x>trailing'.
- unknown `%foo' codes get printed as `%foo'
1999-11-12 02:50:38 +00:00
soren 6fc41af333 Sync usage() with man page. 1999-11-11 03:06:04 +00:00
lukem 14fbd5079e - implement updateremotepwd(); update the global variable `remotepwd'
to contain the remote working directory.
- add `set prompt', a user configurable prompt. (defaults to `ftp> ').
  the following escape characters a la tcsh(1) are supported: %/, %m,
  %M, and %n.
- add global var `username'; used by prompt code
- fix a couple of minor memory leaks
- bump version
1999-11-11 02:53:02 +00:00
lukem 2ef6c64e80 whitespace nits 1999-11-11 01:19:11 +00:00
lukem b2edff6b32 - implement restarting file:/// non-proxied http:// URLs (with -R).
- fix a semicolono which stopped file:/// from working
1999-11-10 07:34:41 +00:00
lukem f8a1dcf0d2 - split the version string into product and version
- be consistent about reporting the version between:
	+ status command
	+ about:version URL fetch
	+ User-agent sent in http requests
1999-11-09 22:03:49 +00:00
drochner 85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
lukem 3889281dc1 when using http/1.1 for unproxied http requests, send the port as a number
(e.g, `:80') instead of a name (e.g, `:http'), because the former is the
supported method that actually works...  noted by hubertf@netbsd.org
1999-11-09 07:46:22 +00:00
lukem f8233fe3ba prevent minor memory leak (unnecessary strdup) 1999-11-09 07:26:50 +00:00
kleink c9954566b9 When we have to print usage instructions, don't indicate success in the exit
status.
1999-11-08 10:21:20 +00:00
mycroft 411b41e76c Update for ld.elf_so changes. 1999-11-07 00:30:18 +00:00
kleink 513b25c0e9 For temporary files' pathnames, check $TMPDIR before falling back to _PATH_TMP. 1999-11-06 15:11:46 +00:00
kleink 1447a4671d * Don't treat failure to open a file as fatal error; print a warning to
standard error, arrange for a non-zero exit status and continue with the
  next file.  Addresses PR bin/8748.
* GCC vs. ANSI: a cast doesn't yield an lvalue.
* Use MAP_FAILED.
1999-11-06 15:05:45 +00:00
lukem 3a2e129c54 add trailing "," to memory names (makes it easier to read) 1999-11-05 07:25:14 +00:00
mycroft ff488606e6 Nit: In the compatibility case, set the seconds to 0. 1999-11-05 04:54:10 +00:00
erh 6752f572d8 Remove ELFNAME defines since they are defined in sys/exec_elf.h 1999-11-04 02:00:17 +00:00
hwr 51515f302b Fix bogus section header. From PR 8735. 1999-11-03 21:45:57 +00:00
wennmach 8d67a1ce88 Fix a documentation bug in this man page: The Gregorian Reformation in Great
Britain and its colonies eliminated 11 days (not 10), following
September 2, 1752.

From "A.D. 1751. Anno vicesimo quarto GEORGII II. CAP. XXIII.
      An Act for Regulating the Commencement of the Year; and for
      Correcting the Calendar now in Use.":

"... and that the natural Day next immediately following the said 2nd Day of
 *September* [1752], shall be called, reckoned and accounted to be the 14th
 Day of *September*, omitting for that Time only the 11 intermediate nominal
 Days of the common Calendar;

 and that the several natural Days, which shall follow and succeed next after
 the said 14th Day of *September*, shall be respectively called, reckoned and
 numbered forwards in numerical Order from the said 14th Day of *September*,
 according to the Order and Succession of Days now used in the present
 Calendar; "

Added a caution note on using cal for very old dates.

Problem mentionned in PR 5215 by John Franklin (franklin@bev.net).

Thanks to Perry Metzger for his comments and for reviewing this man page.
1999-11-03 14:32:25 +00:00
lukem ed43430a7c support `about:version'. also display the version in the output of `status'. 1999-11-03 07:42:01 +00:00
lukem a5d1d869e7 hookup(): when using getservbyname() (when getaddrinfo() isn't available), if
the provided port is a valid number use that rather than trying to do
getservbyname() against it.
fixes a problem on foreign systems noted by Chuck Silvers <chuq@chuq.com>
1999-11-03 02:03:08 +00:00
jwise 768d7ab7a9 GC savestr() function. Makes this build again on i386 (this hadn't been used
for a while, but showed up due to recent static poisoning.)  Note that although
fmt.c builds against ../mail/head.c, this function never actually gets used.
1999-11-02 21:17:16 +00:00
drochner 1899563c96 make it compile after ELF definition changes 1999-11-02 21:13:17 +00:00
jwise d6907ab16b Use <inttypes.h> to get typedefs of integral types instead of local #defines
in "config.h".  Makes this compile again.
1999-11-02 21:05:20 +00:00
jdolecek 5f8283ea12 process correctly whole line even when it's longer than BUFSIZ characters -
previously, all characters of a line after the first BUFSIZ characters
	were just trimmed
while here, do some const & static poisoning
1999-11-02 12:50:04 +00:00
lukem 3f8c4dac86 revert previous 1999-11-02 10:55:47 +00:00
lukem 0895d2339e remove superfluous '-' in getopt string 1999-11-02 10:52:49 +00:00
soren 6df42c85a5 Make pool output fit in 80 columns on most machines. 1999-11-02 06:23:50 +00:00
jdolecek facd78dc9f adapt to last ntfs changes - struct ntnode doesn't contain i_mode
anymore, get the mode from appropriate ntfsmount structure
1999-11-01 19:56:20 +00:00
christos 7d48644528 Resolve corn flakes. 1999-11-01 17:39:26 +00:00
christos 39cf80bb8c new version of file(1) 1999-11-01 17:30:12 +00:00
thorpej 0bd35e4157 This program has to use KVM alrady, so use that to read uvmexp, rather
than sysctl.  This can now read VM stats from crash dumps.
1999-10-30 22:49:58 +00:00
explorer 7e9d7f75aa make change to the yacc output bits, not to the yacc binary bits 1999-10-29 16:41:51 +00:00
explorer 3cdbacc45a defined(__NetBSD__) && defined(__RCSID) 1999-10-29 16:35:46 +00:00
itohy 2f4c0d5e74 Make ktrace(1) not affect interactions between processes.
Following examples show the cases.

    % ktrace -f - false >/dev/null && echo wrong
    wrong
    % ktrace -f - -i /usr/sbin/update >/dev/null
    (does not return to command line)

That is, back out last change and restore the roles of parent/child for
ktrace(1).  The ktruss(1) stuff still remains.
Yes, ktruss(1) has the problems.  Better implementation is expected.
1999-10-29 09:11:49 +00:00
explorer 2e74cdd712 Only use __RCSID() if defined(__NetBSD__) so the yacc output files can
be used on non-NetBSD platforms, too.
1999-10-27 20:28:11 +00:00
kleink 522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
lukem 4f2d3550d0 new features:
- add `usage'; displays the usage of a command.
  implemented by calling the c_handler() with argc = 0, argv = "funcname".
- add `passive auto'; does the same as $FTPMODE=auto.
- add `set [option value]'; display all options, or set an option to a value.
- add `unset option'; unset an option.
- add getoptionvalue() to retrieve an option's value, and replace a few
  global variables with calls to this.
- implement cleanuppeer(), which resets various bits of state back to
  `disconnected'. call in disconnect() and lostpeer().
- support completing on `options'.
- improve recovery after a SIGINT may have closed the connection.
  XXX: there's still a couple to fix

other stuff:
- various consistency fixes in the man page.
- ensure that the command usage strings in the code and man page match reality.
- mput/mget: check that the connection still exists before each xfer.
- minor cosmetic changes in confirm().
- set code correctly in sizecmd() and modtime()
- don't need \n in err() strings.
- change lostpeer to take an argument (rather than casting (sig_t)lostpeer
  in signal handlers)
- knf and whitespace police.
1999-10-24 12:31:36 +00:00
mrg 4b5ab45441 fix bug introduced in 1.12:
only return a header length of 0 if we are using -f (force), not
in the case when we know how long the header is.  this stops from
playing the audio header.
1999-10-23 04:20:14 +00:00
hannken b383db3e6c Undo last change. While these macros are defined in exec_elf.h, they are
enclosed by `#ifdef _KERNEL'.
1999-10-22 10:47:37 +00:00
erh e896ce55a0 Remove ELFNAME macros which are already defined in exec_elf.h 1999-10-21 21:16:07 +00:00
lukem f74df4b2ea * fix up confirm() (broke `a' and `p' in last commit)
* simplify main loop (don't need `top' variable any more)
* use a struct sockaddr_in6.sin6_addr for the result from inet_pton(),
  rather than u_char buf[16]
* add a few more comments
1999-10-13 02:47:54 +00:00
lukem 28f9cbb866 s/ARPANET/Internet/ ... 1999-10-12 08:11:59 +00:00
lukem da626f2307 a few user interface and cosmetic tweaks:
* confirm(): move from util.c to cmds.c. display mnemonic string in its prompt.
  add support for `q' (terminate current xfer), `?' (show help list)
* in various signal handlers, output a linefeed only if fromatty.
* if fgets(stdin) returned NULL (i.e, EOF), clearerr(stdin) because you don't
  want future fgets to fail. this is not done for the fgets() in the main
  command loop, since ftp will quit at that point.
* unless ftp is invoked with -a, don't retain the anonftp setting between
  hosts (`ftp somehost:' sets anonftp, but you don't want that to `stick'
  if you close that connection and open a new one).
1999-10-12 06:04:59 +00:00
augustss 551f9b0d0c Fix timer reset bug when playing multiple songs. 1999-10-11 12:52:10 +00:00
lukem d5b5f0e034 * in the SIGINFO/SIGQUIT handler, print a newline before displaying
the xfer stats
* crankrate() should have a K&R decl (for consistency)
1999-10-11 12:35:42 +00:00
lukem bd5207d5ac if editing is enabled when intr() is called, print a newline. (cosmetic fix) 1999-10-11 12:34:17 +00:00
mrg 45cd15f3ed recognise "dty" the same as we do "tty" 1999-10-11 11:55:27 +00:00
lukem 08ebd97c48 use sigjmp_buf for sigsetjmp(), instead of jmp_buf.
noted by Havard.Eidnes@runit.sintef.no.
1999-10-10 22:33:54 +00:00
mrg 345a3bce75 let "systat vmstat" say "1 user" not "1 users" 1999-10-10 01:07:03 +00:00
lukem afb965e778 allow a second SIGINT during the "xfer aborted. waiting for remote to finish abort."
stage. if this occurs, just call lostpeer() to close the connection.  whilst this
might be considered brutal, it's also extremely handy if you're impatient or there's
lossage at the remote end.
1999-10-09 12:48:12 +00:00
lukem a53d7d57a9 * use sigsetjmp()/siglongjump() instead of setjmp()/longjmp(); the latter
don't save the signal mask on some foreign systems.
* ensure signal handlers don't use stdio and do reset errno if they
  don't exit with siglongjmp()
* use a common SIGINT handler for {send,recv}request()
1999-10-09 03:00:55 +00:00
msaitoh 0fcbe067c6 s/ the the / the / 1999-10-08 20:13:42 +00:00
msaitoh 759d929514 s/ as as / are as / 1999-10-08 18:13:16 +00:00
simonb 7d7c6d9f66 Minor nit - don't append a '/' to tmpdir if it already ends in a '/'. 1999-10-07 02:05:22 +00:00
ad 37a134f54b Add a new optional parameter to the configuration file, specifying the
path to a file containing a PID to send SIGHUP to. If omitted, the default
is to signal syslogd. Idea from FreeBSD.
1999-10-06 13:26:28 +00:00
lukem ce2d63fcbf more propaganda :) 1999-10-06 08:57:46 +00:00
lukem 141ae91ed8 * fetch_url(): specifically set SIGQUIT to psummary before each xfer.
(work around editline's override)
* minor cleanup of signal handler (along the lines of similar work in
  recvrequest()). the handlers should now be reset everytime the cleanup
  handler was callled.
1999-10-05 22:12:34 +00:00
lukem c694a5290b * set SIGQUIT to psummary in each of the xfer routines. (editline seems to
override SIGQUIT when EL_SIGNAL = 1 (but we want the latter for all the
  other signal support it has).
* more fixes after previous rototill
1999-10-05 22:04:30 +00:00
lukem 781fce374d the prior change was a bit too aggressive in factoring out common code in
{send,recv}request(). completion and uploading now works again...
1999-10-05 13:44:39 +00:00
lukem 3f8b92b0b3 * factor out SIGINFO setting into a handler that is always active (but only
prints out info if bytes > 0). only set the handler if SIGINFO is defined
* hijack SIGQUIT to be the same as SIGINFO (foreign ports have this, and it's
  annoying to have SIGQUIT dump core on netbsd when it prints info on other
  systems)
* in {recv,send}request(), factor a lot of duplicated code out into a
  `cleanup' section at the end
* rework shell() a bit
1999-10-05 13:05:39 +00:00
ad b545302160 Allow use of use of ':' to separate user and group names, since elsewhere
'.' is a valid character in user and group names. '.' still works, but
':' takes priority.
1999-10-05 12:11:27 +00:00
matthias 6ecf374e0c make this actually display the flag descriptions and examples. 1999-10-05 11:56:15 +00:00
lukem f45505380a add TNFi copyright to all files i've done more than a minor amount of work to... 1999-10-05 01:16:11 +00:00
lukem 4309cfaab3 enhancments from Marc Horowitz <marc@mit.edu> to improve connection timeouts:
* implement xsignal_restart(), which only sets the SA_RESTART flag if
  specifically requested
* xsignal() is now a wrapper to xsignal_restart(). INFO, USR1, USR2 and WINCH
  are restartable, ALRM, INT, PIPE and QUIT are not.
* improve getreply()'s timeout code to take advantage of the above.

other changes:
* improve wording of how globbing works for `classic' URLs (host:path).
  suggested by John Refling <johnr@imageworks.com> in relation to PRs
  [bin/8519] and [bin/8520]
* always compile in the `edit' command even if NO_EDITCOMPLETE defined.
  it's just a no-op in the latter case, which is more consistent to
  the users.
* always compile in about: support (i.e, remove NO_ABOUT).
  i'm entitled to some vanity in this program...
* clean up some whitespace
1999-10-05 00:54:07 +00:00
lukem 88d3d7c59e update after change to return value of tputs() third argument 1999-10-04 23:26:59 +00:00
lukem 670c7ebebd restart_point is a global; no need for it here 1999-10-01 09:23:32 +00:00
lukem fcb1a22a1c If EPSV or EPRT fails, disable epsv4 for the rest of the current connection.
the disabled state can be overridden by toggling epsv4.

(I got sick of the errors about EPSV not being supported on almost
every server I connect to. This way we retain support for epsv4, but
it's not so whiny after the first failure...)
1999-10-01 08:01:12 +00:00
lukem 4c9f05c61f simple dependancy so addition of global vars to ftp_var.h is detected for main.c 1999-10-01 07:58:02 +00:00
lukem ad70c1982e prefix the global variables in ftp_var.h with GLOBAL, which defaults
to "extern" if it's not set. define GLOBAL to (empty) in main.c.
this effectively moves all the globals into main.c whilst retaining
namespace access to them in other source files.
(global vars in header files confuse foreign linkers)
1999-10-01 06:55:44 +00:00
lukem 46111773d1 * don't bother with "pathnames.h"; it contained just a single #define.
instead, include <paths.h> in the files that need it
* slightly reorg ftp_var.h
1999-10-01 06:18:32 +00:00
lukem 38100c05f4 * newer takes an optional second arg, so document this
* be a bit more explicit that the arguments to rate are in bytes
1999-10-01 05:08:31 +00:00
lukem 25790d921d * In the !NI_NUMERICHOST case (i.e, getaddrinfo() challenged systems), portnum
should be in host order. found/fixed by Matthias Pfaller <leo@dachau.marco.de>
* parse_url(): improve checking of portnum, and add an extra argument to pass
  back the parsed portnum to the caller (reduces a bit of code duplication)
* Move the KAME/WIDE copyrights after the BSD/TNFi ones. Since there was
  significantly less code added under the former, it's only fair on the latter.
1999-09-30 23:51:26 +00:00
soren 60b747deab Typo. 1999-09-30 13:47:57 +00:00
soren a87871bbec There's room in the systat-vmstat-iostat display, so allow four-letter
device names like e.g. ccd0 and print an extra digit of precision in
the 'sec' line like iostat(8) does.
1999-09-30 13:16:27 +00:00
soren 30d18a154c Remove extraneous colons and newlines from perror(3) arguments. 1999-09-30 12:35:52 +00:00
lukem 1b3e840242 * fix initialisation of home[]
* fetch_url(): if path would be NULL, return strdup("")
1999-09-30 12:18:03 +00:00
lukem c4a3ce23de in empty(), FD_ZERO(&rmask) not (&cin). (hi christos! :)
fixes abort_remote() when __USE_SELECT is defined.
thanks to simonb@netbsd.org for reporting this bug
1999-09-30 06:35:13 +00:00
lukem 5f7fe832b6 #define BUFLEFT is always used... 1999-09-30 05:38:19 +00:00