Commit Graph

2110 Commits

Author SHA1 Message Date
fvdl ff19eb6a74 warnx --> warn, warnx wasn't needed anymore after previous change
(pointed out by enami tsugutomo)
1997-03-10 14:14:37 +00:00
cgd d15724228e print out a
rwho: no hosts in /var/rwho.
message like ruptime does, for consistency.  (Similarly, exit with exit
code 0, though i'm not sure that's "correct" for either.)
1997-03-08 23:08:28 +00:00
cgd 31b388d823 add rwhod(8) xref 1997-03-08 22:23:19 +00:00
mouse ee6a5b2cd6 alternate -> alternative, per PR 2643 1997-03-08 14:24:19 +00:00
mouse 650ee578da alternate -> alternative, per PR 2643 1997-03-08 14:13:54 +00:00
mikel e1525d735d merge lite2 changes (just SCCS ids) 1997-03-07 06:14:02 +00:00
fvdl 720565ab4f Correct error in previous. 1997-03-06 16:09:45 +00:00
fvdl 3ee3460f02 Don't bail out when chflags() fails with EOPNOTSUPP. Fixes PR #3288 1997-03-05 23:48:47 +00:00
explorer 1a20e46715 s/strcnpy/strncpy/ typo 1997-03-04 00:21:13 +00:00
explorer 3f120170b2 Add a double quote to make emacs's color mode happy... 1997-03-03 22:47:17 +00:00
explorer 5c1fdae73d Message buffer passed to kvm_openfiles() should _POSIX2_LINE_MAX long; PR#3266 1997-03-03 22:22:48 +00:00
explorer a030e0a1ae Message buffer passed to kvm_openfiles() should _POSIX2_LINE_MAX long; PR#3266 1997-03-03 22:12:19 +00:00
mikel e60e80fff9 pass $SHELL or /bin/sh as argv[0] to subshell, instead of "sh"; fixes
PR bin/3276.
1997-03-03 04:02:21 +00:00
mikel a9513a3823 fix typo; from Andrew Wheadon in PR bin/3264. 1997-02-28 06:35:48 +00:00
jonathan f0f7e53290 Add compiled-in MCLBYTES and MSIZE to conf/param.c, as 'mclbytes" and "msize".
Add code to netstat to use libkvm to for kernel variables "mclbytes"
and "msize', and if found, use those for netstat -m rather than
compiled-in defaults.
1997-02-28 00:14:19 +00:00
mikel 5ca01fc0a4 Don't assume that sun_path in sockaddr_un is null-terminated; final fix by
Noriyuki Soda <soda@sra.co.jp>.  fixes part of PR 3035.
1997-02-27 05:41:19 +00:00
mrg e3fdccd2ce oops, rsh is still setuid root for the moment. 1997-02-24 00:00:22 +00:00
thorpej a7883a4d79 If kmem stats are not being gathered by the kernel, print a useful
message to that effect.  Fixes PR #3187, submitted by
Guenther Grau <s_grau@ira.uka.de> (fix by me).
1997-02-22 02:04:42 +00:00
thorpej 46610bda06 Tidy up printf formats in "don't use all lower case" warning
message.  From Dave Huang <khym@bga.com>, PR #3198.
1997-02-22 01:50:46 +00:00
mikel 87b7b330c4 don't clobber CFLAGS 1997-02-21 07:52:37 +00:00
explorer ff34809355 Add Carl Sagan's death 1997-02-20 21:54:39 +00:00
christos 4417c4f61f Reported by cgd: fix .USE directive problems:
1. ${.*} variables did not get expanded in dependencies.
    2. expanded ${.*} variables in .USE dependencies can cause tree
       restructuring; handle it.
    3. in compat mode, expand .USE before evaluating the list of targets,
       instead of doing .USE expansions on demand, because they can cause
       tree restructuring.
1997-02-20 16:51:47 +00:00
mrg 40095a1c39 merge lite2 stuff; fix a bit. 1997-02-17 15:10:53 +00:00
mrg e2c3c3f6c8 ensure we do not dump core. 1997-02-17 06:14:25 +00:00
mrg 2d7faefcd4 merge lite2 changes. 1997-02-16 15:01:02 +00:00
cgd 91fbda1d8b tn3270 shouldn't try to do magic depending on the setting of
EXPORTABLE_SYSTEM.  Additionally, since it doesn't actually use libtelnet
for any of the 'interesting' features, it shouldn't be using libtelnet
at all (because that adds some serious headaches and problems, on ELF
systems with shared libraries, which cannot be easily addressed and
don't actually _have_ to be).  Now it simply pulls in genget.c from
the libtelnet source, and builds it locally.
1997-02-13 00:30:25 +00:00
mikel 68be8c5d1a fix typo reported by Saitoh Masanobu in PR misc/3214.
also fixed .Nm usage, other typos
1997-02-12 07:09:07 +00:00
mrg 954a0f16a0 getopt returns -1 not EOF. 1997-02-11 09:41:45 +00:00
mrg f9db097104 remove dangerous sprintf and strcpy calls. 1997-02-11 09:29:26 +00:00
mrg a4424f42c3 use strncpy. 1997-02-11 09:25:24 +00:00
mrg 53fddda6b9 give buffers lengths; use strdup. 1997-02-11 09:24:03 +00:00
mrg 5e32125362 remove dangerous sprintf call; use strdup 1997-02-11 09:20:15 +00:00
mrg e5baf973cc avoid not knowing the length of internal buffers. 1997-02-11 08:43:23 +00:00
mrg 23768a9e9a remove possibly dangerous sprintf and strcpy calls. 1997-02-11 08:42:03 +00:00
mrg b9de9dbc60 remove dangerous sprintf and strcpy calls. 1997-02-11 08:40:44 +00:00
mrg fc8700736a remove possibly dangerous sprintf and strcpy calls. 1997-02-11 08:39:23 +00:00
mrg cc03262905 remove dangerous sprintf and strcpy calls. 1997-02-11 08:26:27 +00:00
mrg a4d8e69073 remove possibly dangerous sprintf and strcpy calls. 1997-02-11 08:21:03 +00:00
mrg 2ba96e4833 remove dangerous sprintf calls. 1997-02-11 08:18:32 +00:00
cjs 795a80dde1 64-bit police. 1997-02-11 08:15:19 +00:00
mrg 56d95f62f0 remove dangerous sprintf calls. 1997-02-11 08:15:08 +00:00
mikel 43d35f1fb2 fix typo; from Saitoh Masanobu in PR misc/3199. 1997-02-11 06:01:54 +00:00
veego daad32f0db RCS id police. 1997-02-09 14:33:50 +00:00
veego 57344c4022 Add missing ;
Fix pr #3201.
1997-02-09 14:31:41 +00:00
cgd af10d1eaff handle quoted strings in quoted strings properly, when using multicharacter
quotes.  E.g. if left quote was "``" and right quote was "''", then
"``foo ``bar'' baz''" would yield "foo `bar' baz" when it should yield
"foo ``bar'' baz".
1997-02-08 23:54:49 +00:00
cgd 8b1ea567b0 Simplify some push-back code (e.g. for left and right quotes) so that
it uses pbstr() instead of doing the characters individually (in
    reverse order) with putback().
Fix dodiv() so that divert(<out-of-range stream>) doesn't cause "divnum" to
    return 0, but rather the stream number specified to divert().  Macros
    like PUSHDIVERT/POPDIVERT rely on this.  The new behaviour is compatible
    with vendor m4 implementations.
1997-02-08 23:50:40 +00:00
cgd 2c5dcba13b i don't know why this was still here, but it does not belong. It appears
to have been in Lite2, but with a Net/2 SCCS id.  It's unnecessary (it's
not used), so it's going away.
1997-02-08 23:42:48 +00:00
mikel 7eb775bf99 fix typo; from Saitoh Masanobu in PR misc/3195. 1997-02-07 03:27:22 +00:00
christos 8a0d2c8cb0 Fix PR1882+PR3171, swap display core-dumps from Paul Boven. 1997-02-02 19:20:55 +00:00
lukem 4c7551e4f0 don't display negative ETA upon SIGINFO because filesize isn't known 1997-02-01 11:26:34 +00:00
lukem 3a50014d60 [Yet Another Huge Ftp Commit - hopefully the last for a while,
barring any more little things people want added ...]

