Commit Graph

3918 Commits

Author SHA1 Message Date
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