New features:
* progressmeter is now asynchronous, so "stalled" transfers can be
  detected. "- stalled -" is displayed instead of the ETA in this case.
  When the xfer resumes, the time that the xfer was stalled for is
  factored out of the ETA. It is debatable whether this is better than
  not factoring it out, but I like it this way (I.e, if it stalls for 8
  seconds and the ETA was 30 seconds, when it resumes the ETA will still
  be 30 seconds).
* verbosity can be disabled on the command line (-V), so that in auto-fetch
  mode the only lines displayed will be a description of the file, and
  the progress bar (if possible)
* if the screen is resized (and detected via the SIGWINCH signal), the
  progress bar will rescale automatically.

Bugs fixed:
* progress bar will not use the last character on the line, as this can
  cause problems on some terminals
* screen dimensions (via ioctl(TIOCWINSZ)) should use stdout not stdin
* progressmeter() used some vars before initialising them
* ^D will quit now. [fixes bin/3162]
* use hstrerror() to generate error message for host name lookup failure.
* use getcwd instead of getwd (it should have been OK, but why tempt fate?)
* auto-fetch transfers will always return a positive exit value upon failure
  or interruption, relative to the file's position in argv[].
* remote completion of / will work, without putting a leading "///".
  This is actually a bug in ftpd(1), where "NLST /" prefixes all names
  with "//", but fixing every ftpd(1) is not an option...
1997-02-01 10:44:54 +00:00
matthias cd80e9aae6 remove second RCS-Id line. 1997-02-01 09:51:48 +00:00
ghudson b440233d15 Document the recent change in group wheel semantics. Also, it wasn't
previously documented that anyone could su to root if group 0 didn't
exist.
1997-01-31 23:12:17 +00:00
ghudson 1b6b85b894 As discussed on tech-userlevel, allow anyone to su if group wheel has
no members (if you have just "root" as a member, which is the shipped
default, then no one can su, as before).
1997-01-31 22:22:47 +00:00
matthias 192303707a let the flat profile ignore symbols specified with -E. 1997-01-30 09:20:55 +00:00
matthias ec450f3940 finding whiteouts didn't work. 1997-01-30 09:17:27 +00:00
mikel 00702536b8 eliminate absent directories from .PATH; PR bin/3154 1997-01-30 07:29:11 +00:00
mikel feaa2cfce3 fix leftovers from lite2 integration; PR misc/3159 1997-01-30 06:52:44 +00:00
thorpej e911ec0bfe Don't try to divide by zero in progressmeter().
From Thorsten Frueauf <frueauf@ira.uka.de>, PR #3160.
1997-01-30 03:36:26 +00:00
thorpej 0941c04d45 Add support for generating MD5 checksums, partially derived from the
FreeBSD md5(1) program.  MD5 checksums may be generated by using the
"-m" flag to cksum, or by invoking this program as "md5".
1997-01-30 01:10:32 +00:00
christos b210ac559b make $MACHINE_ARCH settable from the environment. 1997-01-28 23:58:00 +00:00
christos 704854c465 Update to version 3.22 1997-01-28 00:49:36 +00:00
cgd 0317ced760 fix decode of _IOR/_IOW/_IOWR: 'R' and 'W' were switched (i.e. _IOW ioctls
would print out as '_IOR'), and _IOWR ioctls were being printed as
_IORW (which doesn't exist).
1997-01-27 21:39:50 +00:00
christos bea4a27a8e and again 1997-01-27 19:56:34 +00:00
christos 96aa33d4de bring in changes from file-3.22 1997-01-27 17:58:11 +00:00
cgd 2ea81b29dd parens around macro value. (oops!) 1997-01-23 19:13:56 +00:00
mikel f5a8ade241 return 0 on successful exit, compare getopt() result to -1 instead of EOF. 1997-01-23 06:29:05 +00:00
cgd 4f2317d97b add ELF support. tested on an alpha (64-bit ELF), but compiled with both
32- and 64-bit ELF support.
1997-01-23 05:43:29 +00:00
cgd 4790c9bc3d note that -k/-f should be give C names. note what i've done 1997-01-23 05:28:50 +00:00
cgd 4a4977d054 clean up formatting glitches (bogus newlines in source) 1997-01-23 05:14:37 +00:00
cgd d2fff4533c change the keep list (in_keep_list()) semantics: now keep list is C labels 1997-01-23 05:13:00 +00:00
cgd 20741c52e9 give crunchide a C label name with -k, since crunchgen really doesn't
want to have to care about the object format in use, and C label prefix
is object format dependent.
1997-01-23 05:07:22 +00:00
cgd 9e2f98f172 clean up formatting glitches (bogus newlines in source) 1997-01-23 05:03:49 +00:00
cgd b78496eee9 add ECOFF, ELF32, and ELF64 recognition code. Right now, when
you try to hide symbols in these kinds of files, an error message
is printed noting that the executable format is not supported.
1997-01-22 23:57:18 +00:00
cgd d7b9b1a503 dd the various #defines/#ifdefs for ECOFF support. ECOFF will
probably never be completely supported here (since its internal vs.
external symbol handling is so annoying), but at least we can recognize
the ECOFF binaries and print something useful, on machines that use
them.
1997-01-22 23:53:58 +00:00
cgd 144d8aad7e a couple more bogons. (i'd been testing with the wrong executable!)
Now it really works.
1997-01-22 23:33:08 +00:00
cgd eb8abf7e9d include extern.h, add newline to new fprintf 1997-01-22 23:21:49 +00:00
cgd 34f3806288 fix a couple of goofs ('hide' now returns errors!), move #ifdef 1997-01-22 23:21:01 +00:00
cgd ccc5be39c2 fix hide_* prototypes 1997-01-22 23:20:03 +00:00
cgd 5247fa0ce9 split this up so that support for other executable formats can be more
easily added.
1997-01-22 22:49:05 +00:00
explorer 8b5cdff515 sprintf -> snprintf, from David A. Holland <dholland@eecs.harvard.edu> 1997-01-20 19:04:59 +00:00
cjs 7e342b5f92 Add list of bugs: relies only on /etc/group for group membership,
sets policy in code.
1997-01-20 07:14:35 +00:00
veego 13c790f77f Add missing ; 1997-01-19 20:17:37 +00:00
lukem 7a7fa80740 New features:
* Command line editing via editline(3) library.
* Context sensitive command and file completion, including remote files.

Enhancements to auto-fetch feature:
* Support for http:// URLs using the http protocol, including proxy HTTP
  support via $htty_proxy if it's defined.
* The connection is kept open between successive files on the same host.
  (obviously, this does not count for http requests.)
* Return value of ftp is 0 on no error, or the offset in argv[] of the file
  which failed (i.e., argv[x] failed, ftp returns x).
* If the path in an ftp URL or classic format line has a trailing '/',
  cd to the path and enter interactive mode. Fixes [bin/3011], albiet
  requiring the user to help ftp in determining the operation.

Other changes:
* '-P port' works for normal ftp, and is the default for all classic style
  auto-fetch transfers and for ftp URLs that don't specify the port.
  (previously it would just work for the first xfer.)
* Some code moved into separated files along logical divisions.
* Editing and completion can be compiled out with -DSMALLFTP.
1997-01-19 14:19:02 +00:00
perry 979eb7d04f close pr-2767 -- add German Reunification Day (from Heiko Rupp) 1997-01-17 15:24:51 +00:00
perry 93933ccd04 Close pr-3115 from stephen.ma@jtec.com.au. He claims:
Sydney was settled by the English on 26 Jan, 1788 not 1778
1997-01-17 05:35:10 +00:00
perry bb1df8311a document mo command, per pr-3104 by Julian <jdc@orthanc.ncl.ac.uk> 1997-01-17 04:58:12 +00:00
perry e1389b7341 Add David Packard & Konrad Zuse's deaths to calendar.birthday
submitted by Heiko W.Rupp.
closes pr-2448
Also, moved Alan Turing's birthday from calendar.computer to
calendar.birthday, removed duplicate Thoreau entry and cleaned up date
ordering in calendar.birthday
1997-01-17 02:32:00 +00:00
perry 9cb735d26b fix write to print a warning if the sender has "mesg n" set, instead
of dying with an error. From Mark Weaver
closes pr-355, per thorpej
1997-01-17 01:52:12 +00:00
perry 21e443a885 mail.rc now installed by 'make distribution' -- fixes pr-3015 1997-01-16 23:10:16 +00:00
perry 9d923e3e93 add -t summary option per pr-3075 1997-01-16 22:23:13 +00:00
perry bf059fab25 make rup handle uptimes of more than 1 year per pr-3060 1997-01-16 22:18:16 +00:00
mikel 5504577051 stdin and stdout are not regular files; fixes PR bin/3112
skip size checks, unlinking, &c. as specified by manpage if output is
  not a regular file
replace manifest constant with BUFSIZ
1997-01-16 04:51:29 +00:00
mikel 0ad5b3127c make -p affect all variables; PR bin/2997 1997-01-15 07:24:25 +00:00
cgd 8d3057754a lint and KNF changes. (mostly casting returns to void to quiet lint.) 1997-01-14 19:20:09 +00:00
cgd 26a525b1a4 lint fixes 1997-01-13 22:04:39 +00:00
tls 9bb9a57573 revert to pre-merged version due to bugs; will fix. 1997-01-13 20:57:48 +00:00
tls 9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
tls 8292047440 Sync to 4.4BSD-Lite2 1997-01-09 15:33:42 +00:00
tls b871569837 Sync to 4.4BSD-Lite2 1997-01-09 15:17:30 +00:00
tls 0214c17253 RCS ID police 1997-01-09 15:01:32 +00:00
tls b3f5b3283a Import from 4.4BSD-Lite2 1997-01-09 14:49:43 +00:00
tls 5445d0188b Sync to 4.4BSD-Lite2 1997-01-09 14:39:10 +00:00
tls 20d490585f Sync to 4.4BSD Lite-2 (minus a number of conflicting bugfixes) 1997-01-09 13:29:56 +00:00
tls 4ed8b99e7b Sync to 4.4BSD-Lite2 1997-01-09 12:40:06 +00:00
tls 3514c40606 add note about Kerberos to manual page 1997-01-09 12:09:26 +00:00
tls c6f1b0a138 RCS ID Police, also Sync to 4.4BSD-Lite2 1997-01-09 12:03:21 +00:00
tls 60a059d296 Sync to 4.4BSD-Lite2 1997-01-09 11:55:19 +00:00
tls 653b58e924 Sync to 4.4BSD-Lite2 1997-01-09 11:43:05 +00:00
tls 29985c32a6 Sync to 4.4BSD-Lite2 1997-01-09 06:57:45 +00:00
leo f02c53ba36 The atari-Hades can use fdformat too. 1997-01-08 21:41:22 +00:00
tls d47b2b42f1 remove vestigal Berkeley kpasswdd support 1997-01-07 04:02:11 +00:00
cjs 95a6463b3e PR 3080: fix entry for Apple II NuFX archive.
Fix from Dave Huang <khym@bga.com>.
1997-01-05 10:28:32 +00:00
cjs 938125b32e PR 3081: segfault due to reversed test.
Fix from Todd Kover <kovert@omniscient.com>.
1997-01-05 10:06:40 +00:00
thorpej 32e089cd4b Fix RCS ID, and clean up extra newline at end of file. 1997-01-05 05:21:51 +00:00
lukem 53b51b68ea doproxy(): remove leading "proxy " from input buffer so if another() is called
and line[] is reparsed to build margc/margv, commands don't get confused.
1997-01-03 02:55:59 +00:00
mellon 8040aaffba ns_print: fix type conflict 1997-01-02 08:06:24 +00:00
mellon 9209b257a5 ns_print: undo bogus type conflict 1997-01-02 08:04:26 +00:00
mellon d8671bd736 Lite2 Merge 1997-01-02 08:00:55 +00:00
jtk 142bbb09e6 fix typos per PR 3076 1997-01-01 16:30:09 +00:00
christos f73f9b0103 Don't compile the regex code if MAKE_BOOTSTRAP (from gwr) 1996-12-31 18:03:30 +00:00
christos 4442744d56 BSD did not traditionally have <sys/cdefs.h>; use BSD4_4 instead and include
<sys/param.h> to grab it.
1996-12-31 18:02:22 +00:00
christos 59a3352108 implement snprintf() and vsnprintf() for non BSD4_4 systems. 1996-12-31 17:56:04 +00:00
christos e43039b92f add a missing 'static' decl. 1996-12-31 17:55:28 +00:00
christos 9a2fab368e define const and volatile for non __STDC__ 1996-12-31 17:55:02 +00:00
christos 87961728d3 - include <stdlib.h> to get getenv() prototype on SVR4
- if __STDC__ -> ifdef __STDC__ to appease SVR4
1996-12-31 17:54:16 +00:00
christos 9749ddca0f Use only integral types in procedure arguments. 1996-12-31 17:53:21 +00:00
christos 36d9e80aff Use explicit .c.o rule so that the bootstrap process works. 1996-12-31 17:52:23 +00:00
cgd 89dcb48dfb fix up -ansi -pedantic warnings produced because of static function
declarations nested in other functions.  The solution: declare the
static functions at the top level.
1996-12-29 10:41:53 +00:00
cgd 8e2918a81c make evenpartab be of type 'unsigned char' to avoid -ansi -pedantic errors 1996-12-29 10:38:20 +00:00
cgd 879c890af2 add -ansi -pedantic to CFLAGS, so that people won't try to use the behaviour
of the old zzhack-access macros, which with the current macro definitions
would cause a cast value to be used as an lvalue, which is a gcc extension,
but _not_ what we want.
1996-12-29 10:36:37 +00:00
cgd 88caf985e6 replace old zzhack structure (YUCK!) and number(), boolean(), character(),
and address() macros with new macros of the same names (to get values),
and macros with those names but with "set" prepended and which take a
second argument (to set values).  The new macros use type casts to do
type conversion, which is much cleaner than using a union and making
endianness-related hacks to get the right 'short's and 'char's from
the right array indices.  (YUCK! again, for good measure.)
1996-12-29 10:34:03 +00:00
lukem e699917c51 * preserve modtime if size is 0 [bin/3040, Enami Tsugutomo]
* in autofetch mode, don't retry a file if the connection failed - skip it
  and move to the next file. [bin/3051, Matt Green]
* only print error messages from SIZE or MDTM if the user used 'size' or
  'modt' (respectively). prevents extraneous warnings during normal transfers
  when connected to a site which doesn't support these (behaviour prior to
  last commit), but still allows error feedback to specific user requests
  for this info (which the last commit broke).
* 'account': only accept one optional argument
* if invoked as pftp, default to passive mode on (from FreeBSD)
* remove leading '0 ' in progress bar - looked ugly
* use warn instead of perror
* use strncpy when src isn't known to have safe length
* remglob(): use mkstemp() to prevent symlink games, and don't override
  _PATH_TMP, use it as the prefix to the temp file
1996-12-29 04:05:29 +00:00
tls 19d35cbcd9 Sync with 4.4BSD-Lite2 1996-12-28 07:10:57 +00:00
tls 517427d9e1 Import of 4.4BSD-Lite2 source 1996-12-28 05:17:06 +00:00
tls 26d28c381f Import of 4.4BSD-Lite (already merged at head) 1996-12-28 05:15:19 +00:00
tls 28316c21d3 Sync with 4.4BSD-Lite2 (whew!) 1996-12-28 04:30:02 +00:00
tls 7d4405a6a6 Import of 4.4BSD-Lite2 sources 1996-12-27 23:11:39 +00:00
pk 25b5f4149a Splice a union in the type data structure. Some of the members can be `in use'
simultaneously, e.g. an enumerated bit-field.
1996-12-27 20:46:23 +00:00
christos 764c65979e - make sure that the reply string is null-terminated, and copy only up to
the initialized copy of the source string, since the source string is not
  null terminated at this point.
1996-12-25 16:02:06 +00:00
christos 942194d9f4 - Don't print the '500 command not understood' reply for the SIZE and
MDTM commands which are not supported by all ftp servers, unless we
  are in debugging mode.
1996-12-25 16:00:38 +00:00
christos 8819044d2a [initial version of the substitution/regexp changes were courtesy of Der Mouse]
- fix the variable substitution code in make [PR/2748]
      1. change s/a/b/ so that it substitutes the first occurance of the
	 pattern on each word, not only the first word.
      2. add flag '1' to the variable substitution so that the substitutions
	 get performed only once.

  ***THIS IS AN INCOMPATIBLE CHANGE!***

  Unfortunately there was no way to make things consistent without
  modifying the current behavior. Fortunately none of our Makefiles
  depended on this.

	    OLD:

		VAR      = aa1 aa2 aa3 aa4

		S/a/b/   = ba1 aa2 aa3 aa4
		S/a/b/g  = bb1 bb2 bb3 bb4

	    NEW:

		VAR      = aa1 aa2 aa3 aa4

		S/a/b/   = ba1 ba2 ba3 ba4
		S/a/b/1  = ba1 aa2 aa3 aa4
		S/a/b/g  = bb1 bb2 bb3 bb4
		S/a/b/1g = bb1 aa2 aa3 aa4

- add regexp variable substitution via 'C/foo/bar/' [PR/2752]

- add variable quoting via the ${VAR:Q} modifier. This is useful when running
  recursive invocations of make(1):

	make VAR=${VAR:Q}

  will always work... (This may prove useful in the kernel builds...) [PR/2981]
1996-12-24 17:36:27 +00:00
cgd 81f0721bbe * accept the file name '-' to indicate that standard input is to be
used as lint1 input.  That involves having lint pass the '-' through
  to the cpp which preprocesses the lint1 input, and having lint1's
  scanner recognize a cpp filename "" as "{standard input}".
1996-12-22 11:31:47 +00:00
cgd 46b90748f5 * Ignore the size of integer arguments when trying to automatically
convert them to pointers.  If they're zero, they're converted (to
  NULL pointers) regardless of size.  If they're non-zero, they can't
  be converted (without a cast).  This matches the behavior of other
  version of lint, e.g. the lints on Digital UNIX and HP-UX.

* recognize that pointers to identical unnamed and untyped structs,
  unions, and enums are, in fact, identical.  This is done by tagging
  each of unnamed and untyped structure, union and enum with a unique
  position of creation, which is used as a unique identifier that
  when determine whether or not a pair of structures, unions, or enums
  are identical.
1996-12-22 11:31:37 +00:00
cgd 06fa442b12 * recognize that pointers to identical unnamed and untyped structs,
unions, and enums are, in fact, identical.  This is done by tagging
  each of unnamed and untyped structure, union and enum with a unique
  position of creation, which is used as a unique identifier that
  when determine whether or not a pair of structures, unions, or enums
  are identical.

* accept the file name '-' to indicate that standard input is to be
  used as lint1 input.  That involves having lint pass the '-' through
  to the cpp which preprocesses the lint1 input, and having lint1's
  scanner recognize a cpp filename "" as "{standard input}".
1996-12-22 11:31:24 +00:00
cgd 0cde55a411 * recognize that pointers to identical unnamed and untyped structs,
unions, and enums are, in fact, identical.  This is done by tagging
  each of unnamed and untyped structure, union and enum with a unique
  position of creation, which is used as a unique identifier that
  when determine whether or not a pair of structures, unions, or enums
  are identical.
1996-12-22 11:31:05 +00:00
cgd e8685ee836 * Accept asm statements at any place where you could see a function or
variable declaration, in addition to within function & variable
  declarations and function bodies.  I think this comes close enough
  to what gcc does to be considered "correct enough."  Certainly, it
  fixes the problem for the couple of cases where this is a problem
  in our tree.
1996-12-22 11:30:49 +00:00
matthias a6c08e93f9 * revert broken handling of subcommands to the (working) 4.4Lite version. 1996-12-21 09:16:35 +00:00
sommerfe 36da84b7df Longer login name support: use MAXLOGNAME, not UT_NAMESIZE 1996-12-20 20:17:30 +00:00
pk 985887ad37 Remnant of a different area: resource.h is now in /usr/include/sys
(from David Brownlee; PR#3044).
1996-12-18 23:18:57 +00:00
jonathan 53be52fcac Build elf ldd and elf-to-xxx tools on mips ports. 1996-12-17 05:39:35 +00:00
jonathan 20d6ace077 Mipsel changes to ELF ldd/ld.so:
* don't abort() on NetBSD/pmax 1.1 elf binaries;
  * Assume 32-bit elf unless compiling for Alpha;
  * note bugs in ldd's README.
1996-12-17 03:42:44 +00:00
cgd 10243648ef on the alpha, add 'ldd' to the subdirs list 1996-12-16 20:00:26 +00:00
cgd 033e366657 First cut at an elf-aware ldd. Originally from John Polstra's FreeBSD elf
kit, then hacked on by Matt Thomas <matt@3am-software.com>, then by me.
This runs, but it's in serious need of cleaning and/or a fair bit of
reworking.  See the README file for more information, and a list of things
to do.
1996-12-16 19:59:55 +00:00
cjs f271ac2363 Make it clearer how to use alternate delimiters in context patterns. 1996-12-15 08:28:46 +00:00
scottr 823c2433dc Freshen up a bit:
- Replace deprecated sigblock() with sigprocmask()
 - Redraw the current display if SIGWINCH is caught
 - Style police
1996-12-13 19:26:18 +00:00
mrg 2883126ca7 strcpy -> strncpy (from freebsd). 1996-12-11 00:30:20 +00:00
mikel 362f41ae80 fdc manpage is in section 4, not 8. 1996-12-10 07:47:45 +00:00
mikel 9655890e1f we don't use this. 1996-12-10 07:22:22 +00:00
mikel 7bd9154d93 Upgrade to flex 2.5.4. 1996-12-10 07:18:37 +00:00
mikel c9d564c2ca Import flex-2.5.4 1996-12-10 06:06:26 +00:00
thorpej 3dc69d90b9 XXX Kludge to make this compile with large MAXBSIZE until the
XXX GCC bug it tickles is fixed.
1996-12-09 20:03:19 +00:00
neil 36139c4647 errors not generated 'cuz old message was icmp -> [EWW!]
errors not generated because old message was icmp
1996-12-09 12:48:37 +00:00
lukem dd6f8f2061 'b' == bits not bytes. for all prefixes >= 'K', explicitly specify 'B'
afterwards. don't print anything for a pure byte count. rework ETA display
as well.
1996-12-06 04:33:45 +00:00
lukem 2bee2a678e * note that nlist and ls and equivalent
* fix up optional argument descriptions for dir, ls, nlist, and user.
1996-12-06 02:28:13 +00:00
lukem b6df1b3d2d functionality mods:
* implement 'progress bar/meter' (inspired by ncftp). use 'progress' to
  toggle on. it will display current file size to 5 digits, automatically
  determining suffix (up to 16384 P (petabytes) == 2^64).
* 'ls' now uses NLST (unadorned listing), a la older ftp clients. 'dir'
  still does LIST (long listing). idea from John Nemeth <jnemeth@cue.bc.ca>

bug fixes:
* return first line of reply in reply_string[] from getreply(), instead
  of last line. This fixes [bin/741] (parsing of SYST), and also means
  that SIZE and MDTM messages will be parsed correctly if they're longer
  than 1 line.
* parse URL-style auto-ftps that have no filename correctly
  (e.g, ftp://host, ftp://host/, ftp://host/dir/). pointed out by
  Jaromir Dolecek <dolecek@saruman.ics.muni.cz>
* pass the correct size array in 2nd arg of utimes() when setting the
  modification time
1996-12-06 02:06:46 +00:00
jtk 81532e0382 remove stray $Id$ string 1996-11-30 01:53:51 +00:00
thorpej 3d130af5dc Compute `halfuptime' correctly when `uptime' == 1.
From Lennart Augustsson <augustss@cs.chalmers.se>, PR #2944.
1996-11-29 19:40:56 +00:00
jtk 18ea43307d add fdformat 1996-11-29 16:32:18 +00:00
jtk 060474468e add floppy formatting command 1996-11-29 16:31:02 +00:00
lukem 8ef5f80460 More features, some of which were inspired by changes that
friedman@gnu.ai.mit.edu (Noah Friedman) made to his modified ftp:
- implement "lpwd" - local pwd
- implement "preserve" - toggle preserving of file modification
  times on retrieved files
- allow for explicit "on" or "off" arg to toggle commands
- "exit" synonym for "quit", "msend" synonym for "mput"
- in confirmation mode, allow 'a' (yes to rest of current command),
  and 'p' (turn off prompt mode, as if 'prompt off' was done,
  effective immediately)
- "modtime" returns time formatted as localtime, not GMT

Bug fixes:
- check for extraneous args on commands
- cleanup const usage, line formatting
- create 0 length temporary file in remglob() to prevent symlink games
  (from OpenBSD)
- check length of filename of ~/.netrc (from OpenBSD)
1996-11-28 03:12:28 +00:00
thorpej 97fdc79a5e Fix a semantic problem reported by Chuck Cranor:
If a user wishes to change a password on a system running YP, and
the master server is not running rpc.yppasswdd, chpass(1) would fail,
even if the user had a local entry.  Fix this by checking for local
entry if master is not running rpc.yppasswd iff we defaulted to using
YP (not invoked with "-y").

XXX Unlike the similar change to passwd(1), this one duplicates some
XXX code (makes an attempt to contact rpc.yppasswdd early).  This is
XXX a side-effect of the structure of this program.  chpass(1) could
XXX use a re-write.
1996-11-26 23:38:42 +00:00
thorpej bbe8c40877 Fix a semantic problem reported by Chuck Cranor:
If a user wishes to change a password on a system running YP, and
the master server is not running rpc.yppasswdd, passwd(1) would fail,
even if the user had a local entry.  Fix this by checking for local
entry if master is not running rpc.yppasswd iff we defaulted to using
YP (not invoked as "yppasswd" or with "-y").
1996-11-26 23:35:38 +00:00
cgd 72f7358ea7 print all evcnt structures, not just those which have the name "intr".
Printing only those with the name "intr" is too restrictive, because it
means that devices can only have one interrupt, which makes little
sense for many devices and absolutely no sense for several common busses.
1996-11-25 22:55:59 +00:00
fvdl 7970a0483a Correct the connecthelp info. This is really ftp, not tftp. 1996-11-25 09:53:50 +00:00
lukem 36d3d1fd0f cleanups/bugfixes:
- don't echo 'ACCT' parameter when debugging (a la 'PASS')
- Fix checking of directory access for "/foo", the parent
  directory is "/", not "" (from FreeBSD)
- remove trailing whitespace on lines
- add any missing NetBSD tags
- cleanups to man page, includinging sorting options description

feature additions:
- variable sized hash marks (from [bin/683], but done in the hash command
  as an optional arg)
- more user-friendly transfer time printing (from FreeBSD, with mods)
- '-p' command line option to jump into PASV mode (closes [bin/2857],
  but with an option rather than checking argv[0])
- SIGINFO support for printing xfer stats when sending/receiving requests
- '-P port' for changing the port to connect to (from thorpej@netbsd.org)
- '-a': bypass normal login, and try anonymous login (from OpenBSD
  via thorpej)
- autofetch files via url (ftp://...) or "classic" (host:/file)
  (from OpenBSD via thorpej)
- 'ftp' synonymous with 'open' (from FreeBSD)
1996-11-25 05:13:18 +00:00
lukem 8bcf7e5435 don't need to explicitly NUL terminate strings written by snprintf() 1996-11-22 05:34:06 +00:00
mikel 43f43a58b0 eliminate multiple inclusion of <sys/errno.h>. 1996-11-21 06:25:26 +00:00
lukem 3ccb8ba1c9 - add -h (show hostnames in short listing instead of office info), and
-o (the reverse of this, also the default)
- use vis(3) in vputc() instead of handcrufted function (from OpenBSD).
- move gecos expansion into expandusername() (a la sendmail's buildfname).
  A generic version of this last bit in libutil would be useful...
- cleanup the code, fix prototypes, etc.
1996-11-21 06:01:47 +00:00
lukem d417f09e65 - clean up man page
- don't allow quotes in terminal names (for -s and -S) as they confuse
  the shell. whitespace is currently forbidden for the same reason.
  as there isn't any orthoganol way of escaping this, forbid it all,
  which makes [bin/306] unfixable.
- use str(r)char instead of (r)index
1996-11-15 05:52:42 +00:00
gwr 6efa6770fc After the chown(ttyn, ...), call ttyaction(ttyn, "login", pwd->pw_name) 1996-11-14 19:28:29 +00:00
mikel f9a7d704f1 preserve data from localtime() buffer before reuse.
PRs bin/2889 and bin/2906, with some improvement by me.
1996-11-14 07:34:46 +00:00
mikel 1d2de6e812 /etc/termcap -> /usr/share/misc/termcap. Fixes misc/1401.
(also /etc/map3270 -> /usr/share/misc/map3270).
1996-11-12 08:19:52 +00:00
mikel a41241b92a /etc/termcap -> /usr/share/misc/termcap. Fixes misc/1401. 1996-11-12 07:50:11 +00:00
christos 2f197a9f4d Fir PR/2930: declare missing variable. 1996-11-11 15:16:10 +00:00
lukem 1be2e46708 fix the the typos (and 1 other) 1996-11-11 00:22:47 +00:00
lukem 5d37ffa7eb fix the the typos 1996-11-10 23:58:22 +00:00
pk e0648652c2 Sync with eval.c. (What's this file doing here, anyway?). 1996-11-10 21:23:53 +00:00
pk b70febb8c1 Use COMMA in stead of ',' when pushing items back on the stack, for
consistency with the macro parsing routine. Suggested by Brian Grayson.
1996-11-10 21:21:29 +00:00
mikel d9c33548ae Fix quote description; PR misc/2781. 1996-11-07 07:24:08 +00:00
is db5fe6cfb2 file(1) magic for AmigaOS binaries --- useful to people mount_ados'ing
Amiga disks.

For the moment, only executable/sharedlib/driver and
object/linklibrary definitions.
1996-11-06 18:47:27 +00:00
christos aa49881371 - Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
  be considered to be out of date, since it does not have a TOC.
1996-11-06 17:58:58 +00:00
pk 0bc3b758b9 Implement `$@' macro, as promised by the manual page (PR#2914). 1996-11-06 00:11:56 +00:00
cgd b7e69ffbd5 translate '=' in phone number strings into ',' (to generate delays),
as is done for couriers and t3000s.  Ahh, the wonders of being in
a hotel room with source.
1996-11-01 23:56:33 +00:00
christos faad20023f Fix PR/2900: Handle case where the signal mask is NULL. 1996-10-29 00:02:01 +00:00
scottr 25e56cb761 Be explicit about iostat transfer rate by displaying `KBps' instead of
`Kps'.  As per (and noticed by) J.T.
1996-10-25 18:30:52 +00:00
thorpej 2ea1f6b673 Add the `toolong' count to the IP stats display. 1996-10-25 07:41:35 +00:00
sommerfe e21d0de843 Fix PR1542: gross inaccuracies in bdes.1 Reviewed by Perry 1996-10-19 00:59:26 +00:00
thorpej 9e0f17d4f7 Implement a -c (Grand Total) option, a'la GNU du(1).
From Luke Mewburn <lukem@telstra.com.au>, PR #2805.
1996-10-18 07:20:31 +00:00
thorpej 338c8b475e Exit with an error condition if the timed command does not exit.
From Arne H. Juul <Arne.Juul@idt.ntnu.no>, PR #2838.
1996-10-18 07:12:58 +00:00
thorpej 150c33e60b Use ${INSTALL}. 1996-10-18 05:55:26 +00:00
jonathan 58e8bd3b69 Rework to compile with <sys/exec_elf.h>. 1996-10-16 00:27:05 +00:00
jonathan db1e04bc0f remove duplicate of elfstrip.c 1996-10-15 23:04:32 +00:00
explorer 35e259ff9e milliseconds, not milleseconds 1996-10-15 18:58:15 +00:00
christos 76ef973082 - Fix previous commit; shells require -c "command"
- RCSid police.
1996-10-15 14:35:41 +00:00
christos 17b3a275d4 Fix PR/2837: su [login [args]] had the wrong usage and did not work properly. Build the correct argument list and add -c for the shells.
Fix PR/2839: su will not build with Kerberos.

- Also:
	-Don't coredump when $TERM is not set.
	-Add prototypes, remove local old style declarations of system
	 functions.
	-Recognize shells that contain "csh" as being csh alike.
	-Don't build with SKEY unconditionally. Obey bsd.own.mk.
1996-10-12 23:54:38 +00:00
christos b7c524d629 Use <sys/types.h> instead of <machine/endian.h> 1996-10-12 23:46:23 +00:00
gwr b99b7ecf12 Fix some warnings, and cosmetic things (spaces/tabs, etc.) 1996-10-09 18:07:14 +00:00
christos dc089e1ea1 Add -X flag, which strips only debugging and compiler identification
symbols. RCSid police and gcc -Wall cleanup.
1996-10-08 22:00:18 +00:00
cgd 9c646fddb7 Don't treat a char buffer like a structure since alignment constraints can
make that fail on some machines.  Rather, since the code wants to access
the data both ways, use a structure and treat that structure as an array
of chars where appropriate.
1996-10-08 15:50:53 +00:00
explorer 3f3e868348 use %lu, not %u. This covers more than my original %d -> %u change... 1996-10-08 01:18:10 +00:00
explorer 3d7986bab5 Netstat -s should use %u for u_long parameters... Closes bin/2817 by me 1996-10-07 18:42:25 +00:00
cgd d703de28b2 include stdlib.h to bring malloc()'s prototype into scope. 1996-10-06 18:27:25 +00:00
christos 1b1e1884b3 Changes from file-3.21 1996-10-05 20:20:24 +00:00
cgd 6964f6b023 treat arrays used with XDR_INLINE as arrays of 'int32_t's, rather than
arrays of 'long's.
1996-10-01 04:13:53 +00:00
jonathan 0506626d5f Fix Makefile boilerplate:
Use elfstrip to strip itself only in elfstrip, not elf2aout or elf2ecoff.
1996-09-29 22:23:01 +00:00
jonathan 559daf5070 Add RCS id lines to Ted Lemon's original code.
Update elf2ecoff to compile against NetBSD-1.2 distribtion ECOFF headers.
1996-09-29 22:01:44 +00:00
jonathan fb8fff0110 Commit minimal Makefiles and man pages for ELf toolchain utilties
elf2aout, elf2ecoff, elfstrip
1996-09-29 21:53:11 +00:00
jonathan 55e1f3d7f3 Import Ted Lemon's ELF toolchain utilties used to build kernels
for the pmax port in  NetBSD 1.1 and 1.2.
1996-09-29 21:48:29 +00:00
thorpej 93f0bfac6d Grok local timezone when determining "today".
From Tatoku Ogaito <tacha@tera.fukui-med.ac.jp>, PR #2534.
1996-09-27 03:32:07 +00:00
thorpej d6430a5271 Document the -l option.
From Dave Huang <khym@bga.com>, PR #2601.
1996-09-27 02:49:50 +00:00
thorpej dff3ccad44 Fix extra "make:" and newline in error message.
From enami tsugutomo <enami@ba2.so-net.or.jp>, PR #2651.
1996-09-27 02:36:58 +00:00
thorpej 1d4301453f RCS id police. 1996-09-27 01:56:55 +00:00
thorpej e8e306239b Correct behavior of setting number of saves to 0.
From Kenneth Stailey <kstailey@dol-esa.gov>, PR #2724.
1996-09-27 01:55:26 +00:00
thorpej 19f013a504 RCS id police. 1996-09-27 01:46:08 +00:00
thorpej 13a88ddb50 Correct time display for 12:xx case.
From Dave Huang <khym@bga.com>, PR #2734.
1996-09-27 01:44:58 +00:00
thorpej f549601f76 Back out previous. Please beat me about the head and shoulders with
a large stick if I ever attempt to touch file(1) again.
1996-09-26 19:51:28 +00:00
thorpej c535ad0cdc Move the definition of MSB (in byte 5) to sit next to the other definitions
for byte 5 values... No functional change, just adds some clarity.
1996-09-26 19:37:15 +00:00
jtc a4eaf78058 Added a "-l" flag so that it is possible to distinguish between weak
and global symbols.  When this flag is used, an asterisk is printed
after the key letter for weak symbols.

Prior art for this flag comes from Solaris.
1996-09-21 00:34:35 +00:00
thorpej a500813c14 RCS id police. 1996-09-19 19:39:36 +00:00
thorpej 29cf09f47a RCS id police. 1996-09-19 06:27:04 +00:00
thorpej 0b02f897d7 Decode long (GNU-style) options. Changes originally from Niklas Hallqvist,
but modified some by me.
1996-09-19 06:10:02 +00:00
explorer e1fa4673e0 Don't display skey error on s/key logins... This gives attackers some
information
1996-09-18 21:23:37 +00:00
christos 453e90716c - Fix bug where the first line after a conditionally skipped was not ready
in its entirety if it contained a continuation.
- Print the whole error line, not just the first 20 characters of it.
1996-09-13 04:22:09 +00:00
thorpej 65f3b15dc2 When iterating the host list, do not access memory that has just been
free()'d.  From Matt Beal <beal@umiacs.umd.edu>, PR #2747.
1996-09-10 18:48:57 +00:00
thorpej ec67ea7102 When checking the entry point of an executable, use N_PAGSIZ() rather
than __LDPGSZ directly.
1996-09-07 22:07:15 +00:00
explorer d3a4eeb1fe Fix some potential buffer overflow problems.
From David Holland <dholland@hcs.harvard.edu>
1996-09-07 21:05:37 +00:00
christos bb97544b1b Fix bug reported by Greg Hudson where leaf (source only) nodes were
referenced only by their basename and not by their full pathname. This
breaks when .PATH or MAKEOBJDIR are used. There might be Makefiles around
that try to work around this bug by prepending ${.CURDIR} to the sources,
and they should be found and fixed. Also a lot of the gunk in suff.c that
was attempting to work around the same problem could be removed.
1996-08-30 23:21:10 +00:00
thorpej bbb4184355 Tidy up some RCS ids a bit. 1996-08-30 17:59:37 +00:00
abrown 091ed31b08 Add missing braces to for-loop to make compress work again after changes
between versions 1.9 and 1.10 (dumped core when not used as a filter).
1996-08-20 18:24:46 +00:00
christos 091b5c0118 Add estrdup(), a checked version of strdup and use it. 1996-08-13 16:42:00 +00:00
christos 22770fe8ea Add strdup() since ultrix is missing it.
From Larry Schwimmer <rosebud@cyclone.Stanford.EDU>
1996-08-13 16:41:15 +00:00
christos ba78477e9d Various cleanups from: Larry Schwimmer <rosebud@cyclone.Stanford.EDU> 1996-08-13 16:40:31 +00:00
christos 1bc899a1ff Protect __P from being multiply defined (for systems that already define it) 1996-08-13 16:39:30 +00:00
explorer d54b3d99f1 call regfree() -- closes pr bin/2691.
Bug noticed and fixed by Charles Amos <amos@umiacs.umd.edu>
Submitted by Mike Grupenhoff
1996-08-13 03:24:18 +00:00
explorer 661c82521c clear the screen at the correct time to avoid leaving garbage on the screen.
This happens when switching from address to :numbers display.

From FreeBSD pr bin/1425.
1996-08-11 04:19:16 +00:00
explorer 1350e82a8f remove nlist lookup of _dk_* 1996-08-11 04:16:28 +00:00
explorer 186c10db45 fix pr bin/2659 in a different way 1996-08-10 19:47:32 +00:00
thorpej 51956e9393 Slight semantics change: ALWAYS use YP if the system is bound to a
YP server.  This is required if the passwd database is to stay in sync
if this program is run on the YP server.  Note, local passwd database
operations can still be performed by passing the -l flag.
1996-08-09 09:22:11 +00:00
thorpej 27643ee095 Slight semantics change: ALWAYS use YP if the system is bound to a
YP server.  This is required if the passwd database is to stay in sync
if this program is run on the YP server.  Note, local passwd database
operations can still be performed by passing the -l flag.

Also, some minor cleanup and RCS id police.
1996-08-09 09:19:33 +00:00