Compare commits

...
Author SHA1 Message Date
cvs2svn 49bb443250 This commit was manufactured by cvs2svn to create tag
'RELENG_2_2_6_RELEASE'.
1998-03-24 11:00:04 +00:00
Jordan K. Hubbard c07eac88c8 Copy up some additional files. 1998-03-24 11:00:03 +00:00
Jordan K. Hubbard 72c7c6df77 One last pass by the spelling police. 1998-03-24 10:51:49 +00:00
Jordan K. Hubbard 6cf06919a0 Fix minor spelling error. 1998-03-24 10:34:52 +00:00
Jordan K. Hubbard 0d4be6ca72 2.2.6-RELEASE! 1998-03-24 10:33:30 +00:00
Jordan K. Hubbard 733cfb9bb8 Hmmmm. Either I'm hallucinating or the previous commit didn't "take" 1998-03-24 10:22:16 +00:00
Jordan K. Hubbard cb460d650f Major updates to this file's layout.
Submitted by:	Doug <[email protected]>
1998-03-24 09:57:39 +00:00
Jordan K. Hubbard 6367fe8072 Tab elimination. 1998-03-24 09:55:47 +00:00
Jordan K. Hubbard c3424cd871 Major updates to the layout and content of the distribution docs.
Submitted by:	Doug <[email protected]> and msmith
1998-03-24 09:54:27 +00:00
cvs2svn 5a24da17a7 This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-03-24 09:52:26 +00:00
Jordan K. Hubbard 1c2b24e948 Add extra categories I missed. 1998-03-24 08:38:59 +00:00
Jordan K. Hubbard 1324ef9143 Remove MNT_NOATIME option; it makes the atime predate the ctime which
is a worisome side-effect.  Sorry, Bruce.
1998-03-24 05:15:32 +00:00
Jordan K. Hubbard 70d839b759 Use proper variable nfs_client_enable.
PR:	6118
Submitted by:	Mark Mayo <[email protected]>
1998-03-24 05:14:07 +00:00
Satoshi Asami 291ce9d9a3 Merge 1.273. 1998-03-24 03:35:54 +00:00
Kazutaka YOKOTA 36f99fcc36 - Describe the SC_DISABLE_REBOOT option.
- Delete redundant comments on syscons flags.
1998-03-24 02:57:24 +00:00
Jordan K. Hubbard 6d6434e793 Fixes for properly determining slice name.
Submitted by:	msmith
1998-03-24 02:38:00 +00:00
Jordan K. Hubbard dc76fc7f98 cosmetic. 1998-03-24 01:20:14 +00:00
Jordan K. Hubbard 5b0cfa351d 1. Add more rc files to resurrection list. We can get into trouble
now if we don't completely resurrect the old /etc environment after
   an upgrade.

2. Adjust post-installation instructions to be (hopefully) less confusing
   and note 2.2.6 specific upgrade issues.
1998-03-23 23:41:13 +00:00
Jonathan M. Bresler a0bc9f84c4 grr....forgot a bug fix in rewrite rules on hub
Reviewed by:	jmb
Submitted by:	Ruslan Ermilov <[email protected]>
1998-03-23 21:32:10 +00:00
Jonathan M. Bresler e0289248f1 update to match configuration currently in use
on hub.freebsd.org
1998-03-23 20:58:22 +00:00
Peter Wemm 9f674266a7 MFC: si driver doc update 1998-03-23 20:55:25 +00:00
Jordan K. Hubbard 66c6293482 Update package names to match 2.2.6 versions. 1998-03-23 20:27:37 +00:00
Peter Wemm d2e84f2808 Mention specialix changes.
OK'ed by: jkh
1998-03-23 19:55:15 +00:00
Peter Wemm 43b4ceb226 MFC: list new si driver modules
OK'ed by: jkh
1998-03-23 19:40:12 +00:00
Peter Wemm 51cddf2d26 MFC: new Specialix driver
OK'ed by: jkh
1998-03-23 19:37:48 +00:00
Peter Wemm 993fbaf726 MFC: new rev of si Z280 microcode
OK'ed by: jkh
1998-03-23 19:36:25 +00:00
Peter Wemm 5b17c66859 MFC: new rev of si Z280 microcode
OK'ed by: jkh
1998-03-23 19:33:46 +00:00
Jordan K. Hubbard 73ac47a262 Here's a simple RELENG_2_2 patch to keep msdosfs from trying to mount
FAT32 filesystems.

Submitted by:	Robert Nordier
1998-03-23 18:28:14 +00:00
cvs2svn fd0aafd577 This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-03-23 16:12:54 +00:00
Jordan K. Hubbard afcd9d9b16 small cleanup 1998-03-23 09:18:30 +00:00
Jordan K. Hubbard 62f9114960 o Put back check for written disk case - it was necessary after all.
o If we're upgrading, try and get old system information.
1998-03-23 08:33:34 +00:00
Daniel O'Callaghan e298b4a9c2 PR: 6104
Submitted by:	Anatoly Vorobey <[email protected]>
MFC typo fix.
1998-03-23 08:14:06 +00:00
Jordan K. Hubbard 16253f541d dpt stuff will be left disabled for now but at least better documented. 1998-03-23 08:04:00 +00:00
Jordan K. Hubbard 3653eb467c MFC: update copyrights.
Approved by:	Simon Shapiro <[email protected]>
1998-03-23 07:57:34 +00:00
Jordan K. Hubbard 6c3e83d3ae MFC: use correct copyrights.
Approved by:	Simon Shapiro <[email protected]>
1998-03-23 07:53:52 +00:00
Kazutaka YOKOTA dec2349be0 YAMFC:
- Remove the notice that psm0 must be enabled before using the PS/2 mouse;
  the device is enabled by default in the GENERIC kernel.
- Kill the mouse daemon, if any, when the user wants to disable it.
- Minor update on mouse menus.
1998-03-23 06:13:02 +00:00
Jordan K. Hubbard 12f2852b67 Don't forget to link /dev/mouse for backwards compat. 1998-03-23 05:58:10 +00:00
Kazutaka YOKOTA a2483209ea Enabel psm0 by default. 1998-03-23 05:53:57 +00:00
Jordan K. Hubbard 46de6f9b51 Add new ports categories. 1998-03-23 05:49:45 +00:00
Jordan K. Hubbard 1a0a467b2b MFC: don't set bouncepages as a function of total memory size or you will
lose on large memory machines.
1998-03-23 05:30:29 +00:00
Jordan K. Hubbard cef7a77d87 1. Cosmetic tweaks to menus.
2. Go through docs and generally clean them up / reorganize in preparation
   for 2.2.6
1998-03-23 05:24:34 +00:00
Jordan K. Hubbard 632da78512 Shorten names, add freebsd alias for a tweaked freebsd partition ID (some
popular boot manager likes to OR in 16).

Submitted by:	Drew Derbyshire <[email protected]>
1998-03-23 03:28:04 +00:00
Steve Price fbd2533d62 MFC: Add -F option to synopsis.
OK'd by:	jkh
1998-03-22 22:58:21 +00:00
Steve Price b9f1e07817 MFC: better wording
OK'd by:	jkh
1998-03-22 19:17:50 +00:00
Jordan K. Hubbard b908a7017e MFC: PR#6092 1998-03-22 07:41:49 +00:00
Jordan K. Hubbard e6989a19cf Add additional check for don't-spam-the-MBR-in-dedicated-disk case.
Submitted by:	eivind
1998-03-21 21:20:40 +00:00
Peter Wemm f2e45911e4 Take out vector siintr from example, it's set internally in all cases now.
(this series of si changes OK'ed by jhk)
1998-03-21 19:25:48 +00:00
Peter Wemm bc7aba4d8b merge from head: use a static interrupt handler rather than depending
on the user specifying it in config..  The pci (and soon eisa) config
routines specify it directly and need a prototype.  If an isa device
is configured, ioconf.h would supply an extra prototype which caused
a warning.
1998-03-21 19:23:28 +00:00
Jordan K. Hubbard a0af358cab An overly conservative choice prevented the new kernel from landing in
the right place after an upgrade.  Fix that.
1998-03-21 02:08:33 +00:00
Jordan K. Hubbard 6fb3275346 Don't ask for a boot manager if the last time we came through was with
a dedicated disk.  That's fatal.  Eivind:  You may now be happy. :)

Submitted by:	msmith
1998-03-21 01:36:42 +00:00
Jordan K. Hubbard 9f918aee67 Deal with device names > 2 chars in length. 1998-03-21 00:32:20 +00:00
Jordan K. Hubbard f21b767cf0 create raw slices correctly. 1998-03-20 23:40:17 +00:00
Jordan K. Hubbard 534868f7e8 Teach libdisk about wfd drives. 1998-03-20 23:27:20 +00:00
Mike Smith dace61020a MFC - remove ENXIO printf 1998-03-20 23:15:30 +00:00
Jordan K. Hubbard 01af8b9c01 Change major number for wfd device. 1998-03-20 22:01:01 +00:00
Jordan K. Hubbard 0c55543a21 MFC: I suck. Fix typo. 1998-03-20 18:26:23 +00:00
Jordan K. Hubbard 76d702ac87 MFC: fix slice entries. 1998-03-20 18:07:23 +00:00
Joerg Wunsch f015efc65b Partial merge of rev 1.52: bump the timeout in scsi_start_unit() to 30
seconds since some drives are slow enough to come up.

Requested by: Leif Neland
1998-03-20 18:00:03 +00:00
Jordan K. Hubbard fd94d842e3 2.2.5 -> 2.2.6 1998-03-20 17:17:55 +00:00
Jun-ichiro itojun Hagino 59ce00d12b /usr/local/man/ja_JP.EUC -> /usr/local/man/ja
PR:		5251
1998-03-20 16:54:34 +00:00
Jordan K. Hubbard 8bac3c358e MFC: fix a compatibility slice aliasing bug
Requested by:	bde
1998-03-20 16:35:48 +00:00
Jordan K. Hubbard 029dcaf2e5 MFC: DTRT when writing twice. 1998-03-19 15:07:47 +00:00
Jordan K. Hubbard 550be9779a MFC: Use noatime 1998-03-19 15:02:55 +00:00
David Greenman 792c207aa2 Brought in fix from rev 1.62: fix for panic when count of chars is 0. 1998-03-18 21:05:19 +00:00
Tim Vanderhoek 1e8398d0df Trim username examples to <= 8 characters (in -STABLE only).
This strikes me as a somewhat hypocritical mistake given that
the document includes a 1/2-page paragraph explaining why usernames
should not be in excess of 8 characters...  What would Freud say? ;)

PR:		docs/5874
1998-03-18 16:14:48 +00:00
Tim Vanderhoek ed4c88b1d5 MFC: Fix over-zealous .Nm trimming
PR:		docs/5968
1998-03-18 15:45:00 +00:00
David E. O'Brien 243fd3e79a MFC rev 1.9 1998-03-18 12:29:08 +00:00
David E. O'Brien 71d0614efb Document WANT_LIBC_R.
Ok'ed by:	JKH
1998-03-18 11:07:27 +00:00
Jordan K. Hubbard d869e46220 MFC: NOPERL 1998-03-18 08:00:13 +00:00
Jordan K. Hubbard 0575a75788 MFC: NOPERL 1998-03-18 07:59:13 +00:00
Jordan K. Hubbard 6929275e82 Document NOPERL
Submitted entirely incorrectly in -hackers by:	<[email protected]>
1998-03-18 07:58:13 +00:00
Daniel O'Callaghan 1cea839607 PR: i386/6040
Approved by: jkh
MFC.  Add VIA NE2000 clone.
1998-03-17 21:12:13 +00:00
James Raynard 190a915090 MFC - Merge rev 1.16 (prevent output columns from merging into one another). 1998-03-16 23:55:08 +00:00
Tim Vanderhoek 90638faa1f MFC: this is uulog.1, not uuname.1 1998-03-16 15:11:49 +00:00
Jordan K. Hubbard 03bcc3402c MFC: 1.72 1998-03-16 14:33:36 +00:00
Jordan K. Hubbard 6af7e6d637 MFC: El Bruce Fernando Maximillian Ernesto Supremo Evan's fixes in r1.9. 1998-03-16 09:21:59 +00:00
Steve Price 6de777acf5 Typo fix.
PR:		6016
Submitted by:	Kazuo Horikawa <[email protected]>
OK'd by:	jkh
1998-03-16 07:11:27 +00:00
Steve Price feb65cb027 MFC: fix an ethernet framesize mismatch
OK'd by:	jkh
1998-03-16 01:32:51 +00:00
Mark Murray 407b54fd05 MFC: linking breakage fixed. 1998-03-15 20:22:54 +00:00
Jordan K. Hubbard 2fa4719ed4 MFC: variable bogon fixes. 1998-03-15 19:31:11 +00:00
Jordan K. Hubbard 1e359daeb4 MFC: cleanup / frobbing. 1998-03-15 17:11:01 +00:00
Jordan K. Hubbard c235c061fb Fix minor typo. 1998-03-15 16:39:41 +00:00
Jordan K. Hubbard 9feb160f29 MFC: make slice entries. 1998-03-15 16:16:29 +00:00
KATO Takenori cb20acb3b8 Sync with sys/i386/isa/npx.c revision 1.31.2.7.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-15 15:23:04 +00:00
KATO Takenori 7521aec722 Sync with sys/i386/confi/GENRIC revision 1.77.2.19.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-15 15:22:06 +00:00
KATO Takenori 9408676622 Sync with sys/i386/conf/files.i386 revision 1.141.2.19.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-15 15:21:15 +00:00
KATO Takenori a1fde92e0c Sync with sys/i386/i386/userconfig.c revision 1.63.2.25.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-15 15:20:17 +00:00
KATO Takenori 3a39895236 Sync with sys/i386/i386/machdep.c revision 1.209.2.21.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-15 15:19:18 +00:00
Jordan K. Hubbard 4e97723090 MFC: -F flag
Requested by:	pst
1998-03-15 05:47:08 +00:00
KATO Takenori 1ed5167061 Sync with sys/i386/conf/Makefile.i386 revision 1.89.2.4.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-15 02:39:43 +00:00
KATO Takenori 7143f5f3f2 Sync with sys/i386/isa/sio.c revision up to 1.147.2.13.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-15 02:39:00 +00:00
KATO Takenori cd6b1bf7af Sync with sys/i386/i386/machdep.c revision 1.209.2.20.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-15 02:38:03 +00:00
Jordan K. Hubbard 74efa25380 MFC: idprio is privileged. 1998-03-15 00:07:09 +00:00
Andrey A. Chernov 9a41f0e081 MFC: more partition types 1998-03-14 21:23:07 +00:00
Andrey A. Chernov 085c0b8eca MFC: more partition types 1998-03-14 21:15:52 +00:00
Mike Smith 5770110f26 Merge from -current: if the root filesystem mount fails because the
device being mounted doesn't exist, and the device might have been
within a slice, try mounting via the compatability slice instead.
1998-03-14 10:19:49 +00:00
Daniel O'Callaghan db7e1c2a6c Obtained from: bde
Back out last brain blip
1998-03-13 22:01:26 +00:00
Daniel O'Callaghan d3263cd569 Reviewed by: jkh
MFC - Cyclades examples c -> c0
1998-03-13 14:01:57 +00:00
Jordan K. Hubbard a3a781424a |Here are a few patches to my audio driver (from a recently cvsupped
|2.2.6-BETA). The first two were already submitted some time ago
|but probably were applied to the wrong line. The last one fixes a
|problem that has been there for ages.

Submitted by:	Luigi Rizzo <[email protected]>
1998-03-13 12:21:51 +00:00
Jordan K. Hubbard 74c1d25376 MFC: Danish mirrors. 1998-03-13 12:12:30 +00:00
Kazutaka YOKOTA 161d9c3e34 YAMFC: Update man page and the usage message to include the -I option. 1998-03-13 11:21:18 +00:00
Jordan K. Hubbard f19047ea50 MFC: don't spam ld.so.hints 1998-03-13 11:13:28 +00:00
Jordan K. Hubbard 233785b9b9 MFC: occluded variable fix. 1998-03-13 11:08:06 +00:00
Brian Somers aafeb4047a MFC: Correct #ifdef for __FreeBSD__ < 3
It'll compile now *blush*
1998-03-13 03:25:16 +00:00
Brian Somers 9f00e664c0 MFC:
o Fix a few comment typos.
    o Fix ``set timeout'' usage message and documentation.
    o Change ifOutPackets, ifOutOctets and ifOutLQRs to `u_int32_t's
      so that they wrap correctly.
    o Put the LQR in network byte order using the correct struct size
      (sizeof u_int32_t, not sizeof u_long).
    o Wrap LQR ECHO counters correctly.
    o Don't increment OutLQR count if the last LQR hasn't been replied
      to.
    o Initialise HisLqrData (last received LQR) in StartLqm.
    o Don't start the LQR timer if we're `disabled' and `accepted'.
    o Generate LQR responses when both sides are using a timer and
      we're not going to send our next LQR before the peers max timeout.
    o Don't send LQRs when the peer has LCP REJ'd them.  Send
      ECHO LQRs instead.

Ok'd by: jkh
1998-03-13 00:58:09 +00:00
Guido van Rooij 2f340cec8e MFC: mmap for char device patch 1998-03-12 19:36:50 +00:00
Guido van Rooij cc36f4f11f MFC: mktemp -> mkstemp 1998-03-12 19:27:47 +00:00
Eivind Eklund f27bc428c5 Remove warning from f00f_hack.
Approved by:	jkh
1998-03-12 13:06:42 +00:00
Jordan K. Hubbard e62e0a9cd5 Shrink the header back down. I'd like to make it dynamic, but
the code is just too evilly static in its layout.  w need a rewrite.
1998-03-12 02:00:38 +00:00
KATO Takenori cdac4fc88d Sync with followings:
>  Revision  Changes    Path
 >  1.77.2.17 +8 -1      src/sys/i386/conf/GENERIC
 >  1.9.2.9   +2 -1      src/sys/i386/conf/majors.i386
 >  1.209.2.19 +42 -2     src/sys/i386/i386/machdep.c
 >  1.83.2.6  +5 -1      src/sys/i386/i386/trap.c
 >  1.63.2.24 +6 -2      src/sys/i386/i386/userconfig.c
 >  1.147.2.11 +5 -1      src/sys/i386/isa/sio.c

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-11 15:29:14 +00:00
Jordan K. Hubbard 46f18e0a84 Don't snip out SYSVSHM option - we have room for it in the boot kernel
and it just makes X complain noisily when it's gone.
1998-03-10 17:29:23 +00:00
Jordan K. Hubbard 506507f08d MFC: correct misfeatureness. 1998-03-10 17:24:29 +00:00
Jordan K. Hubbard dd4fe77199 Fix bug where vidcontrol was being run on debug screen (resulting in
no change in mouse cursor behavior for ttyv0, as expected instead).
1998-03-10 13:41:21 +00:00
cvs2svn 885366f8ef This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-03-10 13:40:59 +00:00
Jordan K. Hubbard d8acbb659c Neaten debugging output.
Fix installEnvironment() call in stand-alone case.
Reshuffle configuration menu into what is hopefully less confusing shape.
1998-03-10 13:32:30 +00:00
Jordan K. Hubbard 3ba684834e MFC: new entries, doc fix. 1998-03-10 08:04:34 +00:00
Jordan K. Hubbard 910d07b46f We are now in 2.2.6 beta.
Requested by:	asami
1998-03-10 02:59:33 +00:00
Jordan K. Hubbard 7ce4840b98 MFC: update to XFree86 3.3.2 1998-03-10 02:38:11 +00:00
Andreas Klemm 21a88d2aca MFC: 4 hours timeout for preformatting a large SCSI disk 1998-03-09 21:59:32 +00:00
Jordan K. Hubbard 3d0513eb64 MFC: elminate dead XIG #ifdefs. 1998-03-09 15:04:05 +00:00
Jordan K. Hubbard c4d84e573b MFC: last of the cosmetic changes. Modulo updating sysinstall
for XFree86 3.3.2 and a few other fixes, that's it!  I'm done merging.
1998-03-09 14:46:31 +00:00
Andrey A. Chernov a86a6e2ee9 MFC: fix RFC number 1998-03-09 14:25:12 +00:00
Jordan K. Hubbard 02a575f96d Better solution for the dir dependency problem (the "ugly hack" can
now go away for good).

Submitted by:	jhay
1998-03-09 14:18:02 +00:00
Jordan K. Hubbard 33b8b7d63a MFC: much general cleanup. 1998-03-09 14:14:33 +00:00
Jordan K. Hubbard ad351aa0fa MFC: much better docs. 1998-03-09 14:12:23 +00:00
Jordan K. Hubbard b936d091ae MFC: Whoops! My -current tree was out of date. re-merge. 1998-03-09 14:11:44 +00:00
Jordan K. Hubbard 454941b570 MFC: update docs, cosmetic. 1998-03-09 13:56:07 +00:00
Jordan K. Hubbard cb577245cb MFC: purely cosmetic changes grouped in one commit. 1998-03-09 13:52:39 +00:00
Steve Price e4591b2fa9 Add si_jet.c to the list of dependencies for si.
PR:		5947
1998-03-09 13:01:28 +00:00
Andrey A. Chernov ad8f2c5634 MFC: FTS_PHYSICAL -> FTS_LOGICAL
MFC: cosmetique
1998-03-09 12:32:09 +00:00
Jordan K. Hubbard ec72e8eac1 MFC: extra sanity, eliminate dead routines. 1998-03-09 12:31:15 +00:00
Jordan K. Hubbard 15aa8bbf6e MFC: strcmp -> strncmp 1998-03-09 12:22:56 +00:00
Jordan K. Hubbard e349036c87 MFC: use errx, get pid differently. 1998-03-09 12:20:44 +00:00
Jordan K. Hubbard 412c4bd52a MFC: mostly rewritten with support for other mixer devices and more. 1998-03-09 12:06:02 +00:00
Jordan K. Hubbard 740f4fdd92 MFC: login class support. 1998-03-09 11:48:27 +00:00
Jordan K. Hubbard b432275ccc MFC: login class support, *lots* of sanity checks, build sanification. 1998-03-09 11:42:10 +00:00
Jordan K. Hubbard 1e136bb59b MFC: bag dups. 1998-03-09 11:13:33 +00:00
Jordan K. Hubbard 7d33adacfc MFC: add bktr(4) 1998-03-09 10:56:55 +00:00
Jordan K. Hubbard 49b674e404 MFC: strengthen check 1998-03-09 10:45:25 +00:00
Jordan K. Hubbard 2f846027d7 MFC: cosmetic, update doc. 1998-03-09 10:40:28 +00:00
Jordan K. Hubbard 55dfa970e9 Nuke extraneous line. 1998-03-09 10:36:32 +00:00
Jordan K. Hubbard eb147da479 MFC: cosmetic tweaks, use DPSRCS to generate nfs_prot.h properly. 1998-03-09 10:08:50 +00:00
Jordan K. Hubbard 055eefe377 MFC: make /var/run 1998-03-09 08:57:37 +00:00
Jordan K. Hubbard 9961cc24c4 MFC: relax overly strict checking of -h and -R 1998-03-09 08:54:51 +00:00
Jordan K. Hubbard da926b324c MFC: rarpd flags. 1998-03-09 08:52:01 +00:00
Jordan K. Hubbard b6c0616c29 MFC: allow starting rarpd. 1998-03-09 08:51:20 +00:00
Mike Smith fc2381faa1 Merge from -current: more correct handling of the WHOLE_DISK_SLICE case. 1998-03-09 08:36:43 +00:00
Jordan K. Hubbard 3744cb12b8 Evil compat slice hacks are gone - use canonical names for everything
in fstab.  Hurrah!
1998-03-09 08:21:03 +00:00
Mike Smith 7c7601318f The bootblock passes the slice value in as 1 (WHOLE_DISK_SLICE) when booting
a dedicated disk, not 0.  Deal with this by range-checking for a sane
slice number.
1998-03-09 08:04:13 +00:00
Mike Smith c58546b6e8 Merge from -current: use the slice number passed in from the bootloader
to correctly locate the FreeBSD slice we are booting from.

Also make more use of the macros in reboot.h, and add an extra one to
obtain the slice number.
1998-03-09 04:48:54 +00:00
Steve Price bca25aca16 MFC: remove extraneous \'s. 1998-03-09 03:03:23 +00:00
Steve Price d654db57fd MFC: tcp -> udp to remove duplicate entries. 1998-03-09 02:59:21 +00:00
Jordan K. Hubbard 8c789ce6f1 MFC: fix typos. 1998-03-09 02:21:31 +00:00
Jordan K. Hubbard dead352686 MFC: remove contraversial ircd entries. 1998-03-09 02:17:45 +00:00
Mike Smith 487f5e8626 Merge from -current: search for the right slice entry to match the one
mounted on / when supplied with a possible compatability-slice devicename.
1998-03-09 02:06:27 +00:00
Brian Somers 4af5a7d002 MFC: Explicitly call caused' an int'.
Sugested by: gcc-2.8
1998-03-08 23:44:48 +00:00
David E. O'Brien 0f73cb6fbc Add /usr/bin/CC for C++.
2.2.6 commit OK'ed by:	jkh
1998-03-08 22:53:50 +00:00
Andrey A. Chernov 7a86eaebc6 MFC: include reordering
MFC: localize
1998-03-08 20:59:33 +00:00
Stephen McKay 5ff2fc8acc MFC rev 1.7: typos, new functions, changed abort() behaviour. 1998-03-08 15:20:02 +00:00
Jordan K. Hubbard 87fef19de6 MFC: describe full behavior. 1998-03-08 14:59:56 +00:00
Jordan K. Hubbard b3f0d6573d MFC: last round of cosmetic diffs in usr.bin 1998-03-08 14:55:12 +00:00
Jordan K. Hubbard d5c1447353 MFC: staticize the world, allow for dynamic parser stack growth. 1998-03-08 14:53:21 +00:00
Jordan K. Hubbard d5778a710e MFC: cosmetic, disallow ctrl char spamming. 1998-03-08 14:42:56 +00:00
Jordan K. Hubbard 7d82445973 MFC: cosmetic, translate app keypad sequences. 1998-03-08 14:41:42 +00:00
Jordan K. Hubbard f710e88f14 MFC: strengthen check for "executables" 1998-03-08 14:33:16 +00:00
Jordan K. Hubbard 80f51f71d5 MFC: prepare for longer usernames, add -d flag. 1998-03-08 14:31:56 +00:00
Jordan K. Hubbard d8b0e6145c MFC: cosmetic. 1998-03-08 14:29:25 +00:00
Jordan K. Hubbard 2f74839692 MFC: add polish messages. 1998-03-08 14:28:08 +00:00
Jordan K. Hubbard 8c16e00393 MFC: cosmetic 1998-03-08 14:26:21 +00:00
Jordan K. Hubbard ef602f288b MFC: Use proper character constant. 1998-03-08 14:23:47 +00:00
Jordan K. Hubbard 739cc4994b MFC: add -i and -s flags. 1998-03-08 14:16:32 +00:00
Jordan K. Hubbard 45c6141c08 MFC: tabify. 1998-03-08 14:11:29 +00:00
Jordan K. Hubbard a1fd592756 MFC: add -i (ignore case) flag. 1998-03-08 14:08:00 +00:00
Jordan K. Hubbard 58d8819dad MFC: general cosmetics. 1998-03-08 14:05:43 +00:00
Jordan K. Hubbard a6248a578b MFC: update man page, cosmetic tweak. 1998-03-08 13:48:34 +00:00
Jordan K. Hubbard c7d1714833 MFC: cosmetic 1998-03-08 13:40:27 +00:00
Jordan K. Hubbard f4c3a13a6e MFC: cosmetic. 1998-03-08 13:36:24 +00:00
Jordan K. Hubbard fa130747f5 MFC: typo 1998-03-08 13:35:30 +00:00
Jordan K. Hubbard d7a2ce56b3 MFC: MAP_SHARED, cosmetic tweaks. 1998-03-08 13:29:51 +00:00
Jordan K. Hubbard 9f508664ec MFC: cosmetic. 1998-03-08 12:28:54 +00:00
Jordan K. Hubbard 79642eb1d5 MFC: cosmetic. 1998-03-08 12:19:06 +00:00
Jordan K. Hubbard fb70d80533 MFC: try tcp connection first for long replies. 1998-03-08 12:17:03 +00:00
Jordan K. Hubbard 9527403b34 MFC: cosmetic + respect ${BINDIR} 1998-03-08 12:13:51 +00:00
Jordan K. Hubbard c1224d2453 MFC: cosmetic. 1998-03-08 12:13:06 +00:00
Jordan K. Hubbard 4cb6b0566a MFC: add quiet flag. 1998-03-08 12:12:16 +00:00
Jordan K. Hubbard 88efa09f14 MFC: remove hardcoded constants. 1998-03-08 12:09:53 +00:00
Jordan K. Hubbard 8fb558fe22 MFC: docs 1998-03-08 12:07:38 +00:00
Jordan K. Hubbard 9dbcc22226 MFC: order xrefs. 1998-03-08 12:05:28 +00:00
Jordan K. Hubbard 991e337734 MFC: purely cosmetic. 1998-03-08 12:04:57 +00:00
Jordan K. Hubbard d7e6040dd6 MFC: correct comment 1998-03-08 12:04:25 +00:00
Jordan K. Hubbard 0439300080 MFC: better randomness, update manpage 1998-03-08 12:04:11 +00:00
Jordan K. Hubbard 2e5860ca13 MFC: eliminate gratuitous -I 1998-03-08 11:55:50 +00:00
Julian Elischer 23e43883f9 correct the DPT configuration options 1998-03-08 11:06:56 +00:00
Julian Elischer d3ba7f2755 Change a definition to configure the dpt driver to live without
the CAM SWI code.
1998-03-08 10:58:11 +00:00
Jordan K. Hubbard 80a7328e64 Undocument flags which were punted in revert. 1998-03-08 09:59:08 +00:00
Jordan K. Hubbard 2de062a5d6 MFC: revert changes bde doesn't like and just go with PNP support since
that's all I actually care about.
1998-03-08 09:57:35 +00:00
Jordan K. Hubbard c4564a0846 MFC: new locale data 1998-03-08 09:48:21 +00:00
Jordan K. Hubbard b555909025 MFC: add support for REPLYTO. 1998-03-08 09:47:20 +00:00
Jordan K. Hubbard 12a0106037 MFC: typo 1998-03-08 09:31:57 +00:00
Jordan K. Hubbard cc0baf1126 Update table to match reality. 1998-03-08 09:26:19 +00:00
Jordan K. Hubbard 2086e2380b MFC: alphabetise xrefs. 1998-03-08 09:22:01 +00:00
Jordan K. Hubbard eac5ae87c9 MFC: suicide prevention and other fixes. 1998-03-08 09:21:10 +00:00
Jordan K. Hubbard 2caa3c7ec7 MFC: update docs and randomness. 1998-03-08 09:18:33 +00:00
Jordan K. Hubbard 6a93dd96e2 MFC: setlocale, style. 1998-03-08 09:16:54 +00:00
Jordan K. Hubbard 43c2f5b8b9 MFC: simplify 1998-03-08 09:14:38 +00:00
Jordan K. Hubbard 612784615f MFC: assorted cleanups. 1998-03-08 09:08:20 +00:00
Jordan K. Hubbard 07a6122da8 MFC: user friendly suggestion. 1998-03-08 08:57:19 +00:00
Jordan K. Hubbard c2556ef3bb MFC: appropriate type in compare. Elimiate warning. 1998-03-08 08:36:11 +00:00
Jordan K. Hubbard 66a7bbebff MFC: update to version 1.3. Add polish msg catalog. 1998-03-08 08:09:04 +00:00
Jordan K. Hubbard cab3b1cc45 MFC: parenify. 1998-03-08 07:56:48 +00:00
Jordan K. Hubbard 0731ee16d2 MFC: proper parens 1998-03-08 07:56:02 +00:00
Jordan K. Hubbard 93282a50b8 MFC: new links 1998-03-08 07:54:22 +00:00
Jordan K. Hubbard 4e0902ecb1 MFC: cleanup 1998-03-08 07:40:09 +00:00
Jordan K. Hubbard f59ac23959 MFC: cruft patrol 1998-03-08 07:38:39 +00:00
Jordan K. Hubbard 6bfb7c23f6 MFC: PR#5942 1998-03-08 06:53:13 +00:00
Jordan K. Hubbard 14294751ca MFC: new historical items. 1998-03-08 06:27:31 +00:00
Jordan K. Hubbard 41bc14717a MFC: use proper character contants, correct typo 1998-03-08 06:18:11 +00:00
Jordan K. Hubbard dbfbe0991b MFC: be fuzzier on the date of the Gregorian Reformation :-) 1998-03-08 06:13:06 +00:00
Jordan K. Hubbard 987d42d1d9 MFC: cosmetic - return rather than exit 1998-03-08 06:12:15 +00:00
Jordan K. Hubbard de503836d7 MFC: better verbiage. 1998-03-08 05:02:54 +00:00
Bruce Evans c16dffe008 YAMFC (rev.1.57: removed superstitious fnop()). 1998-03-08 04:11:05 +00:00
Bruce Evans 190d09596b YAMFC (rev.1.191: fix breakage of late calls to setidt()). 1998-03-08 04:04:58 +00:00
Jordan K. Hubbard 975ecd4e44 MFC: make sure MFS is set R/W. 1998-03-08 02:12:32 +00:00
Jordan K. Hubbard 75215af3a4 MFC: proper definition for CSTATUS 1998-03-08 02:09:04 +00:00
Jordan K. Hubbard 63a0d06723 MFC: proper structure initializers. 1998-03-08 02:06:52 +00:00
Jordan K. Hubbard 6ba9a03def MFC: don't clobber flags. 1998-03-08 01:52:31 +00:00
Jordan K. Hubbard 42099f1985 MFC: spell my name right. :-) 1998-03-08 01:46:26 +00:00
Jordan K. Hubbard 1a7da473da MFC: (style bugs and all - if they're not critical enough to fix in -current
then they must not be that critical :).  Support for PNP serial ports,
     extra flags to match man page which soften probe checking, check
     for Startech uarts, etc.
1998-03-08 01:40:29 +00:00
Jordan K. Hubbard ce4f6eab05 MFC: update copyright notice. 1998-03-08 01:14:36 +00:00
Jordan K. Hubbard 0dcd847817 MFC: whoops - I thought I'd done these files already (with locale updates). 1998-03-07 22:58:01 +00:00
James Raynard 2d53fa24bc MFC: Revert last commit. Despite the names, these files contain
troff input, not C source.
1998-03-07 22:37:01 +00:00
Andrey A. Chernov 8185204e06 MFC: add "da" device to devices list
MFC: add primary fat-32
1998-03-07 22:04:12 +00:00
Andrey A. Chernov c84686f2fe MFC: prevent locking forever waiting for user input
Submitted by: Antti Kaipila <[email protected]>
1998-03-07 21:44:00 +00:00
Jordan K. Hubbard e4589052b7 MFC: move #endif to end. 1998-03-07 16:47:01 +00:00
Jordan K. Hubbard e77642a7d4 MFC: respect ${DESTDIR} 1998-03-07 16:31:20 +00:00
Jordan K. Hubbard 7215b3e587 MFC: use more sensible defaults. 1998-03-07 14:53:21 +00:00
Jordan K. Hubbard b49a589fbd MFC 1998-03-07 14:33:50 +00:00
Jordan K. Hubbard 25e5aa7122 YAMFC 1998-03-07 13:18:04 +00:00
Jordan K. Hubbard ba8f5a28fc MFC: update information on our usage of the sticky bit. 1998-03-07 12:17:29 +00:00
Jordan K. Hubbard 2686524e26 YAMFC 1998-03-07 12:15:34 +00:00
Jordan K. Hubbard 16124dd4d8 MFC: new entries 1998-03-07 12:11:34 +00:00
Jordan K. Hubbard fae58f29bf MFC: cosmetic 1998-03-07 12:08:12 +00:00
Jordan K. Hubbard 73fa0bd618 MFC: new entries and cosmetic tweaks 1998-03-07 11:51:40 +00:00
Jordan K. Hubbard 2cdd42ccc0 MFC: install map3270, merge termcap 1998-03-07 11:50:01 +00:00
Jordan K. Hubbard b513302589 YAMFC 1998-03-07 11:46:30 +00:00
Jordan K. Hubbard a49c296607 MFC: correct font name, add new polish fonts, etc. 1998-03-07 11:45:54 +00:00
Jordan K. Hubbard 36f098b747 MFC: new skeleton files. 1998-03-07 11:42:06 +00:00
Stefan Eßer 3ff1999702 Add -a option to tell whether a device got a driver attached.
(Its a candidate for a PCI LKM driver, else ...)
1998-03-07 11:35:49 +00:00
Stefan Eßer e5a7e22bf0 Add PCI LKM support. Drivers that want to be loadable need to call the new
function "pci_register_lkm(&pci_device, 0)" from their "load" entry point.
The new PCIOCATTACHED ioctl on /dev/pci allows user-land programs to find
out, whether a PCI device got a driver attached. The "pciconf" function has
been extended to return that information for automatic PCI driver loading
from /etc/rc.
1998-03-07 11:33:25 +00:00
Jordan K. Hubbard c7efd09df3 MFC: update various phone numbers. 1998-03-07 10:26:14 +00:00
Jordan K. Hubbard b5a190847f MFC: update family tree. 1998-03-07 10:13:57 +00:00
Jordan K. Hubbard 05e0e2a035 MFC: nuke outdated zipcodes. 1998-03-07 10:13:08 +00:00
Jordan K. Hubbard 9b63e77d39 MFC: better installation method 1998-03-07 10:05:26 +00:00
Jordan K. Hubbard d91b51a381 MFC: add diskless man page and assorted tweaks. 1998-03-07 10:04:24 +00:00
Jordan K. Hubbard 9b43fd1d20 MFC: mouse menu. 1998-03-07 09:09:23 +00:00
Jordan K. Hubbard ca431b5b3f MFC: misc mergification. 1998-03-07 09:07:07 +00:00
Jordan K. Hubbard 849c9a9907 MFC: moused flags 1998-03-07 09:06:19 +00:00
Jordan K. Hubbard 2e7e860033 MFC: -I flag 1998-03-07 09:05:56 +00:00
Satoshi Asami c493950755 Merge 1.272. 1998-03-07 04:41:14 +00:00
Julian Elischer 46aa4c86cb Added support for the DPT driver.
All non cosmettic changes are conditionalised on the #define  DPTOPT
so this should produce no functional changes if this is not defined.
All changed files have previously been tagged with PRE_DPT.
1998-03-06 23:45:13 +00:00
Julian Elischer 37456e2c56 MFC: bring in TAILQ_HEAD_INITIALIZER 1998-03-06 23:10:12 +00:00
Julian Elischer 5629e5d986 MFC: use the capacity command rather than the geometry page to
get the blocksize of a disk.
1998-03-06 23:07:07 +00:00
Jordan K. Hubbard 1a7c7795ae Revert some of the inode sizes. 1998-03-06 23:06:20 +00:00
Jordan K. Hubbard 2763415aa7 MFC: use srandomdev() 1998-03-06 22:36:40 +00:00
Guido van Rooij 240ac5a208 MFC: open tempfiles with O_EXCL 1998-03-06 19:03:35 +00:00
Jordan K. Hubbard 3d90a70e17 MFC: last updates in section 4. 1998-03-06 14:32:29 +00:00
Jordan K. Hubbard b0c3f4c6ae MFC: Add sb(4) manpage and update pcvt man page. 1998-03-06 14:27:13 +00:00
Jordan K. Hubbard a2e9dbda21 MFC: more playing catch-up. 1998-03-06 14:23:13 +00:00
Jordan K. Hubbard 717c94ce15 MFC: more updates. 1998-03-06 14:12:27 +00:00
Jordan K. Hubbard 1a58ada4d0 MFC: more reality checks. 1998-03-06 14:09:29 +00:00
Jordan K. Hubbard d265b9ab3e MFC: to match reality.. 1998-03-06 14:05:57 +00:00
Jordan K. Hubbard be526c8cd4 MFC: proper perms 1998-03-06 13:59:35 +00:00
Jordan K. Hubbard 1e3cb17908 MFC: don't select drive model by default. 1998-03-06 13:49:36 +00:00
Jordan K. Hubbard 722f695479 MFC: sync with latest 1998-03-06 13:48:32 +00:00
Jordan K. Hubbard 3ef85769b6 MFC: update example code. 1998-03-06 13:39:55 +00:00
Jordan K. Hubbard b4e1904a54 MFC: typo fix 1998-03-06 13:38:40 +00:00
Jordan K. Hubbard a686be61fc MFC: Add ports-german 1998-03-06 13:36:33 +00:00
Jordan K. Hubbard 34f27258c4 MFC: install with -C 1998-03-06 13:34:18 +00:00
Jordan K. Hubbard a22e146e91 MFC: simplify 1998-03-06 13:33:41 +00:00
Jordan K. Hubbard 9f9121a48a MFC: simplify. 1998-03-06 13:33:25 +00:00
Jordan K. Hubbard 6664127189 Whoops, put this back - it's less confusing (IMO) to have it present. 1998-03-06 13:32:26 +00:00
Jordan K. Hubbard e50f132dab MFC: build fixes 1998-03-06 13:31:43 +00:00
Jordan K. Hubbard 9c14b9d60f MFC: fix typos. 1998-03-06 13:30:15 +00:00
Jordan K. Hubbard 1c0ab20825 MFC: new words 1998-03-06 13:27:10 +00:00
Jordan K. Hubbard dee399a6f9 MFC: fix typo 1998-03-06 13:25:58 +00:00
Jordan K. Hubbard fcce2c9c3b MFC: use proper modes 1998-03-06 13:22:46 +00:00
Jordan K. Hubbard 5bd0d24864 MFC: use proper ownership macros 1998-03-06 13:22:13 +00:00
Jordan K. Hubbard ab5b89e884 MFC: RIP EBONES 1998-03-06 13:21:14 +00:00
Jordan K. Hubbard 4d10866172 MFC: style nits & missing DPADD 1998-03-06 13:07:12 +00:00
Jordan K. Hubbard b3d60a9e86 MFC: sync 1998-03-06 08:15:33 +00:00
Jordan K. Hubbard d29fd12d7d MFC: better prompting. 1998-03-06 08:12:26 +00:00
Jordan K. Hubbard 09b1aa831d MFC: Don't be suid root. That's dangerous.
BTW, why in the heck is there /usr/src/sbin/i386 directory in the first
place?  People don't want to read DOS floppies on their ALPHAs?  This
organizational scheme is EVIL! :)
1998-03-06 08:06:39 +00:00
Jordan K. Hubbard f1e6abb452 MFC: pnp support 1998-03-06 07:42:19 +00:00
Jordan K. Hubbard b781c00d72 MFC: ... and into here, where it belongs as the only consumer. 1998-03-06 07:29:45 +00:00
Jordan K. Hubbard a8b6c5dc10 MFC: move selective crypto linking cruft out of here... 1998-03-06 07:29:27 +00:00
Jordan K. Hubbard a004a3217f MFC: new hardware entries. 1998-03-06 07:19:40 +00:00
Jordan K. Hubbard 04042f8a99 MFC: catch up with kerberos 1998-03-06 07:17:50 +00:00
Jordan K. Hubbard 67035a68d5 MFC: add -f flag 1998-03-06 07:17:27 +00:00
Jordan K. Hubbard 551c64f766 MFC: sync purely gratuitous differences from current. 1998-03-06 06:48:02 +00:00
Jordan K. Hubbard ef33836f21 MFC: primarily do-nothing commits just to facilitate future merging. 1998-03-06 05:27:04 +00:00
Kazutaka YOKOTA a8ca7e86be - Add Genius PnP mouse support (MFC v1.15).
- Add 4th button support for "MouseMan" protocol (MFC v1.16).
- Remove timeradd() timersub() macros; they are now in sys/time.h.
1998-03-06 03:12:22 +00:00
Brian Somers c8d3b74023 MFC: Nul terminate sockaddr_un::sun_path
Suggested by: Theo de Raadt <[email protected]>
1998-03-06 02:12:55 +00:00
Jordan K. Hubbard 85ed071988 MFC: update to latest. 1998-03-06 01:50:00 +00:00
Jordan K. Hubbard 6c4df54e91 MFC: sanify password check. 1998-03-06 01:49:10 +00:00
Jordan K. Hubbard 8ee67de88d MFC: alphabetize xrefs 1998-03-06 01:48:36 +00:00
Jordan K. Hubbard fb82164a44 MFC: use linemode by default. 1998-03-06 01:47:55 +00:00
Jordan K. Hubbard 2ec296b2f4 MFC: overflow protection. 1998-03-06 01:46:27 +00:00
Jordan K. Hubbard e70043e74a MFC: minor error message change. 1998-03-06 01:46:10 +00:00
Brian Somers e326ccd99e MFC: Use the correct device name in -direct mode. 1998-03-06 00:36:08 +00:00
Brian Somers 985c94d740 MFC: Make SyslogAddr a sockaddr_un rather than a sockaddr.
This wasn't a problem in practice as PATH_LOG and PATH_OLDLOG
     are both < sizeof sockaddr::sa_data.
1998-03-05 22:19:54 +00:00
Jonathan M. Bresler e97ee948df fix a typo in the rulesets
PR:		misc/5924
Reviewed by:	jmb
Submitted by:	Ruslan Ermilov <[email protected]>
1998-03-05 18:33:20 +00:00
Jordan K. Hubbard 4806c3b763 MFC: quite a few improvements - this is a full merge. 1998-03-05 13:01:40 +00:00
Jordan K. Hubbard d93a6ba8b3 MFC: add sanity check 1998-03-05 12:57:12 +00:00
Jordan K. Hubbard 04cdd79934 MFC: various minor style nits and one doc bogon. 1998-03-05 12:24:20 +00:00
Jordan K. Hubbard 985f4cbc11 MFC: update for new kerberos flags. 1998-03-05 12:21:16 +00:00
David Greenman e145ffa4ba Brought in fix from rev 1.153: fix rounding error. 1998-03-05 12:20:08 +00:00
Jordan K. Hubbard fe874e21b6 MFC: simplify/correct .if 1998-03-05 12:00:55 +00:00
Jordan K. Hubbard d06b1bfae6 MFC: install docs. 1998-03-05 11:55:01 +00:00
Jordan K. Hubbard cc1922f9c8 MFC: more doc bogons. 1998-03-05 09:41:40 +00:00
Jordan K. Hubbard e682184fae MFC: fix bogons in doc. 1998-03-05 09:40:44 +00:00
KATO Takenori 0330ff20d9 MFC: defined CCR6 and CCR7 (revision 1.15). 1998-03-05 03:40:55 +00:00
KATO Takenori 85fe572bcd Sync with sys/i386/boot/biosboot/asm.S, boot.c and boot.h revisions
1.9.4.1, 1.60.2.3 and 1.14.2.2, respectively.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-05 03:37:22 +00:00
KATO Takenori c1273ab0d2 Sync with sys/i386/conf/majors.i386 revision 1.9.2.8.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-05 03:35:29 +00:00
KATO Takenori e1d0e58079 - Sync with sys/i386/isa/lpt.c revision 1.55.2.2.
- #ifndef PC98'ed lpt_port_test function.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-05 03:34:36 +00:00
KATO Takenori 53624e94f1 - Sync with sys/i386/isa/syscons.c revision 1.182.2.31.
- #ifndef PC98'ed unused ioctl.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-05 03:33:08 +00:00
David E. O'Brien 56f0dfd16e MFC rev 1.29. 1998-03-05 03:08:57 +00:00
KATO Takenori 4a04b7e53c Sync with sys/i386/conf/options.i386 revision 1.26.2.17.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-05 02:57:03 +00:00
KATO Takenori fb5974780c MFC: Support C-NET(98)S ethernet card.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-03-05 02:50:27 +00:00
Jordan K. Hubbard 9c51dc33c2 Whoops! This commit should not have made it in.
Noted by: Chris Timmons
1998-03-04 09:52:20 +00:00
Chris Timmons 1c0b99dade PR: 3371
Conferred-with: pst, fenner

MFC: print-udp v1.3 including LBL 3.3 repairs for dumping small packets.
     interface.h v1.1.1.2 (only the macros needed by print-udp.c)
1998-03-04 07:57:53 +00:00
Jordan K. Hubbard af5ad159ff MFC: more miscellaneous cleanups and the new mktmp() functions from OpenBSD 1998-03-04 07:26:37 +00:00
David Greenman e14ae26bdb Brought in changes from rev 1.50/1.12: additional PHY support. 1998-03-03 14:20:54 +00:00
Jordan K. Hubbard f6f16d1894 MFC: doc & security fixes. 1998-03-03 13:27:38 +00:00
Jordan K. Hubbard bcbbf719a8 MFC: doc fix, bring in security fixes to fts.c.
fts.c changes also include whiteout support, which isn't applicable to 2.2,
but it's #ifdef'd out and harmless.
1998-03-03 08:24:43 +00:00
Jordan K. Hubbard e3e6bbd6c1 MFC: correct casts. 1998-03-03 07:13:40 +00:00
Jordan K. Hubbard 129ec01ab6 MFC: style nits. 1998-03-03 07:00:20 +00:00
Jordan K. Hubbard cf65d7238e MFC: install new man pages and use canonical permissions. 1998-03-03 06:37:09 +00:00
Jordan K. Hubbard 8e5b4b7228 MFC: style nits. 1998-03-03 06:15:50 +00:00
Jordan K. Hubbard 10a0a6c691 MFC: add man pages. 1998-03-03 06:12:57 +00:00
Jordan K. Hubbard 2158e8d2ac MFC: add man page. 1998-03-03 06:10:44 +00:00
Jordan K. Hubbard 67dacb093c MFC: c++-ification and updated regex sets. 1998-03-03 06:06:14 +00:00
Jordan K. Hubbard b2fb2490bf MFC: FAT32/VFAT support. 1998-03-03 04:29:23 +00:00
Jordan K. Hubbard 7374211ae1 MFC: merge r1.12. I was too conservative to merge this before.
Requested by: bde
1998-03-02 21:34:41 +00:00
Guido van Rooij 24c252656d Another misused bit_* function 1998-03-02 20:49:31 +00:00
Guido van Rooij b1b992e40d MFC: correct bit_nclear usage. 1998-03-02 19:01:21 +00:00
Jordan K. Hubbard 70d3135c69 MFC: Tested by Eivind Eklund and will be further tested by FTL. 1998-03-02 10:46:44 +00:00
Jordan K. Hubbard b4d39651f8 Yikes, I thought I committed this already. More support for CODA
filesystems - does nothing if you don't have CFS defined.

Approved by:	davidg
1998-03-02 08:54:56 +00:00
Jordan K. Hubbard 07e798e8a3 MFC: latest bt848 driver (now that I have one of these boards to test with) 1998-03-02 08:42:24 +00:00
Jordan K. Hubbard 2261fa0be1 MFC: latest bt848 driver. 1998-03-02 08:41:32 +00:00
Guido van Rooij a4cc7f4b09 MFC: add uid's to struct socket. 1998-03-02 07:58:17 +00:00
Jordan K. Hubbard 91a42e4408 MFC: update to proper major number and correct style. 1998-03-02 07:36:17 +00:00
Jordan K. Hubbard b4ae091bf1 Add entry for bktr driver since we appear to have it in 2.2. 1998-03-02 07:26:16 +00:00
Peter Wemm 00445d9a5b MFC: PCI and enhanced specialix host card support.
Also: clean out some cruft
      make multiple host cards actually work..
      try and recover from isa and pci unit collisions.
1998-03-02 05:54:12 +00:00
Peter Wemm 310895245a MFC: enhanced specialix host card firmware 1998-03-02 05:50:22 +00:00
Jordan K. Hubbard e970871785 Eliminate:
ufs/ifs/ifs_isyscalls.c optional vcfs
		ufs/ifs/ifs_subr.c      optional vcfs
CMU says they're no longer necessary.
1998-03-02 02:58:52 +00:00
Jordan K. Hubbard 61c67a1217 MFC: PR#5873 1998-03-02 02:53:12 +00:00
Jordan K. Hubbard 7744cb4ebd Add VT_CFS type for CODA filesystem. 1998-03-02 02:50:54 +00:00
Jordan K. Hubbard fb43d43394 Add entries for CODA filesystem. 1998-03-02 02:47:33 +00:00
Steve Price d1763d119d MFC: Allow NULL cookie verifiers for non-NULL offsets. 1998-03-01 22:33:27 +00:00
Steve Price 4cfa33f038 MFC: create the cuaiA* and cualA* devices. 1998-03-01 22:20:11 +00:00
Jordan K. Hubbard 8d9622c3c9 Adjust initstate() prototype. 1998-03-01 20:24:23 +00:00
Joerg Wunsch 66e34790dc MFC: rev 1.6, bump the timeout to 3 hours. 1998-03-01 20:16:01 +00:00
Steve Price 1d9738f844 MFC: fix a few nits. 1998-03-01 18:59:42 +00:00
Steve Price 92f4c0ce84 MFC: revised fix for PR 5345 and 5610. 1998-03-01 18:53:09 +00:00
Jordan K. Hubbard 1e5009096a MFC: why not? 1998-03-01 17:50:19 +00:00
Jordan K. Hubbard 935b3a313c MRC: arc4random prototypes. 1998-03-01 17:44:00 +00:00
Jordan K. Hubbard 04be3b2317 MFC: bring in arc4random code. 1998-03-01 17:43:20 +00:00
Jordan K. Hubbard 377ebd813c MFC: major merge - bring all the arc4random support in now that it's
in 2.2.
1998-03-01 17:42:05 +00:00
James Raynard 1805b0603c MFC: Get sigprocmask args the right way round. 1998-03-01 11:09:02 +00:00
Satoshi Asami 1321af36c3 Merge 1.60. 1998-03-01 10:12:00 +00:00
Alexander Langer b0c14abb8e MFC (rev 1.4): use .Nm id' instead of .Nm' in synopsis. 1998-02-28 22:11:14 +00:00
James Raynard 0d86498d34 MFC: Strings are terminated by NUL, not NULL. 1998-02-28 18:09:44 +00:00
James Raynard 9cdc1be394 MFC: Strings are terminated by NUL, not NULL. 1998-02-28 15:49:29 +00:00
Steve Price 71c1288a19 Really remove the config_* files this time.
Noticed by:	jkh
1998-02-28 12:47:23 +00:00
John Hay ca4d247b09 MFC: Mention the WANic 400/405 PCI card support and some cleanups. 1998-02-28 07:13:14 +00:00
Steve Price 5af0a1725f MFC: CLEANFILES+= foo.gz 1998-02-28 06:32:14 +00:00
Steve Price 21a9ec614a Add a couple of files I missed in the update to zlib-1.1.1. 1998-02-28 06:30:54 +00:00
Steve Price 74f2655fd9 MFC: algorithm.doc -> algorithm.txt 1998-02-28 06:20:45 +00:00
Steve Price 57ba83dfce MFC: update to zlib-1.1.1 1998-02-28 06:19:11 +00:00
cvs2svn 2dead96ff3 This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-02-28 06:04:28 +00:00
Kazutaka YOKOTA f64f13befd MFC: added SC_DISABLE_REBOOT. 1998-02-28 05:17:25 +00:00
Kazutaka YOKOTA 1c77f6284f YAMFC: merge following fixes: various small fixes (1.248), screen update
fix (1.249), font loading fix (1.250) and mouse cursor fix (1.251, 1.252).
1998-02-28 05:16:14 +00:00
Steve Price 44425c8879 MFC: cleanup the lpt port probe code. 1998-02-28 04:18:12 +00:00
Steve Price 65be1f35bf MFC: Remove the config_* routines. 1998-02-28 04:02:58 +00:00
Brian Somers 7b63e34bea MFC: Don't nullify entry in linkTableOut, set the aliasing
address even when PKT_ALIAS_RESET_ON_ADDR_CHANGE is in
     effect.
1998-02-27 23:09:57 +00:00
Mike Smith 2631f8007f Merge changes from r1.61 - remove pbzero(), as everything we load clears
its own BSS.
1998-02-27 22:56:15 +00:00
Paul Traina fec1ddfe5d MFC: fix API and compile with warnings enabled. 1998-02-27 22:37:38 +00:00
Stefan Eßer 854e5b87a4 Add PCI device ID of Surecom NE-34 1998-02-27 22:30:36 +00:00
Jordan K. Hubbard 8b140cc754 MFC: increase retry time. 1998-02-27 21:32:55 +00:00
Jordan K. Hubbard e24dccc870 MFC: opielocks dir. 1998-02-27 21:32:32 +00:00
Jordan K. Hubbard a2d1368129 MFC: /etc/skel doesn't seem to be used in the -current branch either,
but it doesn't hurt.
1998-02-27 21:03:13 +00:00
Jordan K. Hubbard 9cc691db5c MFC: msdosfs / cd9660 includes. 1998-02-27 21:01:42 +00:00
Jordan K. Hubbard fb3dfe55f8 MFC: rocketport entries. As Bruce notes, this rule needs a complete
rewrite so I'm going to sync it first with -current and then decide
how to rip it to bits.
1998-02-27 20:59:44 +00:00
Jordan K. Hubbard 0c3900b51c MFC: sync services. 1998-02-27 20:58:18 +00:00
Jordan K. Hubbard 5c65c476da MFC: cosmetic tweaks, merge in new kerberos vars for rc.conf. 1998-02-27 20:49:15 +00:00
Guido van Rooij dd1b601f5a MFC: Fix potential DOS. 1998-02-27 20:01:21 +00:00
Bill Fenner 0e9b5b4dee Merge %SUBDIR% change from 1.56 1998-02-27 18:37:03 +00:00
Satoshi Asami d009bf39da Merge 1.55. 1998-02-27 15:46:43 +00:00
Jordan K. Hubbard 173160ff04 Merge this with -current even though we don't have half these devices
in 2.2-stable and probably never will; it prevents us from inadvertantly
recycling a major number in one branch to conflict with another.
1998-02-27 06:16:35 +00:00
Steve Price cd8a873ba8 MFC: allow a negative number without a core dump 1998-02-26 21:14:45 +00:00
Dima Ruban c86f973ea7 MFC: NetBSD PR# 2772
Reviewed by:	David Greenman
1998-02-26 17:17:09 +00:00
Steve Price 6f51dd62b2 Show the noatime flag if set.
PR:		5843
Submitted by:	Jukka A. Ukkonen <[email protected]>
1998-02-26 05:08:24 +00:00
Jordan K. Hubbard 0bd789315d MFC: modulo rc.shutdown reference which doesn't exist in 2.2 and was elided. 1998-02-26 02:45:22 +00:00
Jordan K. Hubbard c5e964b9c5 MFC: PR#5849 1998-02-26 02:18:05 +00:00
Jonathan M. Bresler 62a0144f81 added two new files: allowed_domains.txt and allowed_ips.txt.
domains/ips listed in these files are *NOT* filtered,
        even if listed in domains.txt or ips.txt.

        someone added netcom.com to the domains.txt file,
        resulting in all mail from netcom.com being blocked.
1998-02-25 22:21:33 +00:00
Andrey A. Chernov 1dd5073864 MFC: minimize clock drift 1998-02-25 09:43:47 +00:00
Hiroyuki Hanai 364287184c To commit japanese online manuals into doc/ja/man.
Submitted by: Kazuo Horikawa <[email protected]>
1998-02-25 04:19:09 +00:00
Julian Elischer 8fa950ecaf MFC: fix typo in last commit 1998-02-25 02:34:30 +00:00
Julian Elischer e80901d631 MFC: 1.28->1.29 define more IP protocols as defined in the new list. (rfc1700) 1998-02-25 02:18:12 +00:00
Daniel O'Callaghan f89ede28f4 PR: 5812
Put in the right direction by: Mike Smith and Steve Price

Close syslogging to remove unwanted messages in ftpd's INTERNAL_LS.
1998-02-24 22:18:18 +00:00
Andrey A. Chernov ad423c383c MFC: DESTDIR tweaks 1998-02-24 10:25:42 +00:00
Bruce Evans 88e3d55425 NQYAMFC. Move #include of <sys/cdefs.h> earlier and clean up some
formatting.

PR:	5785
1998-02-24 00:22:28 +00:00
Guido van Rooij 881ad77662 MFC: Addition of forward_sourceroute and accept_sourceroute variables
in rc.conf and the implementation of the latter.
1998-02-23 20:21:37 +00:00
Steve Price 3c0f3c1ee9 MFC: use port 0x110 to avoid PNP conflicts. 1998-02-23 15:05:12 +00:00
Andrey A. Chernov eb6bde4037 Add missing DESTDIR 1998-02-23 09:15:01 +00:00
David Greenman 4ac0bf5406 Brought in changes from rev 1.31: support more than 32 units in
dkmakeminor().
1998-02-22 10:12:50 +00:00
Jordan K. Hubbard 16639c2c16 MFC: bzero new ccdbufs. 1998-02-22 10:02:08 +00:00
Jordan K. Hubbard 167855d31d MFC: fix message 1998-02-22 09:54:39 +00:00
Mark Murray 46691eb9d8 MFC: eBones --> kerberosIV upgrade. 1998-02-22 07:17:42 +00:00
KATO Takenori 8592baea6d Sync with sys/i386/conf/majors.i386 revision 1.9.2.7.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-22 07:02:37 +00:00
Julian Elischer baa0a2e1ce MFC: add entries for pptp and radius 1998-02-22 06:31:15 +00:00
Jordan K. Hubbard aaf4de8255 Correct comments for new CFS. Whoops!
Pointed-out-by-the-usual-eagle-eye-of:	bde
1998-02-22 01:17:20 +00:00
Jordan K. Hubbard 03a4ce00c3 ircd doesn't use udp - eliminate useless entries for same. Also
change name of 6667 assignment to be unique.

Suggested by:	Bill Fenner <[email protected]>
1998-02-22 00:50:14 +00:00
Bill Fenner e77f4eacc9 Merge from 1.15: correctly document tty-related capability names. 1998-02-21 23:36:10 +00:00
Jordan K. Hubbard ae94e14fdd MFC: add ircd entries. 1998-02-21 19:38:10 +00:00
Jordan K. Hubbard 5e7d2837f9 Add entries for CODA filesystem.
Submitted by: "Robert.V.Baron" <[email protected]>
1998-02-21 19:23:58 +00:00
Jordan K. Hubbard 50b12e912f Add entries for CODA filesystem. Not to worry, we're not bringing
this into 2.2 at the last minute, these are just here to make it easier
for folks to drop it in as an add-on.
1998-02-21 19:22:14 +00:00
Bill Paul 0af28e9283 YAMFC. Just shoot me now, okay? 1998-02-21 18:15:30 +00:00
Nate Williams e588909218 - MFC: 'hang' and 16-bit ESS support bugs. 1998-02-21 17:54:56 +00:00
Gary Palmer f7705ac1e9 MFC: fix kernel panic caused by bad printf 1998-02-21 04:55:00 +00:00
Mike Smith 482892fcb4 MFC, use the correct field for the no-tags attribute, avoid spamming probe
messages.
Submitted by:	bde
1998-02-20 21:04:35 +00:00
Jordan K. Hubbard a098ebeaf9 MFC: update to stable-167. Note to FTL: please regression test. 1998-02-20 18:10:44 +00:00
Jordan K. Hubbard f03e8f3e57 MFC: stable-167 update. 1998-02-20 18:09:55 +00:00
Jordan K. Hubbard 0e1d9fe707 MFC: minor cleanups and doc updates. 1998-02-20 17:32:28 +00:00
Brian Somers 38d94ef317 Update to version 1.11:
PR:		5802
1998-02-20 15:42:06 +00:00
Mark Murray cb81b9e53f [More nasty sailor language] - I hate "cvs update -jHEAD". It does not
work. Despam the last commit.
1998-02-20 14:50:31 +00:00
Brian Somers 660422417d MFC: Remove useless argument to ``. start_if.$ifn''
Pointed out by: Tim Tsai <[email protected]>
1998-02-20 14:46:12 +00:00
Mark Murray 8b6cbc8e12 MFC: Use major 92 for the bktr driver 1998-02-20 10:36:18 +00:00
Mark Murray d9db2132d0 MFC: Added IOCTL's and repair to damage. 1998-02-20 10:19:34 +00:00
Eivind Eklund 8d1b11d33c mtree changes for setgid games. Matches jkh's merge. 1998-02-20 06:35:37 +00:00
Steve Price ab44076735 MFC: -DMAKE_EBONES -> -DMAKE_KERBEROS4
Reminded by:	Matthew Hunt <[email protected]>
1998-02-20 05:19:40 +00:00
Bill Paul f30c2d09c4 MFC: another (and hopefully last) missing backslash 1998-02-20 04:02:05 +00:00
Steve Price 2c555e4f1a MFC: set Tbl.str_numstr before do_order or randomize are called.
PR:		5791
1998-02-20 00:49:43 +00:00
Stephen McKay 84cb66dcae MFC rev 1.15: Prevent corruption of errno. 1998-02-20 00:49:32 +00:00
Garrett Wollman 6b81d495cc getopt(3) is declared in stdlib.h under 2.2. 1998-02-19 21:49:20 +00:00
Bill Fenner 65c146f937 Merge rev 1.37: clear so_error after reporting it in sosend(). 1998-02-19 20:20:27 +00:00
Garrett Wollman 2740d93865 MFC: rev. 1.5 of whois.c, 1.4 of whois.1. 1998-02-19 19:10:26 +00:00
Mark Murray 63db378a26 [Nasty sailor language censored] - Another typo. 1998-02-19 17:21:05 +00:00
Mike Smith 4cf5702563 MFC: move 'sw' device away from being trampled by 'wfd'. 1998-02-19 12:19:48 +00:00
Mark Murray 6dcf27befc Dammit. I committed an incomplete merge and a typo. Fix these. 1998-02-19 11:30:47 +00:00
Mark Murray 6204e88d2a More eBones --> kerberosIV merging 1998-02-19 09:55:25 +00:00
Mark Murray ff2d4a6612 More eBones --> kerberosIV merges 1998-02-19 09:32:59 +00:00
Mark Murray 547a90c0d5 More eBones --> KerberosIV merges 1998-02-19 09:12:26 +00:00
Guido van Rooij 62b482e8da Argh: fix an if statement that caused the old passwd not be rebuild.
Pointed out by: "Julie M. Juracich" <[email protected]>
1998-02-19 08:10:31 +00:00
Satoshi Asami 79beccb985 Merge 1.271. 1998-02-19 06:51:32 +00:00
Jordan K. Hubbard 5693556bca Note that KerberosIV now merged. 1998-02-19 02:32:16 +00:00
Jordan K. Hubbard 8de10f6d18 MFC: changes to support crypto/kerberos dists and dispense with
the aged eBones stuff.  Doc fixes also as necessary.
1998-02-19 02:22:17 +00:00
Brian Somers 45984731dd MFC: Allow 8 character login names.
Do the login()/logwtmp()/logout() as id 0.
1998-02-19 02:11:05 +00:00
Jordan K. Hubbard 7b9a62ea21 MFC: FTPD_INTERNAL_LS -> INTERNAL_LS 1998-02-19 01:07:49 +00:00
Jordan K. Hubbard 02acb6c49c MFC: merge just enough of our linux emulator changes to successfully
run the Linux RealAudio 5.0 client.  I wish my kernel hacking skills were
up to merging *all* the nifty new features, like linux_iopl(), but this
merge already taught me more than enough about the code to know that I don't
really understand it well enough to do that. ;-)
1998-02-19 00:37:34 +00:00
Nate Williams ae38c4b199 - After the install has been done, but before makedb is run, run
'ldconfig -R' to pick up new shlib dependencies.

Suggested by:	Amancio and a whole lot of other folks
1998-02-19 00:23:43 +00:00
Dima Ruban d428a4b284 MFC: add -f flag. 1998-02-18 22:55:00 +00:00
Brian Somers f287ca6aaa MFC: LogWARN rather than LogERROR when we can't create
our diagnostic socket.
1998-02-18 20:41:35 +00:00
Dima Ruban fc7807d266 MFC: NO_LKM option 1998-02-18 20:15:49 +00:00
Brian Somers 395a4bcf59 MFC: Don't leak memory when the peer sends PROTO_COMPD packets
without negotiating compression first.
1998-02-18 19:39:28 +00:00
Steve Price f2bdedc432 MFC: #include <unistd.h> for nice(3). 1998-02-18 18:35:42 +00:00
Steve Price fdca560121 MFC: missing newline when euid != ruid. 1998-02-18 17:36:08 +00:00
Jordan K. Hubbard 02a1f33dd3 Heh - somebody merged this Makefile and brought config -n in with
it.  Since config doesn't have a -n option in -stable, that caused
the release builds to fall over.  Whoops.
1998-02-18 17:25:20 +00:00
Mark Murray f29096316f Punt this into the attic. KerberosIV (KTH eBones) has been tagged into
the tree and the userland changes have been merged.
1998-02-18 13:23:23 +00:00
Mark Murray 9bc63d5d71 Replace eBones with kerberosIV (Actually KTH eBones from current)
sysinstall is going to need some work to sync with this.
1998-02-18 12:45:09 +00:00
Jordan K. Hubbard e2e273a558 MFC: very minor style tweak. 1998-02-18 12:30:56 +00:00
Jordan K. Hubbard 1f4a4cf7e4 MFC: deal properly with 8-bit characters. 1998-02-18 12:25:43 +00:00
Mark Murray ad79c5fdaa Replace eBones with kerberosIV (Actually KTH eBones from current) 1998-02-18 12:16:03 +00:00
Mark Murray 52bc0f17f0 Replace eBones with kerberosIV (Actually KTH eBones from current) 1998-02-18 11:52:20 +00:00
Mark Murray 3c50b19b46 Replace eBones with kerberosIV (Actually KTH-eBones from current) 1998-02-18 11:48:08 +00:00
Mark Murray c83ec7c18c Replace eBones with kerberosIV (Actually KTH-eBones from current) 1998-02-18 11:41:29 +00:00
Mark Murray 93294191b5 Replace eBones with kerberosIV (Actually just the new KTH-eBones) 1998-02-18 11:38:37 +00:00
Mark Murray b8cb053796 Replace eBones with kerberosIV 1998-02-18 11:36:46 +00:00
Mark Murray d9391d60a9 2.2 does not have if_var.h. Unset HAVE_NET_IF_VAR_H 1998-02-18 11:34:22 +00:00
David E. O'Brien 73a0bfddbb Proper var to get internal `ls' is "FTPD_INTERNAL_LS". 1998-02-18 11:03:48 +00:00
David E. O'Brien 767c375f9c Add /etc/ftphosts to the FILES section.
Note that ftpmotd is relative to the user's view of /etc.
1998-02-18 10:48:29 +00:00
Jordan K. Hubbard 27c55448ae MFC: A few bits I missed on my 1st pass. 1998-02-18 09:09:06 +00:00
Philippe Charnier 6819f91559 Typos. 1998-02-18 07:26:03 +00:00
Jordan K. Hubbard 38ca348910 MFC: mondo merge of bootpd. I really hope someone can test this since
I've never even *seen* a netbooted FreeBSD system.  Mike: Maybe that's
one scenario needed for the test lab.
1998-02-18 05:55:37 +00:00
Jordan K. Hubbard b3dce7919c MFC: correct prototype (missed in last commit). 1998-02-18 05:37:31 +00:00
Jordan K. Hubbard 3b1e46d52d MFC: overflow fixes and better understanding of UT_NAMESIZE. 1998-02-18 05:36:39 +00:00
Jordan K. Hubbard 0445a11d70 MFC: bug fix and doc tweaks. 1998-02-18 05:35:27 +00:00
Jordan K. Hubbard 5444c305a6 MFC: add mskanji 1998-02-18 05:33:31 +00:00
Jordan K. Hubbard 5d236b351a MFC: add new login_auth(3) man page and merge various fixes from current 1998-02-18 05:30:08 +00:00
Bill Paul 73a7bd0fad MFC: put back missing backslash 1998-02-18 04:12:52 +00:00
Jordan K. Hubbard 0517605bd8 MFC: /sys relativity. 1998-02-18 02:59:02 +00:00
Jordan K. Hubbard 1b7a8ba9fb MFC: relative paths to /sys, doc fixes. 1998-02-18 02:51:16 +00:00
Jordan K. Hubbard 4d2b8b0cb7 MFC: better yacc handling. 1998-02-18 02:46:31 +00:00
Jordan K. Hubbard c9907737be MFC: misc cleanup. 1998-02-18 02:31:37 +00:00
Jordan K. Hubbard 52d420ba99 MFC: constify 1998-02-18 02:28:14 +00:00
Jordan K. Hubbard 44f1f16583 MFC: doc fixes, better prototypes, misc. 1998-02-18 02:24:07 +00:00
Julian Elischer 2c32415aa5 Submitted by: [email protected]
MFC: fix version confusion in pthreads support.
1998-02-18 01:27:27 +00:00
Jordan K. Hubbard b910f9f584 MFC: relative paths to /sys, doc tweak. 1998-02-17 20:05:06 +00:00
Jordan K. Hubbard e0f44d8ea6 MFC: separate error and errno reporting. 1998-02-17 20:04:34 +00:00
Jordan K. Hubbard efcc214848 MFC: declare the correct arg types. 1998-02-17 20:03:20 +00:00
Jordan K. Hubbard e954be3560 MFC: style points. 1998-02-17 20:02:54 +00:00
Jordan K. Hubbard 124be570c8 MFC: Add a soelim befoer nroff. This entire Makefile is broken in the
presence of obj dirs, both in -current and in -stable.
1998-02-17 19:59:14 +00:00
Jordan K. Hubbard 4acbacbf19 MFC: doc fixes. 1998-02-17 19:54:26 +00:00
Jordan K. Hubbard cb15545a43 MFC: more doc fixes. 1998-02-17 19:52:29 +00:00
Jordan K. Hubbard 302c9157a9 MFC: I am a merging machine. Let's just hope I don't die of boredom before
I finish this.
1998-02-17 19:48:19 +00:00
Jordan K. Hubbard 20021e11c7 MFC: more doc tweaks. 1998-02-17 19:46:20 +00:00
Jordan K. Hubbard f243c7fc5d MFC: more doc fixes. 1998-02-17 19:36:26 +00:00
Jordan K. Hubbard 66eeac3dea MFC: more conservative doc updates. 1998-02-17 19:18:15 +00:00
Jordan K. Hubbard 6e3e4e0955 MFC: purely cosmetic. 1998-02-17 19:13:44 +00:00
Jordan K. Hubbard efd9ff49c0 MFC: various docs tweaks to reflect modern reality. 1998-02-17 19:13:23 +00:00
Jordan K. Hubbard 361c3b4198 MFC: minor doc tweaks. 1998-02-17 19:09:44 +00:00
Jordan K. Hubbard 57cc2adeb7 MFC: minor doc tweaks. 1998-02-17 18:59:56 +00:00
Jordan K. Hubbard 683bc49e47 MFC: constify. 1998-02-17 18:56:45 +00:00
Jordan K. Hubbard fd3374a739 MFC: symlink loop checking in realpath(). 1998-02-17 18:56:30 +00:00
Jordan K. Hubbard ff755ca072 MFC: minor improvements to radixsort. 1998-02-17 18:55:22 +00:00
Jordan K. Hubbard 4e82845941 MFC: getopt() wants to use -1 instead of EOF now. 1998-02-17 18:24:39 +00:00
Jordan K. Hubbard 84f7f79739 MFC: various improvements to printf() family, among them support for
long double.
1998-02-17 17:33:57 +00:00
Jordan K. Hubbard 6eb78d60c2 MFC: check for 0-length writes. 1998-02-17 17:29:50 +00:00
Jordan K. Hubbard e3fb95be71 MFC: constify. 1998-02-17 17:29:17 +00:00
Jordan K. Hubbard 556ee612e5 MFC: constify 1998-02-17 17:28:44 +00:00
Jordan K. Hubbard 95ae1807d9 MFC: extra security. 1998-02-17 17:25:30 +00:00
Jordan K. Hubbard 1db99c554d Add mskanji.c, which I tagged in. 1998-02-17 17:19:41 +00:00
Jordan K. Hubbard 525c53b3ec MFC: Add Kanji runes and more security checks. 1998-02-17 17:18:30 +00:00
Jordan K. Hubbard 9c97b85b3c MFC: doc tweaks, extra security check to setlocale(), minor tweak to
isctype.c
1998-02-17 16:49:19 +00:00
Jordan K. Hubbard 23a8527027 MFC: doc fix. 1998-02-17 16:43:34 +00:00
Jordan K. Hubbard 30b2cc2b1b MFC: doc fix 1998-02-17 16:43:18 +00:00
Jordan K. Hubbard c66f09b6a3 MFC: doc cleanups and one potential overflow. 1998-02-17 16:40:17 +00:00
Jordan K. Hubbard b267deb4c5 MFC: doc cleanups. 1998-02-17 16:38:15 +00:00
Jordan K. Hubbard 8471da2f8f MFC: history. 1998-02-17 16:37:04 +00:00
Jordan K. Hubbard adfc96dfd5 Boast of new features. 1998-02-17 14:54:32 +00:00
Jordan K. Hubbard 23ceeef060 MFC: Since we have bidirectional pipes, allow bidirectional popen()s. 1998-02-17 14:51:47 +00:00
Jordan K. Hubbard b3582060b0 MFC: cleanup. 1998-02-17 14:40:02 +00:00
Jordan K. Hubbard 814cb5b910 MFC: more fascist signal blocking. 1998-02-17 14:36:14 +00:00
Jordan K. Hubbard 88a5eacca9 MFC: doc cleanup, various cosmetic adjustments. 1998-02-17 14:33:20 +00:00
Jordan K. Hubbard 99504fb4e4 MFC: doc fixes. 1998-02-17 10:30:02 +00:00
Jordan K. Hubbard 27763d6d8a MFC: much more extensive error checking. 1998-02-17 10:05:29 +00:00
Jordan K. Hubbard 76ea369c73 MFC: more doc cleanups. 1998-02-17 09:58:49 +00:00
Jordan K. Hubbard 404ec9caa3 MFC: misc doc fixes. 1998-02-17 09:57:18 +00:00
Jordan K. Hubbard 447695c26b MFC: return MAP_FAILED instead of -1. 1998-02-17 09:52:59 +00:00
Jordan K. Hubbard 1d62962b11 MFC: int function returns 0, not NULL. 1998-02-17 09:51:33 +00:00
Jordan K. Hubbard 7e2b49dd8d MFC: this returns int, say so. 1998-02-17 09:50:22 +00:00
Jordan K. Hubbard 1af88191c0 MFC: correct prototypes 1998-02-17 09:49:13 +00:00
Philippe Charnier b88c111087 Typos. 1998-02-17 07:29:31 +00:00
Alexander Langer da3e600964 Partial unmerge from -current: don't use <sysexits.h>. While this
would work fine for 2.2.6-RELEASE and beyond, many 2.2.5-stable
installations will still be using the broken version of rc.network
which expects to see a return value of 1 as the failure exit code.
1998-02-17 05:04:56 +00:00
Justin M. Seger 9515cf0b15 MFC: Fix saver line to use tabs instead of spaces. 1998-02-17 03:26:03 +00:00
KATO Takenori f1e7747dd5 Disable Luigi's sound driver.
Submitted by:	Takahashi Yoshihiro <[email protected]>
1998-02-17 03:19:00 +00:00
KATO Takenori 65869d0828 MFC: revision 1.24 (NEC 86 card).
Submitted by:	Takahashi Yoshihiro <[email protected]>
1998-02-17 03:17:10 +00:00
Jordan K. Hubbard e35b6d2d67 MFC: convert to unsigned 1998-02-17 01:38:25 +00:00
Jordan K. Hubbard c1c5295bb2 MFC: spelling fix 1998-02-17 01:34:50 +00:00
Jordan K. Hubbard 12d7c718f2 MFC: POSIXification. 1998-02-17 00:51:56 +00:00
Jordan K. Hubbard 2e866bdb54 MFC: very small - just bring in fix for fpos_t typedef. 1998-02-17 00:48:17 +00:00
Guido van Rooij 57a15a2aa7 MFC: check return value from db close and fprintf(). 1998-02-16 19:13:43 +00:00
Jordan K. Hubbard fd9c6ac960 MFC: don't say "obsoleted" 1998-02-16 18:32:02 +00:00
Jordan K. Hubbard 8af71c651f MFC: FNM_IGNORECASE compat macro. 1998-02-16 18:29:08 +00:00
Jordan K. Hubbard 5336463792 MFC: cast ctype macro args to unsigned char. 1998-02-16 18:25:44 +00:00
Jordan K. Hubbard 1e09e5bdbf MFC: eliminate support category, use proper email addrs. 1998-02-16 18:24:53 +00:00
Jordan K. Hubbard 0b56e0673e MFC: misc doc tweaks with very little visual effect (but I'm sure
they're there for a reason! :).
1998-02-16 18:22:13 +00:00
Jordan K. Hubbard d35bc7e328 MFC: nuke them nested playpens. 1998-02-16 17:41:57 +00:00
Mike Smith d81830504d Merge from -current; disable tagged command queueing for all Jaz drives.
Submitted by:	Steve Logue <[email protected]>
1998-02-16 11:16:42 +00:00
Nate Williams 334a8b8c19 - Removed these files as they are no longer necessary. (The soundcard.h
file is exactly the same as the version in i386/include/soundcard.h, which
  is now shared by both luigi's and the Voxware drivers.)

Submitted by:	luigi
1998-02-16 06:14:46 +00:00
Jordan K. Hubbard 2548e94bf7 Update to luigi's latest.
Compiles OK for me under 2.2 (of course, so did the previous version).
1998-02-15 23:29:16 +00:00
Steve Price d7ae2737b6 MFC: bring in Bruce's fixes from revision 1.6. 1998-02-15 21:37:54 +00:00
Guido van Rooij 085c2f151e MFC: Only forward source routed packets when ipforwarding is set to 1.
(including Andrews fix for my typo, thanks)
Obtained from: Thomas Ptacek
1998-02-15 18:41:57 +00:00
Kazutaka YOKOTA 2767e2eeea YAMFC: Reword description of Brazilian keyboard.
Submitted by: Daniel C. Sobral
1998-02-15 18:23:16 +00:00
Steve Price 934cf4eeb4 MFC: ' is a special character when the first character on a line.
PR:		5754
Submitted by:	Kazuo Horikawa <[email protected]>
1998-02-15 17:05:30 +00:00
Alexander Langer cf4724914d MFC: ability to list/show a single rule by specifying its number. 1998-02-15 16:32:01 +00:00
Jordan K. Hubbard e336171dc1 MFC: security tweak, support for -T and -B flags. 1998-02-15 16:30:09 +00:00
Jordan K. Hubbard 1140eaf333 MFC: spelling corrections, deobfuscation. 1998-02-15 16:05:27 +00:00
Jordan K. Hubbard 46923adada MFC: selected security fixes. 1998-02-15 15:34:20 +00:00
Jordan K. Hubbard 71a3f8f1bd MFC: doc tweak. 1998-02-15 15:26:35 +00:00
Jordan K. Hubbard 8a7b85eafe MFC: Add extended opcodes for a variety of x86 processors. 1998-02-15 15:20:01 +00:00
Jordan K. Hubbard 418f30eb6d MFC: allow perl compilation to be conditionalized. 1998-02-15 15:18:36 +00:00
Jordan K. Hubbard 5c0822d911 MFC: Selected security fixes and bogosity rectification. Couldn't
bring the srandomdev() changes in since we don't have that in 2.2.
     Pity.
1998-02-15 15:12:08 +00:00
Jordan K. Hubbard 2e5559a9ee MFC: saner dotfiles for root. 1998-02-15 14:31:55 +00:00
Jordan K. Hubbard 221b016f86 MFC: selected improvements for etc files *not* including periodic changes,
security tweaks or other kerberbos related stuff.  I expect that
     stuff to occur as a side-effect of what others will be doing in etc,
     if at all.
1998-02-15 14:24:59 +00:00
Jordan K. Hubbard f51d972eda MFC: very minor error handling fixes. 1998-02-15 13:53:03 +00:00
Jordan K. Hubbard 5315cd21e3 MFC: more selective verbosity. 1998-02-15 13:51:08 +00:00
Jordan K. Hubbard a078966dee MFC: add a bit of missing functionality. 1998-02-15 13:43:06 +00:00
KATO Takenori ce7a7394ee Sync with sys/i386/conf/majors.i386 revision 1.9.2.6.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-15 13:35:32 +00:00
Jordan K. Hubbard ab20a5df0b MFC: eliminate redundant includes. 1998-02-15 13:32:21 +00:00
Jordan K. Hubbard 46f43ee8a4 MFC: minor doc cleanup, minor tweak to call _exit(), include
/usr/libdata/gcc in prefixes even though currently empty.
1998-02-15 13:08:13 +00:00
Jordan K. Hubbard 1c005bf789 MFC: correctly list deleted files. 1998-02-15 11:51:17 +00:00
Jordan K. Hubbard f7f588cbec MFC: cite correct paths. 1998-02-15 11:48:03 +00:00
Jordan K. Hubbard 71383a1a73 MFC: prevent potential overflow in sprintf(). 1998-02-15 11:34:02 +00:00
Jordan K. Hubbard 2232ea795e MFC: timeout support, fixes to signal handling. If there's more
contraversy over the latter, I can either continue to track it
in -current or back it out.
1998-02-15 11:32:27 +00:00
Jordan K. Hubbard b9572e1d0c MFC: remove include pollution. 1998-02-15 11:18:33 +00:00
Jordan K. Hubbard 76c92e50b7 MFC: correct manpage, don't move mountpoints. 1998-02-15 11:16:28 +00:00
Jordan K. Hubbard b07152c2b0 MFC: save/restore errno, cosmetic include reduction. 1998-02-15 11:10:07 +00:00
Jordan K. Hubbard 1442749f62 MFC: cosmetic. Some VFS hacker will have to investigate an actual
real MFC for this code - it doesn't look like something to be undertaken
lightly.
1998-02-15 11:06:23 +00:00
Jordan K. Hubbard bbab5af811 MFC: support for sparse files. 1998-02-15 11:04:30 +00:00
Jordan K. Hubbard a021374b82 MFC: miscellany.. 1998-02-15 11:01:40 +00:00
Jordan K. Hubbard 480d43780d MFC: purely cosmetic "let's eliminate divergence" commit. 1998-02-15 10:58:17 +00:00
Jordan K. Hubbard 4f0d5513ca MFC: handle residual writes properly. 1998-02-15 10:53:17 +00:00
Jordan K. Hubbard fe0e3377f5 MFC: proper cite for chmod(2) 1998-02-15 10:51:43 +00:00
Jordan K. Hubbard 47bd995ad7 MFC: spelling error. 1998-02-15 10:49:26 +00:00
Jordan K. Hubbard 9c875d9f49 MFC: correct citation for config(8). 1998-02-15 10:47:57 +00:00
Jordan K. Hubbard 0bbc124081 MFC: remove extra splbio(). I will read through diffs more carefully
before committing.  I will read through diffs more carefully before committing.
I will read through diffs more carefully before committing. :-)
1998-02-15 08:29:27 +00:00
Jordan K. Hubbard b508227023 MFC: Chris Csanady's OpenBSD fixes. 1998-02-15 08:15:08 +00:00
Steve Price a74632b4e0 MFC: clarify the -batch arguments.
PR:		5677
1998-02-14 22:56:25 +00:00
Steve Price 57750d9b19 MFC: '+' and '?' are ordinary characters but can be simulated using bounds.
PR:		5708
1998-02-14 18:28:25 +00:00
Nate Williams 5e7e17f1ee - Rip out the (unused and un-working) DEVFS code out of here, since DEVFS
dooesn't (and will never) work in -stable.

Noted by:	NAGAO -abtk- Tadaaki <[email protected]>
1998-02-14 16:19:22 +00:00
Steve Price 0e2e931499 MFC: correctly document the h and m modifiers of the time format. 1998-02-14 16:14:24 +00:00
Nate Williams 7dc2f8b338 - MFC:
revision 1.85
  date: 1998/02/03 00:50:36;  author: dyson;  state: Exp;  lines: +65 -36
  This fix should help the panic problems in -current.  There
  were some errors in "interval" management.  Due to the
  clustering mechanism, the code is necessarily complex and
  error prone.

Reviewed by:	a number of folks on -stable

[
The same code exists in both branches, and the patch seems to give no
ill effects to testers.
]
1998-02-14 16:13:27 +00:00
Steve Price 93e116a75d MFC: Don't truncate long lines to be quoted.
PR:		5679
1998-02-14 15:42:58 +00:00
Jordan K. Hubbard 48ffbb042b MFC: fixes to xenix ftime & extra sanity.
PR:	5734
1998-02-14 14:31:26 +00:00
KATO Takenori a7ace46a44 MFC: revision 1.43 (use rdmsr instead of wrmsr). 1998-02-14 13:44:42 +00:00
Peter Wemm af0ef8eea2 YAMFC: rev 1.9; adjust idle process sorting 1998-02-14 13:37:25 +00:00
Paul Traina a7e03f4755 Merge from -current: Block device of wfd changed from 24 to 1 1998-02-13 22:50:12 +00:00
Andrey A. Chernov 74e75f855c MFC: fix rare bug with empty DES passwords 1998-02-13 21:05:48 +00:00
Julian Elischer 0ed832a5a5 Add RFC 1702 (GRE)
MCF: matches version 1.10
1998-02-13 20:25:42 +00:00
Jordan K. Hubbard ef5d0da3b9 Add a no-cost optimization for DOC bootstrap. Get from local release
building machine if available.
1998-02-13 20:18:54 +00:00
Kazutaka YOKOTA 6e7e1e81eb MFC: list Brazilian keymap with accent keys in the keymap menu. 1998-02-13 09:00:03 +00:00
Jordan K. Hubbard c821eb485c Change a bogus failure return to the more proper success return. 1998-02-13 07:58:45 +00:00
Kazutaka YOKOTA 2ba3a677f9 MFC: Brazilian keymap with accent keys. 1998-02-13 03:48:16 +00:00
Bill Paul 3b78646819 Merge fix for PR #2206 from -current.
PR: 2206
1998-02-13 03:39:46 +00:00
Alexander Langer c080068bf4 MFC: correct handling of fragmented packets. 1998-02-13 01:58:13 +00:00
Julian Elischer c6b074e9c0 Submitted by: Jeremy Allison(Samba maintainer) and Terry Lambert
Obtained from:	Whistle Communications FreeBSD tree.
YAMFC:

Pthreads now works well enough to run the LDAP and ACAPD(with the gcc 2.8 fix)
sample implementations. (even with C++)
1998-02-13 01:35:57 +00:00
Bill Paul 6af9aa044c Merge in fix for PR #5610 from -current.
PR:		5610
1998-02-13 00:22:11 +00:00
Nate Williams 9b0287d02f - Removed the 'poll' code from the -stable files and replaced it with the
'select' code from Luigi's original release.

Reviewed by:		luigi
Pointy Hat donated to:	jkh
1998-02-12 22:48:52 +00:00
cvs2svn 645d8a83e6 This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-02-12 17:06:48 +00:00
Bill Paul f07ebb62ea Merge in fix for DB handle caching bug from -current. Also remove
bogus global 'int debug;' from yp_main.c
1998-02-12 16:55:28 +00:00
Tim Vanderhoek b34ff0f84d Sync comment with reality and current. 1998-02-12 04:30:58 +00:00
KATO Takenori cfa6e9077d MFC: cosmetic change (revisions 1.51 and 1.51).
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-12 03:08:11 +00:00
KATO Takenori 3ad0fccd05 Sync with sys/i386/i386/userconfig.c revision 1.63.2.23.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-12 03:06:22 +00:00
KATO Takenori ec225d7313 Sync with sys/i386/conf/files.i386 revision 1.141.2.18.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-12 03:05:34 +00:00
Nate Williams c19360290d - MFC: Minor number bump due to addition of stringlist functions (which
were brought into -stable as well.)
1998-02-12 01:45:58 +00:00
John Polstra b108a0bd5d Merge from main branch 1.18 -> 1.19: describe "." command search
rules.
1998-02-12 01:25:29 +00:00
John Polstra fa8055d766 MFC: Boggle is gone. 1998-02-11 20:05:05 +00:00
John Polstra 5c0b3a8493 MFC: Nuke boggle. 1998-02-11 20:01:10 +00:00
Guido van Rooij a1f7e01e87 MFC (rev 1.67 and 1.69): Do not sourceroute ever when dosourceroute
is set to 0.
1998-02-11 18:35:46 +00:00
Jordan K. Hubbard f87930345e MFC: create devices only as needed. Gosh I sure wish those "extra" 56
bytes in the boot blocks could be used to TEACH THE BOOT BLOCKS ABOUT SLICES
SO WE COULD GET RID OF THE %$#@*!! ROOT COMPATABILITY HACK.  While I'm wishing,
I'd like world peace too.
1998-02-11 15:43:19 +00:00
Jordan K. Hubbard 9b3cc4d8a9 Add comments for Luigi's audio driver now that it's been tagged into
2.2 (it works fine with the existing audio driver).
1998-02-11 15:37:32 +00:00
Satoshi Asami 08ca3972f3 Merge dd.h rev 1.8 and misc.c rev 1.11 from -current. 1998-02-11 02:24:41 +00:00
Brian Somers 05c94159a6 MFC: Move handle_signals() to before the FD_SETs. handle_signals()
may result in a our modem closing after it's made its way into
     the fd_set, resulting in a program exit (with select(): bad file
     descriptor) rather than a dropped link.
1998-02-10 22:35:01 +00:00
Andrey A. Chernov 8841389ba9 MFC: fix n == 0 case, fix argument check 1998-02-10 20:44:40 +00:00
Andrey A. Chernov 029cb871c6 MFC: add INT_MAX length overflow check 1998-02-10 20:40:20 +00:00
Jordan K. Hubbard 159c47d6bb Totally change the way that devices are made in the MFS and subsequently
probed in sysinstall.  Rather than make template devices and use up lots
of inodes, also restricting the number of devices that can be dealt with,
mknod all necessary devices as necessary using built-in information.
This removes a number of constraints on the number and type of devices
that sysinstall can see.
1998-02-10 18:31:27 +00:00
Jordan K. Hubbard 9b14c24177 MFC: verbose major/minor check. 1998-02-10 17:19:52 +00:00
Jordan K. Hubbard be225210cf Add entries for Luigi's sound driver.
Submitted by:	luigi
1998-02-10 16:03:11 +00:00
Jordan K. Hubbard 353d376929 Merge of old and new soundcard files to support both Luigi's sound
driver and older VOXWARE driver.

Submitted by:	luigi
1998-02-10 16:02:11 +00:00
Jordan K. Hubbard a060cf8674 MFC: PR#5691 1998-02-10 07:02:11 +00:00
Adam David af20c42255 get default firewall type from rc.conf 1998-02-10 01:45:57 +00:00
Mike Smith 285aec4be4 MFC, Eiger modem entry. 1998-02-10 01:02:06 +00:00
Mike Smith f8c1ca120d Merge from -current: document extended -c behaviour. 1998-02-10 00:18:25 +00:00
Mike Smith 98e3c339d5 Merge from -current: USERCONFIG_BOOT escape mechanism. 1998-02-10 00:11:20 +00:00
KATO Takenori 1822af0b19 MFC: revision 1.403. 1998-02-09 15:06:51 +00:00
Daniel O'Callaghan c66dddb0b1 PR: 1708, 5448
Reviewed by:	Alex Nash, Steve Price
More sensible wtmp rollover and login accounting.
1998-02-09 11:44:22 +00:00
Jordan K. Hubbard c499c3953a Don't need this for anything that I can see. 1998-02-09 10:37:24 +00:00
Jordan K. Hubbard 3d8719929d MFC: dead code elimination. 1998-02-09 10:36:48 +00:00
Steve Price a76093b068 MFC: update to reflect current Jewish calendar.
PR:		5683
Submitted by:	[email protected]
1998-02-08 23:06:34 +00:00
Jordan K. Hubbard ecd4e6393a Better description for moused changes.
Submitted by: (I think) yokota
1998-02-08 12:55:54 +00:00
Steve Price fbdfe6cfbf MFC: Don't pint garbage when user enters EOF at name prompt. 1998-02-07 22:09:29 +00:00
Tim Vanderhoek afaba402ee CFC -- Doc. make readmes' and delta make package'. 1998-02-07 21:08:44 +00:00
Nate Williams d25af4c96e - Added Id. 1998-02-07 20:42:29 +00:00
Nate Williams 027e33e1f7 MFC:
- Bring in PCMCIA emulation mode for the PD6832 PCI/CardBus controller.

Submitted by:	Ted Faber <[email protected]>
1998-02-07 20:38:58 +00:00
Nate Williams 6edbf2a534 MFC: V1.24
Work around race condition where the kernel's 'wakeup' call to pccardd
gets lost when the machine is suspended, and when the machine is awoken
'wakeup' call over-writes the previous state before it has been
processed.

Submitted by:	guido
1998-02-07 20:33:06 +00:00
Andrey A. Chernov 045ade9166 MFC: banner supressed & Russian filters 1998-02-07 19:17:32 +00:00
Andrey A. Chernov db905d03f0 MFC: add directory for Russian filters 1998-02-07 19:04:36 +00:00
Andrey A. Chernov e7acc121a2 MFC: Add Russian filters 1998-02-07 18:59:56 +00:00
Andrey A. Chernov b56b6f1294 Add Russian filters 1998-02-07 18:59:41 +00:00
KATO Takenori 4474bc8244 MFC: revision 1.20 (number of entries in gid-mapfile). 1998-02-07 01:38:04 +00:00
Alexander Langer cda3c22ce5 MFC (rev 1.75): suppress display of TCP/UDP port numbers for fragmented
packets when IP offset != 0.
1998-02-07 00:28:25 +00:00
Julian Elischer 2fc56184a7 MFC:
change the return values to those specified in posix and presently
imlemented that way in -current.
1998-02-06 23:43:16 +00:00
Julian Elischer 5a3e30a66b YAMFC: bring in the fix for the handling of NODELAY sockets correctly. 1998-02-06 23:33:46 +00:00
KATO Takenori 3d22e6a7cf MFC: revision 1.19 (declare the variable `i'). 1998-02-06 14:34:03 +00:00
Adam David c62a6476fb -DNOTOOLS to not rebuild any tools during buildworld 1998-02-06 09:52:34 +00:00
Jordan K. Hubbard 26b656890c Properly reset CHUNK_IS_ROOT flag for non-root partitions.
Submitted-By: "Brian Dean" <[email protected]>
1998-02-06 04:11:24 +00:00
Chris Timmons 815cd824bf Finish the upgrade and hope for no pointy hats on the eve of 2.2.6-beta! 1998-02-05 04:53:30 +00:00
Chris Timmons 33d0449485 A new addition in v2 1998-02-05 04:51:10 +00:00
Chris Timmons 94df5a8d5b Contribification of global along with upgrade to v2.24 from -current 1998-02-05 04:48:07 +00:00
Chris Timmons 7ce8a424e8 global v2.24 from -current 1998-02-05 04:42:26 +00:00
David Greenman b76ad9ff28 Brought in change from rev 1.31: restrict idprio to superuser.
PR: 5639
1998-02-04 18:47:42 +00:00
Bill Paul f741481677 Sync Makefile.yp with -current. Picks up fixes for PR #5571 and
a few other things.

PR:	5571
1998-02-04 16:22:15 +00:00
Jordan K. Hubbard e78cbdfa07 Update to version 1.66 1998-02-04 15:01:32 +00:00
Jordan K. Hubbard 9a2bf9599e Update to version 1.66 - support autoselection better. 1998-02-04 15:00:15 +00:00
KATO Takenori 7925c9901c MFC: revision 1.42 (cpuid probelm of M2 CPU). 1998-02-04 14:35:55 +00:00
cvs2svn 085f0c8a53 This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-02-04 13:03:58 +00:00
Satoshi Asami e658b9c185 Merge 1.270. 1998-02-04 10:37:30 +00:00
KATO Takenori ca4b414c7b Sync with sys/i386/isa/syscons.c revision 1.182.2.30.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-04 10:32:28 +00:00
KATO Takenori 24b298fe9a Define NO_ACCENTCHARS when PC98 is defined.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-04 10:31:59 +00:00
KATO Takenori 06b816a9d8 Sync with sys/i386/boot/biosboot/boot.c revision 1.60.2.2.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-04 10:24:23 +00:00
KATO Takenori 8683d822f8 Sync with sys/i386/boot/rawboot/Makefile revision 1.3.2.3.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-04 10:23:26 +00:00
Daniel O'Callaghan df05d108e3 PR: 4385, 5283
Reviewed by:	Alex Nash
Submitted by:	Peter Hawkins and Robert Eckardt
Merge from HEAD - fix --norecurse, document time formats, as CEST
1998-02-04 06:54:00 +00:00
Paul Traina 93ba63597f Fix the SB16's IRQ too, Jordan had just fixed the 8bit SB 1998-02-04 06:17:18 +00:00
Brian Somers 352827a8ea Merge from MP branch:
Correct magic number format string
1998-02-04 01:06:23 +00:00
Paul Traina ca13ea54b3 Change SB16's MIDI address to 0x330 like everything else (and match LINT).
PR:		5542
1998-02-03 20:23:20 +00:00
Philippe Charnier 443b7ee41b MFC: Typo and incorrect reference. 1998-02-03 07:37:45 +00:00
Daniel O'Callaghan f913a59011 Back out last commit. It needs more testing in -current. 1998-02-02 22:04:26 +00:00
John Hay cc64368d73 Make "make release" work again... I hope. 1998-02-02 17:37:05 +00:00
Wolfram Schneider 27516d4c8b Merge rev 1.23 1998-02-02 15:48:15 +00:00
Daniel O'Callaghan 84cb365772 Reviewed by: Archie Cobbs
Submitted by:	Alex Le Heux <[email protected]>
Add '-n' option to suppress command action.
1998-02-02 11:48:05 +00:00
KATO Takenori 9d9e357c5e MFC (revision 1.51).
Submitted by:	Takahashi Yoshihiro <[email protected]>
1998-02-02 08:00:16 +00:00
Chris Timmons eaf1b7be8f PR: bin/5529
Submitted by: Shigio Yamaguchi <[email protected]>

MFC: Do not misinterpret file names with a digit in the 2nd column as
     a tab stop specification.
1998-02-02 07:18:41 +00:00
Brian Somers bb20c765b8 ${.OBJDIR}\osreldate.h -> ${.OBJDIR}/osreldate.h
This is not MSDOS :-)
1998-02-01 16:21:52 +00:00
Brian Somers 5b5cd0d201 ppp.secrect.sample -> ppp.secret.sample 1998-02-01 13:28:38 +00:00
KATO Takenori 129b306d00 Sync with sys/i386/conf/GENERIC revision 1.77.2.16.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-01 11:55:32 +00:00
KATO Takenori 6595512435 Sync with sys/i386/i386/userconfig.s revision 1.63.2.22.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-02-01 11:54:24 +00:00
KATO Takenori 23ce36f885 Sync with following changes:
Revision  Changes    Path
      1.26.2.16 +1 -4      src/sys/i386/conf/options.i386
      1.28.2.2  +204 -19   src/sys/i386/isa/mse.c
      1.182.2.29 +484 -48   src/sys/i386/isa/syscons.c

Reviewed by:	NOKUBI Hirotaka <[email protected]>
Submitted by:	Michio "Karl" Jinbo <[email protected]> and
             	Takahashi Yoshihiro <[email protected]>
1998-02-01 11:52:37 +00:00
Steve Price 453eff22bc MFC: all single character options are extensions to Posix.
PR:		4701
1998-02-01 07:36:15 +00:00
Steve Price 7bdfdec9c0 MFC: minor formatting nits
PR:		5373
1998-02-01 07:30:45 +00:00
Steve Price 4b30cf18ce MFC: minor formatting bugs.
PR:		5216
1998-02-01 07:25:19 +00:00
Steve Price a09226bba3 MFC: install osreldate.h from ${.OBJDIR}. 1998-02-01 07:18:38 +00:00
Steve Price b2e059338f MFC: typo fixes
PR:		5561
1998-02-01 07:14:00 +00:00
Steve Price cf3e1daa3d MFC: use -literal for a more pleasing list.
PR:		5547
1998-02-01 07:12:00 +00:00
Steve Price d17d950b3b MFC: spelling correction
PR:		5614
1998-02-01 07:05:02 +00:00
Paul Traina 01c7d0f68b Remove INTCVSROOT, it's obsolete. 1998-02-01 06:36:24 +00:00
Steve Price cb4d28ad2a MFC: ulimit doesn't have its own manpage.
PR:		5582
Submitted by:	Craig Leres <[email protected]>
1998-02-01 06:21:47 +00:00
Steve Price d3d40d6aae MFC: Don't try to install nonexistant etc/ppp/*.sample files.
PR:		5612
1998-02-01 06:10:09 +00:00
Steve Price c414bef8bb MFC: add msmith's prototypes for isa_dmastatus and isa_dmastop.
PR:		5613
1998-02-01 06:05:20 +00:00
Steve Price 7f7d250b5f MFC: type: PAT -> FAT
PR:		5593
1998-02-01 06:01:00 +00:00
Kazutaka YOKOTA a1e60e042a MFC: fix RAWBOOT; don't read boot.config' and boot.help'
if RAWBOOT is defined.
1998-02-01 05:28:36 +00:00
Jean-Marc Zucconi d7134afc47 MFC: optional arguments to the status command. 1998-02-01 04:55:49 +00:00
Garrett Wollman 141f4393fe MFC: allow an alternate named to be specified.
Revs: rc.conf 1.37, rc.network 1.15
1998-02-01 00:24:02 +00:00
David E. O'Brien 7800e53de7 MFC rev 1.269 1998-01-31 21:00:38 +00:00
Joerg Wunsch 3c353147a1 MFC: rev 1.14, switch UIDs so quotas will be honored. 1998-01-31 17:06:48 +00:00
Joerg Wunsch 1b909317e8 MFC: proc.c rev 1.7, err.c rev 1.6, csh.c rev 1.11.
Save errno (proc.c); security paranoia.
1998-01-31 17:06:15 +00:00
KATO Takenori 502d1984bf MFC (deleted unused file). 1998-01-31 11:41:17 +00:00
KATO Takenori bc0ea602a4 Sync with following changes:
Revision  Changes    Path
    1.77.2.15 +3 -2      src/sys/i386/conf/GENERIC
    1.9.4.1   +2 -1      src/sys/i386/conf/devices.i386
    1.141.2.17 +2 -1      src/sys/i386/conf/files.i386
    1.9.2.5   +3 -1      src/sys/i386/conf/majors.i386
    1.119.2.10 +2 -2      src/sys/i386/isa/wd.c

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-31 11:38:43 +00:00
KATO Takenori 1609559230 Sync with sys/i386/boot/netboot/ns8390.c revision 1.7.2.4.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-31 11:36:28 +00:00
KATO Takenori 870010a55d Sync with sys/i386/boot/netboot/main.c and netboot.h revisions
1.18.2.3 and 1.9.2.3, respectively.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-31 11:35:37 +00:00
KATO Takenori 324c6add0e MFC (delted unused files). 1998-01-31 11:33:35 +00:00
Tim Vanderhoek f173e370fa CFC (Copy From Current) 1998-01-31 02:58:18 +00:00
Kazutaka YOKOTA e9e5d16b88 MFC: Synchronize with ../biosboot/Makefile.
- Remove reference to the obsolete options: BOOT_PROBE_KEYBOARD,
  BOOT_PROBE_KEYBOARD_LOCK and BOOT_FORCE_COMCONSOLE.
- Add reference to BOOT_COMCONSOLE_SPEED.

No functional change is introduced in this merge.
1998-01-31 01:30:05 +00:00
Brian Somers 9234d22cc3 Mention things that'll break the spam filters.
Quote all comments to protect them from m4.
Change FreeBSD.ORG -> $m.
Make the spamsites.db lookup recursive.
Add `xlat' to xlat example.
1998-01-30 20:58:42 +00:00
Brian Somers 88aa7456e2 MFC: Use the new subclean target before building the crunch
stuff and define RELEASE_CRUNCH.
1998-01-30 20:54:27 +00:00
Brian Somers 1d935d7bc3 MFC: Support realclean and subclean targets
Use `/bin/pwd` instead of `pwd`.
1998-01-30 20:53:32 +00:00
John Hay bbe3b23726 MFC: Don't clobber pp_flags when PP_KEEPALIVE must be set. 1998-01-30 19:54:46 +00:00
Brian Somers 33a5a01f1b MFC: Bring in examples to compliment the current sources.
Remembered by:	Leif Neland <[email protected]>
1998-01-30 19:54:38 +00:00
Bill Fenner 26ccfeff7a Merge rev 1.68 from -current (more complete fix for "land" attack)
PR:		kern/5103
1998-01-30 19:13:55 +00:00
KATO Takenori 8c9d8ce4b8 Sync with sys/i386/conf/GENERIC.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-30 15:57:37 +00:00
KATO Takenori d8c231517a Sync with sys/i386/boot/biosboot/README.serail revision up to 1.5.2.2.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-30 15:56:07 +00:00
Kazutaka YOKOTA 0568ea0d2a YAMFC: update the keymap menu and built-in keymaps. 1998-01-30 11:02:33 +00:00
Kazutaka YOKOTA 33a5f2e68e YAMFC:
- Add new keymaps: Icelandic, Latin American, Polish and Slovenian.
- Define `debug' (CTL-ALT-ESC), `susp' (CTL-ALT-SPACE), NUL (CTL-SPACE)
  in all keymaps.
- Fix Japanese keymaps.
- Add keymaps with accent key definitions for French, Icelandic and
  Spanish keymaps (fr.iso.acc.kbd, icelandic.iso.acc.kbd, spanish.iso.acc.kbd)
- Update INDEX.keymaps for kbdmap(1).
- Update Makefile.
1998-01-30 10:57:30 +00:00
Kazutaka YOKOTA 8bd133c816 YAMFC: merge accent (dead) key support from -current: kbdcontrol.c (1.12,
1.23), lex.h (1.5), lex.l (1.6).
1998-01-30 10:49:07 +00:00
Kazutaka YOKOTA 09afa73f83 YAMFC: merge accent (dead) key support from -current: syscons.c (1.243, 1.244)
kbdtables.h (1.37, 1.38, 1.39) console.h (1.34)
1998-01-30 10:47:24 +00:00
Jordan K. Hubbard bfebe9e467 Add tx.4 to build list - whoops! 1998-01-30 00:42:50 +00:00
Paul Traina 268cf3d588 Merge with -current (ZIP changes) 1998-01-29 20:42:12 +00:00
Paul Traina dd38ad52d1 YAMFC: Remove obsolete block mapping code. 1998-01-29 19:05:55 +00:00
Andrey A. Chernov a892a02aed MFC: localization 1998-01-29 12:36:07 +00:00
David E. O'Brien dc84c70cb8 Remove useless test that I added. 1998-01-29 11:17:44 +00:00
David E. O'Brien befa68afd3 Change my $ldconfig_extra_libdirs to $ldconfig_paths to match the name
used in -CURRENT.  Note the semantics are still 2.2.x's in that /usr/compat,
/usr/local, and /usr/X11R6 are still in rc and not rc.conf.  (thus making
$ldconfig_paths entirely optional.

Bring in $clear_tmp_enable from -STABLE while I'm here.
1998-01-29 11:01:29 +00:00
David E. O'Brien de1d9be7d0 Adds new configuration variable "ldconfig_extra_libdirs", whose contents
is appended to _LDC.  Useful for Motif or a truly local dir tree.

(Tested on my 2.2.5-S box for a month.)
1998-01-29 10:50:22 +00:00
Jordan K. Hubbard a5e8bedc5a MFC: update to stable-165 version. 1998-01-29 10:28:03 +00:00
Jordan K. Hubbard 4707ded303 MFC: tx.4 man page. 1998-01-29 10:27:00 +00:00
Mike Smith b13951d29e Merge timeradd()/timersub() from current. This fixes the build issue with
ftp(1) and improves NetBSD/OpenBSD source compatability.
1998-01-29 03:14:20 +00:00
Brian Somers 5c6c3376c6 MFC: Talk about ongoing development. 1998-01-29 00:45:08 +00:00
Brian Somers 6c830cc7f9 Don't moan about not creating tunX.pid and ttyX.if if RELEASE_CRUNCH
is defined.
1998-01-29 00:44:15 +00:00
cvs2svn 05276d135a This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-01-29 00:42:53 +00:00
Brian Somers 140a9c19a0 MFC: Make it clear that aliasing is done on the public interface, not
the private one.
1998-01-29 00:41:21 +00:00
Jordan K. Hubbard 843724d3d0 MFC: better range checking to prevent attack. 1998-01-28 23:32:26 +00:00
John Polstra dec4b7aef6 Merge from main branch 1.11 -> 1.12: bug fix for "#pragma weak foo=bar". 1998-01-28 16:34:14 +00:00
Jordan K. Hubbard c8f119883f Since stringlist.h is now in this branch, it might be a good idea to mention
it in the Makefile. :-)
1998-01-28 13:35:09 +00:00
Jordan K. Hubbard dd29bd4fb0 MFC: Just set PATH once. 1998-01-28 04:05:26 +00:00
Mike Smith 2fa6f14da1 Merge ftp(1) updates from -current (command history, command/filename
completion, commandline fetching, etc.)
1998-01-28 02:27:59 +00:00
Mike Smith 0064e6b3b6 Add the stringlist functions. (the files were tagged back onto the 2.2
branch from -current)
Required for the new ftp(1)
1998-01-28 02:24:28 +00:00
Mike Smith cb916c1f38 MFC: Libedit updates from NetBSD, local fixes, etc.
Required by new ftp(1).
1998-01-28 02:13:13 +00:00
David E. O'Brien 65d6800f17 MFC, Y2k fixes. 1998-01-28 02:01:29 +00:00
David E. O'Brien 33a5d9d948 MFC. 1998-01-28 01:11:03 +00:00
Tor Egge 896f45b4ed MFC: Choose filesync write when writing a cluster.
PR:		3438
Reviewed by:	Ian Dowse <[email protected]>
1998-01-28 00:26:54 +00:00
Brian Somers b7b37d2099 MFC: Cosmetic copyright changes. 1998-01-27 23:16:24 +00:00
Jordan K. Hubbard 7da863dc25 MFC: set path explicitly. 1998-01-27 23:09:44 +00:00
Garrett Wollman 32e09a111e Merge Zaire/Congo changes from -current (needed for new timezone database). 1998-01-27 16:51:07 +00:00
Garrett Wollman 578a086c41 Merge 1997i release of timezone data from -current.
Requested by: markm
1998-01-27 16:49:28 +00:00
John Polstra 55e4da0b7d Merge from main branch: add ELF header files and fix a misspelled
identifier in brandelf.c.

Files merged from main branch:
    src/usr.bin/brandelf/brandelf.c	1.5  -> 1.6
    src/include/Makefile		1.55 -> 1.56
    src/sys/sys/imgact_elf.h		1.4  -> 1.5

Files added from main branch:
    src/include/elf.h			1.1
    src/sys/i386/include/elf.h		1.2
    src/sys/sys/elf32.h			1.2
1998-01-27 16:24:00 +00:00
Daniel O'Callaghan 4cc7a0f0c3 PR: 5573
Submitted by:	<[email protected]>
Add strncasecmp, strncmp to NAME section.
1998-01-27 07:07:07 +00:00
Jordan K. Hubbard 9bf57627ee MFC: bogus work-around. 1998-01-27 01:07:06 +00:00
Brian Somers 8f13751bcc Remove __libalias_version. ppp no longer needs it. 1998-01-26 21:58:00 +00:00
Brian Somers 7026d8da48 MFC: Bring the -current ppp into RELENG_2_2 1998-01-26 20:05:34 +00:00
Brian Somers 5f5939e751 MFC: Bring the -current pppctl into RELENG_2_2 1998-01-26 20:00:50 +00:00
Brian Somers 79dd6b9dc0 MFC: Move softc stuff into if_tunvar.h 1998-01-26 19:58:22 +00:00
cvs2svn ce41fbb4b9 This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-01-26 06:26:42 +00:00
Alexander Langer 1830995bf9 MFC (rev 1.9): year 2000 fix. 1998-01-26 01:01:39 +00:00
Adam David 1248da34d4 -I/sys --> -I${.CURDIR}/../../sys
so this compiles under other versions such as 3.0.
Suggested by: bde
1998-01-25 18:23:42 +00:00
Kazutaka YOKOTA 420fee292a MFC: fix typo.
PR: docs/5562
1998-01-25 15:49:50 +00:00
KATO Takenori bdef1d1965 MFC: fix general protection fault by wrmsr. 1998-01-25 15:40:40 +00:00
KATO Takenori da9be79356 Sync with sys/i386/i386/userconfig.c revision 1.63.2.21.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-25 01:45:47 +00:00
KATO Takenori 493d6a0dec Sync with sys/i386/i386/machdep.c and trac.c revisions 1.209.2.17 and
1.83.2.5, respectively.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-25 01:44:42 +00:00
KATO Takenori df09afe043 Sync with sys/i386/isa/isa.c revision 1.74.2.5.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-25 01:42:53 +00:00
Wolfgang Helbig 15e3a583fd MFC: r1.4: Don't swap carriage return and new line in quoted mode. 1998-01-24 22:37:54 +00:00
Wolfgang Helbig 462fac9c68 MFC: Add -u to force unbuffered output. 1998-01-24 14:53:12 +00:00
Wolfgang Helbig 6486e9db80 Merge revision 1.3 from current.
PR:		5395
1998-01-24 14:30:01 +00:00
Wolfgang Helbig 143a8a7fe1 MFC: Ensure stdout is line buffered. "pat"->"re" in ed.1 . 1998-01-24 14:07:29 +00:00
Wolfgang Helbig c8a978d1f3 MFC: Don't ignore empty $PATH components. 1998-01-24 13:40:18 +00:00
Wolfgang Helbig 5bdb3c8b56 MFC: Add LC_TIME files. 1998-01-24 13:11:42 +00:00
Kazutaka YOKOTA c5ed7cd9fa YAMFC: add brief note on error message from the driver (v1.11). 1998-01-24 12:14:54 +00:00
Kazutaka YOKOTA 712d120ca9 YAMFC: small adjustment in sync check code (v1.50). 1998-01-24 12:13:13 +00:00
Jordan K. Hubbard 8512dd1f60 MFC: clean up ports 1998-01-24 07:31:20 +00:00
Jordan K. Hubbard 000de18dad DISTRIBUTION=bin 1998-01-23 20:36:09 +00:00
Jordan K. Hubbard 03db2997c3 MFC: Bring back docs, do better dist subselection. 1998-01-23 20:16:45 +00:00
Jordan K. Hubbard 0a88588e3e MFC: handbook and FAQ are back. 1998-01-23 20:12:37 +00:00
Jordan K. Hubbard b09d5dbb8f MFC: various descriptions of new things. 1998-01-23 07:49:23 +00:00
Jordan K. Hubbard 63308da72a MFC: reorder all target. 1998-01-22 21:30:01 +00:00
Jordan K. Hubbard 5e8f9ce585 Recognise ATAPI floppies. 1998-01-22 21:12:58 +00:00
Jordan K. Hubbard 796bd8bf6e Start catching up on what we've changed lately. 1998-01-22 18:01:48 +00:00
Thomas Gellekum e4a091227f MFC: Fix ``Integer overflow in expression''. 1998-01-22 08:05:55 +00:00
Andrey A. Chernov 6168b728f5 MFC: PATCH_INDEX_FIRST environment variable 1998-01-22 07:45:54 +00:00
KATO Takenori 45bf2f08fa MFC: revision 1.48 (added dealy). 1998-01-22 03:53:54 +00:00
Jordan K. Hubbard 8358267a40 MFC: Add entry for SMC 9432TX cards (tx driver). 1998-01-21 19:28:11 +00:00
Andrey A. Chernov d3c17c74e2 MFC: back out my -L change in favour of patch -I 1998-01-21 19:05:09 +00:00
Andrey A. Chernov 12d367dd29 MFC: -I, --index-first option to emulate FreeBSD hack 1998-01-21 19:01:54 +00:00
Jordan K. Hubbard 174689d853 Add entries for tx driver. 1998-01-21 18:41:45 +00:00
Jordan K. Hubbard a6c0065435 Add entry for tx driver. 1998-01-21 18:06:27 +00:00
Andrey A. Chernov d738bdb73a MFC: SCSI-SCSI RAID from Infotrand 1998-01-21 08:04:47 +00:00
Jordan K. Hubbard 963c4e4a4f MFC: Now that the drugs have worn off, revert this change. 1998-01-21 06:08:58 +00:00
Jordan K. Hubbard 5b259a5e08 Add pnpinfo to Makefile
PR:		5533
1998-01-21 06:03:59 +00:00
Warner Losh 3c56d9fa6d MFC: better quoting 1998-01-21 00:15:10 +00:00
Tor Egge b49116e407 MFC: Mark page as not free while zeroing it. 1998-01-20 12:47:33 +00:00
Kazutaka YOKOTA bbf0f0c73f - Update man pages for new mouse support merged from -current. 1998-01-20 04:01:31 +00:00
Kazutaka YOKOTA d693f65c2f - Merge new mouse support from -current. 1998-01-20 03:52:44 +00:00
Kazutaka YOKOTA 67a5262989 - Merge new mouse support from -current.
- Add compatibility support to the merged code in syscons and psm
  so that existing programs which use old console/mouse ioctls will
  run unmodified.
1998-01-20 03:51:30 +00:00
Jonathan M. Bresler d024026477 update hub's master configuraton file
limit sendmail to 500 messages per run
keeps the process from growing too large
sort the queue by host, not numeric priority
connecting to a host is too expensive,
once we got the connection, ram all the mail down his throat ;>
1998-01-20 01:48:12 +00:00
Tor Egge 3694001918 MFC: Don't drop legal bootp reply packets.
PR:		5512
1998-01-18 20:17:49 +00:00
Tor Egge 05108e5cb6 MFC: Remove unused init parameters, use ETHER_ADDR_LEN, not ETHER_ADDR_SIZE. 1998-01-18 20:15:25 +00:00
Tor Egge 561a7318e2 MFC: Increase the minimum size limit of bootp reply packet. 1998-01-18 20:10:22 +00:00
KATO Takenori 75609b5b87 Sync with sys/i386/i386/machdep.c and trap.c revisions 1.209.2.16 and
1.83.2.4, respectively.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-18 15:11:53 +00:00
KATO Takenori 215c2c6dda Sync with sys/i386/i386/machdep.c revision 1.209.2.15.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-17 15:59:42 +00:00
Jordan K. Hubbard 1f96f1b269 Fix bug I recently introduced with running install scripts. Whoops! :)
Submitted by: Kazuhiko Kiriyama(System administrator) <[email protected]>
1998-01-17 12:24:48 +00:00
Paul Traina cbd9fd89ef Install wfd.4 (which was also tagged into RELENG_2_2) 1998-01-17 05:16:59 +00:00
Paul Traina 829e66ff5f WFD v1.0 for RELENG_2_2 branch 1998-01-16 22:42:17 +00:00
Paul Traina 45517834bd Bring in v1.0 of Junichi's ATAPI floppy driver (LS-120 floppy support).
NOTE: The major device numbers have been changed to avoid conflicts with
      devices present in 2.2 and later kernel releases.
Submitted by:	[email protected]
1998-01-16 22:28:44 +00:00
cvs2svn c3cf4947ba This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-01-16 22:13:08 +00:00
Andrey A. Chernov 9873a7e9bc MFC: add -L option to diff 1998-01-16 06:05:08 +00:00
Jonathan M. Bresler 17e9468629 update hub.mc to match what we are currently using:
both /etc/aliases and /etc/majordomo.aliases
sendmail.cw is *not* optional
command and connection timeouts
common hoststat directory for all queues
add fakenames database
clean up spam filter rules
limit the number of message processed each queue run
dont need to check Vixie's RBL in both check_relay and check_mail

Submitted by:	jmb
1998-01-15 17:35:59 +00:00
KATO Takenori 82b04f8442 Sync with sys/i386/i386/machdep.c and trap.c revisions 1.209.2.14 and
1.83.2.3, respectively.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-15 11:09:40 +00:00
Wolfgang Helbig a89b5cb8ab MFC: r1.5 -> r1.6 (Handle -j correctly, synch usage() with man page)
PR:	bin/5488
1998-01-15 10:28:43 +00:00
KATO Takenori 5ca8318b57 MFC: revision 1.30 (I/O port address of ed8). 1998-01-15 08:17:56 +00:00
KATO Takenori 639b6fc0a5 MFC: revision 1.29 1998-01-15 08:15:01 +00:00
Jordan K. Hubbard 536ad3ea79 MFC: Add ppp back to GENERIC. 1998-01-14 15:25:12 +00:00
Thomas Gellekum 88c370dffa Remove more ``...using script...'' lines. 1998-01-14 14:11:16 +00:00
KATO Takenori 897ba78098 MFC: revision 1.21 (fix typo). 1998-01-14 08:10:49 +00:00
Alexander Langer 7ec8fc48b0 Removed extraneous script output added by previous commit. 1998-01-14 03:01:10 +00:00
KATO Takenori c749bd6e74 Sync with sys/i386/isa/syscons. revision 1.182.2.28.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-12 15:44:06 +00:00
KATO Takenori 894ec265c9 MFC (initialize Crtat and Atrat in scvidprobe).
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-12 15:36:28 +00:00
David E. O'Brien cb6efea151 MFC. 1998-01-12 09:58:46 +00:00
David E. O'Brien c46c60d264 Turn on minigzip. 1998-01-12 09:58:27 +00:00
David E. O'Brien 42688aef00 Used Peters suggestion of "cvs update -A -p foo > foo".
Problem is my cvs wrapper isn't quiet.  Thus the spam.
1998-01-12 06:21:25 +00:00
David E. O'Brien 063a5bd12c Adding libcalendar. 1998-01-12 05:35:28 +00:00
David E. O'Brien 9cd69ea883 MFC. 1998-01-12 05:11:22 +00:00
David E. O'Brien 911bc45f47 Add c89 and ncal. 1998-01-12 05:08:47 +00:00
cvs2svn 1778c9bd2c This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1998-01-12 05:02:58 +00:00
Steve Price 358eeff570 MFC: reword synopsis line. 1998-01-12 00:49:26 +00:00
Andrey A. Chernov 9981b91cc4 Back out rev1.5 change, Index: precedence restored to historycal behaviour 1998-01-11 20:45:30 +00:00
Alexander Langer 53616a70c3 Update prototype for pthread_detach.
Pointed out by:	David E. Cross <[email protected]>
1998-01-11 15:54:24 +00:00
KATO Takenori 1557704800 Sync with sys/i386/conf/options.i386 revision 1.26.2.15. 1998-01-11 12:49:20 +00:00
KATO Takenori b161c7ad27 Sync with sys/i386/conf/files.i386 revision 1.141.2.16. 1998-01-11 12:45:37 +00:00
Bruce Evans 338b26306d YAMFC (refer to the boot block options that are actually supported).
Submitted by:	yokota
1998-01-11 02:45:16 +00:00
Bruce Evans 3f4ca2de5c Unmerged from -current. Don't refer to sio flags that don't exist in 2.2.
Submitted by:	yokota
1998-01-11 02:35:28 +00:00
John Polstra 296c601b45 Sync with main branch. 1998-01-10 20:46:17 +00:00
John Polstra 99429694a4 Merge from main branch 1.2 -> 1.3: fix backtracing for application
programs in the absence of full debugging symbols.

Bruce has put a better fix for this into -current, but it is too new
to merge into -2.2 yet.
1998-01-10 20:35:10 +00:00
Steve Price 70ebb9cb36 MFC: add some braces so that /etc/wall_cmos_clock is created.
PR:		5473
Submitted by:	MIHIRA Yoshiro <[email protected]>
1998-01-10 15:56:55 +00:00
KATO Takenori ae1acdba2e - pnp.h: MFC (NEC PC-98 support, revision 1.6)
- pnp.c: include pc98.h instead of isa.h if PC98 is defined.

Submitted by:	Takahashi Yoshihiro <[email protected]>
1998-01-10 15:13:12 +00:00
Steve Price 95644767c5 MFC: use manpath(1) to find the value of ${MANPATH}.
PR:		5365
Submitted by:	Ruslan Shevchenko <[email protected]>
1998-01-10 00:06:55 +00:00
Steve Price cbcb11e08e MFC: fix option description anomaly.
PR:		4569
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-09 18:51:35 +00:00
Jordan K. Hubbard 57143f3c8d Be more paranoid about removing relative paths. 1998-01-09 14:51:53 +00:00
Jordan K. Hubbard c2e8cf81ac MFC: sh -c for install script. 1998-01-09 14:47:05 +00:00
Joerg Wunsch ff9e61eb57 MFC: rev 1.22, move the EP_ID_PORT out to 0x110. 1998-01-09 09:14:41 +00:00
Joerg Wunsch 91bc3a3e31 MFC: rev 1.13, use the correct counter for calling swab(3). 1998-01-09 09:13:06 +00:00
Alexander Langer afb082a415 MFC (revs 1.3 and 1.4): change the prototype and return values to
conform with POSIX.
1998-01-09 00:22:45 +00:00
Jordan K. Hubbard a2ab4bb2bf MFC: man pages for pnp I forgot on first pass. 1998-01-08 19:04:39 +00:00
Joerg Wunsch b6d90f2b77 MFC: rev 1.8, make the documentation of the link[0-2] flags match the
driver soruce code.
1998-01-08 17:11:07 +00:00
Jordan K. Hubbard b1bb0c441f MFC: add controller pnp example. 1998-01-08 12:36:07 +00:00
Jordan K. Hubbard da29049ba5 MFC: support for pnp 1998-01-08 12:34:02 +00:00
Jordan K. Hubbard 2e33d44c0f MFC: pnp support. 1998-01-08 12:33:37 +00:00
Jordan K. Hubbard 5bdcd310f6 MFC: new pnp support, sound bugfix to isa.c. 1998-01-08 12:32:32 +00:00
Jordan K. Hubbard 11f3f3cd20 MFC: pnp support. Seems to work according to all testers, and this will
make merging the new audio code (at some point) that much easier.
1998-01-08 12:30:29 +00:00
David E. O'Brien b9f60d10a1 MFC rev 1.10. 1998-01-07 10:44:20 +00:00
KATO Takenori f4b4eb47c5 MFC (revision 1.68). 1998-01-07 09:05:00 +00:00
Alexander Langer 889a50a45f Removed listing/showing individual rules from usage (it's not supported). 1998-01-07 02:27:32 +00:00
Steve Price 4b6a53f316 Revert previous commit and instead SEE ALSO yp(4). 1998-01-07 00:55:01 +00:00
Warner Losh 414209db7c MFC: handle long dns names. 1998-01-07 00:30:31 +00:00
Warner Losh e7bcf2a04f MFC: wait and exec failure changes 1998-01-07 00:06:28 +00:00
KATO Takenori b20df097d3 Sync with sys/i386/conf/options.i386 revision 1.26.2.14.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-06 13:53:31 +00:00
KATO Takenori 0ff36d7151 Sync with sys/i386/isa/syscons.c and syscons.h revisions 1.182.2.25
and 1.23.2.6, respectively.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-06 13:52:33 +00:00
Alexander Langer a79ee00664 MFC (rev 1.50): error handling for zero/delete operations. 1998-01-06 00:17:55 +00:00
Jonathan M. Bresler c84580aaa0 length argument to truncate() in linux emulation
was not being set copied to the bsd arguments..
        frequently, resulting in files of over 100MB of NULs

Reviewed by:		jmb
Submitted by:		(Richard Winkel) [email protected]
1998-01-05 04:03:42 +00:00
James Raynard 2fb24b4b1d Merge from version 1.7 of current. Cleanup. 1998-01-05 00:20:52 +00:00
Alexander Langer b07160254c MFC (rev 1.70): missing parens. 1998-01-05 00:14:54 +00:00
James Raynard 2340fc3916 Merge from version 1.5 of current.
Fix bit-twiddling in sigismember(3).

Note this ONLY affects the function version - the macro version is always
used unless for some reason you put #undef sigismember in your code before
calling it.

PR:		3615
Submitted by:	Nanbor Wang <[email protected]> (slightly amended patch)
1998-01-05 00:11:29 +00:00
Alexander Langer 3c28dfbe95 MFC (rev 1.69): ICMP type fix. 1998-01-05 00:11:16 +00:00
James Raynard a4b302f726 Merge from version 1.13 in current.
Balance parentheses around command abbreviations.

PR:	4888
Submitted by:	[email protected]
1998-01-05 00:02:15 +00:00
James Raynard cf2a1052b7 Merge in typo fixes from version 1.3 of current. 1998-01-04 23:53:11 +00:00
Brian Somers d5cbe77c9e MFC: Don't scribble on the stack if a packet is bigger than our MRU.
PR:		5424
1998-01-04 20:33:14 +00:00
Wolfram Schneider 4b8a4c48f5 Update copyright to 1998. 1998-01-04 18:00:53 +00:00
Steve Price ba41a82208 MFC: use of /etc/ethers has been deprecated.
PR:		5233
Obtained from:	partially NetBSD
1998-01-04 17:37:35 +00:00
Steve Price 5ed04b4e84 Don't use __BEGIN_DECLS, __END_DECLS, or __P in the KERNEL case
as they are not defined unless <sys/cdefs.h> is included.
1998-01-04 16:02:53 +00:00
KATO Takenori fbdaac74be Sync with sys/i386/isa/if_ed.c revision 1.107.2.6.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-04 09:54:13 +00:00
KATO Takenori 342a6fb1bf Sync with sys/i386/isa/sio.c revision 1.147.2.10.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-04 09:53:20 +00:00
KATO Takenori e497d697fa Sync with sys/i386/conf/options.i386 revision 1.26.2.13.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-04 09:52:29 +00:00
KATO Takenori 5a667a4b35 Sync with sys/i386/isa/syscons.c and syscons.h revisions 1.182.2.27
and 1.23.2.8, respectively.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-04 09:51:33 +00:00
Steve Price 0cc0babb77 MFC: merge changes that quiet lint about the ntoh* and hton* routines.
PR:		1717
1998-01-04 04:26:38 +00:00
Andrey A. Chernov 1255258cfc MFC: ctype and Index over +++/--- precedence 1998-01-03 23:52:05 +00:00
Steve Price 1da671d87c MFC: newsyslog(8) maintains (u|w)tmp files.
PR:		5414
1998-01-03 20:32:46 +00:00
Steve Price 8ea94cce42 MFC: The default dumplevel is 0.
PR:		5413
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-03 20:28:13 +00:00
Steve Price cf15fe8d40 MFC: typo fix: when -> with
PR:		5420
Submitted by:	Jonathan Hanna <[email protected]>
1998-01-03 19:16:40 +00:00
Brian Somers 23949b6ee8 MFC: Correct -r and -f descriptions.
Suggested by: joerg
1998-01-03 10:12:33 +00:00
David E. O'Brien bb530930d9 Merge rev 1.36 of identcpu.c from -CURRENT. Modivation is the new AMD info.
Also required merging rev 1.16 of asmacros.h and rev 1.15 of cdefs.h.
1998-01-03 08:51:53 +00:00
KATO Takenori ae953937e1 Change from crd into card.
Submitted by:	NOKUBI Hirotaka <[email protected]>
1998-01-03 05:53:12 +00:00
KATO Takenori 3e83eef908 MFC: revision 1.11 (fix typo). 1998-01-03 05:38:03 +00:00
John Polstra 8c0eb26b8f Merge from main branch 1.35 -> 1.36: accept comments and blank
lines.
1998-01-03 05:37:49 +00:00
John Polstra 1121b712c5 Merge from main branch 1.47 -> 1.48: accept comments and blank
lines.
1998-01-03 05:21:50 +00:00
Steve Price 01aa757517 MFC: correct a bogon in an example.
PR:		5415
Submitted by:	Sergei S. Laskavy <[email protected]>
1998-01-02 19:25:11 +00:00
Joerg Wunsch 28801d8a51 MFC: rev 1.33, clean SI_MOUNTEDON flag iff the mount attempt fails early. 1998-01-02 16:46:15 +00:00
Steve Price e3ef61e87f Remove the *group* files, since tclsh is no longer present
on this branch, and they have effectively been replaced by
pw(8).

PR:		5405
Reviewed by:	jkh
1998-01-02 13:35:52 +00:00
Satoshi Asami eb34b52a3a Merge 1.268. 1998-01-02 10:38:06 +00:00
Andrey A. Chernov 9df87923d9 MFC: testing code removed 1998-01-02 05:06:24 +00:00
Andrey A. Chernov 3c85ff2d98 MFC: insdel in last windows line fix 1998-01-02 04:39:38 +00:00
Paul Traina 5df5c35e86 Bring in print-fr.c 1997-12-31 21:51:55 +00:00
David E. O'Brien 98b9422ae3 MFC rev 1.390. 1997-12-31 21:47:28 +00:00
Paul Traina 4fa918711d Handle ISO over frame relay properly.
Submitted by:	Pasvorn Boonmark <[email protected]>
1997-12-31 21:45:54 +00:00
Paul Traina 54a6feacd2 Properly decode upper layer ethernet and llc info.
Submitted by:	Fong-Ching Liaw <[email protected]>
1997-12-31 21:44:58 +00:00
Paul Traina 41c637f831 Fix incorrect packet truncation error.
Submitted by:	Tom Pusateri <[email protected]>
1997-12-31 21:43:16 +00:00
Alexander Langer 6b6bd4ea62 MFC (rev 1.6): Added missing #include <unistd.h> to synopsis.
PR:		5303
Submitted by:	David Malone <[email protected]>
1997-12-31 05:27:23 +00:00
Nate Williams 0050bff193 MFC: - Accept all models of the HP C1553A tape series as usable tapes. 1997-12-30 22:27:58 +00:00
Wolfram Schneider b0025d0931 MFC: add FreeBSD 2.2.[126], OpenBSD 2.[123] 1997-12-30 19:13:10 +00:00
Warner Losh 9c0558a269 MFC: drop privs... 1997-12-30 05:15:13 +00:00
Brian Somers a9cd70d9f7 MFC: Make the super scsi device available (/dev/ssc). 1997-12-30 03:46:58 +00:00
KATO Takenori 0e480efce6 Set DTR when divisor != 0 for compatibility with 16450. Some programs
set divisor = 0 to clear DTR and set divisor = non-zero to reenable
DTR (e.g. mgetty).  So, such program did not work with 1st CCU of PC98
(i8253 based).  This fix has been already commited in current
(revision 1.46), but I forgot it and did not describe in commit log.

Submitted by:	NOKUBI Hirotaka <[email protected]>
1997-12-30 02:54:57 +00:00
Wolfram Schneider 1bdb0c08ee MFC: gzip.c rev 1.8 Check argument filename length before copying.
inflate.c rev 1.7 Fix NULL pointer reference.
1997-12-29 23:29:14 +00:00
Wolfram Schneider 22349a8ca5 MFC rev 1.38 store uid_start in /etc/adduser.conf 1997-12-29 23:27:29 +00:00
cvs2svn 5b7c438d0f This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1997-12-29 21:07:11 +00:00
Jordan K. Hubbard 2934376fd7 MFC: gateway -> gateway_enable 1997-12-29 20:07:36 +00:00
Masafumi Max NAKANE 387e3f62d1 MFC: typo fix. 1997-12-29 13:59:44 +00:00
Philippe Charnier 8ce877ea7d MFC: Add const to copyright string. Hide sccsid string. 1997-12-29 07:09:39 +00:00
Philippe Charnier 9cf455aaa5 MFC: Convert to mdoc. 1997-12-29 07:08:36 +00:00
Philippe Charnier 3623a71d8b MFC: Add missing .Ar. 1997-12-29 07:07:33 +00:00
Philippe Charnier 8c801b6376 MFC: Correct a path. 1997-12-29 07:05:38 +00:00
Steve Price aa4bb97695 MFC: Add davidn's support for %s, %m, %r, and %v from revision 1.8.
PR:		5390
Verified by:	Alex Bulan <[email protected]>
1997-12-28 22:19:54 +00:00
Steve Price 35d97a9e61 MFC: Bruce Evans' fixes to make bcopy.S support the generation of
both memmove and memcpy.  Also tag the memcpy.S stub onto this
     branch.
1997-12-28 20:01:13 +00:00
Steve Price 27493a5edc MFC: Bruce Evans' sqrt -> __ieee754_sqrt changes. 1997-12-28 19:48:45 +00:00
Steve Price 0a2165b40c MFC: gamma -> gammaf fix from Bruce Evans. 1997-12-28 19:47:15 +00:00
Steve Price 2cf5dd837d MFC: Hide the declaration of `struct exception' from C++, since it
conflicts with the standard C++ `class exception'.
1997-12-28 19:45:49 +00:00
Steve Price abbb1c1afe MFC: Bruce's fix to remove a hard reference to DEFS.h 1997-12-28 19:41:36 +00:00
Alexander Langer 46b4f2e7b0 MFC (rev 1.67): restore commented out logging. 1997-12-28 16:49:37 +00:00
Jordan K. Hubbard d3e34dbb59 Adjust SBC_IRQ to 5.
PR:		5384
Submitted by:	<[email protected]>
1997-12-28 00:30:53 +00:00
Jordan K. Hubbard 56741a081d Adjust sb0 IRQ to 5 from 7 (as was already done in -current) and update
comments to match.
PR:		5384
Submitted by:	<[email protected]>
1997-12-28 00:29:50 +00:00
Satoshi Asami 879fd82504 Add 1 to RELDATE to mark the "ldconfig -R" merge. 1997-12-27 10:42:58 +00:00
Jordan K. Hubbard 0c2177ea58 MFC: mention FTP_PASSIVE_MODE 1997-12-27 05:37:13 +00:00
Tim Vanderhoek 6440ac243f YACC: fork() checks RLIMIT_NPROC, not RLIMIT_NOFILE.
pr:		docs/5260
submitted-par:	Niall Smart [3][email protected]
1997-12-26 16:23:22 +00:00
Tim Vanderhoek a2090eb847 MFC: comment fix
PR:		bin/5188
1997-12-26 05:35:08 +00:00
Tim Vanderhoek ed1f57f9a0 Use consistent spelling,
writeable -> writable (recall prior debate over this? :-)
	initialise -> initialize
	recognise -> recognize

Merry Christmas! :)
1997-12-25 09:36:42 +00:00
Jordan K. Hubbard 7f8ac6aa1a MFC: -R support for ports collection. 1997-12-25 07:57:43 +00:00
Warner Losh 493e5a5a8f MFC:sprintf->snprintf 1997-12-24 19:23:18 +00:00
Warner Losh 84cc83712b MFC:sprintf->snprintf 1997-12-24 19:13:49 +00:00
Warner Losh 963ea596a7 MFC:sprintf->snprintf 1997-12-24 18:58:07 +00:00
Jordan K. Hubbard f574fdf66c /etc/sysconfig -> /etc/rc.conf
Submitted by:	chein
1997-12-23 21:05:55 +00:00
Philippe Charnier 02e2d6b705 MFC: Remove obsolete /etc/hostname.ep? reference.
PR:	kern/5310
Submitted by:	[email protected]
1997-12-23 07:28:34 +00:00
Philippe Charnier 69f6c35e6a MFC: Use .Tn, .Bx Free and .An. 1997-12-23 07:26:55 +00:00
Philippe Charnier 7fdca09f79 MFC: Use .Nm ktrace instead of .Nm in SYNOPSIS section. 1997-12-23 07:25:07 +00:00
Philippe Charnier a8ab6074bb MFC: Mdoc'ify man page. 1997-12-23 07:20:16 +00:00
Philippe Charnier 3e6d9e9e9c MFC: Use err(3). Silent -Wall. 1997-12-23 07:18:29 +00:00
Philippe Charnier be40226a6b MFC: Use Pa for files and Ar for arguments. 1997-12-23 07:15:39 +00:00
Masafumi Max NAKANE 44da6e4afd MFC: typo fix. 1997-12-21 15:41:56 +00:00
James Raynard b8280542c5 Merge revision 1.4 from head (a number of keyboard fixes).
Requested by:	Goris Davy <[email protected]>
1997-12-20 22:40:58 +00:00
Peter Wemm cc2377eb0e Merge rev 1.8 and 1.9 from HEAD (fix ipv6 official names and add SKIP
names)
1997-12-20 12:45:39 +00:00
Peter Wemm 1ee6e2823d Somewhere between 2.2.2 and 2.2.5, somebody screwed the RELENG_2_2 tag
on the protocols file.  Restore the tag and correctly merge the changes up
to rev 1.7, as was RELENG_2_2 was incorrectly set at.
1997-12-20 12:41:33 +00:00
Julian Elischer 7f8b578479 Add a link to allow the ja_JP_SJIS locale to have the default
collation capabilities.

Submitted by:	Nobuhiro Yasutomi <[email protected]>
Obtained from: current
1997-12-19 23:10:04 +00:00
Julian Elischer 0292124f79 MFC: Bring in japanese EUC encoded time definitions
Submitted by:	Nobuhiro Yasutomi <[email protected]>
1997-12-19 22:50:44 +00:00
cvs2svn 17536ff55d This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1997-12-19 22:46:24 +00:00
Philippe Charnier bb602b4be5 MFC: Use full path in synopsis. Sort #includes. Use .Tn for NIS. 1997-12-19 07:35:35 +00:00
Philippe Charnier 47332048c3 MFC: Use err(3). Remove trailing \n in syslog strings. -Wall cleaning. 1997-12-19 07:33:33 +00:00
Julian Elischer b26150537d Obtained from: Whistle production tree
MFC:
Fix horrendous kernel stack overwrite bug
when ipwf was used to implement the ""reset tcp" firewall command.
Add a comment in the tcp code to stop others ever making the
same mistake.
1997-12-19 03:50:49 +00:00
David Greenman 84588e0912 MFC rev 1.36: splnet was not released in an error condition in
tcp_usr_send().
1997-12-18 09:52:01 +00:00
David Greenman 261835d9a8 MFC: call in_pcballoc() at splnet. 1997-12-18 09:42:41 +00:00
Philippe Charnier 34519663c2 MFC: Use err(3). Add prototypes. Document that startup scripts are rc.i386 and
rc.conf (enable/disable) not rc.local. Use full pathname in SYNOPSIS section.
1997-12-18 07:37:47 +00:00
Philippe Charnier 54fd837c68 MFC: Sort #includes. Add rcsid. Use full pathname in SYNOPSIS section. 1997-12-18 07:32:42 +00:00
Philippe Charnier 1b19c67bf4 MFC: Use full path in synopsis. Syslog will add trailing \n. 1997-12-18 07:31:37 +00:00
Philippe Charnier 389d195aaa MFC: Use err(3). Add protos for -Wall. 1997-12-18 07:30:11 +00:00
Philippe Charnier 5dfadf47d3 MFC: No \n in syslog() strings. Add man page to Xrefs.
Change null byte to NUL byte.
1997-12-18 07:18:13 +00:00
Philippe Charnier 16460baaf0 MFC: Do not terminate syslog() messages with a dot. 1997-12-17 07:38:17 +00:00
Philippe Charnier a216f0308a MFC: Document -n flag. Use err(3). Add usage. Add syslog capability. 1997-12-17 07:36:28 +00:00
Philippe Charnier a5229afc6c MFC: Use err(3). -Wall cleaning. cosmetics in man page. 1997-12-17 07:34:42 +00:00
Philippe Charnier cc2ab1e13c MFC: Remove \n at end of syslog string. -Wall cleaning. Cosmetics in man page. 1997-12-17 07:33:09 +00:00
Philippe Charnier 1d909eeabd MFC: Cosmetics in man page. Add rcsid and sort #includes. 1997-12-17 07:31:28 +00:00
Paul Traina 1c0a002bf3 Merge from -current 1997-12-17 01:57:57 +00:00
David Greenman c976e350fb Brought in fix from rev 1.70: don't accidently free() struct buf's. 1997-12-16 15:47:03 +00:00
KATO Takenori db6b0d3582 MFC (revision 1.66; fix for EPSON PC-486HX/HG/HA). 1997-12-16 10:34:02 +00:00
Philippe Charnier 1494cae800 MFc: Sort #includes. Add rcsid. Add man page section in .Xrefs. 1997-12-16 07:23:41 +00:00
Philippe Charnier 0e1cf8e36c MFC: Use err(3). -Wall cleaning. Use Pa for file names and add section in Xrefs. 1997-12-16 07:22:08 +00:00
Philippe Charnier 1daf575af6 MFC: Use warn(3). Hardcode progname instead of using argv[0]. Use Pa for file
name.
1997-12-16 07:20:19 +00:00
Philippe Charnier b6b4607cdd MFC: Add usage(), rcsids. 1997-12-16 07:17:53 +00:00
Mike Smith 3c9c967631 Whoops, add 'retval' arg to new console ioctls.
Submitted by:	jkh
1997-12-15 21:36:41 +00:00
Philippe Charnier 2de0667d03 MFC: Cosmetics in usage() and man page. 1997-12-15 07:16:19 +00:00
Philippe Charnier 2a8d6e5d91 MFC: Key is 8 bytes not 10 as stated in man page. Add rcsid. 1997-12-15 07:13:46 +00:00
Philippe Charnier 55ed0029f6 MFC: Use err(3) instead of local redefinition. Add usage. -Wall cleaning. 1997-12-15 07:11:54 +00:00
Philippe Charnier 1a92ca98f2 MFC: Correct incompletes .Xrs. Remove duplicate #includes and unused variables. 1997-12-15 07:10:54 +00:00
Philippe Charnier c9e5fc7b7a MFC: Use err(3). -Wall cleaning. 1997-12-15 07:09:41 +00:00
Mike Smith 9520c6e4b8 MFC: emulation of Linux keyboard ioctls and vt operations.
Submitted by:	Amancio Hasty <[email protected]>
1997-12-15 06:11:34 +00:00
Mike Smith 97adcdaa3f MFS: fixes to avoid trampling sa_len fields in the presence of MSG_COMPAT
with COMPAT_OLDSOCK defined  (ie. COMPAT_43 in kernel config).
Submitted by:	[email protected] (Pierre Beyssac)
1997-12-15 02:24:08 +00:00
Mike Smith 0ab2e4b338 Functional merge from current; as described by the contributor:
- emulate Linux IP_HDRINCL behaviour in sendto(): byte order fixed
	  Note that we do an extra getsockopt() on every sendto()
	  to check if the option is set because we don't keep state
	  in the emulator code. Is there a better way to implement
	  this?
	- correct a bug (value of "name" not passed) with
	  getsockopt() (see last hunk)
1997-12-15 02:10:38 +00:00
Jordan K. Hubbard 1280baf755 MFC: PR#5289 1997-12-14 12:31:13 +00:00
Sean Eric Fagan 95778a3035 MFC: use $TMPDIR if set. 1997-12-13 18:21:05 +00:00
Daniel O'Callaghan 3a397712e4 Submitted by: Peter Hawkins <[email protected]>
Spelling police.
1997-12-13 06:34:47 +00:00
Satoshi Asami 85e35a4756 Add ports-biology. 1997-12-13 05:59:44 +00:00
Philippe Charnier d55e3d33f5 MFC: Cosmetics in man page. Exit(-1) -> exit(1). 1997-12-12 07:20:40 +00:00
Philippe Charnier f0195efdc4 MFC: Add const to copyright string. Put sccsid under #if 0/#endif control. 1997-12-12 07:18:21 +00:00
Philippe Charnier 411b24a0d0 MFC: Use err(3). exit(-1) -> exit(1). 1997-12-12 07:16:56 +00:00
Philippe Charnier 94fc0783ff MFC: Cosmetic in error strings. Sort Xrefs. Add usage (with syslog capability). 1997-12-12 07:15:37 +00:00
Bruce Evans ad1f72b440 Fixed printing of and comparison with d_typename[]. It is not always
null terminated.
1997-12-11 09:32:35 +00:00
Bruce Evans 8a9d9e56be Changed lots of %ld's in format strings back to %d. %ld was right
when daddr_t was long, but Lite2 changed daddr_t to int32_t which
is implemented as `int' on i386's.
1997-12-11 09:17:20 +00:00
Bruce Evans 21653cb97c YAMFC (fixed large offsets in the scan for bad sectors). 1997-12-11 07:32:25 +00:00
Wolfram Schneider 04538516ac MFC 1997-12-09 22:59:32 +00:00
Steve Price 29d321b5ab Revert the hard reference removal commits, since they don't seem
to work for anybody but me.
1997-12-09 14:43:22 +00:00
Daniel O'Callaghan 97aa7e5221 Back out last commit for dmesg.boot 1997-12-09 10:05:04 +00:00
Daniel O'Callaghan d103000886 Make rc record dmesg in /var/log/dmesg.boot 1997-12-09 07:24:35 +00:00
Wolfram Schneider 8cb72df8aa Merge rev 1.6: fix whitespaces in pattern
PR: 5211
1997-12-08 19:27:41 +00:00
Steve Price 2e7f80b849 Merge Bruce Evans' fix to get rid of a hard reference to
/usr/src/lib/libc/i386/DEFS.h.

PR:		2813
Reviewed by:	alex
1997-12-08 01:08:02 +00:00
Brian Somers 664f264f9b MFC: Const correctness for dl*().
PR:		5243
1997-12-07 04:26:46 +00:00
Brian Somers 19a29d88c2 MFC: Const correctness for dl*(). The link.h polution
should probably be fixed here too.
PR:		5243
1997-12-07 04:26:24 +00:00
Stefan Eßer da9c90fd01 Merge from -current: Define START_MAX as 32, independent of the default
number of tags of tags. This fixes incompatibilities between the GENERIC
kernel and ncrcontrol.
PR:		kern/5133
1997-12-07 00:19:51 +00:00
John-Mark Gurney 65c974e762 MFC: document NO_F00F_HACK, make it a proper option, and sort opt headers.. 1997-12-05 07:26:39 +00:00
Jordan K. Hubbard e64853e80b MFC: F00F cleanup. 1997-12-04 14:36:57 +00:00
KATO Takenori d7d1e6403f MFC: revision 1.20 (Use the `port' instead of hard coded address). 1997-12-04 13:18:38 +00:00
Warner Losh eb6ffe6ef7 MFC: EOF -> -1 for getopt 1997-12-04 08:04:33 +00:00
Warner Losh a564378015 MFC: EOF -> -1 for getopt 1997-12-04 07:36:22 +00:00
Warner Losh 49ce1aca5f MFC: buffer overflow fix 1997-12-04 02:56:45 +00:00
Sean Eric Fagan 0810d179fa MFC -- F00f cleanups. 1997-12-03 16:30:12 +00:00
Warner Losh 524909f177 MFC: EOF -> -1 in comparison of return value from getopt 1997-12-03 05:48:12 +00:00
Warner Losh 46ab13df54 MFC: EOF -> -1 in comparison of return value from getopt 1997-12-03 05:40:08 +00:00
Sean Eric Fagan e37b880bd5 MFC -- Intel Pentium F00F bug workaround. Note that I forgot the
reviewer credit in the current log message; also credit to Cy Schubert
<[email protected]> for cleaning up my initial patches.

Reviewed by:	Stephen McKay <[email protected]>
1997-12-03 02:48:35 +00:00
John Dyson 340c11ee28 Add definition of MS_SYNC for compatibility. 1997-12-02 21:31:32 +00:00
Daniel O'Callaghan 83a9cfa09d Submitted by: bde
Merge Bruce's fix for PR bin/5172 from HEAD
1997-12-02 09:57:38 +00:00
David E. O'Brien 01f8b8aa1c Remove useless double test. 1997-12-01 06:06:35 +00:00
Steve Price f2246e8db9 MFC: Add mount_devfs(8) to the SEE ALSO section.
PR:		5125
1997-12-01 00:47:09 +00:00
Steve Price a0d6c372fa MFC: Use the manpath.[ch] files from the manpath directory. 1997-11-30 20:17:09 +00:00
Steve Price 6654ca29e9 MFC: remove this copy of manpath.c and use the other in ../man.
Suggested by:	Bruce Evans
1997-11-30 17:25:23 +00:00
David E. O'Brien e8ebe2308b Remove my `ulimit' hack -- latest changes to /etc/login.conf fixed the
problem with mfs filesystems listed in /etc/fstab.
1997-11-30 01:33:22 +00:00
Steve Price a08697a4c3 MFC: call gripe_reading_mp_config with the required args.
PR:		3894
Submitted by:	Stephen Clawson <[email protected]>
1997-11-30 01:10:14 +00:00
KATO Takenori 6284b48915 MFC (recognize 3C569 NIC on PC98; revision 1.68). 1997-11-29 14:41:48 +00:00
Peter Wemm 52083bfec0 MFC: s/geteid/geteuid/ - finger slippage between testing and commit. 1997-11-29 11:40:48 +00:00
Peter Wemm dd18481e46 MFC: hack workaround to avoid breakage by recently added calls to
issetugid().  -stable's libtermcap.so.2.1 and -current's bogus
libtermcap.so.3.0 are now pretty much identical. Sigh...  It's a shame
we can't revert the -current major number bump.
1997-11-29 11:33:37 +00:00
Steve Price 2ba8043a8d Finish the work of changing NCRD to NCARD.
PR:		5163
Submitted by:	NAGAO Takaaki <[email protected]>
1997-11-29 04:45:41 +00:00
Steve Price 99fb2d6dd1 MFC: datasize-curr -> datasize-cur, typo fix.
PR:		5152
Submitted by:	[email protected]
1997-11-27 17:55:27 +00:00
Joerg Wunsch f88d4eeedf MFC: rev 1.151, remove extraneous ".kbd" 1997-11-26 22:50:30 +00:00
Jordan K. Hubbard 9fc5b9bdde MFC: reenable NODOC 1997-11-26 12:45:39 +00:00
Nate Williams 14dff51593 MFC:
- Don't worry about the previous state of the card.
 - Renamed log_1s() to logmsg().
1997-11-25 19:41:39 +00:00
Kazutaka YOKOTA ef5adff921 YAMFC: mouse cursor fix (1.230), iso 2022 support (1.233),
remove unused vars (1.237), rename shadowed local vars (1.238),
comp_vgaregs() fix (1.239).

OKed by: sos, phk
1997-11-25 13:05:20 +00:00
Kazutaka YOKOTA 235d4dee7f YAMFC: MouseSystems PS/2 mouse kludge (1.46). 1997-11-25 12:34:24 +00:00
Alexander Langer ab50cfd70b Merge from rev 1.10: added missing reference to uthread_sigwait.c. 1997-11-24 23:07:51 +00:00
Alexander Langer 7a5f51eadc Merge pthread_cond_timedwait return value fix from rev 1.6. 1997-11-24 22:58:27 +00:00
David E. O'Brien 3ef84d17f9 Add note that things in /etc/rc are run under login class `daemon' by
/sbin/init.
1997-11-24 09:24:19 +00:00
David E. O'Brien 4ef9c5b002 Do not limit mfs partitions to 32meg. 1997-11-24 04:31:45 +00:00
David E. O'Brien ceb8154d1c MFC (rev 1.13) 1997-11-24 03:32:47 +00:00
Bruce Evans 0482db90be YAMFC (fixed long double formats). 1997-11-23 06:03:31 +00:00
Alexander Langer 5e007daf51 MFC documentation for IPFIREWALL_DEFAULT_TO_ACCEPT.
Reminded by:	Studded <[email protected]>
1997-11-22 22:11:43 +00:00
Guido van Rooij 8073928b42 MFC: watch out when remote file names start with '|'. 1997-11-22 20:23:33 +00:00
Alexander Langer 1ec95b81f2 Bring in compile time override of default rule from -current.
PR:             5068
1997-11-22 13:00:48 +00:00
Mike Smith a1e83538f6 Merge Winbond W89C940 support from -current
Submitted by:	Micha Class <[email protected]>
1997-11-22 06:21:10 +00:00
Jonathan Lemon 49ea47d685 Fix CPU_CYRIX_NO_LOCK option to use correct control register.
PR:	5121
1997-11-21 22:37:46 +00:00
Andrey A. Chernov ee4c1e56ab MFC: HOME bufer overflow fix, manpage spelling fixes, __set_ospeed declaration,
issetugid() check
1997-11-21 16:03:28 +00:00
Nate Williams 3795ddeff6 MFC: - Flush the arp cache when bringing up a new network link. 1997-11-20 22:32:55 +00:00
Garrett Wollman ab90fea96b By popular demand, pull Matt Dillon's hackaround for the TCP self-connect
bug into -stable.

PR:		5103
1997-11-20 21:45:34 +00:00
Satoshi Asami 157288d366 Merge everything up to 1.23. 1997-11-20 05:37:23 +00:00
Satoshi Asami c3c3ba4f59 Merge 1.267. 1997-11-20 05:34:49 +00:00
Satoshi Asami c296277c1d Bump RELDATE by 1, we are post-2.2.5R now.
Forgotten by:	yours truly, should have done it a long time ago
1997-11-20 00:33:07 +00:00
Nate Williams d31157003b - MFC:
* new ACCTON card settings
 * setup a default route when an ethernet card is inserted.
1997-11-19 18:53:36 +00:00
John Polstra 426ca56de1 Merge from main branch: back out warnx() "fix", which broke sh. 1997-11-18 15:24:46 +00:00
Philippe Charnier ba7fcc2c02 MFC: Use err(3). 1997-11-18 07:54:08 +00:00
Philippe Charnier 966549ce5b MFC: Typos in man page. Cosmetics in error strings. 1997-11-18 07:52:07 +00:00
Philippe Charnier c72da07aed MFC: Cosmetics in yp_error() and usage(). 1997-11-18 07:45:17 +00:00
Philippe Charnier fdd0c57b01 MFC: Use err(3). 1997-11-18 07:38:47 +00:00
Philippe Charnier b15315a699 MFC: Use err(3). Change =' to ==' in two places. 1997-11-18 07:37:40 +00:00
Philippe Charnier 2c3044640e MFC: Remove `progname'. 1997-11-18 07:32:59 +00:00
Philippe Charnier 726b036e26 MFC: Add usage() and err(3). Sync man page with usage string. 1997-11-18 07:30:08 +00:00
Philippe Charnier c13180b6a0 MFC: One line usage string. 1997-11-18 07:28:15 +00:00
Philippe Charnier 4e759a51ed MFC: Cosmetic in err() strings. 1997-11-18 07:26:34 +00:00
Philippe Charnier 6b95f492b8 MFC: Use err(3). Cosmetics in error strings. 1997-11-18 07:24:17 +00:00
Philippe Charnier 59d1cd6d18 MFC: Use err(3). Add prototypes. Document -s and -r flags. 1997-11-18 07:20:55 +00:00
Philippe Charnier 7d97390e24 MFC: Statisize usage(). 1997-11-18 07:17:16 +00:00
Philippe Charnier 5cb64c3dd5 MFC: Use err(3). 1997-11-18 07:14:19 +00:00
John Polstra f416d31767 Merge from main branch 1.9 -> 1.10: Fix call to fprintf with too
many arguments.
1997-11-18 05:57:58 +00:00
John Polstra ae8e46245f Merge from main branch 1.4 -> 1.5: Fix too many arguments to
sprintf().
1997-11-18 05:54:07 +00:00
John Polstra 14791dcf9e Merge from main branch 1.9 -> 1.10: Fix extra args to warnx(). 1997-11-18 05:46:23 +00:00
John Polstra ae9a28ea86 Merge from main branch 1.18 -> 1.19: Fix erroneous format string. 1997-11-18 05:35:48 +00:00
John Polstra 8139c33495 Merge from main branch: add cross-references.
fork.2:		1.3 -> 1.5
	vfork.2:	1.8 -> 1.9
1997-11-18 04:07:05 +00:00
John Polstra e645221cca Merge from main branch 1.6 -> 1.7: Add missing argument, change
message for consistency.
1997-11-18 03:51:38 +00:00
John Polstra 11b16e0b5f Merge from main branch 1.18 -> 1.19: Fix incorrect format string. 1997-11-18 03:43:09 +00:00
John Polstra 4d0f48d313 Merge from main branch 1.15 -> 1.16: add missing argument. 1997-11-18 03:39:10 +00:00
John Polstra 553426e83b Merge from main branch 1.27 -> 1.28: Add missing argument. 1997-11-18 03:34:35 +00:00
John Polstra 5cbcf1d710 Merge from main branch 1.14 -> 1.15: Add missing arguments. 1997-11-18 03:28:50 +00:00
John Polstra 2fb1472555 Merge from main branch 1.6 -> 1.7: fix "-Wformat" errors. 1997-11-18 03:23:20 +00:00
John Polstra 959c1c300c Merge from main branch 1.11 -> 1.12: fix missing arguments detected
by "-Wformat".
1997-11-18 03:16:34 +00:00
Bill Paul e713d840dd Merge from -current: close PR by fixing _listmatch() to not
return false positives.

PR:	 4867
1997-11-16 03:04:34 +00:00
Nate Williams f8686cf6df - Correctly register pcic_imask with the system interrupt code.
- Call update_intr_masks() so that pcic_imask modifications that occur
  when card interrupts are registered get updated in the system
  interrupt code.

Reviewed by:	Guido van Rooij <[email protected]>
Aided by:	Bruce
1997-11-15 14:11:34 +00:00
Sean Eric Fagan d0cc99345f Log what the requests are, in addition to the fact that they happened.
Reviewed by:	julian
1997-11-14 04:45:53 +00:00
John Polstra 83942493e1 Merge Bruce's synopsis corrections from main branch:
ceil.3: 1.6 -> 1.7
	cosh.3: 1.5 -> 1.6
1997-11-14 02:59:10 +00:00
Jordan K. Hubbard 6189f6970b The last change was in error - if -p is specified, just add an @cwd
to the beginning (but don't delete one if it exists).

Noticed by: asami
1997-11-14 01:55:35 +00:00
Julian Elischer b47837c71e Submitted by: Archie cobbs (IPDIVERT author)
close small security hole where an atacker could sendpackets with
IPDIVERT protocol, and select how it would be diverted thus bypassing
the ipfirewall.  Discovered by inspection rather than attack.
(you'd have to know how the firewall was configured (EXACTLY) to
make use of this but..)
1997-11-13 22:57:33 +00:00
Steve Price ce9acbfe9b Merge Bruce Evans' cos -> cosf fix from -current.
PR:		5033
1997-11-13 18:39:52 +00:00
Julian Elischer 83086f21f4 MFC: bring in changes from -current including some formatting changes
so that I can keep them in sync easier.
1997-11-13 18:22:21 +00:00
Jordan K. Hubbard 48ab02f708 MFC: PR#4894 1997-11-13 11:49:53 +00:00
Jordan K. Hubbard 5361be8c3c MFC: PR#4959 1997-11-13 11:44:59 +00:00
Brian Somers 2a386443d8 MFC: Use htonl() rather than htons(). 1997-11-13 11:43:39 +00:00
Julian Elischer ddc56328a7 Submitted by: [email protected] (archie Cobbs)
MFC:	allow the  -a option to work with the  -d option
thus:
arp -d -a now flushes your arp cache.
also fix the -n option so that -an now works correctly.
(also add -Wall to Makefile)
1997-11-13 01:37:28 +00:00
Satoshi Asami e1144dc72b Merge 1.266. 1997-11-12 10:43:04 +00:00
David E. O'Brien 08bd7550de MFC (rev 1.19) 1997-11-12 06:34:24 +00:00
David E. O'Brien a424fb1209 MFC (rev 1.3) 1997-11-12 04:40:45 +00:00
John Polstra 16735098be Merge from main branch 1.16 -> 1.17: Document exit status of a
command terminated by a signal.
1997-11-12 04:34:33 +00:00
Brian Somers 91e63a068d MFC: Allow .editrc to be read.
Forgotten by: msmith
1997-11-12 02:01:52 +00:00
Kazutaka YOKOTA 3f842b3f9b Documented PSM_HOOKAPM and PSM_RESETAFTERSUSPEND options. 1997-11-11 03:06:45 +00:00
Jun-ichiro itojun Hagino 8a48fd791b merge from current. (if_ep.c 1.60 -> 1.61 and if_epreg.h 1.20 -> 1.21)
if_ep.c clarification/simplification.
- irq = 9 problem (PR 4693)
- mbuf chaining oddity fixed. (PR 4693)
- trailer protocol has gone. (PR 4693)
- removed mbuf kludge, we got higher performance. (PR 4693)
- some indentation fixes

PR:		4693
Reviewed by:	[email protected]
Submitted by:	[email protected]
1997-11-10 23:53:31 +00:00
Mark Murray 7e53192819 MFC: make this compile by moving the variable declarations to the top. 1997-11-10 17:11:29 +00:00
Nate Williams 871ec2968f MFC:
- Convert c++ comment to c comment.

Noted by:       Bruce
1997-11-10 14:40:40 +00:00
Kazutaka YOKOTA 4c932cdd1b MFC: add PSM_HOOKAPM and PSM_RESETAFTERSUSPEND options to psm. 1997-11-10 12:25:12 +00:00
Kazutaka YOKOTA 785c330256 MFC: merge APM support for some laptops (from v1.40). Introduces kernel
configuration options PSM_HOOKAPM and PSM_RESETAFTERSUSPEND.
1997-11-10 12:24:16 +00:00
Jordan K. Hubbard c0753ad684 MFC: More secure defaults. 1997-11-10 05:25:14 +00:00
Peter Wemm 9de9ccb3a2 Merge-o-tron.. Update sendmail from 8.8.8 in -current. 1997-11-10 03:00:37 +00:00
Brian Somers ab3fd57237 MFC: Let LcpClose() terminate ppp in background mode
(although it's incorrectly done at PHASE_TERMINATE
     'till I bring the rest of the -current changes in).
1997-11-09 23:48:11 +00:00
Brian Somers f38d0b5e37 MFC: (I lied, this is an easily fixed bug)
Initialization of VarAltPhone
PR:  4993
1997-11-09 23:42:57 +00:00
David E. O'Brien 11057593c1 M revision 1.7 FC. 1997-11-09 16:11:13 +00:00
Wolfram Schneider 7dfb554e73 off by one typo in error message
PR: bin/4987
Submitted by:	[email protected]
1997-11-09 14:47:02 +00:00
Kazutaka YOKOTA 63d6c71e6e MFC:
- Make blank, fade and green savers work on MDA and CGA adapters.
- Dont' let the daemon figure in the daemon saver go off the screen.
1997-11-09 07:58:57 +00:00
Kazutaka YOKOTA 2f86ba6203 MFC:
- Introduces the option SC_HISTORY_SIZE (syscons.c 1.231, syscons.h 1.33).
- Fix the maximum history size (syscons.c 1.235, syscons.h 1.35).
- Fix set_border() (syscons.c 1.236).
1997-11-09 07:14:38 +00:00
Kazutaka YOKOTA 7f5c2799af MFC: introduces the option SC_HISTORY_SIZE for syscons. 1997-11-09 07:12:15 +00:00
Mike Smith b8a421cb03 Command history buffer fix. (MFC)
Submitted by:	john hood <[email protected]>
1997-11-09 06:33:09 +00:00
David E. O'Brien 627294a8b8 MFC. 1997-11-09 06:10:48 +00:00
David E. O'Brien b5b6335a64 Added ports.7 from -CURRENT. (tagged ports.7 to ci into the 2.2 branch) 1997-11-09 06:07:43 +00:00
David E. O'Brien 9826c7254f Merge of revision 1.8. 1997-11-09 05:48:44 +00:00
David E. O'Brien 74174270e3 MFC.
(also tagged (added) crc32.c)
1997-11-09 05:39:48 +00:00
Jordan K. Hubbard 5364ddbaed Prevent bogus use of MSG_EOR with SOCK_STREAM sockets from panicing
the system.

Submitted by: wollman
1997-11-09 05:06:12 +00:00
Brian Somers a7063cd377 MFC: Don't include RTA_GATEWAY in rtm_addrs unless it's specified. 1997-11-09 03:23:56 +00:00
David E. O'Brien e132426e55 MFC. 1997-11-08 22:24:45 +00:00
Satoshi Asami 9281f80d33 Merge 1.36. 1997-11-08 02:35:19 +00:00
Brian Somers fcbe885f3e MFC: Update the LOOP AVOIDANCE section to reflect reality.
Requested by:	Archie Cobbs <[email protected]>
1997-11-08 01:03:44 +00:00
Joerg Wunsch e8406d0911 MFC: clear the alarm before going on. 1997-11-07 13:20:37 +00:00
KATO Takenori d2df983a39 MFC: revision 1.32 (MediaGX CPU identification). 1997-11-07 12:56:48 +00:00
Philippe Charnier ab95abbe5d MFC: Use err(3). Sync man page and usage string. -Wall cleaning.
Make all strings representing hostnames to be NUL-terminated within
MAXHOSTNAMELEN char.
1997-11-07 07:42:39 +00:00
Philippe Charnier 00b220c466 MFC: Add usage(). Document -n flag. Do not touch/remove /etc/wall_cmos_clock
when -n (do nothing) is used.
1997-11-07 07:36:16 +00:00
Philippe Charnier b8bea516b7 MFC: Use err(3). Add usage() and prototypes. 1997-11-07 07:33:28 +00:00
Philippe Charnier b9f3209a2c MFC: Cosmetic in usage string. 1997-11-07 07:30:40 +00:00
Philippe Charnier cf1f33d440 MFC: Use err(3). Change err(-1,... to err(1,... 1997-11-07 07:27:12 +00:00
Philippe Charnier 68f26b5fd7 MFC: Use err(3). Remove progname. 1997-11-07 07:24:09 +00:00
Philippe Charnier a3e515e062 MFC: Fix usage in man page. Remove progname. 1997-11-07 07:21:16 +00:00
Philippe Charnier 2e183215bc MFC: FreeBSD -> Fx. 1997-11-07 07:19:03 +00:00
Bill Paul f1f1b4b6e5 Remove duplicate rcsid[] string so this will compile/link again. 1997-11-07 03:16:22 +00:00
Joerg Wunsch 9ce4c57499 MFC: rev 1.5 (bootcode.asm), fix reboot problems 1997-11-07 00:21:43 +00:00
Joerg Wunsch c32200b239 MFC: rev 1.9, blank lines in iso3166 are acceptable 1997-11-07 00:08:15 +00:00
Joerg Wunsch 43fda83167 MFC: rev 1.13, fix SYNOPSIS. 1997-11-07 00:06:06 +00:00
Mike Smith 90b7a4a0b8 Disable building the 'wcd' module until lkm.h is fixed. 1997-11-06 13:03:53 +00:00
Mike Smith 12e75133a0 Fix breakage caused by Julian's change to lkm.h (name change in MOD_DEV
definition).  This probably breaks 'wcd' too, but the fix there is
not obvious, so it will be commented out until someone addresses it.
1997-11-06 13:00:13 +00:00
Mark Murray e650bc6ac9 YAMFC: This driver is now identical (again) to the one in CURRENT.
Asked-for-by: Amancio Hasty
1997-11-06 10:11:51 +00:00
Joerg Wunsch 1e91a7d75b Merge rev 1.97: detect recent Nakamichi changers, too. 1997-11-06 08:31:21 +00:00
Philippe Charnier ef2728b6b7 MFC: Hardcode progname in usage string. 1997-11-06 07:40:41 +00:00
Philippe Charnier 12c55b4d4d MFC: Use err(3). Add prototypes. 1997-11-06 07:39:22 +00:00
Philippe Charnier be82e9fdb6 MFC: Use err(3). 1997-11-06 07:37:34 +00:00
Philippe Charnier 08eec301cf MFC: Use err(3). Add usage.
Use syslog instead of fprintf when being a daemon.
1997-11-06 07:36:18 +00:00
Philippe Charnier c0e25c8d7d MFC: Use err(3). Sync usage string and man page. 1997-11-06 07:34:33 +00:00
Philippe Charnier 6368c19417 MFC: Use err(3). 1997-11-06 07:32:22 +00:00
John Dyson ce9c6cd70c Fix (finally, I hope) the missing page allocation problem. The mod
will be signficantly different in -current.
1997-11-06 04:33:01 +00:00
KATO Takenori 7694772ed2 MFC: revision 1.31 (Fix 6x86 recognition). 1997-11-05 15:15:00 +00:00
Philippe Charnier 1ed48d4191 MFC: Remove multiply defined Id string. Hide sccsid string. 1997-11-05 07:37:01 +00:00
Philippe Charnier 17a8496b49 MFC: Use err(3). Add usage() and #includes. 1997-11-05 07:34:52 +00:00
Philippe Charnier 29cba9e58c MFC: Use err(3). Sync man page and usage string. 1997-11-05 07:31:59 +00:00
Philippe Charnier d27b7b62e2 MFC: Add rcsid. 1997-11-05 07:30:18 +00:00
Philippe Charnier a841376b32 MFC: Use err(3). Add prototypes. 1997-11-05 07:29:16 +00:00
Philippe Charnier 19b916b10e MFC: Cosmetic in usage string. 1997-11-05 07:27:19 +00:00
David E. O'Brien c81065f199 2. Try to be more consistant in our usage of partition when we really mean
slice.  (still needs more work, but hopefully closer to being consistant)

Ok'ed by:	jkh
1997-11-05 05:54:48 +00:00
David E. O'Brien 881b87a07c 1. If running multi-user and doing initializing a new disk, don't mount
async.
2. Try to be more consistant in our usage of partition when we really mean
   slice.  (still needs more work, but hopefully closer to being consistant)

Ok'ed by:	jkh
1997-11-05 05:54:30 +00:00
David E. O'Brien 182da0df25 MFC.
(holy toledeos Batman, we really do have a manpage).
1997-11-05 05:45:21 +00:00
Julian Elischer b4f8389ab2 fix code so it would compile for the MOD_DEV case.
this is not the correct answer, which is implemented in -current.
1997-11-05 03:58:41 +00:00
Julian Elischer 732c6d9d94 MFC: add some new area codes and sort some entries 1997-11-05 02:37:37 +00:00
Jordan K. Hubbard 41042d9ff7 MFC: don't mention handbook 1997-11-04 23:44:49 +00:00
Dima Ruban e360fedee0 from -current:
Add possibility to specify maximum number of connections per minute
for a given IP address.
1997-11-04 21:49:01 +00:00
Nate Williams 949cb28bdb - Missed a copyright Update 1997-11-04 19:15:32 +00:00
Nate Williams f56efde542 MFC:
- Lots of cleanups, getopt changes, manpage updates.
 - new display/suspend function.

[ The latter is to reflect changes made to the kernel ]
1997-11-04 19:06:54 +00:00
Nate Williams 7bb8a2294d MFC:
- Driver cleanup (update copyrights, un-necessary parameters, white-space)
- remove un-necessary include, and the NAPM check since it's done already in
  apmprobe.
- Run the apm_resume hooks if apm_suspend fails due to the BIOS.
- Add a better display/suspend function

[ The last requires that apm(8) be recompiled ]
1997-11-04 19:02:35 +00:00
KATO Takenori a53ad5a283 Sync with sys/i386/isa/fd.c revision 1.92.2.5.
Submitted by:	H. Nokubi <[email protected]>
1997-11-04 09:48:58 +00:00
KATO Takenori 6dc3ca6ec6 Sync with sys/i386/conf/options.i386 revision 1.26.2.12.
Submitted by:	H. Nokubi <[email protected]>
1997-11-04 09:47:29 +00:00
KATO Takenori 156ce8a520 Sync with sys/i386/conf/options.i386 and sys/i386/isa/fd.c revisions
1.26.2.11 and 1.92.2.4, respectively.

Submitted by:	H. Nokubi <[email protected]>
1997-11-04 09:46:18 +00:00
John Dyson a715202c54 Bring some fixes from -current into -stable. A couple of them are
map optims from Alan Cox ([email protected].)  Also, there is an incorrectly
handled panic and inefficient/improper map upgrade fixed.
1997-11-04 09:02:38 +00:00
Philippe Charnier b2b97bae44 MFC: Use err(3). Add prototypes. Cosmetic in usage string. 1997-11-04 07:24:32 +00:00
Philippe Charnier ddc81f7629 MFC: Use err(3). Silent -Wall. 1997-11-04 07:22:14 +00:00
Philippe Charnier e8af1c59f1 MFC: Use err(3). 1997-11-04 07:20:34 +00:00
Philippe Charnier 20e8a26e5f MFC: Staticize usage(). Cosmetics. 1997-11-04 07:18:20 +00:00
Philippe Charnier c4c52a2b9d MFC: Use err(3). Add rcsid. 1997-11-04 07:16:22 +00:00
John Dyson a75c15bd23 Make sure that we check properly for what queue a page was on for
pagedaemon wakeups.  Brought from -current.
1997-11-04 06:27:13 +00:00
KATO Takenori ffb1eb5804 MFC: revision 1.101 (address for USERCONFIG_BOOT on PC-98). 1997-11-04 03:22:03 +00:00
KATO Takenori 2673d214ce Sync with sys/i386/boot/netboot/Makefile revision 1.9.2.4.
Submitted by:	H. Nokubi <[email protected]>
1997-11-04 03:15:23 +00:00
KATO Takenori ec7e867937 Sync with sys/i386/isa/isa.c revision 1.74.2.4.
Submitted by:	H. Nokubi <[email protected]>
1997-11-04 03:09:03 +00:00
KATO Takenori e076d80eea Sync with sys/i386/isa/wd.c revision 1.119.2.9.
Reviewed by:	H. Nokubi <[email protected]>
1997-11-04 03:07:59 +00:00
KATO Takenori 4e0ab57fdd Sync with sys/i386/isa/isa.c revision 1.74.2.3.
Submitted by:	H. Nokubi <[email protected]>
1997-11-04 03:06:48 +00:00
John Polstra 4a0eba1e56 Merge from main branch 1.4 -> 1.5: describe "mrouted_flags". 1997-11-02 21:47:22 +00:00
Nate Williams c000725d18 - Simplify some code, no functional differences. 1997-11-02 21:24:36 +00:00
David Greenman 3c854924e7 Brought in fix from rev 1.37: handle 'route add -lock'. 1997-11-02 07:29:25 +00:00
David Greenman 983fcaead5 Brought in fix from rev 1.127: killed 0WS option. 1997-11-02 07:15:08 +00:00
Nate Williams d4223c3ff8 - MFC: Example PCCARD config file (modified for 2.2). 1997-11-01 18:55:45 +00:00
cvs2svn 82f24f8d62 This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1997-11-01 18:54:11 +00:00
Wolfram Schneider ef03c4d436 Merge typo from rev 1.9. 1997-11-01 15:11:46 +00:00
Masafumi Max NAKANE 18a3196ff8 Merge the sysconfig -> rc.conf changes from -current. 1997-10-31 23:40:53 +00:00
John Polstra fe79593cd4 Merge from main branch 1.31 -> 1.32: add "mrouted_flags". 1997-10-31 02:00:42 +00:00
Andrey A. Chernov 5b9137d76a MFC: -d and mmap fixes from -current 1997-10-30 21:01:18 +00:00
Nate Williams 011900324c - Whoops, some bogus if 0 code slipped in. 1997-10-30 01:41:24 +00:00
Nate Williams 31f6ea3211 - MFC: News definitions, and removal of PAO-specific definitions. 1997-10-30 01:18:37 +00:00
Nate Williams 10dac66425 - Userland changes to reflect the changes made in the kernel pccard
sources.  You must re-build/re-install pccardd or else it won't
  recognize insertion/removal events.
1997-10-30 00:40:09 +00:00
Nate Williams cafbafde03 - MFC: Better suspend/resume laptop support. Due to interest in
bringing it in (and the fact that it's mostly broken here still), bring
  in all of the changes.  You must edit your custom kernel file, and
  re-config/build/install a new kernel for these changes.

[ Note userland changes are required as well, they'll be committed ASAP ]
1997-10-30 00:38:27 +00:00
Jordan K. Hubbard 2c0e775278 MFC: proper use of chflags in upgrade 1997-10-29 07:47:27 +00:00
Satoshi Asami b6a5549243 Merge 1.32 (pmake cleanness). 1997-10-29 01:23:14 +00:00
Julian Elischer 9aa8e0fee6 MFC:
Fix various problems with netatalk kernel support.
Some of these changes are a bit rough and will become
more polished later.  the changes to if_ethersubr should largely be moved
to within the appletalk code, but that will happen later.
A few of these were related to network-byteorder problems,
and more were related to loopback failures.
1997-10-29 00:33:59 +00:00
Joerg Wunsch d3be7d37ea MFC: typo fix 1997-10-28 07:47:24 +00:00
Jordan K. Hubbard 2589f597e2 MFC: 1.13, mention daemon saver. 1997-10-27 08:22:54 +00:00
Jordan K. Hubbard 10e8e7dc86 MFC: 512MB MAXDSIZE 1997-10-27 00:39:15 +00:00
Jordan K. Hubbard 779a78f185 MFC: parallelize 1997-10-26 23:54:24 +00:00
Jordan K. Hubbard 89ab5bc7f7 MFC: parallelize. 1997-10-26 23:37:21 +00:00
Jordan K. Hubbard 72cda6fbff MFC: parallelize 1997-10-26 23:37:04 +00:00
Jordan K. Hubbard 36af3b3b36 NODOC should be enabled for now. 1997-10-26 23:35:22 +00:00
Jordan K. Hubbard 618e3470d2 MFC: parallelize 1997-10-26 22:48:31 +00:00
Guido van Rooij cdd618b97c MFC: On execing a sgid program, do not set P_SUGID when cr_gid and cr)_uid
do not change.
Reviewed by:	 4755
1997-10-26 20:39:44 +00:00
cvs2svn 65a105cd4c This commit was manufactured by cvs2svn to create branch 'RELENG_2_2'. 1997-10-26 06:06:55 +00:00
Nate Williams dc2b07f121 MFC: Cleanup, staticize, fix the manpage, etc..
[ No real functional changes. ]
1997-10-26 04:13:48 +00:00
Jordan K. Hubbard 58bb0f6dba End the contraversy and commit the *&%#@! 2.2.5 change. :) 1997-10-26 04:11:21 +00:00
Jordan K. Hubbard 80e8079d74 MFC: parallelization changes. 1997-10-26 02:18:41 +00:00
John Polstra 5906ff8223 Merge from main branch 1.4 -> 1.6: Fix misuse of NULL, and use
SEEK_SET instead of L_SET.
1997-10-26 00:46:42 +00:00
Poul-Henning Kamp 7dbc3e67ad Recognize more of the Znyx 314 cards. 1997-10-25 14:33:16 +00:00
Peter Wemm f4b17d6dbf Merge in login.conf relaxations from -current, including a typo fix. 1997-10-25 11:39:21 +00:00
Jordan K. Hubbard efa3ef68f0 MFC: typo 1997-10-25 09:27:36 +00:00
Brian Somers 257c74eeba MFC: Fix various filter problems 1997-10-24 23:16:48 +00:00
Brian Somers f32b9c1276 MFC: sleep => nointr_sleep
usleep => nointr_usleep
1997-10-24 23:15:43 +00:00
Jordan K. Hubbard 1f3ce7cfab Update to match amended version. 1997-10-24 10:35:57 +00:00
Jordan K. Hubbard 48deac08f8 Update for a post-2.2.5 world. 1997-10-24 07:09:43 +00:00
Tim Vanderhoek 5049a17c0c YACC: sync defaults with reality (from rev. 1.6).
PR:		docs/3817
1997-10-24 04:52:39 +00:00
David Greenman 861f6791e9 Merge important fix from rev 1.44 that was overlooked for the 2.2.5
release: fix panic that can result from anything that accesses kernel
memory (w, ps, top, snmpd) if the kernel memory should change during
the accesses, resulting in bogus /dev/kmem memory references.
Wcarchive paniced yesterday due to this bug.
1997-10-24 04:38:18 +00:00
Alexander Langer f3f2cf899c Merge IOPL check from rev 1.42. 1997-10-23 22:14:24 +00:00
Nate Williams 1690d5f3ca MFC: Bring in all the 'safe' changes from current
- When doing suspend/resume, only try to suspend those drivers on active
  slots.
- Simplify code by removing a variable which was initialized once, never
  modified, and was expected to have the initialized value.
- Speaker audio & low power mode on certain Cirrus Logic chips.
- Update chip ID comments.
- PCIC_RESUME_RESET & APM_PCCARD_RESUME sysctls.
- make getb() and putb() member functions of struct pcic_slot.
- Don't start at IRQ 0 in build-freelist, but instead start at IRQ 1.
- Don't apply 5V when we want 3.3V.  Kludge around the case where the PCIC
  refuses to use 5V because it knows better than us.
- Make MOD_* macros almost consistent.

Reviewed by:	[email protected]
1997-10-23 18:44:07 +00:00
Joerg Wunsch 12dc924ede MFC: reject illegal combinations of O_RDONLY, O_RDWR, and O_WRONLY
in open(2), and document the return value EINVAL.
1997-10-23 18:05:06 +00:00
Brian Somers 3f8559f2c1 MFC: Fix HDLC logging. 1997-10-23 09:50:55 +00:00
Nate Williams 4f1d0db9b8 MFC: pccard support (minus the unused SCSI_DETACH code). 1997-10-21 18:14:10 +00:00
Nate Williams cd50789984 MFC: Updated CIS tuple for Adaptec SlimSCSI. 1997-10-21 18:09:03 +00:00
Jordan K. Hubbard b56db3ce74 We're not at 2.2.5-release anymore.
The ultimate value of these variables is also not something I'm up
for debating at the moment, I'm simply adjusting this so that 2.2 SNAPs
don't announce themselves as 2.2.5
1997-10-21 13:27:40 +00:00
KATO Takenori d8916dfa94 `isvplocked' should be initialzed.
Pointed out by:		bde
1997-10-21 07:08:20 +00:00
2312 changed files with 92069 additions and 125804 deletions

No files matched your search

+104 -38
View File
@@ -1,14 +1,15 @@
#
# $Id: Makefile,v 1.109.2.18 1997/09/17 23:50:26 rgrimes Exp $
# $Id: Makefile,v 1.109.2.24 1998/03/09 14:18:02 jkh Exp $
#
# Make command line options:
# -DCLOBBER will remove /usr/include
# -DMAKE_EBONES to build eBones (KerberosIV)
# -DMAKE_KERBEROS4 to build KerberosIV
# -DALLLANG to build documentation for all languages
# (where available -- see share/doc/Makefile)
#
# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
# -DNOCLEAN do not clean at all
# -DNOTOOLS do not rebuild any tools first
# -DNOCRYPT will prevent building of crypt versions
# -DNOLKM do not build loadable kernel modules
# -DNOOBJDIR do not run ``${MAKE} obj''
@@ -17,6 +18,7 @@
# -DNOGAMES do not go into games subdir
# -DNOSHARE do not go into share subdir
# -DNOINFO do not make or install info files
# -DNOPERL do not make or install perl
# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
#
@@ -39,6 +41,13 @@
# Put initial settings here.
SUBDIR=
# We must do share/info early so that installation of info `dir'
# entries works correctly. Do it first since it is less likely to
# grow dependencies on include and lib than vice versa.
.if exists(share/info)
SUBDIR+= share/info
.endif
# We must do include and lib first so that the perl *.ph generation
# works correctly as it uses the header files installed by this.
.if exists(include)
@@ -57,8 +66,8 @@ SUBDIR+= games
.if exists(gnu)
SUBDIR+= gnu
.endif
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
SUBDIR+= eBones
.if exists(kerberosIV) && exists(crypto) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
SUBDIR+= kerberosIV
.endif
.if exists(libexec)
SUBDIR+= libexec
@@ -146,7 +155,7 @@ world:
cd ${.CURDIR} && ${MAKE} pre-world
.endif
cd ${.CURDIR} && ${MAKE} buildworld
cd ${.CURDIR} && ${MAKE} installworld
cd ${.CURDIR} && ${MAKE} -B installworld
.if target(post-world)
@echo
@echo "--------------------------------------------------------------"
@@ -209,14 +218,22 @@ buildworld:
chflags -R noschg ${WORLDTMP}/
rm -rf ${WORLDTMP}
.endif
.if !defined(NOTOOLS)
@echo
@echo "--------------------------------------------------------------"
@echo " Making make"
@echo "--------------------------------------------------------------"
mkdir -p ${WORLDTMP}/usr/bin
.if !defined(NOCLEAN) || !defined(NOOBJDIR)
cd ${.CURDIR}/usr.bin/make && \
${IBMAKE} -I${.CURDIR}/share/mk ${OBJDIR} clean cleandepend depend && \
${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all install clean cleandepend
${IBMAKE} -I${.CURDIR}/share/mk ${CLEANDIR} ${OBJDIR}
.endif
cd ${.CURDIR}/usr.bin/make && \
${IBMAKE} -I${.CURDIR}/share/mk depend && \
${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all && \
${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} install && \
${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} clean cleandepend
.endif
@echo
@echo "--------------------------------------------------------------"
@echo " Making hierarchy"
@@ -227,15 +244,16 @@ buildworld:
@echo "--------------------------------------------------------------"
@echo " Cleaning up the obj tree"
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && ${BMAKE} ${CLEANDIR}
cd ${.CURDIR} && ${BMAKE} par-${CLEANDIR}
.endif
.if !defined(NOOBJDIR)
@echo
@echo "--------------------------------------------------------------"
@echo " Rebuilding the obj tree"
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && ${BMAKE} obj
cd ${.CURDIR} && ${BMAKE} par-obj
.endif
.if !defined(NOTOOLS)
@echo
@echo "--------------------------------------------------------------"
@echo " Rebuilding bootstrap tools"
@@ -246,31 +264,36 @@ buildworld:
@echo " Rebuilding tools necessary to build the include files"
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && ${BMAKE} include-tools
.endif
@echo
@echo "--------------------------------------------------------------"
@echo " Rebuilding /usr/include"
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && SHARED=symlinks ${BMAKE} includes
.if !defined(NOTOOLS)
@echo
@echo "--------------------------------------------------------------"
@echo " Rebuilding tools needed to build the libraries"
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && ${BMAKE} lib-tools
.endif
@echo
@echo "--------------------------------------------------------------"
@echo " Rebuilding /usr/lib"
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && ${BMAKE} libraries
.if !defined(NOTOOLS)
@echo
@echo "--------------------------------------------------------------"
@echo " Rebuilding all other tools needed to build the world"
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && ${BMAKE} build-tools
.endif
@echo
@echo "--------------------------------------------------------------"
@echo " Rebuilding dependencies"
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && ${XMAKE} depend
cd ${.CURDIR} && ${XMAKE} ${.MAKEFLAGS} par-depend
@echo
@echo "--------------------------------------------------------------"
@echo " Building everything.."
@@ -304,6 +327,11 @@ reinstall:
cd ${.CURDIR} && ${MAKE} install
@echo
@echo "--------------------------------------------------------------"
@echo " Re-scanning the shared libraries.."
@echo "--------------------------------------------------------------"
cd ${.CURDIR} && ldconfig -R
@echo
@echo "--------------------------------------------------------------"
@echo " Rebuilding man page indexes"
@echo "--------------------------------------------------------------"
cd ${.CURDIR}/share/man && ${MAKE} makedb
@@ -351,8 +379,8 @@ most:
cd ${.CURDIR}/gnu/libexec && ${MAKE} ${.MAKEFLAGS} all
cd ${.CURDIR}/gnu/usr.bin && ${MAKE} ${.MAKEFLAGS} all
cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} ${.MAKEFLAGS} all
#.if defined(MAKE_EBONES) && !defined(NOCRYPT)
# cd ${.CURDIR}/eBones && ${MAKE} ${.MAKEFLAGS} most
#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT)
# cd ${.CURDIR}/kerberosIV && ${MAKE} ${.MAKEFLAGS} most
#.endif
#.if !defined(NOSECURE) && !defined(NOCRYPT)
# cd ${.CURDIR}/secure && ${MAKE} ${.MAKEFLAGS} most
@@ -376,8 +404,8 @@ installmost:
cd ${.CURDIR}/gnu/libexec && ${MAKE} ${.MAKEFLAGS} install
cd ${.CURDIR}/gnu/usr.bin && ${MAKE} ${.MAKEFLAGS} install
cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} ${.MAKEFLAGS} install
#.if defined(MAKE_EBONES) && !defined(NOCRYPT)
# cd ${.CURDIR}/eBones && ${MAKE} ${.MAKEFLAGS} installmost
#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT)
# cd ${.CURDIR}/kerberos4 && ${MAKE} ${.MAKEFLAGS} installmost
#.endif
#.if !defined(NOSECURE) && !defined(NOCRYPT)
# cd ${.CURDIR}/secure && ${MAKE} ${.MAKEFLAGS} installmost
@@ -413,11 +441,14 @@ bootstrap:
cd ${.CURDIR}/include && make symlinks
.endif
cd ${.CURDIR}/usr.bin/make && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} -DNOLIB all install ${CLEANDIR}
${MAKE} ${MK_FLAGS} -DNOLIB all && \
${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR}
.if !defined(NOOBJDIR)
cd ${.CURDIR}/usr.bin/lex && ${MAKE} obj
.endif
@@ -431,8 +462,9 @@ bootstrap:
# on cleaned away headers in ${WORLDTMP}.
#
include-tools:
cd ${.CURDIR}/usr.bin/rpcgen && ${MAKE} cleandepend depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
cd ${.CURDIR}/usr.bin/rpcgen && ${MAKE} -B cleandepend depend && \
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
#
# includes - possibly generate and install the include files.
@@ -443,17 +475,22 @@ includes:
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${DESTDIR}/usr/include
.endif
cd ${.CURDIR}/include && ${MAKE} all install
cd ${.CURDIR}/include && ${MAKE} -B all install
cd ${.CURDIR}/gnu/include && ${MAKE} install
cd ${.CURDIR}/gnu/lib/libreadline && ${MAKE} beforeinstall
cd ${.CURDIR}/gnu/lib/libregex && ${MAKE} beforeinstall
cd ${.CURDIR}/gnu/lib/libstdc++ && ${MAKE} beforeinstall
cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall
cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
cd ${.CURDIR}/eBones/include && ${MAKE} beforeinstall
cd ${.CURDIR}/eBones/lib/libkrb && ${MAKE} beforeinstall
cd ${.CURDIR}/eBones/lib/libkadm && ${MAKE} beforeinstall
.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
cd ${.CURDIR}/kerberosIV/lib/libacl && ${MAKE} beforeinstall
cd ${.CURDIR}/kerberosIV/lib/libkadm && ${MAKE} beforeinstall
cd ${.CURDIR}/kerberosIV/lib/libkafs && ${MAKE} beforeinstall
cd ${.CURDIR}/kerberosIV/lib/libkdb && ${MAKE} beforeinstall
cd ${.CURDIR}/kerberosIV/lib/libkrb && ${MAKE} beforeinstall
cd ${.CURDIR}/kerberosIV/lib/libtelnet && ${MAKE} beforeinstall
.else
cd ${.CURDIR}/lib/libtelnet && ${MAKE} beforeinstall
.endif
cd ${.CURDIR}/lib/csu/i386 && ${MAKE} beforeinstall
cd ${.CURDIR}/lib/libalias && ${MAKE} beforeinstall
@@ -498,7 +535,8 @@ lib-tools:
usr.bin/ranlib \
usr.bin/uudecode
cd ${.CURDIR}/$d && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endfor
#
@@ -507,43 +545,53 @@ lib-tools:
libraries:
.if exists(lib/csu/i386)
cd ${.CURDIR}/lib/csu/i386 && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(lib/libcompat)
cd ${.CURDIR}/lib/libcompat && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(lib/libncurses)
cd ${.CURDIR}/lib/libncurses && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(lib/libtermcap)
cd ${.CURDIR}/lib/libtermcap && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(gnu)
cd ${.CURDIR}/gnu/lib && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
cd ${.CURDIR}/secure/lib && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(lib)
cd ${.CURDIR}/lib && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(usr.bin/lex/lib)
cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
cd ${.CURDIR}/eBones/lib && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
.if exists(kerberosIV) && exists(crypto) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
cd ${.CURDIR}/kerberosIV/lib && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
.if exists(usr.sbin/pcvt/keycap)
cd ${.CURDIR}/usr.sbin/pcvt/keycap && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endif
#
@@ -614,7 +662,25 @@ build-tools:
usr.sbin/mtree \
usr.sbin/zic
cd ${.CURDIR}/$d && ${MAKE} depend && \
${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
${MAKE} ${MK_FLAGS} all && \
${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
.endfor
.for __target in clean cleandir obj depend
.for entry in ${SUBDIR}
${entry}.${__target}__D: .PHONY
if test -d ${.CURDIR}/${entry}.${MACHINE}; then \
${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE}"; \
edir=${entry}.${MACHINE}; \
cd ${.CURDIR}/$${edir}; \
else \
${ECHODIR} "===> ${DIRPRFX}${entry}"; \
edir=${entry}; \
cd ${.CURDIR}/$${edir}; \
fi; \
${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
.endfor
par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
.endfor
.include <bsd.subdir.mk>
+3 -3
View File
@@ -1,5 +1,5 @@
This is the top level of the FreeBSD source directory. This file
was last revised on: $Id: README,v 1.7 1997/01/01 14:06:29 jkh Exp $
was last revised on: $Id: README,v 1.7.2.1 1997/08/13 19:49:35 jkh Exp $
For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
@@ -14,10 +14,10 @@ kernel and the contents of /etc. Please see the top of the Makefile
in this directory for more information on the standard build targets
and compile-time flags.
Building a kernel with config(1) is a somewhat more involved process,
Building a kernel with config(8) is a somewhat more involved process,
documentation for which can be found at:
http://www.freebsd.org/handbook/kernelconfig.html
And in the config(1) man page.
And in the config(8) man page.
The sample kernel configuration files reside in the sys/i386/conf
sub-directory (assuming that you've installed the kernel sources), the
+2 -2
View File
@@ -1,4 +1,4 @@
/* $Id: chio.c,v 1.1.1.1.2.1 1997/06/06 16:02:01 charnier Exp $ */
/* $Id: chio.c,v 1.1.1.1.2.2 1997/08/24 10:29:16 jkh Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe <[email protected]>
@@ -374,7 +374,7 @@ do_params(cname, argc, argv)
/* No arguments to this command. */
if (argc) {
warnx("%s: no arguements expected", cname);
warnx("%s: no arguments expected", cname);
goto usage;
}
+6 -2
View File
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)chmod.1 8.4 (Berkeley) 3/31/94
.\" $Id: chmod.1,v 1.7 1997/02/22 14:01:29 peter Exp $
.\" $Id: chmod.1,v 1.4.2.1 1997/02/28 07:54:25 mpp Exp $
.\"
.Dd March 31, 1994
.Dt CHMOD 1
@@ -110,10 +110,14 @@ the following values:
.Bl -tag -width 6n -compact -offset indent
.It Li 4000
set-user-ID-on-execution
( see
.Xr chmod 2
for directories )
.It Li 2000
set-group-ID-on-execution
.It Li 1000
sticky bit, see chmod(2)
sticky bit, see
.Xr chmod 2
.It Li 0400
read by owner
.It Li 0200
+21 -6
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: utils.c,v 1.9 1996/03/08 06:58:08 wosch Exp $
* $Id: utils.c,v 1.9.2.1 1997/08/24 10:34:49 jkh Exp $
*/
#ifndef lint
@@ -60,7 +60,8 @@ copy_file(entp, dne)
{
static char buf[MAXBSIZE];
struct stat to_stat, *fs;
int ch, checkch, from_fd, rcount, rval, to_fd, wcount;
int ch, checkch, from_fd, rcount, rval, to_fd, wcount, wresid;
char *bufp;
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
char *p;
#endif
@@ -81,13 +82,16 @@ copy_file(entp, dne)
* modified by the umask.)
*/
if (!dne) {
#define YESNO "(y/n [n]) "
if (iflag) {
(void)fprintf(stderr, "overwrite %s? ", to.p_path);
(void)fprintf(stderr, "overwrite %s? %s",
to.p_path, YESNO);
checkch = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar();
if (checkch != 'y' && checkch != 'Y') {
(void)close(from_fd);
(void)fprintf(stderr, "not overwritten\n");
return (0);
}
}
@@ -125,7 +129,13 @@ copy_file(entp, dne)
warn("%s", entp->fts_path);
rval = 1;
} else {
if (write(to_fd, p, fs->st_size) != fs->st_size) {
for (bufp = p, wresid = fs->st_size; ;
bufp += wcount, wresid -= wcount) {
wcount = write(to_fd, bufp, wresid);
if (wcount >= wresid || wcount <= 0)
break;
}
if (wcount != wresid) {
warn("%s", to.p_path);
rval = 1;
}
@@ -139,8 +149,13 @@ copy_file(entp, dne)
#endif
{
while ((rcount = read(from_fd, buf, MAXBSIZE)) > 0) {
wcount = write(to_fd, buf, rcount);
if (rcount != wcount || wcount == -1) {
for (bufp = buf, wresid = rcount; ;
bufp += wcount, wresid -= wcount) {
wcount = write(to_fd, bufp, wresid);
if (wcount >= wresid || wcount <= 0)
break;
}
if (wcount != wresid) {
warn("%s", to.p_path);
rval = 1;
break;
+3 -2
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: csh.c,v 1.6 1995/10/23 23:08:25 ache Exp $
* $Id: csh.c,v 1.6.2.1 1997/08/24 21:41:29 jkh Exp $
*/
#ifndef lint
@@ -46,6 +46,7 @@ static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93";
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <fcntl.h>
#include <errno.h>
#include <pwd.h>
@@ -229,7 +230,7 @@ main(argc, argv)
*/
set(STRstatus, Strsave(STR0));
if ((tcp = getenv("HOME")) != NULL)
if ((tcp = getenv("HOME")) != NULL && strlen(tcp) < MAXPATHLEN)
cp = SAVE(tcp);
else
cp = NULL;
+2 -2
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: err.c,v 1.2 1994/09/24 02:53:57 davidg Exp $
* $Id: err.c,v 1.2.8.1 1997/08/24 21:41:31 jkh Exp $
*/
#ifndef lint
@@ -307,7 +307,7 @@ seterror(id, va_alist)
#endif
if (id < 0 || id > sizeof(errorlist) / sizeof(errorlist[0]))
id = ERR_INVALID;
vsprintf(berr, errorlist[id], va);
vsnprintf(berr, sizeof(berr), errorlist[id], va);
va_end(va);
seterr = strsave(berr);
+3 -3
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: file.c,v 1.4 1995/06/18 14:08:44 ache Exp $
* $Id: file.c,v 1.4.2.1 1997/08/24 21:41:33 jkh Exp $
*/
#ifndef lint
@@ -450,7 +450,7 @@ tsearch(word, command, max_word_length)
looking_for_lognames = (*word == '~') && (Strchr(word, '/') == NULL);
if (looking_for_lognames) {
(void) setpwent();
setpwent();
copyn(name, &word[1], MAXNAMLEN); /* name sans ~ */
dir_fd = NULL;
}
@@ -498,7 +498,7 @@ again: /* search for matches */
ignoring = FALSE;
nignored = 0;
if (looking_for_lognames)
(void) setpwent();
setpwent();
else
rewinddir(dir_fd);
goto again;
+3 -1
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: proc.c,v 1.2 1994/09/24 02:54:13 davidg Exp $
* $Id: proc.c,v 1.2.8.1 1997/08/24 21:41:37 jkh Exp $
*/
#ifndef lint
@@ -86,6 +86,7 @@ pchild(notused)
struct process *fp;
int pid;
extern int insource;
int save_errno = errno;
union wait w;
int jobflags;
struct rusage ru;
@@ -101,6 +102,7 @@ loop:
goto loop;
}
pnoprocesses = pid == -1;
errno = save_errno;
return;
}
for (pp = proclist.p_next; pp != NULL; pp = pp->p_next)
+6 -6
View File
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)date.1 8.3 (Berkeley) 4/28/95
.\" $Id: date.1,v 1.8.2.4 1997/09/14 13:07:03 jkh Exp $
.\" $Id: date.1,v 1.8.2.6 1997/10/03 12:54:28 danny Exp $
.\"
.Dd November 17, 1993
.Dt DATE 1
@@ -43,14 +43,14 @@
.Nd display or set date and time
.Sh SYNOPSIS
.Nm date
.Op Fl nu
.Op Fl d Ar dst
.Op Fl r Ar seconds
.Op Fl t Ar minutes_west
.Op Fl nu
.Op Cm + Ns Ar format
.Op Fl v Ar [+|-]val[ymwdHM]
.Op Fl v Ns Ar [+|-]val Ns Op ymwdHM
.Ar ...
.Op Fl f Ar fmt Ar date | [[[[yy]mm]dd]HH]MM[\&.ss]
.Op Cm + Ns Ar format
.Sh DESCRIPTION
.Nm
displays the current date and time when invoked without arguments.
@@ -183,12 +183,12 @@ and years are handled automatically.
.Sh EXAMPLES
The command:
.Bd -literal -offset indent
date ``+DATE: %m/%d/%y%nTIME: %H:%M:%S''
date "+DATE: 19%y-%m-%d%nTIME: %H:%M:%S"
.Ed
.Pp
will display:
.Bd -literal -offset indent
DATE: 11/21/87
DATE: 1987-11-21
TIME: 13:36:16
.Ed
.Pp
+6 -5
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: date.c,v 1.7.2.5 1997/10/01 06:12:58 danny Exp $
* $Id: date.c,v 1.7.2.6 1997/10/03 12:54:30 danny Exp $
*/
#ifndef lint
@@ -187,9 +187,9 @@ setthetime(fmt, p)
lt = localtime(&tval);
return;
} else if (*t != '\0')
fprintf(stderr, "Warning: Ignoring %d extraneous"
fprintf(stderr, "Warning: Ignoring %ld extraneous"
" characters in date string (%s)\n",
strlen(t), t);
(long) strlen(t), t);
} else {
for (t = p, dot = NULL; *t; ++t) {
if (isdigit(*t))
@@ -276,7 +276,8 @@ static void
usage()
{
(void)fprintf(stderr, "%s\n%s\n",
"usage: date [-nu] [-d dst] [-r seconds] [-t west] [+format]",
" [-v [+|-]val[ymwdHM]] ... [-f fmt date | [[[[yy]mm]dd]HH]MM[.ss]]");
"usage: date [-nu] [-d dst] [-r seconds] [-t west] "
"[-v[+|-]val[ymwdHM]] ... ",
" [-f fmt date | [[[[yy]mm]dd]HH]MM[.ss]] [+format]");
exit(1);
}
+28
View File
@@ -1,3 +1,31 @@
/*-
* Copyright (c) 1997 Brian Somers <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
*/
#include <time.h>
#include <string.h>
#include <stdlib.h>
+28
View File
@@ -1,3 +1,31 @@
/*-
* Copyright (c) 1997 Brian Somers <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
*/
struct vary {
char *arg;
struct vary *next;
+4 -1
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: args.c,v 1.3.8.1 1996/11/21 16:30:28 phk Exp $
* $Id: args.c,v 1.3.8.2 1997/08/24 21:45:26 jkh Exp $
*/
#ifndef lint
@@ -101,6 +101,8 @@ jcl(argv)
in.dbsz = out.dbsz = 512;
while ((oper = *++argv) != NULL) {
if ((oper = strdup(oper)) == NULL)
errx(1, "unable to allocate space for the argument \"%s\"", *argv);
if ((arg = strchr(oper, '=')) == NULL)
errx(1, "unknown operand %s", oper);
*arg++ = '\0';
@@ -282,6 +284,7 @@ static struct conv {
{ "oldebcdic", C_EBCDIC, C_ASCII, a2e_32V },
{ "oldibm", C_EBCDIC, C_ASCII, a2ibm_32V },
{ "osync", C_OSYNC, C_BS, NULL },
{ "sparse", C_SPARSE, 0, NULL },
{ "swab", C_SWAB, 0, NULL },
{ "sync", C_SYNC, 0, NULL },
{ "ucase", C_UCASE, C_LCASE, NULL },
+8 -1
View File
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
.\" $Id: dd.1,v 1.2.8.1 1997/02/28 07:54:33 mpp Exp $
.\" $Id: dd.1,v 1.2.8.2 1997/08/24 21:45:30 jkh Exp $
.\"
.Dd January 13, 1994
.Dt DD 1
@@ -250,6 +250,13 @@ regularly sized blocks to be written.
This option is incompatible with use of the
.Cm bs= Ns Ar n
block size specification.
.It Cm sparse
If one or more output blocks would consist solely of
.Tn NUL
bytes, try to seek the output file by the required space instead of
filling them with
.Tn NULs ,
resulting in a sparse file.
.It Cm swab
Swap every pair of input bytes.
If an input buffer has an odd number of bytes, the last byte will be
+34 -5
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: dd.c,v 1.5.2.2 1997/08/21 02:52:39 jlemon Exp $
* $Id: dd.c,v 1.5.2.4 1998/01/09 09:13:06 joerg Exp $
*/
#ifndef lint
@@ -75,6 +75,7 @@ IO in, out; /* input/output state */
STAT st; /* statistics */
void (*cfunc) __P((void)); /* conversion function */
u_long cpy_cnt; /* # of blocks to copy */
u_long pending = 0; /* pending seek if sparse */
u_int ddflags; /* conversion options */
u_int cbsz; /* conversion block size */
u_int files_cnt = 1; /* # of files to copy */
@@ -315,7 +316,7 @@ dd_in()
}
if (ddflags & C_SWAB) {
if ((n = in.dbcnt) & 1) {
if ((n = in.dbrcnt) & 1) {
++st.swab;
--n;
}
@@ -347,7 +348,7 @@ dd_close()
memset(out.dbp, 0, out.dbsz - out.dbcnt);
out.dbcnt = out.dbsz;
}
if (out.dbcnt)
if (out.dbcnt || pending)
dd_out(1);
}
@@ -356,7 +357,7 @@ dd_out(force)
int force;
{
static int warned;
int cnt, n, nw;
int cnt, n, nw, i, sparse;
u_char *outp;
/*
@@ -378,7 +379,35 @@ dd_out(force)
outp = out.db;
for (n = force ? out.dbcnt : out.dbsz;; n = out.dbsz) {
for (cnt = n;; cnt -= nw) {
nw = write(out.fd, outp, cnt);
sparse = 0;
if (ddflags & C_SPARSE) {
sparse = 1; /* Is buffer sparse? */
for (i = 0; i < cnt; i++)
if (outp[i] != 0) {
sparse = 0;
break;
}
}
if (sparse && !force) {
pending += cnt;
nw = cnt;
} else {
if (pending != 0) {
if (force)
pending--;
if (lseek (out.fd, pending, SEEK_CUR) == -1)
err(2, "%s: seek error creating sparse file",
out.name);
if (force)
write(out.fd, outp, 1);
pending = 0;
}
if (cnt)
nw = write(out.fd, outp, cnt);
else
return;
}
if (nw <= 0) {
if (nw == 0)
errx(1, "%s: end of device", out.name);
+3 -2
View File
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)dd.h 8.3 (Berkeley) 4/2/94
* $Id: dd.h,v 1.2 1994/09/24 02:54:54 davidg Exp $
* $Id: dd.h,v 1.2.8.2 1998/02/11 02:24:40 asami Exp $
*/
/* Input/output stream state. */
@@ -69,7 +69,7 @@ typedef struct {
u_long out_part; /* # of partial output blocks */
u_long trunc; /* # of truncated records */
u_long swab; /* # of odd-length swab blocks */
u_long bytes; /* # of bytes written */
u_int64_t bytes; /* # of bytes written */
double start; /* start time of dd */
} STAT;
@@ -95,3 +95,4 @@ typedef struct {
#define C_UCASE 0x40000
#define C_UNBLOCK 0x80000
#define C_OSYNC 0x100000
#define C_SPARSE 0x200000
+5 -2
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: misc.c,v 1.2.8.1 1996/11/21 16:30:35 phk Exp $
* $Id: misc.c,v 1.2.8.3 1998/02/11 02:24:41 asami Exp $
*/
#ifndef lint
@@ -45,6 +45,7 @@ static char const sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94";
#include <sys/time.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -81,7 +82,7 @@ summary()
(void)write(STDERR_FILENO, buf, strlen(buf));
}
(void)snprintf(buf, sizeof(buf),
"%u bytes transferred in %.6f secs (%.0f bytes/sec)\n",
"%qu bytes transferred in %.6f secs (%.0f bytes/sec)\n",
st.bytes, secs, st.bytes / secs);
(void)write(STDERR_FILENO, buf, strlen(buf));
}
@@ -91,8 +92,10 @@ void
summaryx(notused)
int notused;
{
int save_errno = errno;
summary();
errno = save_errno;
}
/* ARGSUSED */
+2 -2
View File
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)df.1 8.2 (Berkeley) 1/13/94
.\" $Id: df.1,v 1.4.2.1 1996/12/13 17:15:10 joerg Exp $
.\" $Id: df.1,v 1.4.2.2 1997/09/19 06:18:10 charnier Exp $
.\"
.Dd January 13, 1994
.Dt DF 1
@@ -96,7 +96,7 @@ or
``df -t local -t nomfs''
will display statistics for UFS and LFS filesystems.
.El
.Sh ENVIRONMENTAL VARIABLES
.Sh ENVIRONMENT VARIABLES
.Bl -tag -width BLOCKSIZE
.It Ev BLOCKSIZE
If the environment variable
+2 -2
View File
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: df.c,v 1.8 1996/01/14 18:55:09 bde Exp $
* $Id: df.c,v 1.8.2.1 1996/12/13 17:15:11 joerg Exp $
*/
#ifndef lint
@@ -129,7 +129,7 @@ main(argc, argv)
iflag = nflag = tflag = 0;
fsmask = MT_NONE;
while ((ch = getopt(argc, argv, "iknt:")) != EOF)
while ((ch = getopt(argc, argv, "iknt:")) != -1)
switch (ch) {
case 'i':
iflag = 1;
+11 -3
View File
@@ -24,11 +24,15 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: buf.c,v 1.7 1995/05/30 00:06:43 rgrimes Exp $
*/
#ifndef lint
static char *rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp";
#if 0
static char * const rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp";
#else
static char * const rcsid =
"$Id: buf.c,v 1.15 1997/12/31 12:25:33 helbig Exp $";
#endif
#endif /* not lint */
#include <sys/file.h>
@@ -264,6 +268,10 @@ init_buffers()
hello, world
EOF */
setbuffer(stdin, stdinbuf, 1);
/* Ensure stdout is line buffered. This avoids bogus delays
of output if stdout is piped through utilities to a terminal. */
setvbuf(stdout, NULL, _IOLBF, 0);
if (open_sbuf() < 0)
quit(2);
REQUE(&buffer_head, &buffer_head);
+2 -2
View File
@@ -1,4 +1,4 @@
.\" $Id: ed.1,v 1.8 1996/10/05 22:26:02 wosch Exp $
.\" $Id: ed.1,v 1.12 1997/12/31 12:25:35 helbig Exp $
.TH ED 1 "21 May 1993"
.SH NAME
.\" ed, red \- text editor
@@ -820,7 +820,7 @@ are treated as a single command by undo.
is its own inverse.
.TP 8
.RI (1,$)v /pat/command-list
.RI (1,$)v /re/command-list
Applies
.I command-list
to each of the addressed lines not matching a regular expression
+1 -2
View File
@@ -25,10 +25,9 @@
* SUCH DAMAGE.
*
* @(#)ed.h,v 1.5 1994/02/01 00:34:39 alm Exp
* $Id: ed.h,v 1.7 1994/09/24 02:55:25 davidg Exp $
* $Id: ed.h,v 1.8 1994/11/03 21:46:55 davidg Exp $
*/
#include <sys/types.h>
#include <sys/param.h> /* for MAXPATHLEN */
#include <errno.h>
#if defined(sun) || defined(__NetBSD__)
+8 -3
View File
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: main.c,v 1.6 1996/08/11 16:48:11 ache Exp $
* $Id: main.c,v 1.6.2.1 1997/08/24 21:50:21 jkh Exp $
*/
#ifndef lint
@@ -1355,7 +1355,8 @@ signal_hup(signo)
{
if (mutex)
sigflags |= (1 << (signo - 1));
else handle_hup(signo);
else
handle_hup(signo);
}
@@ -1365,7 +1366,8 @@ signal_int(signo)
{
if (mutex)
sigflags |= (1 << (signo - 1));
else handle_int(signo);
else
handle_int(signo);
}
@@ -1415,6 +1417,8 @@ void
handle_winch(signo)
int signo;
{
int save_errno = errno;
struct winsize ws; /* window size structure */
sigflags &= ~(1 << (signo - 1));
@@ -1422,6 +1426,7 @@ handle_winch(signo)
if (ws.ws_row > 2) rows = ws.ws_row - 2;
if (ws.ws_col > 8) cols = ws.ws_col - 8;
}
errno = save_errno;
}
+2 -2
View File
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ls.1 8.6 (Berkeley) 4/18/94
.\" $Id: ls.1,v 1.5.2.3 1997/03/26 17:55:17 obrien Exp $
.\" $Id: ls.1,v 1.5.2.4 1997/09/19 06:18:11 charnier Exp $
.\"
.Dd April 18, 1994
.Dt LS 1
@@ -265,7 +265,7 @@ and setgroup-ID mode is set.
The file is executable or the directory is
searchable.
.It Sy \-
The file is neither readable, writeable, executable,
The file is neither readable, writable, executable,
nor set-user-ID nor set-group-ID mode, nor sticky. (See below.)
.El
.Pp
+2 -2
View File
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ls.c,v 1.9 1995/10/26 10:56:38 ache Exp $
* $Id: ls.c,v 1.10 1996/08/27 21:51:48 adam Exp $
*/
#ifndef lint
@@ -131,7 +131,7 @@ main(argc, argv)
f_listdot = 1;
fts_options = FTS_PHYSICAL;
while ((ch = getopt(argc, argv, "1ACFLRTacdfgikloqrstu")) != EOF) {
while ((ch = getopt(argc, argv, "1ACFLRTacdfgikloqrstu")) != -1) {
switch (ch) {
/*
* The -1, -C and -l options all override each other so shell
+2 -2
View File
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)mv.1 8.1 (Berkeley) 5/31/93
.\" $Id: mv.1,v 1.6 1996/02/20 23:27:54 wosch Exp $
.\" $Id: mv.1,v 1.7 1996/08/29 18:06:04 wosch Exp $
.\"
.Dd May 31, 1993
.Dt MV 1
@@ -47,7 +47,7 @@
.Ar source target
.Nm mv
.Op Fl f | Fl i
.Ar source ... source directory
.Ar source ... directory
.Sh DESCRIPTION
.Pp
In its first form, the
+30 -12
View File
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: mv.c,v 1.8 1996/03/01 06:14:13 wosch Exp $
* $Id: mv.c,v 1.8.2.1 1997/08/25 08:33:11 jkh Exp $
*/
#ifndef lint
@@ -50,6 +50,7 @@ static char const sccsid[] = "@(#)mv.c 8.2 (Berkeley) 4/2/94";
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <err.h>
#include <errno.h>
@@ -142,7 +143,7 @@ do_move(from, to)
char *from, *to;
{
struct stat sb;
int ask, ch;
int ask, ch, first;
char modep[15];
/*
@@ -157,30 +158,47 @@ do_move(from, to)
warn("%s", from);
return (1);
}
#define YESNO "(y/n [n]) "
ask = 0;
if (iflg) {
(void)fprintf(stderr, "overwrite %s? ", to);
(void)fprintf(stderr, "overwrite %s? %s", to, YESNO);
ask = 1;
} else if (access(to, W_OK) && !stat(to, &sb)) {
strmode(sb.st_mode, modep);
(void)fprintf(stderr, "override %s%s%s/%s for %s? ",
(void)fprintf(stderr, "override %s%s%s/%s for %s? %s",
modep + 1, modep[9] == ' ' ? "" : " ",
user_from_uid(sb.st_uid, 0),
group_from_gid(sb.st_gid, 0), to);
group_from_gid(sb.st_gid, 0), to, YESNO);
ask = 1;
}
if (ask) {
if ((ch = getchar()) != EOF && ch != '\n')
while (getchar() != '\n');
if (ch != 'y' && ch != 'Y')
first = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar();
if (first != 'y' && first != 'Y') {
(void)fprintf(stderr, "not overwritten\n");
return (0);
}
}
}
if (!rename(from, to))
return (0);
if (errno != EXDEV) {
if (errno == EXDEV) {
struct statfs sfs;
char path[MAXPATHLEN];
/* Can't mv(1) a mount point. */
if (realpath(from, path) == NULL) {
warnx("cannot resolve %s: %s", from, path);
return (1);
}
if (!statfs(path, &sfs) && !strcmp(path, sfs.f_mntonname)) {
warnx("cannot rename a mount point");
return (1);
}
} else {
warn("rename %s to %s", from, to);
return (1);
}
@@ -327,7 +345,7 @@ void
usage()
{
(void)fprintf(stderr, "%s\n%s\n",
"usage: mv [-f | -i] src target",
" mv [-f | -i] src1 ... srcN directory");
"usage: mv [-f | -i] source target",
" mv [-f | -i] source ... directory");
exit(1);
}
+1 -3
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ar_io.c,v 1.4.2.1 1997/08/25 08:36:50 jkh Exp $
* $Id: ar_io.c,v 1.4.2.2 1997/09/14 13:07:09 jkh Exp $
*/
#ifndef lint
@@ -42,11 +42,9 @@ static char const sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#endif /* not lint */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mtio.h>
#include <sys/param.h>
#include <signal.h>
#include <string.h>
#include <fcntl.h>
+2 -3
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ar_subs.c,v 1.4.2.1 1997/08/25 08:36:51 jkh Exp $
* $Id: ar_subs.c,v 1.4.2.2 1997/09/14 13:07:11 jkh Exp $
*/
#ifndef lint
@@ -44,7 +44,6 @@ static char const sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94";
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <signal.h>
#include <string.h>
#include <stdio.h>
@@ -743,7 +742,7 @@ copy()
* set up the destination dir path and make sure it is a directory. We
* make sure we have a trailing / on the destination
*/
dlen = l_strncpy(dirbuf, dirptr, PAXPATHLEN);
dlen = l_strncpy(dirbuf, dirptr, sizeof(dirbuf) - 1);
dest_pt = dirbuf + dlen;
if (*(dest_pt-1) != '/') {
*dest_pt++ = '/';
+1 -4
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: buf_subs.c,v 1.4.2.1 1997/08/25 08:36:52 jkh Exp $
* $Id: buf_subs.c,v 1.4.2.2 1997/09/14 13:07:13 jkh Exp $
*/
#ifndef lint
@@ -42,10 +42,7 @@ static char const sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94";
#endif /* not lint */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+1 -3
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cache.c,v 1.3.2.2 1997/08/25 08:36:54 jkh Exp $
* $Id: cache.c,v 1.3.2.3 1997/09/14 13:07:15 jkh Exp $
*/
#ifndef lint
@@ -42,9 +42,7 @@ static char const sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93";
#endif /* not lint */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <string.h>
#include <stdio.h>
#include <pwd.h>
+1 -2
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cpio.c,v 1.4.2.1 1997/08/25 08:36:55 jkh Exp $
* $Id: cpio.c,v 1.4.2.2 1997/09/14 13:07:17 jkh Exp $
*/
#ifndef lint
@@ -44,7 +44,6 @@ static char const sccsid[] = "@(#)cpio.c 8.1 (Berkeley) 5/31/93";
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
+1 -2
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: file_subs.c,v 1.4.2.1 1997/08/25 08:36:56 jkh Exp $
* $Id: file_subs.c,v 1.4.2.2 1997/09/14 13:07:21 jkh Exp $
*/
#ifndef lint
@@ -45,7 +45,6 @@ static char const sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93";
#include <sys/time.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/param.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
+1 -2
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ftree.c,v 1.4.2.1 1997/08/25 08:36:57 jkh Exp $
* $Id: ftree.c,v 1.4.2.2 1997/09/14 13:07:23 jkh Exp $
*/
#ifndef lint
@@ -44,7 +44,6 @@ static char const sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94";
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
+1 -2
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: gen_subs.c,v 1.6 1995/10/23 21:23:14 ache Exp $
* $Id: gen_subs.c,v 1.6.2.1 1997/08/25 08:37:00 jkh Exp $
*/
#ifndef lint
@@ -44,7 +44,6 @@ static char const sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93";
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h>
#include <utmp.h>
#include <unistd.h>
+1 -3
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: options.c,v 1.4.2.1 1997/08/25 08:37:01 jkh Exp $
* $Id: options.c,v 1.4.2.2 1997/09/14 13:07:25 jkh Exp $
*/
#ifndef lint
@@ -42,10 +42,8 @@ static char const sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94";
#endif /* not lint */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/mtio.h>
#include <sys/param.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+1 -3
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: pat_rep.c,v 1.5.2.2 1997/08/25 08:37:02 jkh Exp $
* $Id: pat_rep.c,v 1.5.2.3 1997/09/14 13:07:27 jkh Exp $
*/
#ifndef lint
@@ -42,9 +42,7 @@ static char const sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94";
#endif /* not lint */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+5 -6
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: pax.c,v 1.5.2.1 1997/08/25 08:37:03 jkh Exp $
* $Id: pax.c,v 1.5.2.2 1997/09/14 13:07:29 jkh Exp $
*/
#ifndef lint
@@ -47,17 +47,16 @@ static char const copyright[] =
static char const sccsid[] = "@(#)pax.c 8.2 (Berkeley) 4/18/94";
#endif /* not lint */
#include <stdio.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <locale.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "pax.h"
#include "extern.h"
static int gen_init __P((void));
+1 -2
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: sel_subs.c,v 1.3.2.1 1997/08/25 08:37:04 jkh Exp $
* $Id: sel_subs.c,v 1.3.2.2 1997/09/14 13:07:33 jkh Exp $
*/
#ifndef lint
@@ -44,7 +44,6 @@ static char const sccsid[] = "@(#)sel_subs.c 8.1 (Berkeley) 5/31/93";
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <pwd.h>
#include <grp.h>
#include <stdio.h>
+3 -4
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: tables.c,v 1.4.2.2 1997/08/25 08:37:05 jkh Exp $
* $Id: tables.c,v 1.4.2.3 1997/09/14 13:07:34 jkh Exp $
*/
#ifndef lint
@@ -44,13 +44,12 @@ static char const sccsid[] = "@(#)tables.c 8.1 (Berkeley) 5/31/93";
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include "pax.h"
#include "tables.h"
#include "extern.h"
+1 -2
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: tar.c,v 1.4.2.1 1997/08/25 08:37:05 jkh Exp $
* $Id: tar.c,v 1.4.2.2 1997/09/14 13:07:35 jkh Exp $
*/
#ifndef lint
@@ -44,7 +44,6 @@ static char const sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94";
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
+1 -4
View File
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: tty_subs.c,v 1.3.2.1 1997/08/25 08:37:06 jkh Exp $
* $Id: tty_subs.c,v 1.3.2.2 1997/09/14 13:07:37 jkh Exp $
*/
#ifndef lint
@@ -42,12 +42,9 @@ static char const sccsid[] = "@(#)tty_subs.c 8.2 (Berkeley) 4/18/94";
#endif /* not lint */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
+8 -2
View File
@@ -1,9 +1,15 @@
# @(#)Makefile 8.1 (Berkeley) 6/2/93
# $Id: Makefile,v 1.6 1995/10/25 15:07:38 torstenb Exp $
# $Id: Makefile,v 1.6.2.1 1997/10/16 12:44:17 mckay Exp $
PROG= ps
SRCS= fmt.c keyword.c nlist.c print.c ps.c
CFLAGS+=-I${.CURDIR}/../../sys
#
# To support "lazy" ps for non root/wheel users
# add -DLAZY_PS to the cflags. This helps
# keep ps from being an unnecessary load
# on large systems.
#
CFLAGS+=-I${.CURDIR}/../../sys -DLAZY_PS
DPADD= ${LIBM} ${LIBKVM}
LDADD= -lm -lkvm
BINGRP= kmem
+4 -2
View File
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\" $Id: ps.1,v 1.11 1996/10/21 07:30:25 peter Exp $
.\" $Id: ps.1,v 1.11.2.1 1997/08/21 02:54:28 jlemon Exp $
.\"
.Dd April 18, 1994
.Dt PS 1
@@ -40,7 +40,7 @@
.Nd process status
.Sh SYNOPSIS
.Nm \&ps
.Op Fl aCcehjlmrSTuvwx
.Op Fl aCcefhjlmrSTuvwx
.Op Fl M Ar core
.Op Fl N Ar system
.Op Fl O Ar fmt
@@ -88,6 +88,8 @@ cpu calculation that ignores ``resident'' time (this normally has
no effect).
.It Fl e
Display the environment as well.
.It Fl f
Work harder to get detailed process information.
.It Fl h
Repeat the information header as often as necessary to guarantee one
header per page of information.
+32 -6
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ps.c,v 1.13.2.1 1996/11/11 21:23:15 phk Exp $
* $Id: ps.c,v 1.13.2.2 1997/06/06 16:09:12 charnier Exp $
*/
#ifndef lint
@@ -84,6 +84,12 @@ int totwidth; /* calculated width of requested variables */
static int needuser, needcomm, needenv;
#if defined(LAZY_PS)
static int forceuread=0;
#else
static int forceuread=1;
#endif
enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT;
static char *fmt __P((char **(*)(kvm_t *, const struct kinfo_proc *, int),
@@ -139,7 +145,11 @@ main(argc, argv)
ttydev = NODEV;
memf = nlistf = swapf = NULL;
while ((ch = getopt(argc, argv,
#if defined(LAZY_PS)
"aCcefghjLlM:mN:O:o:p:rSTt:U:uvW:wx")) != EOF)
#else
"aCceghjLlM:mN:O:o:p:rSTt:U:uvW:wx")) != EOF)
#endif
switch((char)ch) {
case 'a':
all = 1;
@@ -153,6 +163,12 @@ main(argc, argv)
case 'e': /* XXX set ufmt */
needenv = 1;
break;
#if defined(LAZY_PS)
case 'f':
if (getuid() == 0 || getgid() == 0)
forceuread = 1;
break;
#endif
case 'g':
break; /* no-op */
case 'h':
@@ -393,6 +409,8 @@ fmt(fn, ki, comm, maxlen)
return (s);
}
#define UREADOK(ki) (forceuread || (KI_PROC(ki)->p_flag & P_INMEM))
static void
saveuser(ki)
KINFO *ki;
@@ -402,7 +420,7 @@ saveuser(ki)
struct user *u_addr = (struct user *)USRSTACK;
usp = &ki->ki_u;
if (kvm_uread(kd, KI_PROC(ki), (unsigned long)&u_addr->u_stats,
if (UREADOK(ki) && kvm_uread(kd, KI_PROC(ki), (unsigned long)&u_addr->u_stats,
(char *)&pstats, sizeof(pstats)) == sizeof(pstats)) {
/*
* The u-area might be swapped out, and we can't get
@@ -419,15 +437,23 @@ saveuser(ki)
/*
* save arguments if needed
*/
if (needcomm)
if (needcomm && UREADOK(ki)) {
ki->ki_args = fmt(kvm_getargv, ki, KI_PROC(ki)->p_comm,
MAXCOMLEN);
else
} else if (needcomm) {
ki->ki_args = malloc(strlen(KI_PROC(ki)->p_comm) + 3);
sprintf(ki->ki_args, "(%s)", KI_PROC(ki)->p_comm);
} else {
ki->ki_args = NULL;
if (needenv)
}
if (needenv && UREADOK(ki)) {
ki->ki_env = fmt(kvm_getenvv, ki, (char *)NULL, 0);
else
} else if (needenv) {
ki->ki_env = malloc(3);
strcpy(ki->ki_env, "()");
} else {
ki->ki_env = NULL;
}
}
static int
+10 -8
View File
@@ -1,23 +1,25 @@
# @(#)Makefile 8.1 (Berkeley) 7/19/93
# $Id: Makefile,v 1.4 1994/09/29 13:06:00 csgr Exp $
# $Id$
PROG= rcp
SRCS= rcp.c util.c
CFLAGS+=-Wall
.if exists(${DESTDIR}/usr/lib/libkrb.a) && (defined(MAKE_KERBEROS) \
|| defined(MAKE_EBONES))
SRCS+= kcmd.c krcmd.c
CFLAGS+=-DKERBEROS -DCRYPT
.if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4)
SRCS+= krcmd.c kcmd.c rcmd_util.c encrypt.c
DPADD= ${LIBKRB} ${LIBDES}
CFLAGS+=-DKERBEROS -DCRYPT -DHAVE_CONFIG_H \
-I${.CURDIR}/../../kerberosIV/include \
-I${.CURDIR}/../../crypto/kerberosIV/include \
-I${.CURDIR}/../../crypto/kerberosIV/lib/roken \
-I${.CURDIR}/../../crypto/kerberosIV/appl/bsd
LDADD= -lkrb -ldes
DISTRIBUTION= krb
.PATH: ${.CURDIR}/../../crypto/kerberosIV/appl/bsd
.endif
BINOWN= root
BINMODE=4555
INSTALLFLAGS=-fschg
.PATH: ${.CURDIR}/../../usr.bin/rlogin
.include <bsd.prog.mk>
+4 -4
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: rcp.c,v 1.8.2.2 1997/06/06 16:11:15 charnier Exp $
* $Id$
*/
#ifndef lint
@@ -70,9 +70,9 @@ static char const sccsid[] = "@(#)rcp.c 8.2 (Berkeley) 4/2/94";
#ifdef KERBEROS
#include <des.h>
#include <kerberosIV/krb.h>
#include <krb.h>
#include "../../usr.bin/rlogin/krb.h"
/* #include "../../usr.bin/rlogin/krb.h" */
char dst_realm_buf[REALM_SZ];
char *dest_realm = NULL;
@@ -344,7 +344,7 @@ tolocal(argc, argv)
if (!(bp = malloc(len)))
err(1, NULL);
(void)snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
iamrecursive ? " -r" : "", pflag ? " -p" : "",
iamrecursive ? " -PR" : "", pflag ? " -p" : "",
argv[i], argv[argc - 1]);
if (susystem(bp, userid))
++errs;
+2 -2
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: rm.c,v 1.10 1996/02/19 05:57:22 pst Exp $
* $Id: rm.c,v 1.11 1996/03/07 23:26:59 wosch Exp $
*/
#ifndef lint
@@ -82,7 +82,7 @@ main(argc, argv)
int ch, rflag;
rflag = 0;
while ((ch = getopt(argc, argv, "dfiPRr")) != EOF)
while ((ch = getopt(argc, argv, "dfiPRr")) != -1)
switch(ch) {
case 'd':
dflag = 1;
+9 -6
View File
@@ -1,5 +1,5 @@
# @(#)Makefile 8.4 (Berkeley) 5/5/95
# $Id: Makefile,v 1.15.2.1 1997/08/25 09:09:28 jkh Exp $
# $Id: Makefile,v 1.15.2.2 1997/08/25 21:16:13 jkh Exp $
PROG= sh
SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
@@ -7,7 +7,8 @@ SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
mystring.c options.c output.c parser.c printf.c redir.c show.c \
trap.c var.c
GENSRCS= arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
SRCS= ${SHSRCS} ${GENSRCS}
GENHDRS= builtins.h nodes.h syntax.h token.h
SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
LDADD+= -ll -ledit -ltermcap
@@ -19,13 +20,13 @@ CFLAGS+=-DSHELL -I. -I${.CURDIR}
.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
CLEANFILES+= builtins.h mkinit mkinit.o mknodes mknodes.o \
CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
mksyntax mksyntax.o \
nodes.h syntax.h token.h y.tab.h
CLEANFILES+= ${GENSRCS}
y.tab.h
CLEANFILES+= ${GENSRCS} ${GENHDRS}
beforedepend: builtins.h nodes.h syntax.h token.h
.ORDER: builtins.c builtins.h
builtins.c builtins.h: mkbuiltins builtins.def
cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
@@ -45,9 +46,11 @@ mknodes.o: mknodes.c # XXX and many headers
mksyntax: mksyntax.o
mksyntax.o: mksyntax.c # XXX and many headers
.ORDER: nodes.c nodes.h
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
.ORDER: syntax.c syntax.h
syntax.c syntax.h: mksyntax
./mksyntax
+2
View File
@@ -29,6 +29,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
*/
char *getpwd __P((void));
+1 -2
View File
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: jobs.c,v 1.8.2.2 1997/08/17 14:47:33 joerg Exp $
* $Id: jobs.c,v 1.8.2.3 1997/08/25 09:10:00 jkh Exp $
*/
#ifndef lint
@@ -45,7 +45,6 @@ static char const sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/param.h>
#ifdef BSD
#include <sys/wait.h>
+63 -4
View File
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: miscbltin.c,v 1.8 1996/09/03 14:24:44 peter Exp $
* $Id: miscbltin.c,v 1.8.2.1 1997/08/25 09:10:10 jkh Exp $
*/
#ifndef lint
@@ -52,6 +52,7 @@ static char const sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <termios.h>
#include "shell.h"
#include "options.h"
@@ -88,14 +89,43 @@ readcmd(argc, argv)
int startword;
int status;
int i;
struct timeval tv;
char *tvptr;
fd_set ifds;
struct termios told, tnew;
int tsaved;
eflag = 0;
prompt = NULL;
while ((i = nextopt("ep:")) != '\0') {
if (i == 'p')
tv.tv_sec = -1;
tv.tv_usec = 0;
while ((i = nextopt("ep:t:")) != '\0') {
switch(i) {
case 'p':
prompt = optarg;
else
break;
case 'e':
eflag = 1;
break;
case 't':
tv.tv_sec = strtol(optarg, &tvptr, 0);
if (tvptr == optarg)
error("timeout value");
switch(*tvptr) {
case 0:
case 's':
break;
case 'h':
tv.tv_sec *= 60;
/* FALLTHROUGH */
case 'm':
tv.tv_sec *= 60;
break;
default:
error("timeout unit");
}
break;
}
}
if (prompt && isatty(0)) {
out2str(prompt);
@@ -105,6 +135,35 @@ readcmd(argc, argv)
error("arg count");
if ((ifs = bltinlookup("IFS", 1)) == NULL)
ifs = nullstr;
if (tv.tv_sec >= 0) {
/*
* See if we can disable input processing; this will
* not give the desired result if we are in a pipeline
* and someone upstream is still in line-by-line mode.
*/
tsaved = 0;
if (tcgetattr(0, &told) == 0) {
memcpy(&tnew, &told, sizeof(told));
cfmakeraw(&tnew);
tcsetattr(0, TCSANOW, &tnew);
tsaved = 1;
}
/*
* Wait for something to become available.
*/
FD_ZERO(&ifds);
FD_SET(0, &ifds);
status = select(1, &ifds, NULL, NULL, &tv);
if (tsaved)
tcsetattr(0, TCSANOW, &told);
/*
* If there's nothing ready, return an error.
*/
if (status <= 0)
return(1);
}
status = 0;
startword = 1;
backslash = 0;
+23 -3
View File
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $Id: sh.1,v 1.9.2.3 1997/08/25 21:22:27 jkh Exp $
.\" $Id: sh.1,v 1.9.2.7 1998/02/12 01:25:29 jdp Exp $
.\"
.Dd May 5, 1995
.Dt SH 1
@@ -453,6 +453,10 @@ error, or a false indication. The man page for each command
should indicate the various exit codes and what they mean.
Additionally, the builtin commands return exit codes, as does
an executed shell function.
.Pp
If a command is terminated by a signal, its exit status is 128 plus
the signal number. Signal numbers are defined in the header file
.Aq Pa sys/signal.h .
.Ss Complex Commands
Complex commands are combinations of simple commands
with control operators or reserved words, together creating a larger complex
@@ -623,7 +627,7 @@ slightly more efficient.
Grouping commands together this way allows you to
redirect their output as though they were one program:
.Bd -literal -offset indent
{ echo -n "hello"; echo " world" } > greeting
{ echo -n "hello"; echo " world"; } > greeting
.Ed
.Ss Functions
The syntax of a function definition is
@@ -970,6 +974,15 @@ etc).
A null command that returns a 0 (true) exit value.
.It \&. file
The commands in the specified file are read and executed by the shell.
If
.Ar file
contains any
.Ql /
characters, it is used as is. Otherwise, the shell searches the
.Ev PATH
for the file. If it is not found in the
.Ev PATH ,
it is sought in the current working directory.
.It alias [ name[=string] ... ]
If name=string is specified, the shell defines the
alias ``name'' with value ``string''. If just ``name''
@@ -1123,7 +1136,7 @@ is rather than recomputing it each time. This makes
it faster. However, if the current directory is
renamed, the builtin version of pwd will continue to
print the old name for the directory.
.It read [ -p prompt ] [ -e ] variable ...
.It Li "read [ -p prompt ] [ -t timeout ] [ -e ] variable ...
The prompt is printed if the -p option is specified
and the standard input is a terminal. Then a line is
read from the standard input. The trailing newline
@@ -1136,6 +1149,13 @@ separated them) are assigned to the last variable.
If there are more variables than pieces, the remaining
variables are assigned the null string.
.Pp
If the -t option is specified the timeout elapses
before any input is supplied, the read command will
return without assigning any values. The timeout value
may optionally be followed by one of 's', 'm' or 'h' to
explicitly specify seconds, minutes or or hours. If none
is supplied, 's' is assumed.
.Pp
The -e option causes any backslashes in the input to
be treated specially. If a backslash is followed by
a newline, the backslash and the newline will be
+12 -6
View File
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: trap.c,v 1.4 1996/09/01 10:21:47 peter Exp $
* $Id: trap.c,v 1.4.2.1 1997/08/25 09:10:46 jkh Exp $
*/
#ifndef lint
@@ -205,12 +205,12 @@ clear_traps()
* Set the signal handler for the specified signal. The routine figures
* out what it should be set to.
*/
long
void
setsignal(signo)
int signo;
{
int action;
sig_t sigact = SIG_DFL;
sig_t sig, sigact = SIG_DFL;
char *t;
if ((t = trap[signo]) == NULL)
@@ -260,7 +260,7 @@ setsignal(signo)
* here, but other shells don't. We don't alter
* sigmode, so that we retry every time.
*/
return 0;
return;
}
if (sigact == SIG_IGN) {
if (mflag && (signo == SIGTSTP ||
@@ -273,14 +273,18 @@ setsignal(signo)
}
}
if (*t == S_HARD_IGN || *t == action)
return 0;
return;
switch (action) {
case S_DFL: sigact = SIG_DFL; break;
case S_CATCH: sigact = onsig; break;
case S_IGN: sigact = SIG_IGN; break;
}
*t = action;
return (long)signal(signo, sigact);
sig = signal(signo, sigact);
#ifdef BSD
if (sig != SIG_ERR && action == S_CATCH)
siginterrupt(signo, 1);
#endif
}
@@ -340,7 +344,9 @@ onsig(signo)
int signo;
{
#ifndef BSD
signal(signo, onsig);
#endif
if (signo == SIGINT && trap[SIGINT] == NULL) {
onint();
return;
+2 -2
View File
@@ -34,14 +34,14 @@
* SUCH DAMAGE.
*
* @(#)trap.h 8.3 (Berkeley) 6/5/95
* $Id: trap.h,v 1.3 1996/09/01 10:21:50 peter Exp $
* $Id: trap.h,v 1.3.2.1 1997/08/25 09:10:48 jkh Exp $
*/
extern int pendingsigs;
int trapcmd __P((int, char **));
void clear_traps __P((void));
long setsignal __P((int));
void setsignal __P((int));
void ignoresig __P((int));
void onsig __P((int));
void dotrap __P((void));
+5 -3
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: print.c,v 1.5 1995/05/30 00:07:27 rgrimes Exp $
* $Id: print.c,v 1.5.6.1 1997/08/25 09:24:08 jkh Exp $
*/
#ifndef lint
@@ -205,8 +205,10 @@ print(tp, wp, ldisc, fmt)
if (fmt != BSD && cc[p->sub] == p->def)
continue;
#define WD "%-8s"
(void)sprintf(buf1 + cnt * 8, WD, p->name);
(void)sprintf(buf2 + cnt * 8, WD, ccval(p, cc[p->sub]));
(void)snprintf(buf1 + cnt * 8, sizeof(buf1) - cnt * 8,
WD, p->name);
(void)snprintf(buf2 + cnt * 8, sizeof(buf2) - cnt * 8,
WD, ccval(p, cc[p->sub]));
if (++cnt == LINELENGTH / 8) {
cnt = 0;
(void)printf("%s\n", buf1);
+2 -3
View File
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: test.c,v 1.13.2.1 1996/12/26 18:54:46 joerg Exp $
* $Id: test.c,v 1.13.2.2 1997/08/25 09:26:35 jkh Exp $
*/
#ifndef lint
@@ -46,9 +46,8 @@ static char const copyright[] =
static char const sccsid[] = "@(#)test.c 8.3 (Berkeley) 4/2/94";
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <ctype.h>
#include <err.h>
+2 -2
View File
@@ -325,9 +325,9 @@ The long-named options can be introduced with `+' as well as `\-\-',
for compatibility with previous releases. Eventually support for `+'
will be removed, because it is incompatible with the POSIX.2 standard.
.SH FILES
/usr/local/lib/bison.simple simple parser
/usr/share/misc/bison.simple simple parser
.br
/usr/local/lib/bison.hairy complicated parser
/usr/share/misc/bison.hairy complicated parser
.SH SEE ALSO
.IR yacc (1)
.br
+1 -1
View File
@@ -3,7 +3,7 @@ GNU cpio 2.4.2
removed files:
INSTALL cpio.info mkdir.c
Makefile.in cpio.texi mkinstalldirs
Makefile.in mkinstalldirs
argmatch.c fnmatch.c mt.1
bcopy.c fnmatch.h mt.c
configure install-sh rmt.c
+4 -4
View File
@@ -1977,7 +1977,7 @@ cases where multiple declaration is valid and changes nothing.
.B \-Wnested-externs
Warn if an \c
.B extern\c
\& declaration is encountered within an function.
\& declaration is encountered within a function.
.TP
.B \-Wenum\-clash
Warn about conversion between different enumeration types (C++ only).
@@ -2925,17 +2925,17 @@ exist in SPARClite but not in SPARC v7.
.B \-mcypress
.TP
.B \-msupersparc
These two options select the processor for which the code is optimised.
These two options select the processor for which the code is optimized.
.Sp
With
.B \-mcypress
(the default), the compiler optimises code for the Cypress CY7C602 chip, as
(the default), the compiler optimizes code for the Cypress CY7C602 chip, as
used in the SparcStation/SparcServer 3xx series. This is also appropriate for
the older SparcStation 1, 2, IPX etc.
.Sp
With
.B \-msupersparc
the compiler optimises code for the SuperSparc cpu, as used in the SparcStation
the compiler optimizes code for the SuperSparc cpu, as used in the SparcStation
10, 1000 and 2000 series. This flag also enables use of the full SPARC v8
instruction set.
.PP
+2 -1
View File
@@ -2098,7 +2098,7 @@ pexecute (search_flag, program, argv, not_last)
/* Exec the program. */
(*func) (program, argv);
perror_exec (program);
exit (-1);
_exit (1);
/* NOTREACHED */
return 0;
@@ -2709,6 +2709,7 @@ process_command (argc, argv)
#ifdef FREEBSD_NATIVE
add_prefix (&exec_prefixes, "/usr/libexec/", 0, 0, NULL_PTR);
add_prefix (&exec_prefixes, "/usr/bin/", 0, 0, NULL_PTR);
add_prefix (&startfile_prefixes, "/usr/libdata/gcc/", 0, 0, NULL_PTR);
#else /* not FREEBSD_NATIVE */
#ifndef OS2
add_prefix (&exec_prefixes, standard_exec_prefix, 0, 2, NULL_PTR);
+2 -1
View File
@@ -87,7 +87,8 @@ add_to_objfile_sections (abfd, asect, objfile_p_char)
/* XXX perhaps this should be in bfd_section_vma (), but it wouldn't
even compile there, since a bfd pointer isn't actually passed in
all invocations of bfd_section_vma (). */
section.addr += bfd_get_start_address (abfd);
if (kernel_debugging)
section.addr += bfd_get_start_address (abfd);
#endif
section.endaddr = section.addr + bfd_section_size (abfd, asect);
obstack_grow (&objfile->psymbol_obstack, (char *) &section, sizeof(section));
+77
View File
@@ -0,0 +1,77 @@
@@@@@@@=
@= @=
@= @=
@= @= @@@@@= @@@@@@= @@= @=
@= F o r a l l h a c k e r s. @=@= @=
@= @@@@@@=@= @= @= @@@@@= @= @= @=
@= @= @= @= @= @= @= @@@@@= @=
@= @= @= @= @= @= @=@= @= @=
@@@@@@@@= @@@@= @@@@@= @@@@@@=@@@= @@@@= @@@@@@=
This software is covered by the following:
Copyright (c) 1996, 1997, 1998 Shigio Yamaguchi. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by Shigio Yamaguchi.
4. Neither the name of the author nor the names of any co-contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of gozilla(1) are covered by the following:
Copyright 1996 Netscape Communications Corporation, all rights reserved.
Created: Jamie Zawinski <[email protected]>, 24-Dec-94.
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting documen-
tation. No representations are made about the suitability of this soft-
ware for any purpose. It is provided "as is" without express or implied
warranty.
Copyright 1991 by Andreas Stolcke
Copyright 1990 by Solbourne Computer Inc.
Longmont, Colorado
All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Solbourne not be used
in advertising in publicity pertaining to distribution of the software
without specific, written prior permission.
ANDREAS STOLCKE AND SOLBOURNE COMPUTER INC. DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MER-
CHANTABILITY AND FITNESS, IN NO EVENT SHALL ANDREAS STOLCKE OR SOL-
BOURNE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
+357
View File
@@ -0,0 +1,357 @@
GLOBAL history
--------------
version 1.0 Initial version [21-Apr-96]
global, gtags, btreeop, extended ctags.
version 1.1 Only bugfix [2-May-96]
[fixed bug]
global - makes corrupted path name by conversion error.
- description of exit code in online manual is mistaken.
btreeop - cannot treat a long line over BUFSIZ. With the result
that gtags fails.
extended ctags - when using -r option, considers a reserved word
to be a function name. With the result that GRTAGS becomes
too large.
version 1.2 Support of 1.34 nvi [7-Jun-96]
[changed]
extended ctags
- change to use bsearch(3) for searching reserved words.
- change to consider '__P' as a reserved word.
- unify the original patch (included in version1.0) and
the bugfix patch (included in version1.1).
[added]
extended vi
- VI tag support.
version 1.3 Support of GTAGSLIBPATH [28-Jul-96]
[changed]
global - search not only in a source tree but also in library paths
specified by environment variable GTAGSLIBPATH.
extended ctags
- change print format a little when -x option
version 1.4 Support of yacc source file [26-Oct-96]
[changed]
extended ctags
- support of yacc source file.
- this version of ctags is NOT COMPATIBLE with original one.
* search all part of a yacc file for C functions.
(original only 3rd part)
* no longer considers a yacc rule to be an object.
version 1.5 Hypertext generator [12-Dec-96]
[fixed bug]
gtags - treat 'y.tab.c' as a C source.(we should treat only *.y)
extended vi
- free stack memory. free(3) in FreeBSD 2.1.5R seems to
show a warning message when receive stack address.
So it spoils the screen.
[added]
htags - new command (hypertext generator of C source file)
gtags - error check code added.
version 1.6 Support of 1.76 nvi and reconstruction for other OS [21-Jan-97]
[changed]
htags - cease using <BLOCKQUOTE> because lynx doesn't understand it.
global,htags
- replace 'sort -u' with 'sort | uniq' for compatibility reason.
[fixed bug]
global - makes illegal path name when using GTAGSLIBPATH.
gtags - error message mistaken.
[added]
nvi-1.76.diff
- patch for nvi 1.76 to make extended vi.
gctags - this is the same with extended ctags in older version.
now GLOBAL includes BSD ctags in it. so no longer has
patch file (ctags.diff).
(I brought original ctags from FreeBSD 2.1.5R)
Thanks to
Gary Kline
Hideki Mori
for their advice.
global - -a option added.
version 1.7 Make suitable for large project (mainly FreeBSD kernel) [17-Feb-97]
[changed]
htags - htags no longer makes frame.html. Index.html offers frame
function too.
- works MUCH faster than previous version.
[fixed bug]
htags - generate path name including '&param'. (It means special
charactor in hypertertext.)
So, changed internal separator from '&' to '|'.
[added]
gtags - -s option added. If specified, gtags extract ENTRY() and
ALTENTRY() from *.[sS] files.
htags - support one level nested index. It's always valid for file
index when directories found, and valid for function index
only when -a option specified.
- -v and -t option added.
systags.sh
- script to make all tags (GTAGS,GRTAGS,HTML) for kernel source.
(it is only for FreeBSD and Linux)
version 1.8 Fix some bugs, add options and make more portable [5-Apr-97]
[changed]
gctags, btreeop, Makefile
- modify for generic UNIX (Linux, Solaris)
- modify to quiet compiler.
Many thanks to
A.E. Brouwer
Oleg Checkulaev
Emile Heyns
gctags - modify to treat '\r' at the end of line.
htags - changed internal separator from '|' to ' '.
because some OS cannot treat '|' in a path.
[fixed bug]
htags - regard a part of path in #include as a reserved word.
- generate illegal links when same tags exist in a line.
- insufficient comment detection.
Thanks to Jeffrey Friedl. I took his code for complete
comment detection.
gctags - regard function name as a definition in extern statement.
- skip macro(no argment) body when -r specified.
gctags, htags
- regard 'entry' as a reserved word.
[added]
global - -c (complete) option added.
htags - -d tagdir option added.
- -w option added.
version 1.81 Make global to understand 'obj' directory [14-Apr-97]
[fixed bug]
extended vi
- doesn't hand '\' in a pattern to global.
[changed]
global
- can find tag file in obj directory.
version 1.9 Support of 1.79 nvi and some additional options [21-Apr-97]
[fixed bug]
htags - doesn't keep the code formatted correctly.
So, changed to convert tabs in source files into spaces.
(expand(1) needed)
Thanks to Andy Newman for his bug report and fix method.
- cannot print error message correctly.
[changed]
gctags, btreeop
- modify for SunOS 4.1.3.
Thanks to Yoshiharu Ito for his information.
[added]
btreeop - META record is available.
(It will be used in the furture.)
- -A and -D option added.
(It will be used in the future.)
global - 'format version record' is available.
(It will be used in the furture.)
htags - use temporary directory specified by TMPDIR environment
variable.
- -l option added.
Thanks to Jeff Trawick. This option is his idea.
nvi-1.79.diff
- patch for nvi 1.79 to make extended vi.
version 2.0 Support of Emacs and CGI Form [7-Jul-97]
[fixed bug]
gtags, htags
- treat files under 'RCS/' or 'SCCS/' directory.
global - allow relative path of GTAGSDBPATH and GTAGSROOT.
htags - illegal tag generated when no definition found.
[changed]
htags - changed not to print line number by default.
If you need it, -n option should be specified.
- added the command name to error message.
- avoid sort(1)'s bug.
- changed for performance.
systags - use -n, -f option for htags by default.
doesn't use -w option for htags by default.
gtags - rewritten with perl.
gtags, gctags
- move some code for assembler source from gtags to gctags.
gtags, htags, global
- restrict PATH to '/bin:/usr/bin'.
btreeop - expand tabs into spaces of output.
[deleted]
nvi-1.76.diff
[added]
gtags.el- emacs support (emulation of 1.34 nvi) added.
htags - hyperlink for include files added.
- check if GTAGS is the latest one.
- -f option added.
With this option, you can use input form and dynamic
index. (You need to setup httpd server for it.)
- -n option added.
global - -f option added.
btreeop - -L option added.
version 2.1 Symbol search, incremental update and gozilla [20-Sep-97]
[changed]
gtags - -e option and -s option were deleted.
These options become default, so you need not to specify
them. Gtags accepts these options for compatibility but
no effect.
global - understand not only 'obj'(MAKEOBJDIR) directory but also
'/usr/obj'(MAKEOBJDIRPREFIX) directory of BSD build system.
Thanks to Jordan K. Hubbard. This is his idea.
gctags, btreeop
- remove <err.h> for portability. (Sorry, Philippe...)
btreeop - output procedure rewritten.
detab() + fprintf -> detab_print()
gtags, htags, global
- don't restrict PATH to '/bin:/usr/bin' like version 1.9
and the former.
[fixed bug]
gctags - cannot treat files which include '\r'.
Thanks to Christoph Conrad for his bug report.
- is disturbed by '_asm' statement.
- write buffer beyoned the end when source file doesn't
end with '\n'. It brings segmentation fault.
gtags.el- ESC-r command doesn't work.
htags - has a security hole in global.cgi.
btreeop - corrupt database when interrupted.
all command
- description of exit code in online manual is fixed.
[added]
gozilla
- new command.
gtags, gctags, global
- can locate specified symbol other than function name
using GSYMS tag file.
btreeop - support secondary key.
Optional key number added to -K option and -D option.
- -k option added.(prefix read)
global
- -g option added.(grep pattern)
Thanks to Hideaki Okada for his advice.
- -s option added.(symbol search)
- -i option added.(incremental update)
- -l option added.(search only under current directory)
- -v option added.(verbose mode)
gtags - -i option added.(incremental update)
- -v option added.(verbose mode)
- -o option added.(stop making GSYMS tag file)
gtags.el- gtags-find-symbol command (ESC-s) added.
It is equal to global's -s option.
- gtags-find-pattern command (ESC-g) added.
It is equal to global's -g option.
version 2.11 Only bugfix [7-Nov-97]
[fixed bug]
htags, gtags
- cannot treat symbolic link.
Thanks to Yoshiharu Ito for his bug report.
Makefile.generic
- doens't work on Debian GNU/Linux.
Thanks to Y.Yoshinaga for his patch.
version 2.2 Rewritten with C for performance [7-Dec-97]
[changed]
gtags, global, gozilla
- rewritten with C.
global - adopted POSIX regular expression (extension) instead of
perl's one.
htags - shape up anchor database.
btreeop - some options (-b, -c, -l, -p) were deleted.
version 2.21 Bugfix and slightly modified [11-Dec-97]
[fixed bug]
gtags, global
- doesn't skip RCS, SCCS, y.tab.c, y.tab.h.
global - generates illegal path name when using GTAGSLIBPATH
with -a option.
[changed]
lib/Makefile.generic
- MANDIR = /usr/share/man -> MANDIR = /usr/man
- replace `lorder $(OBJS) | tsort -q` to already sorted list.
for S.u.S.E Linux 5.1.
Thanks to Christoph Conrad for his information.
gtags, lib/test.c
- some change for Solaris environment.
Thanks to Yamashita TAKAO for his information.
htags/Makefile, systags/Makefile
- ${DESTDIR}/usr/bin -> ${DESTDIR}${BINDIR}
version 2.22 GRTAGS support for assembler source [26-Dec-97]
[changed]
gtags, gctags, htags
- recognize following patterns as a function reference
to C function xxx().
call EXT(xxx)
call _xxx
Thanks to Yamashita TAKAO for his idea.
version 2.23 Bugfix and slightly modified [13-Jan-98]
[fixed bug]
gctags - GRTAGS support in version 2.22 doesn't work.
Thanks to Yamashita TAKAO for his bug report.
[changed]
gctags/Makefile, gctags/Makefile.generic
- -DGLOBAL -DYACC was removed.
gctags/ctags.h
- #define GLOBAL 1 and #define YACC 1 were added.
[added]
COPYING - Copyright notice was added.
version 2.24 Only bugfix [20-Jan-98]
[fixed bug]
global - generates wrong path name when GTAGSROOT includes symbolic
links.
Thanks to Wolfgang Helbig for his bug report.
htags - cannot treat path name which includes digit as the second
character like 'i386'. (In fact it was expand(1)'s bug.)
Thanks to Andrew Gallatin for his bug report.
global - doesn't search 'obj' directory correctly.
+178
View File
@@ -0,0 +1,178 @@
Installation of GLOBAL
20-Jan-1998 Shigio Yamaguchi
---------------------------------------------------------------------------
Guide line (C style)
---------------------------------------------------------------------------
if (Your system == FreeBSD) {
You are lucky!
You need not to do procedure "1. Preparation for generic UNIX".
switch (version) {
case 2.0.5R:
case 2.1.0R:
case 2.1.5R:
There is no problem.
break;
case 2.1.6R:
case 2.1.7R:
I don't know. But it seems same with 2.1.5R.
break;
case 2.2.1R:
It is OK. But your native nvi is version 1.71.
Use 1.79 nvi available on the Internet.
break;
case 2.2.2R:
case 2.2.5R:
Your system inlucdes GLOBAL 1.9. You can overwrite it
with this 2.2 package.
But skip procedure "3. Extended vi (OPTIONAL)", because
your /usr/bin/nvi is already extended nvi for GLOBAL.
break;
default:
I don't know. But it seems to be little problem.
}
} else {
You may some error messages to make GLOBAL.
But it seems not so difficult to clear it. If you make a patch for it,
please let me know. I would like to include your patch into new
version of GLOBAL.
Thank you in advance.
}
----------------------------------------------------------------------------
Install procedure
----------------------------------------------------------------------------
0. Extracting
% tar xzvf global-XXX.tar.gz
% cd global-XXX
(XXX is version number.)
1. Preparation for generic UNIX
If you are a FreeBSD (all version) user, nothing to do here.
Please go to "2. GLOBAL basic".
Otherwise, you must install following items before you install GLOBAL.
a) Generic makefile
This package includes generic makefile. Please do the followings.
% make -f Makefile.generic gen
% vi Makefile <- check install directories (BINDIR, MANDIR)
b) BSD db library version 1.85
If you don't have it, you can fetch it from this site.
http://mongoose.bostic.com/db/packages/db.1.85.tar.gz
c) PERL version 4 or later
If you don't have it, you can fetch it from this site.
ftp://ftp.cis.ufl.edu/pub/perl/CPAN/src/5.0/latest.tar.gz
d) Rewrite some files
If you install GLOBAL into other than /usr/bin, you need rewrite
hard coded path in a program. You can find the place by this command.
% grep '/usr/bin/global' */*.pl
If you install perl to other than /usr/bin, please rewrite hard coded
path in some programs. You can find the places by this command.
% grep '/usr/bin/perl' */*.pl
e) POSIX regular expression (extension) library
If you don't have it, you can use GNU's regex library.
f) Some UNIX tools
Find(1), sed(1), sort(1) are needed.
If your environment is UNIX, you have them.
2. GLOBAL basic (NEEDED)
% make
# make install
3. Extended vi (OPTIONAL)
GLOBAL supports two version of nvi.
There is a little defference in behavior between them when a number of
functions located. (please see 'README'.)
Version 1.34 nvi is included by FreeBSD 2.0.5R, 2.1.0R and 2.1.5R.
Version 1.79 nvi is available on
ftp://ftp.cs.berkeley.edu/ucb/4bsd/nvi-1.79.tar.gz.
If you don't have nvi-1.34, use nvi-1.79.
If you use version 1.34 nvi which is a native command in FreeBSD 2.0.5R,
2.1.0R or 2.1.5R then
% cp -r /usr/src/usr.bin/vi vi <- version 1.34 of nex/nvi
% cd vi
% patch -p < ../nvi-1.34.diff
% make
# make install
else if you use version 1.79 nvi which is the latest version then
fetch from ftp://ftp.cs.berkeley.edu/ucb/4bsd/nvi-1.79.tar.gz and
% tar xzvf nvi-1.79.tar.gz
% cd nvi-1.79
% patch -p < ../nvi-1.79.diff
% cd build
% ./configure
% make
# make install
Caution: If you use FreeBSD 2.2.2R or later, your nvi is already
extended vi. Don't patch with nvi-1.79.diff.
else we have no patch for it.
4. Extended emacs (OPTIONAL)
The version of Emacs supported by GLOBAL is GNU Emacs 19.28, 19.34 or
Mule 2.3 (= Emacs 19.28). Other emacs version seems to work well,
but I don't confirm it.
You can get it from
Emacs 19.34b:
ftp://prep.ai.mit.edu/pub/gnu/emacs-19.34b.tar.gz
Mule 2.3:
ftp://ftp.cs.buffalo.edu/pub/mule/mule-2.3.tar.gz
If you are a FreeBSD user, install it from 'package' (see pkg_add(1)).
If you have installed it then copy gtags.el in this package to the emacs
lisp library directory or place the file in a directory
(for example "~/lisp") and write $HOME/.emacs like this.
+-----------------------------------------------
|(setq load-path (cons "~/lisp" load-path))
5. Gozilla (OPTIONAL)
You need X(1) to install gozilla.
% cd gozilla
% xmkmf
% make
# make install
# make install.man
Good luck!
@@ -1,17 +1,21 @@
COPYING Copyright notice.
HISTORY Histroy of GLOBAL.
INSTALL Installation method
MANIFEST This file.
Makefile Makefile for BSD.
Makefile.inc A part of Makefile for BSD.
Makefile.generic Makefile for generic UNIX(including BSD).
PROBLEMS Problem report.
README Readme (introduction and usage).
VERSION Version number.
btreeop/ Btreeop command directory.
gctags/ Gctags command directory (extended ctags).
global/ Global command directory.
gozilla/ Gozilla command directory.
gctags/ Extended ctags command directory.
gtags/ Gtags command directory.
htags/ Htags command directory.
systags/ Script for kernel.
lib/ library.
gtags.el Gtags mode for Emacs.
nvi-1.34.diff Patch for nvi 1.34.
nvi-1.76.diff Patch for nvi 1.76.
nvi-1.79.diff Patch for nvi 1.79.
+3
View File
@@ -0,0 +1,3 @@
SUBDIR= lib global gtags gctags btreeop htags systags
.include <bsd.subdir.mk>
+7
View File
@@ -0,0 +1,7 @@
BINDIR?= /usr/bin
MANDIR?= /usr/share/man/man
.if exists(${.OBJDIR}/../lib)
LIBUTIL=${.OBJDIR}/../lib/libutil.a
.else
LIBUTIL=${.CURDIR}/../lib/libutil.a
.endif
+38
View File
@@ -0,0 +1,38 @@
GLOBAL cannot recognize following macros and functions.
1. Macro which doesn't end with ';'.
GLOBAL cannot recognize func() after M(a), because M(a) seems to be
function definition.
#define M(a) static char *string = a;
M(a)
func() {
...
}
It should be follows.
#define M(a) static char *string = a
M(a);
func() {
...
}
2. Macro which is a renamed function.
#define func _func
_func() {
...
}
main() {
func();
}
In fact, main() calls _func() instead of func() but GLOBAL cannot
recognize it.
+267 -35
View File
@@ -1,21 +1,33 @@
@@@@@@@-
@- @-
@- @-
@- @- @@@@@- @@@@@@- @@- @-
@- F o r a l l h a c h e r s. version 1.9
@- @@@@@@-@- @- @- @@@@@- @- @- @-
@- @- @- @- @- @- @- @@@@@- @-
@- @- @- @- @- @- @-@- @- @-
@@@@@@@@- @@@@- @@@@@- @@@@@@-@@@- @@@@- @@@@@@-
@@@@@@@=
@= @=
@= @=
@= @= @@@@@= @@@@@@= @@= @=
@= F o r a l l h a c k e r s.
@= @@@@@@=@= @= @= @@@@@= @= @= @=
@= @= @= @= @= @= @= @@@@@= @=
@= @= @= @= @= @= @=@= @= @=
@@@@@@@@= @@@@= @@@@@= @@@@@@=@@@= @@@@= @@@@@@=
Shigio Yamaguchi 21-Apr-97
Shigio Yamaguchi 20-Jan-98
Copyright 1996, 1997 Shigio Yamaguchi All right resereved.
Copyright 1996, 1997, 1998
Shigio Yamaguchi All right resereved.
----------------------------------------------------------
Note:
This version of GLOBAL makes 'GSYMS' tag file for
searching symbols other than functions.
(Try global(1) with -s option.)
But the tag file is very large. If you hope not to
make the file, please use gtags with -o (old) option.
Htags(1) doesn't use 'GSYMS'.
----------------------------------------------------------
GLOBAL is a browsing system for C and Yacc source code.
It brings benefits to all hackers. Enjoy!
Contents
--------------------------------
0. Introduction
@@ -40,6 +52,14 @@ It brings benefits to all hackers. Enjoy!
3.2. Preparation
3.3. Usage
3.4. To make hypertext of kernel
3.5. Gozilla
4. Extended emacs using global
4.1. Features
4.2. Preparation
4.3. Basic usage
4.4. Applied usage
--------------------------------
0. Introduction
@@ -54,9 +74,10 @@ It supports following environments.
o shell command line(see '1. Global')
o vi editor(see '2. Extended vi using global')
o web browser(see '3. Hypertext generator')
o emacs editor(see '4. Emacs using global')
GLOBAL is consist of global(1), gtags(1), btreeop(1), gctags(1), htags(1)
and extended vi(1).
GLOBAL is consist of global(1), gtags(1), btreeop(1), gctags(1), htags(1),
extended vi(1), gtags.el and gozilla(1).
* 'extended' means being entended for GLOBAL.
@@ -77,7 +98,7 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
o Global allows duplicate entries.
o Global can treat a source tree containing subdirectories and you can
get relative path of objects from anywhere within the tree.
o Global can understand perl's regular expression.
o Global can understand POSIX 1003.2 regular expression (extension).
o Global can search in not only a source tree but also library paths.
o Global can treat yacc source file.
@@ -101,9 +122,6 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
GTAGS - database for function definition
GRTAGS - database for function reference
If you cannot find functions that should exist, please try -e option.
% gtags -e
1.3. Basic usage
@@ -154,7 +172,7 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
% global -r func2
../DIR1/fileA.c <- func2() is referred from fileA.c
You can use perl's regular expression.
You can use POSIX regular expression (extension).
% cd ROOT
% global 'func[1-3]'
@@ -174,6 +192,11 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
% global -a func1
/home/user/ROOT/DIR1/fileB.c
-s option locates any symbols other than function.
% global -xs X
X 1 DIR2/fileC.c #ifdef X
You can edit files including specified function directly like this.
% vi `global func1` <- edit fileB.c
@@ -311,14 +334,14 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
o Tag function of extended vi can locate not only function definitions
but also function references.
o Extended vi allows duplicate tag entries.
o Extended vi can understand perl's regular expression as a tag name
for search.
o Extended vi can understand POSIX regular expression (extension)
as a tag name for search.
o Extended vi is completely upper compatible with original one.
Above functions are available only in 'gtags mode'.
2.2. Preparation
First do the preparation of global. (Please see "1.2. Preparation").
First, do the preparation of global. (Please see "1.2. Preparation").
Second, to use global from vi, you need to get into 'gtagsmode'.
There are some ways to do it.
@@ -409,10 +432,10 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
o Other tag commands are available too.
<control-T>
":tagpop"
":tagtop"
":display tags"
<control-T> - Return to the most recent tag context.
":tagpop" - Pop to the specified tag in the tags stack.
":tagtop" - Pop to the top tag in the tags stack.
":display tags" - Display tags stack.
Please read online manual.
@@ -470,6 +493,7 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
o Htags makes hypertext from C source files.
o Once the hypertext generated, you need nothing other than WWW browser.
o You can move hypertext to anywhere. It is independent of the source code.
o You can use all of your browser's functions, for example, search,
history, bookmark, save, frame, windows and so on.
@@ -479,15 +503,20 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
disk space. For example, the source code of FreeBSD kernel needs the
following disk space.
source code(/usr/src/sys) 14MB
tag database(GTAGS,GRTAGS) 9MB(!)
hypertext(HTML/*) 45MB(!!!)
source code(/usr/src/sys) 14.0MB
GTAGS 1.5MB
GRTAGS 8.0MB
GSYMS 12.0MB
HTML/ 55MB(!!!)
-------------------------------------------------
total 77MB
Please do the followings.
(at your source directory)
% gtags <- make tag database
% htags <- make hypertext
% gtags <- make tag database(GTAGS,GRTAGS,GSYMS)
% htags <- make hypertext(HTML/)
Then you will find 'HTML' directory in the current directory.
@@ -498,8 +527,8 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
% lynx HTML/index.html
You can use any browsers, for example, Lynx, Chimera, Mosaic,
Netscape Navigator, Internet Explorer and so on.
(But IE3.0 doesn't work well about index.)
Netscape Navigator, Internet Explorer and so on. But some browsers
cannot treat framed index. Then select '[no frame version is here]'.
You will understand the usage for the looking.
You can move HTML directory to anywhere. It is independent of
@@ -507,7 +536,7 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
3.4. To make hypertext of kernel
If you would like to make hypertext of FreeBSD or Linux kernel source,
If you would like to make hypertext of FreeBSD kernel source,
it is convenient to use systags script in this package.
% cd /usr/src/sys
@@ -516,10 +545,213 @@ All the functions for GLOBAL are enabled only in 'gtagsmode'.
% netscape HTML/index.html
You can use one level nested index and browse assembler source file too.
You can use following functions with systags.
o input form for dynamic index.
(This reqires you to setup httpd server for CGI program.)
o one level nested index.
o browse assembler source file.
Of course, you can use above functions without systags.
Please see gtags(1), htags(1).
3.5. Gozilla
If you use Netscape Navigator, you can control the browser from command
line by gozilla(1).
% gtags
% htags
% global -x fork
fork 60 kern/kern_fork.c fork(p, uap, retval)
% gozilla +60 kern/kern_fork.c
%
Then you can see the hypertext about fork function directly on Netscape
Navigator. If the browser has not been loaded, gozilla loads it.
If you use another browser like lynx, try this.
% gozilla -b lynx +60 kern/kern_fork.c
or
% setenv BROWSER lynx
% gozilla +60 kern/kern_fork.c
You can send remote command to Netscape Navigator too. Try this.
% gozilla -C pagedown
% gozilla -C pageup
The remote commands are undocumented, but you can see the hint in the
resource file. (Netscape.ad file)
NOTES:
Netscape Navigator is a registered trademark of Netscape Communications
Corporation in the United States and other countries.
4. Extended emacs using global
4.1. Features
Addition to the extended vi,
o More intelligent to recongnize current token and its type.
o Tag completion is available for input tag name.
o Mouse event is supported.
4.2. Preparation
First, do the preparation of global. (Please see "1.2. Preparation").
Second, to use global from emacs, you need to load gtags.el file and
execute gtags-mode function in it. There are some ways to do it.
(a) Start emacs, load gtags.el and execute gtags-mode function.
% emacs
|
|J_:-----Mule: *scratch* (Lisp Interaction)--L16--All----
|M-x load-library[RET]
+------------------------------------------------------
|
|J_:-----Mule: *scratch* (Lisp Interaction)--L16--All----
|Load library: gtags[RET]
+------------------------------------------------------
|
|J_:-----Mule: *scratch* (Lisp Interaction)--L16--All----
|M-x gtags-mode[RET]
+------------------------------------------------------
(b) Previously write autoload function to $HOME/.emacs file,
start emacs and execute gtags-mode function.
$HOME/.emacs
+------------------------------------------------------
|(autoload 'gtags-mode "gtags" "" t)
% emacs
|
|J_:-----Mule: *scratch* (Lisp Interaction)--L16--All----
|M-x gtags-mode[RET]
+------------------------------------------------------
(c) Previously write autoload function to $HOME/.emacs file and
start emacs with -f option
$HOME/.emacs
+------------------------------------------------------
|(autoload 'gtags-mode "gtags" "" t)
% emacs -f gtags-mode
You must start emacs under the source tree described in "1.2. Preparation".
4.3. Basic usage
It is resemble to the extended vi based nvi-1.34.
o To go to func1, press 'ESC-t' and you can see a prompt in mini-buffer.
Then input tag name.
:tag func1 # ':tag ' is a prompt.
~~~~~
o To go to referenced point of func1, press 'ESC-r'.
:rtag func1 # 'rtag ' is a prompt
~~~~~
o Tag name completion is available.
:tag fu<TAB>
:tag func1 # 'nc1' is appended by emacs
o If a number of functions located, emacs goes into 'GTAGS SELECT MODE'
like this.
+-------------------------------------------------------------
|main 347 i386/isa/ultra14f.c main()
|main 128 kern/init_main.c main(framep)
|main 104 netiso/clnp_debug.c main()
|main 164 netiso/xebec/main.c main(argc, argv)
|
|
|
|
|
|J_:--%*-Mule: *scratch* (Gtags Select)--L1--All----
|[GTAGS SELECT MODE] 4 lines
+-------------------------------------------------------------
You can select a tag line by any emacs command and press [RETURN],
and you can go to the tag's point. When you want to go to next or
previous tag, you can return to 'GTAGS SELECT MODE' with <control-T>
and reselect.
o <control-]> command is available.
If current token is a definition, it is identical to
":rtag <current token>[RETURN]", otherwise ":tag <current token>[RETURN]".
(GLOBAL decides this intelligentlly, but may sometimes misunderstand.)
o To go to any symbols other than function, try 'ESC-s'.
Find symbol: lbolt
~~~~~
o To go to any strings other than symbol, try 'ESC-g'.
Find pattern: Copyright
~~~~~~~~~
4.4. Applied usage
o You can use POSIX regular expression (extension).
:tag ^put_ # locate tags start with 'put_'.
o If your source files are on a read only device like CDROM, please do
the followings.
% mkdir /var/dbpath <- directory for tag file
% cd /cdrom/src <- the root of source tree
% gtags /var/dbpath <- make tag files in /var/dbpath
% setenv GTAGSROOT `pwd`
% setenv GTAGSDBPATH /var/dbpath
% mule -f gtags-mode
o If you want to treat the references to the function that is not defined
in the source tree like library functions or system calls,
do the followings.
% cd /usr/src/lib
% gtags <- probably as a root
% cd /usr/src/sys
% gtags
% setenv GTAGSLIBPATH /usr/src/lib:/usr/src/sys
% mule -f gtags-mode
o mouse command is avalable.
If you use X version emacs, try this.
(But xemacs doesn't work well. I don't know why.)
Move mouse cursor to a function name and click center button. And you
will go to function's definition or references depending on the context.
In 'GTAGS SELECT MODE', move mouse cursor to a line and click center
button.
To return to the previous position, click right button.
Thank you for your reading of my poor english.
And of course, I'm grateful to Keith Bostic for his excellent nvi(1) and db(3).
And of course, I'm grateful to all excellent tools (vi, emacs, perl, C, db,
mozilla ...) and its authors.
----------------------------------------------------------------------------
E-Mail: <[email protected]>
WWW: <http://wafu.netgate.net/tama/unix/indexe.html>
+1
View File
@@ -0,0 +1 @@
2.24
+6
View File
@@ -0,0 +1,6 @@
PROG= btreeop
CFLAGS+=-I${.CURDIR}/../lib
LDADD= $(LIBUTIL)
DPADD= $(LIBUTIL)
.include <bsd.prog.mk>
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd April 21, 1997
.Dd Nov 26, 1997
.Dt BTREEOP 1
.Os BSD 4
.Sh NAME
@@ -38,12 +38,10 @@
.Nm btreeop
.Op Fl A
.Op Fl C
.Op Fl D Ar key
.Op Fl K Ar key
.Op Fl b
.Op Fl c Ar cashesize
.Op Fl l
.Op Fl p Ar psize
.Op Fl D[keyno] Ar key
.Op Fl K[keyno] Ar key
.Op Fl L
.Op Fl k Ar prefix
.Op Ar dbname
.Sh DESCRIPTION
.Nm Btreeop
@@ -51,9 +49,11 @@ execute simple operations for
.Xr btree 3
database.
.Nm Btreeop
can create database, write record, read record (sequential or index) and
can create database, write record, read record (sequential or indexed) and
delete record from it.
Duplicate entries are allowed.
Multi-key is available but only primary key can use index of
.Xr btree 3 .
.Sh OPTIONS
A capital letter means a command. If no command specified
then it assume sequential read operation.
@@ -62,22 +62,25 @@ then it assume sequential read operation.
append records. If database doesn't exist, btreeop creates it.
.It Fl C
create database and write records to it.
.It Fl D Ar key
delete records by the key.
.It Fl K Ar key
search records by the key.
.It Fl b
assume BIG_ENDIAN byte order. default is LITTLE_ENDIAN.
.It Fl c Ar cashesize
specify cashesize. It's identical to
.Nm info.cachesize
of BTREEINFO. (see btree(3))
.It Fl l
assume LITTLE_ENDIAN byte order. (the default)
.It Fl p Ar psize
specify page size. It's identical to
.Nm info.psize
of BTREEINFO. (see btree(3))
.It Fl D[keyno] Ar key
delete records by the key. By default, keyno is 0 (primary key).
.It Fl K[keyno] Ar key
search records by the key. By default, keyno is 0 (primary key).
.It Fl L
list all primary keys.
Following two command lines are identical except that the latter is much faster.
btreeop | awk '{print $1}' | uniq
btreeop -L
.It Fl k Ar prefix
scan records which have the prefix as a primary key.
This option is valid only with sequential read operation (-L command or non command).
Following two command lines are identical except that the latter is much faster.
btreeop | awk '$1 ~ /^fo/ {print }'
btreeop -k fo
.It Ar dbname
database name. default is 'btree'.
.Sh DATA FORMAT
@@ -86,8 +89,11 @@ To creat (or append) database,
read data from stdin.
The format of the data is the following.
Key Data\\n
Key Data\\n
Primary-key Secondary-key-1 Secondary-key-2 Data
(keyno = 0) (keyno = 1) (keyno = 2)
--------------------------------------------------------------
main 246 main.c main (){\\n
func 120 library.c func(a1, a2)\\n
.
.
.
@@ -96,17 +102,17 @@ The format of the data is the following.
.Bl -enum -offset indent
.It
Key and Data are separated by blank('\\t' or ' ').
All key and data are separated by blank('\\t' or ' ').
.It
Key cannot include blank.
.It
Data can include blank.
.It
Null Data not allowed.
Null data not allowed.
.It
Additionally, META record is available. META record has a key that start with
a blank. You can read this record only by indexed search (with -K option).
Usage is unlimited by Btreeop.
a blank. You can read this record only by indexed read operation (-K option).
Usage is unlimited by btreeop.
.El
.Sh EXAMPLES
Create database.
@@ -129,10 +135,10 @@ Append records.
Sequential read.
% btreeop
key1 data1
key2 data2-2
key2 data2
key3 data3
key2 data2-2
key1 data1
%
Indexed read.
@@ -144,6 +150,14 @@ Indexed read.
__.VERSION 2
%
List primary keys.
% btreeop -L
key1
key2
key3
%
Delete record.
% btreeop -D ' __.VERSION'
@@ -157,7 +171,7 @@ default database name.
.El
.Sh DIAGNOSTICS
.Nm Btreeop
exits with a value of 1 if an error occurred, 0 otherwise.
exits with a non 0 value if an error occurred, 0 otherwise.
.Sh SEE ALSO
.Xr btree 3
.Sh AUTHOR
@@ -165,4 +179,4 @@ Shigio Yamaguchi ([email protected])
.Sh HISTORY
The
.Nm
command appeared in FreeBSD 2.2.
command appeared in FreeBSD 2.2.2.
+344
View File
@@ -0,0 +1,344 @@
/*
* Copyright (c) 1996, 1997 Shigio Yamaguchi. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Shigio Yamaguchi.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* btreeop.c 6-Nov-97
*
*/
#include <sys/stat.h>
#include <ctype.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include "dbio.h"
#include "global.h"
char *dbdefault = "btree"; /* default database name */
char *progname = "btreeop"; /* command name */
static void usage __P((void));
void signal_setup __P((void));
void onintr __P((int));
void main __P((int, char **));
void dbwrite __P((DBIO *));
void dbkey __P((DBIO *, char *, int));
void dbscan __P((DBIO *, char *, int));
void dbdel __P((DBIO *, char *, int));
void dbbysecondkey __P((DBIO *, int, char *, int));
#define F_KEY 0
#define F_DEL 1
static void
usage()
{
fprintf(stderr, "%s\n",
"usage: btreeop [-A][-C][-D[n] key][-K[n] key][-L][-k prefix][dbname]");
exit(1);
}
/*
* Btreeop catch signal even if the parent ignore it.
*/
int exitflag = 0;
void
onintr(signo)
int signo;
{
exitflag = 1;
}
void
signal_setup()
{
signal(SIGHUP, onintr);
signal(SIGINT, onintr);
signal(SIGQUIT, onintr);
signal(SIGTERM, onintr);
}
void
main(argc, argv)
int argc;
char *argv[];
{
char command = 'R';
char *key = NULL;
int mode = 0;
char *dbname;
DBIO *dbio;
int i, c;
int secondkey = 0;
char *prefix = (char *)0;
for (i = 1; i < argc && argv[i][0] == '-'; ++i) {
switch (c = argv[i][1]) {
case 'D':
case 'K':
if (argv[i][2] && isdigit(argv[i][2]))
secondkey = atoi(&argv[i][2]);
key = argv[++i];
case 'A':
case 'C':
case 'L':
if (command != 'R')
usage();
command = c;
break;
case 'k':
prefix = argv[++i];
break;
default:
usage();
}
}
dbname = (i < argc) ? argv[i] : dbdefault;
switch (command) {
case 'A':
case 'D':
mode = 2;
break;
case 'C':
mode = 1;
break;
case 'K':
case 'L':
case 'R':
mode = 0;
break;
}
dbio = db_open(dbname, mode, 0644, DBIO_DUP);
if (dbio == NULL)
die1("db_open failed (dbname = %s).", dbname);
switch (command) {
case 'A': /* Append records */
case 'C': /* Create database */
dbwrite(dbio);
break;
case 'D': /* Delete records */
dbdel(dbio, key, secondkey);
break;
case 'K': /* Keyed (indexed) read */
dbkey(dbio, key, secondkey);
break;
case 'R': /* sequencial Read */
case 'L': /* primary key List */
dbscan(dbio, prefix, (command == 'L') ? 1 : 0);
break;
}
db_close(dbio);
if (exitflag)
exit(1);
exit(0);
}
/*
* dbwrite: write to database
*
* i) dbio database
*/
void
dbwrite(dbio)
DBIO *dbio;
{
char *p;
char keybuf[MAXKEYLEN+1];
char *c;
signal_setup();
/*
* Input file format:
* +--------------------------------------------------
* |Primary-key secondary-key-1 secondary-key-2 Data\n
* |Primary-key secondary-key-1 secondary-key-2 Data\n
* .
* .
* - Keys and Data are separated by blank('\t' or ' ').
* - Keys cannot include blank.
* - Data can include blank.
* - Null record not allowed.
* - Secondary-key is assumed as a part of data by db(3).
*
* META record:
* You can write meta record by making key start with a ' '.
* You can read this record only by indexed read ('-K' option).
* +------------------
* | __.VERSION 2
*/
while ((p = mgets(stdin, 0, NULL)) != NULL) {
if (exitflag)
break;
c = p;
if (*c == ' ') { /* META record */
if (*++c == ' ')
die("key cannot include blanks.");
}
for (; *c && !isspace(*c); c++) /* skip key part */
;
if (*c == 0)
die("data part not found.");
if (c - p > MAXKEYLEN)
die("primary key too long.");
strncpy(keybuf, p, c - p); /* make key string */
keybuf[c - p] = 0;
for (; *c && isspace(*c); c++) /* skip blanks */
;
if (*c == 0)
die("data part is null.");
entab(p);
db_put(dbio, keybuf, p);
}
}
/*
* dbkey: Keyed search
*
* i) dbio database
* i) skey key for search
* i) secondkey 0: primary key, >0: secondary key
*/
void
dbkey(dbio, skey, secondkey)
DBIO *dbio;
char *skey;
int secondkey;
{
char *p;
if (!secondkey) {
for (p = db_first(dbio, skey, 0); p; p = db_next(dbio))
detab(stdout, p);
return;
}
dbbysecondkey(dbio, F_KEY, skey, secondkey);
}
/*
* dbscan: Scan records
*
* i) dbio database
* i) prefix prefix of primary key
* i) keylist 0: key and data, 1: primary key only
*/
void
dbscan(dbio, prefix, keylist)
DBIO *dbio;
char *prefix;
int keylist;
{
char *p;
int flags = DBIO_SKIPMETA;
if (prefix)
flags |= DBIO_PREFIX;
if (keylist)
flags |= DBIO_KEY;
for (p = db_first(dbio, prefix, flags); p; p = db_next(dbio))
detab(stdout, p);
}
/*
* dbdel: Delete records
*
* i) dbio database
* i) skey key for search
* i) secondkey 0: primary key, >0: secondary key
*/
void
dbdel(dbio, skey, secondkey)
DBIO *dbio;
char *skey;
int secondkey;
{
signal_setup();
if (!secondkey) {
db_del(dbio, skey);
return;
}
dbbysecondkey(dbio, F_DEL, skey, secondkey);
}
/*
* dbbysecondkey: proc by second key
*
* i) dbio database
* i) func F_KEY, F_DEL
* i) skey
* i) secondkey
*/
void
dbbysecondkey(dbio, func, skey, secondkey)
DBIO *dbio;
int func;
char *skey;
int secondkey;
{
char *c, *p;
int i;
/* trim skey */
for (c = skey; *c && isspace(*c); c++)
;
skey = c;
for (c = skey+strlen(skey)-1; *c && isspace(*c); c--)
*c = 0;
for (p = db_first(dbio, NULL, DBIO_SKIPMETA); p; p = db_next(dbio)) {
if (exitflag)
break;
c = p;
/* reach to specified key */
for (i = secondkey; i; i--) {
for (; *c && !isspace(*c); c++)
;
if (*c == 0)
die("specified key not found.");
for (; *c && isspace(*c); c++)
;
if (*c == 0)
die("specified key not found.");
}
i = strlen(skey);
if (!strncmp(c, skey, i) && (*(c+i) == 0 || isspace(*(c+i)))) {
switch (func) {
case F_KEY:
detab(stdout, p);
break;
case F_DEL:
db_del(dbio, NULL);
break;
}
}
if (exitflag)
break;
}
}
@@ -35,18 +35,20 @@
static char sccsid[] = "@(#)C.c 8.4 (Berkeley) 4/2/94";
#endif /* LIBC_SCCS and not lint */
#include <ctype.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include "ctags.h"
#include "lookup.h"
static int func_entry __P((void));
static void hash_entry __P((void));
static void skip_string __P((int));
static int str_entry __P((int));
#ifdef GTAGS
#ifdef GLOBAL
static int cmp __P((const void *, const void *));
static int isstatement __P((char *));
static void define_line __P((void));
@@ -116,7 +118,7 @@ c_entries()
*/
if (--level < 0)
level = 0;
#ifdef GTAGS
#ifdef GLOBAL
/*
* -e flag force a function to end when a '}' appear
* at column 0. If -e flag not specified, all functions
@@ -192,7 +194,7 @@ c_entries()
/*
* if we have a current token, parenthesis on
* level zero indicates a function.
#ifdef GTAGS
#ifdef GLOBAL
* in the case of rflag == 1, if we have a current token,
* parenthesis on level > zero indicates a function reference.
#endif
@@ -201,10 +203,14 @@ c_entries()
#endif
*/
case '(':
#ifdef GLOBAL
if (sflag)
break;
#endif
#ifdef YACC
if (inyacc == NO)
#endif
#ifdef GTAGS
#ifdef GLOBAL
if (!rflag && !level && token)
#else
if (!level && token)
@@ -222,7 +228,7 @@ c_entries()
*/
getline();
curline = lineno;
#ifdef GTAGS
#ifdef GLOBAL
/* to make sure. */
if (!isstatement(tok))
#endif
@@ -232,13 +238,14 @@ c_entries()
}
break;
}
#ifdef GTAGS
#ifdef GLOBAL
else if (rflag && level && token) {
if (sp != tok)
*sp = EOS;
getline();
if (!isstatement(tok) && isdefined(tok))
if (!isstatement(tok) && lookup(tok)) {
getline();
pfnote(tok, lineno);
}
break;
}
#endif
@@ -305,13 +312,7 @@ c_entries()
* reserved words.
*/
default:
#ifdef BUGFIX
/*
* to treat following function.
* func (arg) {
* ....
* }
*/
/* ignore whitespace */
if (c == ' ' || c == '\t') {
int save = c;
while (GETC(!=, EOF) && (c == ' ' || c == '\t'))
@@ -321,12 +322,39 @@ c_entries()
(void)ungetc(c, inf);
c = save;
}
#endif
storec: if (!intoken(c)) {
if (sp == tok)
break;
*sp = EOS;
#ifdef GTAGS
#ifdef GLOBAL
/* ignore assembler in C source */
if (!memcmp(tok, "_asm",4)) {
while (GETC(!=, EOF) && (c == ' ' || c == '\t'))
;
if (c == EOF)
return;
if (c == '{') {
while (GETC(!=, EOF) && c != '}') {
if (c == '\n')
SETLINE;
}
} else {
while (GETC(!=, EOF) && c != '\n')
;
if (c == '\n')
SETLINE;
}
if (c == EOF)
return;
break;
}
if (sflag) {
if (!isstatement(tok)) {
getline();
pfnote(tok, lineno);
}
break;
}
if (!memcmp(tok, "extern",7)) {
while (GETC(!=, EOF) && c != ';') {
if (c == '\n')
@@ -367,6 +395,18 @@ c_entries()
*sp++ = c;
token = YES;
}
#ifdef GLOBAL
/* skip hex number */
else if (sp == tok && c == '0') {
if (GETC(==, 'x') || c == 'X') {
while (GETC(!=, EOF) && isxdigit(c))
;
if (c == EOF)
return;
}
(void)ungetc(c, inf);
}
#endif
continue;
/* end of default */
} /* end of switch */
@@ -454,15 +494,10 @@ hash_entry()
char *sp; /* buffer pointer */
char tok[MAXTOKEN]; /* storage buffer */
#ifdef BUGFIX
/*
* to treat following macro.
* # macro(arg) ....
*/
/* ignore leading whitespace */
while (GETC(!=, EOF) && (c == ' ' || c == '\t'))
;
(void)ungetc(c, inf);
#endif
curline = lineno;
for (sp = tok;;) { /* get next token */
if (GETC(==, EOF))
@@ -472,8 +507,16 @@ hash_entry()
*sp++ = c;
}
*sp = EOS;
#ifdef GLOBAL
if (sflag && memcmp(tok, "include", 7)) {
(void)ungetc(c, inf);
define_line();
return;
}
#endif
if (memcmp(tok, "define", 6)) /* only interested in #define's */
goto skip;
for (;;) { /* this doesn't handle "#define \n" */
if (GETC(==, EOF))
return;
@@ -492,12 +535,12 @@ hash_entry()
break;
}
*sp = EOS;
#ifdef GTAGS
#ifdef GLOBAL
if (rflag) {
/*
* #define XXX\n
*/
if (c == '\n' || (c == '\r' && GETC(==, '\n'))) {
if (c == '\n') {
SETLINE;
return;
}
@@ -531,19 +574,13 @@ hash_entry()
}
skip: if (c == '\n') { /* get rid of rest of define */
SETLINE
#ifdef MODIFY
if (*(sp - 1) == '\r') {
if (*(sp - 2) != '\\')
return;
} else
#endif
if (*(sp - 1) != '\\')
return;
}
(void)skip_key('\n');
}
#ifdef GTAGS
#ifdef GLOBAL
/* sorted by alphabet */
static struct words {
char *name;
@@ -619,12 +656,20 @@ define_line()
goto endtok;
case '\\':
if (GETC(==, '\n') || (c == '\r' && GETC(==, '\n'))) {
if (GETC(==, '\n')) {
SETLINE;
}
continue;
case '\n':
if (sflag && token) {
if (sp != tok)
*sp = EOS;
if (!isstatement(tok)) {
getline();
pfnote(tok, lineno);
}
}
SETLINE;
return;
endtok: if (sp > tok) {
@@ -651,11 +696,13 @@ define_line()
goto storec;
case '(':
if (sflag)
break;
if (token) {
if (sp != tok)
*sp = EOS;
getline();
if (!isstatement(tok) && isdefined(tok))
if (!isstatement(tok) && lookup(tok))
pfnote(tok, lineno);
break;
}
@@ -670,6 +717,13 @@ storec: if (!intoken(c)) {
break;
*sp = EOS;
sp = tok;
if (sflag) {
if (!isstatement(tok)) {
getline();
pfnote(tok, lineno);
}
break;
}
}
else if (sp != tok || begtoken(c)) {
*sp++ = c;
@@ -774,10 +828,6 @@ skip_string(key)
case '\\': /* a backslash escapes anything */
skip = !skip; /* we toggle in case it's "\\" */
break;
#ifdef MODIFY
case '\r':
break;
#endif
case '\n':
SETLINE;
/*FALLTHROUGH*/
@@ -823,10 +873,6 @@ skip_key(key)
(void)ungetc(c, inf);
c = '/';
goto norm;
#ifdef MODIFY
case '\r':
break;
#endif
case '\n':
SETLINE;
/*FALLTHROUGH*/
+7
View File
@@ -0,0 +1,7 @@
PROG= gctags
CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../lib
LDADD= $(LIBUTIL)
DPADD= $(LIBUTIL)
SRCS= C.c ctags.c fortran.c lisp.c print.c tree.c yacc.c assembler.c
.include <bsd.prog.mk>
@@ -32,74 +32,77 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)lisp.c 8.3 (Berkeley) 4/2/94";
static char sccsid[] = "@(#)assembler.c 8.3 (Berkeley) 6/6/97";
#endif /* LIBC_SCCS and not lint */
#include <ctype.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include "ctags.h"
#include "lookup.h"
/*
* lisp tag functions
* just look for (def or (DEF
*/
#ifdef GLOBAL
void
l_entries()
asm_entries()
{
int special;
char *cp;
char savedc;
char tok[MAXTOKEN];
char *lbp;
char tok[MAXTOKEN];
char *sp;
for (;;) {
lineftell = ftell(inf);
if (!fgets(lbuf, sizeof(lbuf), inf))
return;
++lineno;
lbp = lbuf;
if (!cicmp("(def"))
continue;
special = NO;
switch(*lbp | ' ') {
case 'm':
if (cicmp("method"))
special = YES;
break;
case 'w':
if (cicmp("wrapper") || cicmp("whopper"))
special = YES;
if (rflag) {
/* extract only call EXT(xxx) or call _xxx */
lbp = lbuf;
while (*lbp && isspace(*lbp))
lbp++;
if (*lbp != 'c' || strncmp(lbp, "call", 4))
continue;
lbp += 4;
while (*lbp && isspace(*lbp))
lbp++;
sp = tok;
if (!strncmp(lbp, "EXT(" /* ) */, 4)) {
lbp += 4;
while (*lbp && intoken(*lbp))
*sp++ = *lbp++;
if (*lbp != /* ( */ ')')
continue;
*sp = EOS;
} else if (*lbp == '_') {
lbp++;
while (*lbp && intoken(*lbp))
*sp++ = *lbp++;
*sp = EOS;
} else
continue;
if (!lookup(tok))
continue;
} else {
/* extract only ENTRY() and ALTENTRY(). */
if (lbuf[0] != 'E' && lbuf[0] != 'A')
continue;
lbp = lbuf;
if (!strncmp(lbp, "ENTRY(", 6)) {
lbp += 6;
} else if (!strncmp(lbp, "ALTENTRY(", 9)) {
lbp += 9;
} else
continue;
sp = tok;
while (*lbp && intoken(*lbp))
*sp++ = *lbp++;
if (*lbp != /* ( */ ')')
continue;
*sp = EOS;
}
for (; !isspace(*lbp); ++lbp)
continue;
for (; isspace(*lbp); ++lbp)
continue;
for (cp = lbp; *cp && *cp != '\n'; ++cp)
continue;
*cp = EOS;
if (special) {
if (!(cp = strchr(lbp, ')')))
continue;
for (; cp >= lbp && *cp != ':'; --cp)
continue;
if (cp < lbp)
continue;
lbp = cp;
for (; *cp && *cp != ')' && *cp != ' '; ++cp)
continue;
}
else
for (cp = lbp + 1;
*cp && *cp != '(' && *cp != ' '; ++cp)
continue;
savedc = *cp;
*cp = EOS;
(void)strcpy(tok, lbp);
*cp = savedc;
getline();
pfnote(tok, lineno);
}
/*NOTREACHED*/
}
#endif
@@ -38,14 +38,10 @@ static const char copyright[] =
#endif /* not lint */
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)ctags.c 8.3 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
"$Id$";
"$Id: ctags.c,v 1.1.1.3 1998/02/02 05:38:07 cwt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <err.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
@@ -53,6 +49,10 @@ static const char rcsid[] =
#include <unistd.h>
#include "ctags.h"
#ifdef GLOBAL
#include "lookup.h"
#include "die.h"
#endif
/*
* ctags: create a tags file
@@ -69,17 +69,21 @@ FILE *outf; /* ioptr for tags file */
long lineftell; /* ftell after getc( inf ) == '\n' */
int lineno; /* line number of current line */
#ifdef GLOBAL
int cflag; /* -c: compact index */
#endif
int dflag; /* -d: non-macro defines */
#ifdef GTAGS
#ifdef GLOBAL
int eflag; /* -e: '{' at 0 column force function end */
#endif
int tflag; /* -t: create tags for typedefs */
int vflag; /* -v: vgrind style index output */
int wflag; /* -w: suppress warnings */
int xflag; /* -x: cxref style output */
#ifdef GTAGS
#ifdef GLOBAL
int Dflag; /* -D: allow duplicate entrys */
int rflag; /* -r: function reference */
int sflag; /* -s: collect symbols */
#endif
#ifdef YACC
int yaccfile; /* yacc file */
@@ -88,12 +92,14 @@ int yaccfile; /* yacc file */
char *curfile; /* current input file name */
char searchar = '/'; /* use /.../ searches by default */
char lbuf[LINE_MAX];
char *progname = "gctags"; /* program name */
void init __P((void));
void find_entries __P((char *));
void main __P((int, char **));
static void usage __P((void));
int
void
main(argc, argv)
int argc;
char **argv;
@@ -109,8 +115,8 @@ main(argc, argv)
extern int optind;
aflag = uflag = NO;
#ifdef GTAGS
while ((ch = getopt(argc, argv, "BDFadef:rtuwvxy")) != -1)
#ifdef GLOBAL
while ((ch = getopt(argc, argv, "BDFacdef:rstuwvx")) != -1)
#else
while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != -1)
#endif
@@ -118,7 +124,7 @@ main(argc, argv)
case 'B':
searchar = '?';
break;
#ifdef GTAGS
#ifdef GLOBAL
case 'D':
Dflag++;
break;
@@ -126,13 +132,23 @@ main(argc, argv)
case 'F':
searchar = '/';
break;
#ifdef GLOBAL
case 's':
sflag++;
break;
#endif
case 'a':
aflag++;
break;
#ifdef GLOBAL
case 'c':
cflag++;
break;
#endif
case 'd':
dflag++;
break;
#ifdef GTAGS
#ifdef GLOBAL
case 'e':
eflag++;
break;
@@ -140,7 +156,7 @@ main(argc, argv)
case 'f':
outfile = optarg;
break;
#ifdef GTAGS
#ifdef GLOBAL
case 'r':
rflag++;
break;
@@ -165,17 +181,24 @@ main(argc, argv)
}
argv += optind;
argc -= optind;
if (!argc)
if (!argc)
usage();
#ifdef GTAGS
if (rflag)
gtagopen();
#ifdef GLOBAL
if (sflag && rflag)
die("-s and -r conflict.");
if (rflag) {
char *dbpath;
if (!(dbpath = getenv("GTAGSDBPATH")))
dbpath = ".";
lookupopen(dbpath);
}
#endif
init();
for (exit_val = step = 0; step < argc; ++step)
if (!(inf = fopen(argv[step], "r"))) {
warnx("%s cannot open", argv[step]);
fprintf(stderr, "%s: %s cannot open\n", progname, argv[step]);
exit_val = 1;
}
else {
@@ -185,9 +208,13 @@ main(argc, argv)
}
if (head)
if (xflag)
if (xflag) {
put_entries(head);
else {
#ifdef GLOBAL
if (cflag)
compact_print("", 0, "");/* flush last record */
#endif
} else {
if (uflag) {
for (step = 0; step < argc; step++) {
(void)sprintf(cmd,
@@ -199,7 +226,7 @@ main(argc, argv)
++aflag;
}
if (!(outf = fopen(outfile, aflag ? "a" : "w"))) {
warnx("%s cannot open", outfile);
fprintf(stderr, "%s: %s cannot open\n", progname, outfile);
exit(exit_val);
}
put_entries(head);
@@ -210,21 +237,21 @@ main(argc, argv)
system(cmd);
}
}
#ifdef GTAGS
#ifdef GLOBAL
if (rflag)
gtagclose();
lookupclose();
#endif
exit(exit_val);
}
static void
static void
usage()
{
(void)fprintf(stderr,
#ifdef GTAGS
"usage: gctags [-BDFadrtuwvx] [-f tagsfile] file ...\n");
#ifdef GLOBAL
"usage: gctags [-BDFacderstuvwx] [-f tagsfile] file ...\n");
#else
"usage: gctags [-BFadtuwvx] [-f tagsfile] file ...\n");
"usage: ctags [-BFadtuwvx] [-f tagsfile] file ...\n");
#endif
exit(1);
}
@@ -282,7 +309,7 @@ find_entries(file)
if (cp[1] == 'l' && !cp[2]) {
int c;
#ifdef GTAGS
#ifdef GLOBAL
if (rflag)
fprintf(stderr, "-r option is ignored in lisp file (Warning only)\n");
#endif
@@ -329,8 +356,14 @@ find_entries(file)
pfnote("yyparse", lineno);
y_entries();
}
#ifdef GLOBAL
/* assembler */ else if ((cp[1] == 's' || cp[1] == 'S') && !cp[2]) {
asm_entries();
return;
}
#endif
/* fortran */ else if ((cp[1] != 'c' && cp[1] != 'h') && !cp[2]) {
#ifdef GTAGS
#ifdef GLOBAL
if (rflag)
fprintf(stderr, "-r option is ignored in fortran file (Warning only)\n");
#endif
@@ -344,63 +377,3 @@ find_entries(file)
#endif
/* C */ c_entries();
}
#ifdef GTAGS
#include <db.h>
DB *db;
void
gtagopen()
{
BTREEINFO info;
char *env;
char dbname[200];
strcpy(dbname, ".");
if ((env = getenv("GTAGDBPATH"))) {
strcpy(dbname, env);
}
strcat(dbname, "/GTAGS");
info.flags = 0;
info.cachesize = 500000;
info.maxkeypage = 0;
info.minkeypage = 0;
info.psize = 0;
info.compare = 0;
info.prefix = 0;
info.lorder = 0;
#define O_RDONLY 0x0000 /* open for reading only */
db = dbopen(dbname, O_RDONLY, 0, DB_BTREE, &info);
if (db == 0)
errx(1, "GTAGS file needed");
}
int
isdefined(skey)
char *skey;
{
DBT dat, key;
int status;
key.data = skey;
key.size = strlen(skey)+1;
status = (*db->get)(db, &key, &dat, 0);
switch (status) {
case RET_SUCCESS:
return(1); /* exist */
case RET_ERROR:
errx(1, "db->get failed");
case RET_SPECIAL: /* not exist */
break;
}
return 0;
}
void
gtagclose()
{
if (db->close(db))
errx(1, "GTAGS cannot close.(dbclose)");
}
#endif
@@ -33,6 +33,10 @@
* @(#)ctags.h 8.3 (Berkeley) 4/2/94
*/
/* Definition for gctags */
#define GLOBAL 1
#define YACC 1
#define bool char
#define YES 1
@@ -47,7 +51,11 @@
#endif
#define SETLINE {++lineno;lineftell = ftell(inf);}
#ifdef GLOBAL
#define GETC(op,exp) ((((c = getc(inf)) == '\r') ? (c = getc(inf)) : c) op (int)exp)
#else
#define GETC(op,exp) ((c = getc(inf)) op (int)exp)
#endif
#define iswhite(arg) (_wht[(unsigned)arg]) /* T if char is white */
#define begtoken(arg) (_btk[(unsigned)arg]) /* T if char can start token */
@@ -71,11 +79,13 @@ extern FILE *inf; /* ioptr for current input file */
extern FILE *outf; /* ioptr for current output file */
extern long lineftell; /* ftell after getc( inf ) == '\n' */
extern int lineno; /* line number of current line */
#ifdef GTAGS
#ifdef GLOBAL
extern int cflag; /* -c: compact index */
extern int eflag; /* -e: '{' at 0 column force function end */
extern int Dflag; /* -D: allow duplicate entrys */
extern int rflag; /* -r: function reference */
#endif /* GTAGS */
extern int sflag; /* -s: collect symbols */
#endif
extern int dflag; /* -d: non-macro defines */
extern int tflag; /* -t: create tags for typedefs */
extern int vflag; /* -v: vgrind style index output */
@@ -85,6 +95,7 @@ extern bool _wht[], _etk[], _itk[], _btk[], _gd[];
extern char lbuf[LINE_MAX];
extern char *lbp;
extern char searchar; /* ex search character */
extern char *progname; /* program name */
#ifndef __P
#ifdef __STDC__
@@ -105,6 +116,8 @@ void y_entries __P((void));
int PF_funcs __P((void));
void c_entries __P((void));
void skip_comment __P((void));
void gtagopen __P((void));
int isdefined __P((char *));
void gtagclose __P((void));
#ifdef GLOBAL
void asm_entries __P((void));
void compact_print __P((char *, int, char *));
int portable_getc __P((FILE *));
#endif
@@ -31,7 +31,7 @@
.\"
.\" @(#)gctags.1 8.1 (Berkeley) 6/6/93
.\"
.Dd Apr 21, 1997
.Dd April 21, 1997
.Dt GCTAGS 1
.Os BSD 4
.Sh NAME
@@ -39,7 +39,7 @@
.Nd create a tags file (special command for GLOBAL)
.Sh SYNOPSIS
.Nm gctags
.Op Fl BDFadertuwvx
.Op Fl BDFacderstuvwx
.Op Fl f Ar tagsfile
.Ar name ...
.Sh DESCRIPTION
@@ -49,7 +49,7 @@ makes a tags file for
from the specified C,
Pascal, Fortran,
.Tn YACC ,
lex, and lisp sources.
lex, lisp and assembler sources.
A tags file gives the locations of specified objects in a group of files.
Each line of the tags file contains the object name, the file in which it
is defined, and a search pattern for the object definition, separated by
@@ -77,6 +77,8 @@ use forward searching patterns
append to
.Ar tags
file.
.It Fl c
print with compact format. It is valid only with -x option.
.It Fl d
create tags for
.Li #defines
@@ -88,11 +90,13 @@ force a function to end when reach a '}' at the first column. (C source only)
.It Fl f
place the tag descriptions in a file called
.Ar tagsfile .
The default behavior is to place them in a file called
The default behaviour is to place them in a file called
.Ar tags .
.It Fl r
locate function references instead of function definitions. GTAGS file is
needed at the current directory. (C source only)
.It Fl s
collect symbols except for functions.
.It Fl t
create tags for typedefs, structs, unions, and enums.
.It Fl u
@@ -144,7 +148,13 @@ Files whose names end in
are assumed to be lisp files if their
first non-blank character is `;', `(', or `[',
otherwise, they are
treated as lex files. Other files are first examined to see if they
treated as lex files.
Files whose names end in
.Nm \&.s
or
.Nm \&.S
are assumed to be Assembler
source files. Other files are first examined to see if they
contain any Pascal or Fortran routine definitions, and, if not, are
searched for C style definitions.
.Pp
@@ -178,7 +188,7 @@ tags file for GLOBAL
.El
.Sh DIAGNOSTICS
.Nm Gctags
exits with a value of 1 if an error occurred, 0 otherwise.
exits with a non 0 value if an error occurred, 0 otherwise.
Duplicate objects are not considered errors.
.Sh SEE ALSO
.Xr btreeop 1 ,
@@ -221,7 +231,11 @@ cause it to enter the last line of the object, rather than the first, as
the searching pattern. The last line of multiple line
.Li typedef Ns 's
will similarly be noted.
.Pp
Assembler support is far from completeness. It extracts only ENTRY()
and ALTENTRY() from source file. Probably valid only for FreeBSD and Linux
kernel source.
.Sh HISTORY
The
.Nm
command appeared in FreeBSD 2.2.
command appeared in FreeBSD 2.2.2.
@@ -41,6 +41,7 @@ static char sccsid[] = "@(#)print.c 8.3 (Berkeley) 4/2/94";
#include <string.h>
#include <unistd.h>
#include "die.h"
#include "ctags.h"
/*
@@ -59,7 +60,7 @@ getline()
saveftell = ftell(inf);
(void)fseek(inf, lineftell, SEEK_SET);
if (xflag)
for (cp = lbuf; GETC(!=, '\n'); *cp++ = c)
for (cp = lbuf; GETC(!=, EOF) && c != '\n'; *cp++ = c)
continue;
/*
* do all processing here, so we don't step through the
@@ -89,7 +90,58 @@ getline()
*cp = EOS;
(void)fseek(inf, saveftell, SEEK_SET);
}
#ifdef GLOBAL
void
compact_print(entry, lno, file)
char *entry;
int lno;
char *file;
{
static int first = 1;
static char p_entry[128];
static char p_file[1024];
static int p_lno;
static char *buf;
static int bufsize = 512;
static char *p;
if (first) {
if (!(buf = (char *)malloc(bufsize)))
die("short of memory.");
buf[0] = 0;
p = buf;
first = 0;
}
if (strcmp(p_entry, entry) || strcmp(p_file, file)) {
if (buf[0])
printf("%s\n", buf);
if (!entry[0]) /* flush */
return;
strcpy(p_entry, entry);
strcpy(p_file, file);
p_lno = lno;
buf[0] = 0;
sprintf(buf, "%s %s %d", entry, file, lno);
p = buf;
p += strlen(p);
} else {
if (p_lno > lno)
die("impossible!");
if (p_lno < lno) {
if (buf + bufsize < p + 10) {
int offset = p - buf;
bufsize *= 2;
if (!(buf = (char *)realloc(buf, bufsize)))
die("short of memory.");
p = buf + offset;
}
sprintf(p, ",%d", lno);
p += strlen(p);
p_lno = lno;
}
}
}
#endif
/*
* put_entries --
* write out the tags
@@ -104,8 +156,12 @@ put_entries(node)
if (vflag)
printf("%s %s %d\n",
node->entry, node->file, (node->lno + 63) / 64);
#ifdef GLOBAL
else if (xflag && cflag)
compact_print(node->entry, node->lno, node->file);
#endif
else if (xflag)
#ifdef MODIFY
#ifdef GLOBAL
/* separate 'entry' and 'lno' */
if (strlen(node->entry) >= 16 && node->lno >= 1000)
printf("%-16s %4d %-16s %s\n",
@@ -35,12 +35,12 @@
static char sccsid[] = "@(#)tree.c 8.3 (Berkeley) 4/2/94";
#endif /* LIBC_SCCS and not lint */
#include <err.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "die.h"
#include "ctags.h"
static void add_node __P((NODE *, NODE *));
@@ -61,12 +61,12 @@ pfnote(name, ln)
/*NOSTRICT*/
if (!(np = (NODE *)malloc(sizeof(NODE)))) {
warnx("too many entries to sort");
fprintf(stderr, "too many entries to sort\n");
put_entries(head);
free_tree(head);
/*NOSTRICT*/
if (!(head = np = (NODE *)malloc(sizeof(NODE))))
errx(1, "out of space");
die("out of space");
}
if (!xflag && !strcmp(name, "main")) {
if (!(fp = strrchr(curfile, '/')))
@@ -80,12 +80,12 @@ pfnote(name, ln)
name = nbuf;
}
if (!(np->entry = strdup(name)))
errx(1, "out of space");
die("out of space");
np->file = curfile;
np->lno = ln;
np->left = np->right = 0;
if (!(np->pat = strdup(lbuf)))
errx(1, "out of space");
die("out of space");
if (!head)
head = np;
else
@@ -100,7 +100,7 @@ add_node(node, cur_node)
int dif;
dif = strcmp(node->entry, cur_node->entry);
#ifdef GTAGS
#ifdef GLOBAL
if (!Dflag && !dif) /* -D option allows duplicate entries. */
#else
if (!dif)
+6
View File
@@ -0,0 +1,6 @@
PROG= global
CFLAGS+=-I${.CURDIR}/../lib
LDADD= $(LIBUTIL)
DPADD= $(LIBUTIL)
.include <bsd.prog.mk>
@@ -28,53 +28,92 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd Apr 21, 1997
.Dd Nov 26, 1997
.Dt GLOBAL 1
.Os BSD 4
.Sh NAME
.Nm global
.Nd print the locations of specified function.
.Nd print the locations of specified object.
.Sh SYNOPSIS
.Nm global
.Op Fl acrx
.Ar name
.Op Fl alrvx
.Ar pattern
.Nm global -c
.Op Ar prefix
.Nm global
.Fl f[arx]
.Ar file
.Nm global
.Fl g[alvx]
.Ar pattern
.Nm global
.Fl i[v]
.Nm global
.Fl p
.Nm global
.Fl s[alvx]
.Ar pattern
.Sh DESCRIPTION
.Nm Global
find the locations of specified function in C and Yacc source files.
find the locations of specified object in C and Yacc source files.
.Nm Global
can treat a source tree, that is, a directory that has subdirectories and
source files.
You can get the relative path of objects from anywhere within the tree.
.Nm Global
can locate not only function definitions but also function references and
allow duplicate entries too.
other symbols.
Duplicate entries are allowed.
.Pp
In advance of using this command, you must execute
.Xr gtags 1
at the root directory of the source tree.
at the root directory of the source tree to make tag files.
Then you can execute
.Nm
at anywhere in the source tree.
.Pp
The following options are available:
.Bl -tag -width Ds
.It Ar pattern
object pattern. It can include POSIX 1003.2 regular expression.
.It Fl a
print absolute path name. By default, print relative path name.
.It Fl c
print candidate function names which start with specified string.
If string is not specified, print all function names.
.It Fl c Op Ar prefix
print candidate function names which start with specified
.Ar prefix .
If
.Ar prefix
is not specified, print all function names.
.It Fl f Ar file
print all function definitions in the
.Ar file .
This option implies -x option.
.It Fl g
print all lines which match to the pattern.
.It Fl i
reconstruct tags files incrementally.
.It Fl l
print objects which exist under the current directory.
.It Fl r
print the locations of function references. By default, print function
definitions.
.It Fl p
print the location of GTAGS.
.It Fl s
print the locations of specified symbol other than function names.
You need GSYMS tags file. See
.Xr gtags 1 .
.It Fl x
In addition to the default output, produce the line number and
the line contents.
.It Ar name
function name. It can include perl's regular expression.
.Sh FILES
.Bl -tag -width tags -compact
.It Pa GTAGS
tags file for function definitions.
.It Pa GRTAGS
tags file for function references.
.It Pa GSYMS
tags file for symbols other then functions.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of global.
@@ -125,12 +164,12 @@ global search in these path too.
exits with a non 0 value if an error occurred, 0 otherwise.
.Sh SEE ALSO
.Xr btreeop 1 ,
.Xr gctags 1 ,
.Xr gtags 1 ,
.Xr htags 1 .
.Xr htags 1 ,
.Xr vi 1 .
.Sh AUTHORS
Shigio Yamaguchi ([email protected])
.Sh HISTORY
The
.Nm
command appeared in FreeBSD 2.2.
command appeared in FreeBSD 2.2.2.
+751
View File
@@ -0,0 +1,751 @@
/*
* Copyright (c) 1996, 1997 Shigio Yamaguchi. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Shigio Yamaguchi.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* global.c 7-Nov-97
*
*/
#include <sys/stat.h>
#include <ctype.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "global.h"
char *progname = "global"; /* command name */
static void usage __P((void));
void main __P((int, char **));
char *outfilter __P((void));
void completelist __P((char *, char *));
void relative_filter __P((char *, char *, char *));
void grep __P((char *));
int printtag __P((FILE *, char *, char *, int));
int regexp __P((char *));
int search __P((char *, char *, char *, char *, int));
char *extractpath __P((char *));
int includepath __P((char *, char *));
char sortfilter[MAXCOMLINE+1]; /* sort filter */
char pathfilter[MAXCOMLINE+1]; /* path convert filter */
char local[MAXPATHLEN+1]; /* local prefix */
char *localprefix; /* local prefix */
int aflag; /* [option] */
int cflag; /* command */
int fflag; /* command */
int lflag; /* [option] */
int gflag; /* command */
int iflag; /* command */
int pflag; /* command */
int rflag; /* [option] */
int sflag; /* command */
int vflag; /* [option] */
int xflag; /* [option] */
static void
usage()
{
fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
"global [-alrvx] pattern",
"global -c [prefix]",
"global -f[arx] file",
"global -g[alvx] pattern",
"global -i[v]",
"global -p",
"global -s[alvx] pattern");
exit(1);
}
void
main(argc, argv)
int argc;
char *argv[];
{
char *p, *av;
int count;
int db;
char cwd[MAXPATHLEN+1]; /* current directory */
char root[MAXPATHLEN+1]; /* root of source tree */
char dbpath[MAXPATHLEN+1]; /* dbpath directory */
char comline[MAXCOMLINE+1];
while (--argc > 0 && (++argv)[0][0] == '-') {
for (p = argv[0] + 1; *p; p++) {
switch (*p) {
case 'a':
aflag++;
break;
case 'c':
cflag++;
break;
case 'f':
fflag++;
break;
case 'l':
lflag++;
break;
case 'g':
gflag++;
break;
case 'i':
iflag++;
break;
case 'p':
pflag++;
break;
case 'r':
rflag++;
break;
case 's':
sflag++;
break;
case 'v':
vflag++;
break;
case 'x':
xflag++;
break;
default:
usage();
}
}
}
av = (argc > 0) ? *argv : (char *)0;
/*
* usage check.
*/
{
int commands, options;
commands = cflag + fflag + gflag + iflag + pflag + sflag;
options = aflag + lflag + rflag + xflag;
/*
* only -c, -i and -p allows no argment.
*/
if (!av && !cflag && !iflag && !pflag)
usage();
/*
* command cannot be duplicated.
*/
if (commands > 1)
usage();
/*
* -c and -i command allows only -v option.
*/
if (cflag + iflag && options)
usage();
/*
* -r is not valid for -g, -i and -s.
*/
if (rflag && (gflag + iflag + sflag))
usage();
}
/*
* remove leading blanks.
*/
if (av && !gflag)
for (; *av == ' ' || *av == '\t'; av++)
;
if (cflag && av && regexp(av))
die("regular expression not allowed with -c option.");
/*
* get path of following directories.
* o current directory
* o root of source tree
* o dbpath directory
*
* if GTAGS not found, getdbpath doesn't return.
*/
getdbpath(cwd, root, dbpath);
if (pflag) {
fprintf(stdout, "%s\n", dbpath);
exit(0);
}
/*
* incremental update of tag files.
*/
if (iflag) {
if (chdir(root) < 0)
die1("cannot change directory to '%s'.", root);
sprintf(comline, "gtags -i%s %s", (vflag) ? "v" : "", dbpath);
if (system(comline))
exit(1);
exit(0);
}
/*
* complete function name
*/
if (cflag) {
completelist(dbpath, av);
exit(0);
}
/*
* make sort filter.
*/
if (sflag && xflag)
*sortfilter = 0;
else if (fflag)
sprintf(sortfilter, "sort +1n -2");
else if (xflag) /* print details */
sprintf(sortfilter, "sort +0 -1 +2 -3 +1n -2");
else /* print just file name */
sprintf(sortfilter, "sort | uniq");
/*
* make path filter.
*/
if (aflag) /* absolute path name */
sprintf(pathfilter, "sed -e 's!\\.!%s!'", root);
else /* relative path name */
relative_filter(root, cwd, pathfilter);
/*
* make local prefix.
*/
if (lflag) {
/*
* getdbpath() assure follows.
* cwd != "/" and cwd includes root.
*/
strcpy(local, cwd);
strcat(local, "/");
localprefix = local + strlen(root) - 1;
*localprefix = '.';
}
/*
* grep the pattern in a source tree.
*/
if (gflag) {
if (!lflag)
chdir(root);
else if (!aflag)
sprintf(pathfilter, "sed -e 's!\\./!!'");
grep(av);
exit(0);
}
db = (rflag) ? GRTAGS : ((sflag) ? GSYMS : GTAGS);
/*
* print function definitions.
*/
if (fflag) {
struct stat sb;
char pathbuf[MAXPATHLEN+1], *path;
char *p;
FILE *op;
DBIO *dbio;
/* av !~ /\.[chysS]$/) */
p = av + strlen(av) - 1; /* last character */
if (stat(av, &sb) || !S_ISREG(sb.st_mode))
die1("file '%s' not found.", av);
if (*(p - 1) != '.' || !locatestring("chysS", p, 0))
die("accept only file name end with '.c .h .y .s .S'.");
/*
* convert path into relative from root directory of source tree.
*/
path = realpath(av, pathbuf);
if (*path != '/')
die("realpath(3) is not compatible with BSD version.");
if (strncmp(path, root, strlen(root)))
die1("file '%s' is out of source tree.", path);
path += strlen(root) - 1;
*path = '.';
if (!(op = popen(outfilter(), "w")))
die("cannot open output pipe.");
dbio = gtagsopen(dbpath, db, 0);
for (p = db_first(dbio, NULL, DBIO_SKIPMETA); p; p = db_next(dbio))
if (includepath(p, path))
fprintf(op, "%s\n", p);
db_close(dbio);
pclose(op);
exit(0);
}
/*
* search in current source tree.
*/
count = search(av, cwd, root, dbpath, db);
/*
* search in library path.
*/
if (count == 0 && !rflag && !sflag && !regexp(av) && getenv("GTAGSLIBPATH")) {
char envbuf[MAXENVLEN+1];
char libdbpath[MAXPATHLEN+1];
char *p, *lib;
strcpy(envbuf, getenv("GTAGSLIBPATH"));
p = envbuf;
while (p) {
lib = p;
if ((p = locatestring(p, ":", 0)) != NULL)
*p++ = 0;
if (!strncmp(lib, cwd, strlen(cwd)) || !strncmp(cwd, lib, strlen(lib)))
continue;
if (!gtagsexist(lib, libdbpath))
continue;
if (!strcmp(dbpath, libdbpath))
continue;
if (aflag) /* absolute path name */
sprintf(pathfilter, "sed -e 's!\\.!%s!'", lib);
else
relative_filter(lib, cwd, pathfilter);
count = search(av, cwd, lib, libdbpath, GTAGS);
if (count > 0) {
strcpy(dbpath, libdbpath);
break;
}
}
}
if (vflag) {
if (count) {
if (count == 1)
fprintf(stderr, "%d object located", count);
if (count > 1)
fprintf(stderr, "%d objects located", count);
fprintf(stderr, " (using '%s').\n", makepath(dbpath, dbname(db)));
} else {
fprintf(stderr, "'%s' not found.\n", av);
}
}
exit(0);
}
/*
* outfilter: return output filter.
*
* gi) pathfilter
* gi) sortfilter
* r) output filter
*/
char *
outfilter(void)
{
static char filter[MAXCOMLINE+1];
/*
* make output filter
*/
if (*sortfilter)
sprintf(filter, "%s | %s", sortfilter, pathfilter);
else
strcpy(filter, pathfilter);
return filter;
}
/*
* completelist: print complete list of function
*
* i) dbpath dbpath directory
* i) prefix prefix of primary key
*/
void
completelist(dbpath, prefix)
char *dbpath;
char *prefix;
{
char *p;
DBIO *dbio;
dbio = gtagsopen(dbpath, GTAGS, 0);
for (p = db_first(dbio, prefix, DBIO_KEY|DBIO_PREFIX|DBIO_SKIPMETA); p; p = db_next(dbio))
(void)fprintf(stdout, "%s\n", p);
db_close(dbio);
}
/*
* relative_filter: make relative path filter
*
* i) root the root directory of source tree
* i) argcwd current directory
* o) bp result
* relative path filter
*/
void
relative_filter(root, cwd, bp)
char *root;
char *cwd;
char *bp;
{
char *p, *c, *branch;
/*
* get branch point.
*/
branch = cwd;
for (p = root, c = cwd; *p && *c && *p == *c; p++, c++)
if (*c == '/')
branch = c;
if (*p == 0 && (*c == 0 || *c == '/'))
branch = c;
if (*c == 0 && *p)
die("illegal root.");
/*
* forward to root.
*/
strcpy(bp, "sed -e 's!\\./!");
for (c = branch; *c; c++)
if (*c == '/')
strcat(bp, "../");
p = root + (branch - cwd);
/*
* backward to leaf.
*/
if (*p) {
p++;
strcat(bp, p);
strcat(bp, "/");
}
strcat(bp, "!'");
/*
* remove redundancy.
*/
if (*branch) {
char unit[256];
bp += strlen(bp);
p = unit;
for (c = branch + 1; ; c++) {
if (*c == 0 || *c == '/') {
*p = 0;
sprintf(bp, " -e 's!\\.\\./%s/!!'", unit);
bp += strlen(bp);
if (*c == 0)
break;
p = unit;
} else
*p++ = *c;
}
}
}
/*
* printtag: print a tag's line
*
* i) op output stream
* i) root root of source tree
* i) bp tag's line
* i) compact 0: standard format, 1: compact format
* r) output line count
*/
int
printtag(op, root, bp, compact)
FILE *op;
char *root;
char *bp;
int compact;
{
int count = 0;
char *tag, *file, *lno;
int opened = 0;
char path[MAXPATHLEN+1];
char *buffer;
int line = 0, tagline = 0;
FILE *ip;
if (!xflag) {
fprintf(op, "%s\n", extractpath(bp));
return 1;
}
if (compact) { /* compact format */
char *p = bp;
tag = p; /* tag = $1 */
for (; !isspace(*p) ; p++)
;
*p++ = 0;
for (; isspace(*p) ; p++)
;
file = p; /* file = $2 */
for (; !isspace(*p) ; p++)
;
*p++ = 0;
for (; isspace(*p) ; p++)
;
lno = p; /* lno = $3 */
sprintf(path, "%s/%s", root, file + 2);
if ((ip = fopen(path, "r")) != NULL) {
opened = 1;
buffer = mgets(ip, 0, NULL);
line = 1;
} else {
buffer = "";
}
while (*lno) {
/* get line number */
for (tagline = 0; *lno >= '0' && *lno <= '9'; lno++)
tagline = tagline * 10 + *lno - '0';
if (*lno == ',')
lno++;
if (opened) {
while (line < tagline) {
if (!(buffer = mgets(ip, 0, NULL)))
die1("unexpected end of file. '%s'", path);
line++;
}
}
if (strlen(tag) >= 16 && tagline >= 1000)
fprintf(op, "%-16s %4d %-16s %s\n",
tag, tagline, file, buffer);
else
fprintf(op, "%-16s%4d %-16s %s\n",
tag, tagline, file, buffer);
count++;
}
if (opened)
fclose(ip);
} else { /* standard format */
/*
* separater in key part must be ' ' to avoid sort(1)'s bug.
*/
detab(op, bp);
count++;
}
return count;
}
/*
* regexp: test whether regular expression included.
*
* i) s string
* r) 0: not included, 1: included
*
* This function cannot be used for generic purpose.
* Any character except '[a-zA-Z_0-9]' is assumed RE char..
*/
int
regexp(s)
char *s;
{
int c;
while ((c = *s++) != NULL)
if ( (c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
(c >= '0' && c <= '9') ||
(c == '_') )
;
else
return 1;
return 0;
}
/*
* grep: grep pattern
*
* i) pattern POSIX regular expression
*/
void
grep(pattern)
char *pattern;
{
FILE *op, *fp;
char *path;
char edit[IDENTLEN+1];
char *buffer, *p, *e;
int linenum, count, editlen;
regex_t preg;
/*
* convert spaces into %FF format.
*/
e = edit;
for (p = pattern; *p; p++) {
if (*p == '%' || *p == ' ' || *p == '\t') {
sprintf(e, "%%%02x", *p);
e += 3;
} else
*e++ = *p;
}
*e = 0;
editlen = strlen(edit);
if (regcomp(&preg, pattern, REG_EXTENDED) != 0)
die("illegal regular expression.");
if (!(op = popen(outfilter(), "w")))
die("cannot open output pipe.");
count = 0;
for (findopen(); (path = findread(NULL)) != NULL; ) {
if (!(fp = fopen(path, "r")))
die1("cannot open file '%s'.", path);
linenum = 0;
while ((buffer = mgets(fp, 0, NULL)) != NULL) {
linenum++;
if (regexec(&preg, buffer, 0, 0, 0) == 0) {
count++;
if (xflag == 0) {
fprintf(op, "%s\n", path);
break;
}
if (editlen >= 16 && linenum >= 1000)
fprintf(op, "%-16s %4d %-16s %s\n",
edit, linenum, path, buffer);
else
fprintf(op, "%-16s%4d %-16s %s\n",
edit, linenum, path, buffer);
}
}
fclose(fp);
}
findclose();
pclose(op);
if (vflag) {
if (count == 0)
fprintf(stderr, "object not found.\n");
if (count == 1)
fprintf(stderr, "%d object located.\n", count);
if (count > 1)
fprintf(stderr, "%d objects located.\n", count);
}
}
/*
* search: search specified function
*
* i) pattern search pattern
* i) cwd current directory
* i) root root of source tree
* i) dbpath database directory
* i) db GTAGS,GRTAGS,GSYMS
* r) count of output lines
*/
int
search(pattern, cwd, root, dbpath, db)
char *pattern;
char *cwd;
char *root;
char *dbpath;
int db;
{
char *p;
int count = 0;
FILE *op;
DBIO *dbio;
int compact;
regex_t preg;
/*
* open tag file.
* currently only GSYMS is compact format.
*/
dbio = gtagsopen(dbpath, db, 0);
compact = (db == GSYMS) ? 1 : 0;
if (!(op = popen(outfilter(), "w")))
die1("filter '%s' failed.", outfilter());
/*
* regular expression.
*/
if (regexp(pattern) && regcomp(&preg, pattern, REG_EXTENDED) == 0) {
char prefix_buf[IDENTLEN+1];
char *prefix = (char *)0;
if (*pattern == '^' && *(p = pattern + 1) && (isalpha(*p) || *p == '_')) {
prefix = prefix_buf;
*prefix++ = *p++;
while (*p && (isalpha(*p) || isdigit(*p) || *p == '_'))
*prefix++ = *p++;
*prefix = 0;
prefix = prefix_buf;
p = db_first(dbio, prefix, DBIO_SKIPMETA|DBIO_PREFIX);
} else {
p = db_first(dbio, NULL, DBIO_SKIPMETA);
}
for (; p; p = db_next(dbio)) {
if (*p == ' ')
continue;
if (regexec(&preg, dbio->lastkey, 0, 0, 0) == 0)
count += printtag(op, root, p, compact);
}
} else {
for (p = db_first(dbio, pattern, 0); p; p = db_next(dbio)) {
if (lflag) {
char *q;
/* locate start point of a path */
q = locatestring(p, "./", 0);
if (!locatestring(q, localprefix, 1))
continue;
}
count += printtag(op, root, p, compact);
}
}
pclose(op);
db_close(dbio);
return count;
}
/*
* extractpath: extract path string of a tag line
*
* i) line tag line
* r) path
*
* standard format: main 12 ./xxx/xxx/xxx.c main(argc, argv) {
* compact format: main ./xxx/xxx/xxx.c 12,15,55,101
*/
char *
extractpath(line)
char *line;
{
static char buf[MAXPATHLEN+1];
char *p, *b;
int c;
if (!(p = locatestring(line, "./", 0)))
die("illegal tag format (path not found).");
b = buf;
while ((c = *b++ = *p++) != NULL) {
if (c == ' ' || c == '\t') {
*(b - 1) = 0;
break;
}
}
return buf;
}
/*
* includepath: check if the path included in tag line or not.
*
* i) line tag line
* i) path path
* r) 0: doesn't included, 1: included
*/
int
includepath(line, path)
char *line;
char *path;
{
char *p;
int length;
if (!(p = locatestring(line, "./", 0)))
die("illegal tag format (path not found).");
length = strlen(path);
if (strncmp(p, path, length))
return 0;
p += length;
if (*p == ' ' || *p == '\t')
return 1;
return 0;
}
+12
View File
@@ -0,0 +1,12 @@
XCOMM
XCOMM Imakefile for gozilla
XCOMM
LOCAL_LIBRARIES = XawClientLibs -L../lib -lutil
DEPLIBS = XawClientDepLibs ../lib/libutil.a
DEFINES = -DSTANDALONE -DGLOBAL -I../lib
SRCS = gozilla.c remote.c
OBJS = gozilla.o remote.o
ComplexProgramTarget(gozilla)
+194
View File
@@ -0,0 +1,194 @@
/*
* Copyright (c) 1996, 1997 Shigio Yamaguchi. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Shigio Yamaguchi.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* gozilla.c 27-Oct-97
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "global.h"
char *progname = "gozilla"; /* command name */
static void usage __P((void));
void main __P((int, char **));
int sendcommand __P((char *));
int bflag;
int pflag;
int Cflag;
static void
usage()
{
fprintf(stderr, "usage:\t%s\n\t%s\n",
"gozilla [+no] [-b browser] [-p] file",
"gozilla -C command");
exit(1);
}
void
main(argc, argv)
int argc;
char *argv[];
{
char c, *p, *q;
char *browser = (char *)0;
char *command = (char *)0;
char *arg = (char *)0;
char URL[MAXPATHLEN+1];
char com[MAXCOMLINE+1];
int linenumber = 0;
int status;
while (--argc > 0 && (c = (++argv)[0][0]) == '-' || c == '+') {
if (c == '+') {
linenumber = atoi(argv[0] + 1);
continue;
}
p = argv[0] + 1;
switch (*p) {
case 'b':
browser = argv[1];
--argc; ++argv;
break;
case 'p':
pflag++;
break;
case 'C':
command = argv[1];
--argc; ++argv;
break;
default:
usage();
}
}
if (!browser && getenv("BROWSER"))
browser = getenv("BROWSER");
if (command) {
if (browser)
die("-C option is valid only for mozilla.");
if (sendcommand(command) == -1)
die("mozilla not found.");
exit(0);
}
if (argc == 0)
usage();
if (locatestring(argv[0], "http:", 1) || locatestring(argv[0], "file:", 1))
strcpy(URL, argv[0]);
else {
char *abspath;
char pathbuf[MAXPATHLEN+1];
char htmlpath[MAXPATHLEN+1];
if (!test("f", argv[0]) && !test("d", argv[0]))
die1("path '%s' not found.", argv[0]);
if (!(abspath = realpath(argv[0], pathbuf)))
die1("cannot make absolute path name. realpath(%s) failed.", argv[0]);
if (*abspath != '/')
die("realpath(3) is not compatible with BSD version.");
if (issource(abspath)) {
char cwd[MAXPATHLEN+1];
char root[MAXPATHLEN+1];
char dbpath[MAXPATHLEN+1];
char htmldir[MAXPATHLEN+1];
/*
* get current, root and dbpath directory.
* if GTAGS not found, getdbpath doesn't return.
*/
getdbpath(cwd, root, dbpath);
if (test("d", makepath(dbpath, "HTML")))
strcpy(htmldir, makepath(dbpath, "HTML"));
else if (test("d", makepath(root, "HTML")))
strcpy(htmldir, makepath(root, "HTML"));
else
die("hypertext not found. See htags(1).");
/*
* convert path into hypertext.
*/
p = abspath + strlen(root);
for (q = ++p; *q; q++)
if (*q == '/')
*q = ' ';
if (linenumber)
sprintf(URL, "file:%s/S/%s.html#%d", htmldir, p, linenumber);
else
sprintf(URL, "file:%s/S/%s.html", htmldir, p);
} else {
sprintf(URL, "file:%s", abspath);
}
}
if (pflag) {
fprintf(stdout, "%s\n", URL);
exit(0);
}
/*
* execute generic browser.
*/
if (browser && !locatestring(browser, "netscape", 3)) {
sprintf(com, "%s '%s'", browser, URL);
system(com);
exit (0);
}
/*
* send a command to mozilla.
*/
sprintf(com, "openURL(%s)", URL);
status = sendcommand(com);
/*
* load mozilla if not found.
*/
if (status != 0) {
int pid;
if ((pid = fork()) < 0) {
die("cannot execute netscape (fork).");
} else if (pid == 0) {
execlp("netscape", "netscape", URL, (char *)0);
die("loading mozilla failed.");
}
exit(0);
}
exit(status);
}
int
sendcommand(com)
char *com;
{
int argc = 3;
char *argv[4];
argv[0] = "netscape-remote";
argv[1] = "-remote";
argv[2] = com;
argv[3] = (char *)0;
return netscape_remote(argc, argv);
}
+141
View File
@@ -0,0 +1,141 @@
.\"
.\" Copyright (c) 1997 Shigio Yamaguchi. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Shigio Yamaguchi.
.\" 4. Neither the name of the author nor the names of any co-contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd Sep 17, 1997
.Dt GOZILLA 1
.Os BSD 4
.Sh NAME
.Nm gozilla
.Nd force mozilla to display specified source file
.Sh SYNOPSIS
\fBgozilla\fP [\fB+\fP\fIno\fP]
.Op Fl b Ar browser
.Op Fl p
.Ar file
.Nm gozilla
.Fl C Ar command
.Sh DESCRIPTION
First form:
.br
.Nm Gozilla
force mozilla (Netscape Navigator) to display specified source file
as a hypertext.
If mozilla has not loaded then
.Nm
loads it.
.Pp
In advance of using this command, you must execute
.Xr gtags 1
and
.Xr htags 1
at the root directory of the source tree to make tag files.
Then you can execute
.Nm
at anywhere in the source tree.
.br
You can specify source file and the line number optionally.
.Pp
Second form:
.br
.Nm Gozilla
send
.Ar command
to mozilla directly.
.Ar Command
is undocumented. But the hint is in the resource file of mozilla.
.Pp
The following options are available:
.Bl -tag -width Ds
.It Ar \fB+\fP\fIno\fP
line number. It must be a line on which function definition or function
reference is exist.
If you execute
.Xr htags 1
with -l option, you can specify any line.
.It Fl b Ar browser
browser to use. By default, assumes mozilla.
If you specify another browser,
.Nm
waits for exiting of the browser.
.It Fl p
just print generated target URL.
.It Ar file
path of source file.
.It Fl C Ar command
send
.Ar command
to mozilla directly.
.El
.Sh FILES
.Bl -tag -width tags -compact
.It Pa HTML/
hypertext of source tree.
.It Pa GTAGS
tags file for function definitions.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of gozilla.
.Pp
.Bl -tag -width indent
.It Ev GTAGSROOT
The directory which is the root of source tree.
.It Ev GTAGSDBPATH
The directory on which HTML directory exist. This value is ignored
when GTAGSROOT is not defined.
.It Ev BROWSER
browser to use. By default, assumes mozilla.
.El
.Sh EXAMPLES
% global -x main
main 82 ctags.c main(argc, argv)
% gozilla +82 ctags.c
% gozilla -C pageDown
% gozilla -C back
.Sh DIAGNOSTICS
.Nm Gozilla
exits with a non 0 value if an error occurred, 0 otherwise.
.Sh SEE ALSO
.Xr global 1 ,
.Xr gtags 1 ,
.Xr htags 1 .
.Sh NOTES
Netscape Navigator is a registered trademark of Netscape Communications Corporation
in the United States and other countries.
.Pp
.Nm Gozilla
means 'Global for mozilla'.
.Sh BUGS
.Nm Gozilla
can treat not only source file but also normal file, directory, HTML file
and even URL, because it is omnivorous.
.Sh AUTHORS
Shigio Yamaguchi ([email protected])
+717
View File
@@ -0,0 +1,717 @@
/* -*- Mode:C; tab-width: 8 -*-
* remote.c --- remote control of Netscape Navigator for Unix.
* version 1.1.3, for Netscape Navigator 1.1 and newer.
*
* Copyright © 1996 Netscape Communications Corporation, all rights reserved.
* Created: Jamie Zawinski <jwz@netscape.com>, 24-Dec-94.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* To compile:
*
* cc -o netscape-remote remote.c -DSTANDALONE -lXmu -lX11
*
* To use:
*
* netscape-remote -help
*
* Documentation for the protocol which this code implements may be found at:
*
* http://home.netscape.com/newsref/std/x-remote.html
*
* Bugs and commentary to x_cbug@netscape.com.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xmu/WinUtil.h> /* for XmuClientWindow() */
/* vroot.h is a header file which lets a client get along with `virtual root'
window managers like swm, tvtwm, olvwm, etc. If you don't have this header
file, you can find it at "http://home.netscape.com/newsref/std/vroot.h".
If you don't care about supporting virtual root window managers, you can
comment this line out.
*/
#include "vroot.h"
#ifdef STANDALONE
#ifdef GLOBAL
extern char *progname;
#else
static const char *progname = 0;
#endif
static const char *expected_mozilla_version = "1.1";
#else /* !STANDALONE */
extern const char *progname;
extern const char *expected_mozilla_version;
#endif /* !STANDALONE */
#define MOZILLA_VERSION_PROP "_MOZILLA_VERSION"
#define MOZILLA_LOCK_PROP "_MOZILLA_LOCK"
#define MOZILLA_COMMAND_PROP "_MOZILLA_COMMAND"
#define MOZILLA_RESPONSE_PROP "_MOZILLA_RESPONSE"
static Atom XA_MOZILLA_VERSION = 0;
static Atom XA_MOZILLA_LOCK = 0;
static Atom XA_MOZILLA_COMMAND = 0;
static Atom XA_MOZILLA_RESPONSE = 0;
static void
mozilla_remote_init_atoms (Display *dpy)
{
if (! XA_MOZILLA_VERSION)
XA_MOZILLA_VERSION = XInternAtom (dpy, MOZILLA_VERSION_PROP, False);
if (! XA_MOZILLA_LOCK)
XA_MOZILLA_LOCK = XInternAtom (dpy, MOZILLA_LOCK_PROP, False);
if (! XA_MOZILLA_COMMAND)
XA_MOZILLA_COMMAND = XInternAtom (dpy, MOZILLA_COMMAND_PROP, False);
if (! XA_MOZILLA_RESPONSE)
XA_MOZILLA_RESPONSE = XInternAtom (dpy, MOZILLA_RESPONSE_PROP, False);
}
static Window
mozilla_remote_find_window (Display *dpy)
{
int i;
Window root = RootWindowOfScreen (DefaultScreenOfDisplay (dpy));
Window root2, parent, *kids;
unsigned int nkids;
Window result = 0;
Window tenative = 0;
unsigned char *tenative_version = 0;
if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids))
{
fprintf (stderr, "%s: XQueryTree failed on display %s\n", progname,
DisplayString (dpy));
exit (2);
}
/* root != root2 is possible with virtual root WMs. */
if (! (kids && nkids))
{
fprintf (stderr, "%s: root window has no children on display %s\n",
progname, DisplayString (dpy));
exit (2);
}
for (i = nkids-1; i >= 0; i--)
{
Atom type;
int format;
unsigned long nitems, bytesafter;
unsigned char *version = 0;
Window w = XmuClientWindow (dpy, kids[i]);
int status = XGetWindowProperty (dpy, w, XA_MOZILLA_VERSION,
0, (65536 / sizeof (long)),
False, XA_STRING,
&type, &format, &nitems, &bytesafter,
&version);
if (! version)
continue;
if (strcmp ((char *) version, expected_mozilla_version) &&
!tenative)
{
tenative = w;
tenative_version = version;
continue;
}
XFree (version);
if (status == Success && type != None)
{
result = w;
break;
}
}
if (result && tenative)
{
#ifndef GLOBAL
fprintf (stderr,
"%s: warning: both version %s (0x%x) and version\n"
"\t%s (0x%x) are running. Using version %s.\n",
progname, tenative_version, (unsigned int) tenative,
expected_mozilla_version, (unsigned int) result,
expected_mozilla_version);
#endif
XFree (tenative_version);
return result;
}
else if (tenative)
{
#ifndef GLOBAL
fprintf (stderr,
"%s: warning: expected version %s but found version\n"
"\t%s (0x%x) instead.\n",
progname, expected_mozilla_version,
tenative_version, (unsigned int) tenative);
#endif
XFree (tenative_version);
return tenative;
}
else if (result)
{
return result;
}
else
{
#ifdef GLOBAL
return 0;
#else
fprintf (stderr, "%s: not running on display %s\n", progname,
DisplayString (dpy));
exit (1);
#endif
}
}
static void
mozilla_remote_check_window (Display *dpy, Window window)
{
Atom type;
int format;
unsigned long nitems, bytesafter;
unsigned char *version = 0;
int status = XGetWindowProperty (dpy, window, XA_MOZILLA_VERSION,
0, (65536 / sizeof (long)),
False, XA_STRING,
&type, &format, &nitems, &bytesafter,
&version);
if (status != Success || !version)
{
fprintf (stderr, "%s: window 0x%x is not a Netscape window.\n",
progname, (unsigned int) window);
exit (6);
}
else if (strcmp ((char *) version, expected_mozilla_version))
{
fprintf (stderr,
"%s: warning: window 0x%x is Netscape version %s;\n"
"\texpected version %s.\n",
progname, (unsigned int) window,
version, expected_mozilla_version);
}
XFree (version);
}
static char *lock_data = 0;
static void
mozilla_remote_obtain_lock (Display *dpy, Window window)
{
Bool locked = False;
Bool waited = False;
if (! lock_data)
{
lock_data = (char *) malloc (255);
sprintf (lock_data, "pid%d@", getpid ());
if (gethostname (lock_data + strlen (lock_data), 100))
{
perror ("gethostname");
exit (-1);
}
}
do
{
int result;
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
unsigned char *data = 0;
XGrabServer (dpy); /* ################################# DANGER! */
result = XGetWindowProperty (dpy, window, XA_MOZILLA_LOCK,
0, (65536 / sizeof (long)),
False, /* don't delete */
XA_STRING,
&actual_type, &actual_format,
&nitems, &bytes_after,
&data);
if (result != Success || actual_type == None)
{
/* It's not now locked - lock it. */
#ifdef DEBUG_PROPS
fprintf (stderr, "%s: (writing " MOZILLA_LOCK_PROP
" \"%s\" to 0x%x)\n",
progname, lock_data, (unsigned int) window);
#endif
XChangeProperty (dpy, window, XA_MOZILLA_LOCK, XA_STRING, 8,
PropModeReplace, (unsigned char *) lock_data,
strlen (lock_data));
locked = True;
}
XUngrabServer (dpy); /* ################################# danger over */
XSync (dpy, False);
if (! locked)
{
/* We tried to grab the lock this time, and failed because someone
else is holding it already. So, wait for a PropertyDelete event
to come in, and try again. */
fprintf (stderr, "%s: window 0x%x is locked by %s; waiting...\n",
progname, (unsigned int) window, data);
waited = True;
while (1)
{
XEvent event;
XNextEvent (dpy, &event);
if (event.xany.type == DestroyNotify &&
event.xdestroywindow.window == window)
{
fprintf (stderr, "%s: window 0x%x unexpectedly destroyed.\n",
progname, (unsigned int) window);
exit (6);
}
else if (event.xany.type == PropertyNotify &&
event.xproperty.state == PropertyDelete &&
event.xproperty.window == window &&
event.xproperty.atom == XA_MOZILLA_LOCK)
{
/* Ok! Someone deleted their lock, so now we can try
again. */
#ifdef DEBUG_PROPS
fprintf (stderr, "%s: (0x%x unlocked, trying again...)\n",
progname, (unsigned int) window);
#endif
break;
}
}
}
if (data)
XFree (data);
}
while (! locked);
if (waited)
fprintf (stderr, "%s: obtained lock.\n", progname);
}
static void
mozilla_remote_free_lock (Display *dpy, Window window)
{
int result;
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
unsigned char *data = 0;
#ifdef DEBUG_PROPS
fprintf (stderr, "%s: (deleting " MOZILLA_LOCK_PROP
" \"%s\" from 0x%x)\n",
progname, lock_data, (unsigned int) window);
#endif
result = XGetWindowProperty (dpy, window, XA_MOZILLA_LOCK,
0, (65536 / sizeof (long)),
True, /* atomic delete after */
XA_STRING,
&actual_type, &actual_format,
&nitems, &bytes_after,
&data);
if (result != Success)
{
fprintf (stderr, "%s: unable to read and delete " MOZILLA_LOCK_PROP
" property\n",
progname);
return;
}
else if (!data || !*data)
{
fprintf (stderr, "%s: invalid data on " MOZILLA_LOCK_PROP
" of window 0x%x.\n",
progname, (unsigned int) window);
return;
}
else if (strcmp ((char *) data, lock_data))
{
fprintf (stderr, "%s: " MOZILLA_LOCK_PROP
" was stolen! Expected \"%s\", saw \"%s\"!\n",
progname, lock_data, data);
return;
}
if (data)
XFree (data);
}
static int
mozilla_remote_command (Display *dpy, Window window, const char *command,
Bool raise_p)
{
int result;
Bool done = False;
char *new_command = 0;
/* The -noraise option is implemented by passing a "noraise" argument
to each command to which it should apply.
*/
if (! raise_p)
{
char *close;
new_command = (char *) malloc (strlen (command) + 20);
strcpy (new_command, command);
close = strrchr (new_command, ')');
if (close)
strcpy (close, ", noraise)");
else
strcat (new_command, "(noraise)");
command = new_command;
}
#ifdef DEBUG_PROPS
fprintf (stderr, "%s: (writing " MOZILLA_COMMAND_PROP " \"%s\" to 0x%x)\n",
progname, command, (unsigned int) window);
#endif
XChangeProperty (dpy, window, XA_MOZILLA_COMMAND, XA_STRING, 8,
PropModeReplace, (unsigned char *) command,
strlen (command));
while (!done)
{
XEvent event;
XNextEvent (dpy, &event);
if (event.xany.type == DestroyNotify &&
event.xdestroywindow.window == window)
{
/* Print to warn user...*/
fprintf (stderr, "%s: window 0x%x was destroyed.\n",
progname, (unsigned int) window);
result = 6;
goto DONE;
}
else if (event.xany.type == PropertyNotify &&
event.xproperty.state == PropertyNewValue &&
event.xproperty.window == window &&
event.xproperty.atom == XA_MOZILLA_RESPONSE)
{
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
unsigned char *data = 0;
result = XGetWindowProperty (dpy, window, XA_MOZILLA_RESPONSE,
0, (65536 / sizeof (long)),
True, /* atomic delete after */
XA_STRING,
&actual_type, &actual_format,
&nitems, &bytes_after,
&data);
#ifdef DEBUG_PROPS
if (result == Success && data && *data)
{
fprintf (stderr, "%s: (server sent " MOZILLA_RESPONSE_PROP
" \"%s\" to 0x%x.)\n",
progname, data, (unsigned int) window);
}
#endif
if (result != Success)
{
fprintf (stderr, "%s: failed reading " MOZILLA_RESPONSE_PROP
" from window 0x%0x.\n",
progname, (unsigned int) window);
result = 6;
done = True;
}
else if (!data || strlen((char *) data) < 5)
{
fprintf (stderr, "%s: invalid data on " MOZILLA_RESPONSE_PROP
" property of window 0x%0x.\n",
progname, (unsigned int) window);
result = 6;
done = True;
}
else if (*data == '1') /* positive preliminary reply */
{
fprintf (stderr, "%s: %s\n", progname, data + 4);
/* keep going */
done = False;
}
#if 1
else if (!strncmp ((char *)data, "200", 3)) /* positive completion */
{
result = 0;
done = True;
}
#endif
else if (*data == '2') /* positive completion */
{
fprintf (stderr, "%s: %s\n", progname, data + 4);
result = 0;
done = True;
}
else if (*data == '3') /* positive intermediate reply */
{
fprintf (stderr, "%s: internal error: "
"server wants more information? (%s)\n",
progname, data);
result = 3;
done = True;
}
else if (*data == '4' || /* transient negative completion */
*data == '5') /* permanent negative completion */
{
fprintf (stderr, "%s: %s\n", progname, data + 4);
result = (*data - '0');
done = True;
}
else
{
fprintf (stderr,
"%s: unrecognised " MOZILLA_RESPONSE_PROP
" from window 0x%x: %s\n",
progname, (unsigned int) window, data);
result = 6;
done = True;
}
if (data)
XFree (data);
}
#ifdef DEBUG_PROPS
else if (event.xany.type == PropertyNotify &&
event.xproperty.window == window &&
event.xproperty.state == PropertyDelete &&
event.xproperty.atom == XA_MOZILLA_COMMAND)
{
fprintf (stderr, "%s: (server 0x%x has accepted "
MOZILLA_COMMAND_PROP ".)\n",
progname, (unsigned int) window);
}
#endif /* DEBUG_PROPS */
}
DONE:
if (new_command)
free (new_command);
return result;
}
int
mozilla_remote_commands (Display *dpy, Window window, char **commands)
{
Bool raise_p = True;
int status = 0;
mozilla_remote_init_atoms (dpy);
if (window == 0)
window = mozilla_remote_find_window (dpy);
else
mozilla_remote_check_window (dpy, window);
#ifdef GLOBAL
if (window == 0)
return -1;
#endif
XSelectInput (dpy, window, (PropertyChangeMask|StructureNotifyMask));
mozilla_remote_obtain_lock (dpy, window);
while (*commands)
{
if (!strcmp (*commands, "-raise"))
raise_p = True;
else if (!strcmp (*commands, "-noraise"))
raise_p = False;
else
status = mozilla_remote_command (dpy, window, *commands, raise_p);
if (status != 0)
break;
commands++;
}
/* When status = 6, it means the window has been destroyed */
/* It is invalid to free the lock when window is destroyed. */
if ( status != 6 )
mozilla_remote_free_lock (dpy, window);
return status;
}
#ifdef STANDALONE
static void
usage (void)
{
fprintf (stderr, "usage: %s [ options ... ]\n\
where options include:\n\
\n\
-help to show this message.\n\
-display <dpy> to specify the X server to use.\n\
-remote <remote-command> to execute a command in an already-running\n\
Netscape process. See the manual for a\n\
list of valid commands.\n\
-id <window-id> the id of an X window to which the -remote\n\
commands should be sent; if unspecified,\n\
the first window found will be used.\n\
-raise whether following -remote commands should\n\
cause the window to raise itself to the top\n\
(this is the default.)\n\
-noraise the opposite of -raise: following -remote\n\
commands will not auto-raise the window.\n\
",
progname);
}
#ifdef GLOBAL
int
netscape_remote(int argc, char **argv)
#else
void
main (int argc, char **argv)
#endif
{
Display *dpy;
char *dpy_string = 0;
char **remote_commands = 0;
int remote_command_count = 0;
int remote_command_size = 0;
unsigned long remote_window = 0;
Bool sync_p = False;
int i;
progname = strrchr (argv[0], '/');
if (progname)
progname++;
else
progname = argv[0];
/* Hack the -help and -version arguments before opening the display. */
for (i = 1; i < argc; i++)
{
if (!strcasecmp (argv [i], "-h") ||
!strcasecmp (argv [i], "-help"))
{
usage ();
exit (0);
}
else if (!strcmp (argv [i], "-d") ||
!strcmp (argv [i], "-dpy") ||
!strcmp (argv [i], "-disp") ||
!strcmp (argv [i], "-display"))
{
i++;
dpy_string = argv [i];
}
else if (!strcmp (argv [i], "-sync") ||
!strcmp (argv [i], "-synchronize"))
{
sync_p = True;
}
else if (!strcmp (argv [i], "-remote"))
{
if (remote_command_count == remote_command_size)
{
remote_command_size += 20;
remote_commands =
(remote_commands
? realloc (remote_commands,
remote_command_size * sizeof (char *))
: calloc (remote_command_size, sizeof (char *)));
}
i++;
if (!argv[i] || *argv[i] == '-' || *argv[i] == 0)
{
fprintf (stderr, "%s: invalid `-remote' option \"%s\"\n",
progname, argv[i] ? argv[i] : "");
usage ();
exit (-1);
}
remote_commands [remote_command_count++] = argv[i];
}
else if (!strcmp (argv [i], "-raise") ||
!strcmp (argv [i], "-noraise"))
{
char *r = argv [i];
if (remote_command_count == remote_command_size)
{
remote_command_size += 20;
remote_commands =
(remote_commands
? realloc (remote_commands,
remote_command_size * sizeof (char *))
: calloc (remote_command_size, sizeof (char *)));
}
remote_commands [remote_command_count++] = r;
}
else if (!strcmp (argv [i], "-id"))
{
char c;
if (remote_command_count > 0)
{
fprintf (stderr,
"%s: the `-id' option must preceed all `-remote' options.\n",
progname);
usage ();
exit (-1);
}
else if (remote_window != 0)
{
fprintf (stderr, "%s: only one `-id' option may be used.\n",
progname);
usage ();
exit (-1);
}
i++;
if (argv[i] &&
1 == sscanf (argv[i], " %ld %c", &remote_window, &c))
;
else if (argv[i] &&
1 == sscanf (argv[i], " 0x%lx %c", &remote_window, &c))
;
else
{
fprintf (stderr, "%s: invalid `-id' option \"%s\"\n",
progname, argv[i] ? argv[i] : "");
usage ();
exit (-1);
}
}
}
dpy = XOpenDisplay (dpy_string);
if (! dpy)
exit (-1);
if (sync_p)
XSynchronize (dpy, True);
#ifdef GLOBAL
return mozilla_remote_commands (dpy, (Window) remote_window,
remote_commands);
#else
exit (mozilla_remote_commands (dpy, (Window) remote_window,
remote_commands));
#endif
}
#endif /* STANDALONE */
+119
View File
@@ -0,0 +1,119 @@
/*****************************************************************************/
/** Copyright 1991 by Andreas Stolcke **/
/** Copyright 1990 by Solbourne Computer Inc. **/
/** Longmont, Colorado **/
/** **/
/** All Rights Reserved **/
/** **/
/** Permission to use, copy, modify, and distribute this software and **/
/** its documentation for any purpose and without fee is hereby **/
/** granted, provided that the above copyright notice appear in all **/
/** copies and that both that copyright notice and this permis- **/
/** sion notice appear in supporting documentation, and that the **/
/** name of Solbourne not be used in advertising **/
/** in publicity pertaining to distribution of the software without **/
/** specific, written prior permission. **/
/** **/
/** ANDREAS STOLCKE AND SOLBOURNE COMPUTER INC. DISCLAIMS ALL WARRANTIES **/
/** WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF **/
/** MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ANDREAS STOLCKE **/
/** OR SOLBOURNE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL **/
/** DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
/** OR PERFORMANCE OF THIS SOFTWARE. **/
/*****************************************************************************/
/*
* vroot.h -- Virtual Root Window handling header file
*
* This header file redefines the X11 macros RootWindow and DefaultRootWindow,
* making them look for a virtual root window as provided by certain `virtual'
* window managers like swm and tvtwm. If none is found, the ordinary root
* window is returned, thus retaining backward compatibility with standard
* window managers.
* The function implementing the virtual root lookup remembers the result of
* its last invocation to avoid overhead in the case of repeated calls
* on the same display and screen arguments.
* The lookup code itself is taken from Tom LaStrange's ssetroot program.
*
* Most simple root window changing X programs can be converted to using
* virtual roots by just including
*
* #include <X11/vroot.h>
*
* after all the X11 header files. It has been tested on such popular
* X clients as xphoon, xfroot, xloadimage, and xaqua.
* It also works with the core clients xprop, xwininfo, xwd, and editres
* (and is necessary to get those clients working under tvtwm).
* It does NOT work with xsetroot; get the xsetroot replacement included in
* the tvtwm distribution instead.
*
* Andreas Stolcke <stolcke@ICSI.Berkeley.EDU>, 9/7/90
* - replaced all NULL's with properly cast 0's, 5/6/91
* - free children list (suggested by Mark Martin <mmm@cetia.fr>), 5/16/91
* - include X11/Xlib.h and support RootWindowOfScreen, too 9/17/91
*/
#ifndef _VROOT_H_
#define _VROOT_H_
#include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
static Window
VirtualRootWindowOfScreen(screen)
Screen *screen;
{
static Screen *save_screen = (Screen *)0;
static Window root = (Window)0;
if (screen != save_screen) {
Display *dpy = DisplayOfScreen(screen);
Atom __SWM_VROOT = None;
int i;
Window rootReturn, parentReturn, *children;
unsigned int numChildren;
root = RootWindowOfScreen(screen);
/* go look for a virtual root */
__SWM_VROOT = XInternAtom(dpy, "__SWM_VROOT", False);
if (XQueryTree(dpy, root, &rootReturn, &parentReturn,
&children, &numChildren)) {
for (i = 0; i < numChildren; i++) {
Atom actual_type;
int actual_format;
unsigned long nitems, bytesafter;
Window *newRoot = (Window *)0;
if (XGetWindowProperty(dpy, children[i],
__SWM_VROOT, 0, 1, False, XA_WINDOW,
&actual_type, &actual_format,
&nitems, &bytesafter,
(unsigned char **) &newRoot) == Success
&& newRoot) {
root = *newRoot;
break;
}
}
if (children)
XFree((char *)children);
}
save_screen = screen;
}
return root;
}
#undef RootWindowOfScreen
#define RootWindowOfScreen(s) VirtualRootWindowOfScreen(s)
#undef RootWindow
#define RootWindow(dpy,screen) VirtualRootWindowOfScreen(ScreenOfDisplay(dpy,screen))
#undef DefaultRootWindow
#define DefaultRootWindow(dpy) VirtualRootWindowOfScreen(DefaultScreenOfDisplay(dpy))
#endif /* _VROOT_H_ */
+350
View File
@@ -0,0 +1,350 @@
;;; gtags.el --- gtags facility for Emacs
;;
;; Copyright (c) 1997 Shigio Yamaguchi. All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;; 1. Redistributions of source code must retain the above copyright
;; notice, this list of conditions and the following disclaimer.
;; 2. Redistributions in binary form must reproduce the above copyright
;; notice, this list of conditions and the following disclaimer in the
;; documentation and/or other materials provided with the distribution.
;; 3. All advertising materials mentioning features or use of this software
;; must display the following acknowledgement:
;; This product includes software developed by Shigio Yamaguchi.
;; 4. Neither the name of the author nor the names of any co-contributors
;; may be used to endorse or promote products derived from this software
;; without specific prior written permission.
;;
;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
;; SUCH DAMAGE.
;;
;; gtags.el 31-Aug-97
;;
;; This file is part of GLOBAL.
;; Author: Shigio Yamaguchi <[email protected]>
;; Version: 1.1
;; Keywords: tools
;;; Code
(defvar gtags-buffer-stack nil
"Stack for tag browsing.")
(defvar gtags-point-stack nil
"Stack for tag browsing.")
(defvar gtags-complete-list nil
"Gtags complete list.")
(defconst symbol-regexp "[A-Za-z_][A-Za-z_0-9]*"
"Regexp matching tag name.")
(defconst definition-regexp "#[ \t]*define[ \t]+\\|ENTRY(\\|ALTENTRY("
"Regexp matching tag definition name.")
(defvar gtags-read-only nil
"Gtags read only mode")
(defvar gtags-mode-map (make-sparse-keymap)
"Keymap used in gtags mode.")
(define-key gtags-mode-map "\et" 'gtags-find-tag)
(define-key gtags-mode-map "\er" 'gtags-find-rtag)
(define-key gtags-mode-map "\es" 'gtags-find-symbol)
(define-key gtags-mode-map "\eg" 'gtags-find-pattern)
(define-key gtags-mode-map "\C-]" 'gtags-find-tag-from-here)
(define-key gtags-mode-map "\C-t" 'gtags-pop-stack)
(define-key gtags-mode-map "\e." 'etags-style-find-tag)
(define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event)
(define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
(defvar gtags-select-mode-map (make-sparse-keymap)
"Keymap used in gtags select mode.")
(define-key gtags-select-mode-map "q" 'gtags-pop-stack)
(define-key gtags-select-mode-map "\C-t" 'gtags-pop-stack)
(define-key gtags-select-mode-map "\C-m" 'gtags-select-tag)
(define-key gtags-select-mode-map " " 'scroll-up)
(define-key gtags-select-mode-map "\^?" 'scroll-down)
(define-key gtags-select-mode-map "\C-f" 'scroll-up)
(define-key gtags-select-mode-map "\C-b" 'scroll-down)
(define-key gtags-select-mode-map "n" 'next-line)
(define-key gtags-select-mode-map "p" 'previous-line)
(define-key gtags-select-mode-map "j" 'next-line)
(define-key gtags-select-mode-map "k" 'previous-line)
(define-key gtags-select-mode-map [mouse-2] 'gtags-select-tag-by-event)
(define-key gtags-select-mode-map [mouse-3] 'gtags-pop-stack)
;;
;; utility
;;
(defun match-string (n)
(buffer-substring (match-beginning n) (match-end n)))
;; Return a default tag to search for, based on the text at point.
(defun gtags-current-token ()
(cond
((looking-at "[0-9A-Za-z_]")
(while (looking-at "[0-9A-Za-z_]")
(forward-char -1))
(forward-char 1))
(t
(while (looking-at "[ \t]")
(forward-char 1))))
(if (and (bolp) (looking-at definition-regexp))
(goto-char (match-end 0)))
(if (looking-at symbol-regexp)
(match-string 0) nil))
;; push current context to stack
(defun push-context ()
(setq gtags-buffer-stack (cons (current-buffer) gtags-buffer-stack))
(setq gtags-point-stack (cons (point) gtags-point-stack)))
;; pop context from stack
(defun pop-context ()
(if (not gtags-buffer-stack) nil
(let (buffer point)
(setq buffer (car gtags-buffer-stack))
(setq gtags-buffer-stack (cdr gtags-buffer-stack))
(setq point (car gtags-point-stack))
(setq gtags-point-stack (cdr gtags-point-stack))
(list buffer point))))
;; if the buffer exist in the stack
(defun exist-in-stack (buffer)
(memq buffer gtags-buffer-stack))
;; is it a function?
(defun is-function ()
(save-excursion
(while (and (not (eolp)) (looking-at "[0-9A-Za-z_]"))
(forward-char 1))
(while (and (not (eolp)) (looking-at "[ \t]"))
(forward-char 1))
(if (looking-at "(") t nil)))
;; is it a definition?
(defun is-definition ()
(save-excursion
(if (bolp)
t
(forward-word -1)
(cond
((looking-at "define")
(forward-char -1)
(while (and (not (bolp)) (looking-at "[ \t]"))
(forward-char -1))
(if (and (bolp) (looking-at "#"))
t nil))
((looking-at "ENTRY\\|ALTENTRY")
(if (bolp) t nil))))))
;;
;; interactive command
;;
(defun gtags-find-tag ()
"Input tag name and move to the definition."
(interactive)
(let (tagname)
(setq tagname (completing-read ":tag " gtags-complete-list))
(push-context)
(gtags-goto-tag tagname "")))
(defun etags-style-find-tag ()
"Input tag name and move to the definition.(etags style)"
(interactive)
(let (tagname prompt input)
(setq tagname (gtags-current-token))
(if tagname
(setq prompt (concat "Find tag: (default " tagname ") "))
(setq prompt "Find tag: "))
(setq input (completing-read prompt gtags-complete-list))
(if (not (equal "" input)) (setq tagname input))
(push-context)
(gtags-goto-tag tagname "")))
(defun gtags-find-symbol ()
"Input symbol and move to the locations."
(interactive)
(let (tagname prompt input)
(setq tagname (gtags-current-token))
(if tagname
(setq prompt (concat "Find symbol: (default " tagname ") "))
(setq prompt "Find symbol: "))
(setq input (read-string prompt))
(if (not (equal "" input)) (setq tagname input))
(push-context)
(gtags-goto-tag tagname "s")))
(defun gtags-find-pattern ()
"Input pattern and move to the locations."
(interactive)
(let (tagname prompt input)
(setq tagname (gtags-current-token))
(if tagname
(setq prompt (concat "Find pattern: (default " tagname ") "))
(setq prompt "Find pattern: "))
(setq input (read-string prompt))
(if (not (equal "" input)) (setq tagname input))
(push-context)
(gtags-goto-tag tagname "g")))
(defun gtags-find-rtag ()
"Input tag name and move to the referenced point."
(interactive)
(let (tagname)
(setq tagname (completing-read ":rtag " gtags-complete-list))
(push-context)
(gtags-goto-tag tagname "r")))
(defun gtags-find-tag-from-here ()
"Get the expression as a tagname around here and move there."
(interactive)
(let (tagname flag)
(setq tagname (gtags-current-token))
(if (is-function)
(if (is-definition) (setq flag "r") (setq flag ""))
(setq flag "s"))
(if (not tagname)
nil
(push-context)
(gtags-goto-tag tagname flag))))
(defun gtags-find-tag-by-event (event)
"Get the expression as a tagname around here and move there."
(interactive "e")
(select-window (posn-window (event-end event)))
(set-buffer (window-buffer (posn-window (event-end event))))
(goto-char (posn-point (event-end event)))
(let (tagname flag)
(if (= 0 (count-lines (point-min) (point-max)))
(progn (setq tagname "main") (setq flag ""))
(setq tagname (gtags-current-token))
(if (is-function)
(if (is-definition) (setq flag "r") (setq flag ""))
(setq flag "s")))
(if (not tagname)
nil
(push-context)
(gtags-goto-tag tagname flag))))
(defun gtags-select-tag ()
"Select a tagname in [GTAGS SELECT MODE] and move there."
(interactive)
(push-context)
(gtags-select-it nil))
(defun gtags-select-tag-by-event (event)
"Select a tagname in [GTAGS SELECT MODE] and move there."
(interactive "e")
(select-window (posn-window (event-end event)))
(set-buffer (window-buffer (posn-window (event-end event))))
(goto-char (posn-point (event-end event)))
(push-context)
(gtags-select-it nil))
(defun gtags-pop-stack ()
"Move to previous point on the stack."
(interactive)
(let (delete context buffer)
(if (not (exist-in-stack (current-buffer)))
(setq delete t))
(setq context (pop-context))
(if (not context)
(message "The tags stack is empty.")
(if delete
(kill-buffer (current-buffer)))
(switch-to-buffer (nth 0 context))
(goto-char (nth 1 context)))))
;;
;; common function
;;
;; goto tag's point
(defun gtags-goto-tag (tagname flag)
(let (save prefix buffer lines)
(setq save (current-buffer))
(cond
((equal flag "g")
(setq prefix "(G)"))
((equal flag "s")
(setq prefix "(S)"))
((equal flag "r")
(setq prefix "(R)"))
(t (setq prefix "(D)")))
;; load tag
(setq buffer (generate-new-buffer (generate-new-buffer-name (concat prefix tagname))))
(set-buffer buffer)
(if (not (= 0 (call-process "global" nil t nil (concat "-ax" flag) tagname)))
(progn (message (buffer-substring (point-min)(1- (point-max))))
(pop-context))
(goto-char (point-min))
(setq lines (count-lines (point-min) (point-max)))
(cond
((= 0 lines)
(message "%s: tag not found" tagname)
(pop-context)
(kill-buffer buffer)
(set-buffer save))
((= 1 lines)
(gtags-select-it t))
(t
(switch-to-buffer buffer)
(gtags-select-mode))))))
;; select a tag line from lines
(defun gtags-select-it (delete)
(let (line file)
;; get context from current tag line
(beginning-of-line)
;; (if (not (looking-at "[A-Za-z_][A-Za-z_0-9]*[ \t]+\\([0-9]+\\)[ \t]\\([^ \t]+\\)[ \t]"))
(if (not (looking-at "[^ \t]+[ \t]+\\([0-9]+\\)[ \t]\\([^ \t]+\\)[ \t]"))
(pop-context)
(setq line (string-to-number (match-string 1)))
(setq file (match-string 2))
(if delete (kill-buffer (current-buffer)))
;; move to the context
(if gtags-read-only (find-file-read-only file) (find-file file))
(goto-line line)
(use-local-map gtags-mode-map))))
;; make complete list
(defun make-gtags-complete-list ()
(save-excursion
(setq gtags-complete-list (make-vector 63 0))
(set-buffer (generate-new-buffer "*Completions*"))
(call-process "global" nil t nil "-c")
(goto-char (point-min))
(while (looking-at symbol-regexp)
(intern (match-string 0) gtags-complete-list)
(forward-line))
(kill-buffer (current-buffer))))
;;;###autoload
(defun gtags-mode ()
"Minor mode for browsing C source using GLOBAL."
(interactive)
(make-gtags-complete-list)
(use-local-map gtags-mode-map)
(run-hooks 'gtags-mode-hook))
;; make gtags select mode
(defun gtags-select-mode ()
"Major mode for choosing a tag from tags list."
(setq buffer-read-only t
major-mode 'gtags-select-mode
mode-name "Gtags Select")
(use-local-map gtags-select-mode-map)
(setq truncate-lines t)
(goto-char (point-min))
(message "[GTAGS SELECT MODE] %d lines" (count-lines (point-min) (point-max)))
(run-hooks 'gtags-select-mode-hook))
;;; gtags.el ends here
+6
View File
@@ -0,0 +1,6 @@
PROG= gtags
CFLAGS+=-I${.CURDIR}/../lib
LDADD= $(LIBUTIL)
DPADD= $(LIBUTIL)
.include <bsd.prog.mk>
@@ -28,59 +28,71 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd Apr 21, 1997
.Dd Sep 12, 1997
.Dt GTAGS 1
.Os BSD 4
.Sh NAME
.Nm gtags
.Nd create GTAGS, GRTAGS file
.Nd create GTAGS, GRTAGS and GSYMS file
.Sh SYNOPSIS
.Nm gtags
.Op Fl e
.Op Fl s
.Op Fl i
.Op Fl o
.Op Fl v
.Op Ar dbpath
.Sh DESCRIPTION
.Nm Gtags
makes GTAGS, GRTAGS files for global(1).
makes GTAGS, GRTAGS and GSYMS file for
.Xr global 1 .
.Nm Gtags
trace subdirectories, read source files,
locate the functions and save the information into tag files.
locate symbols and save the information into tag files.
C, yacc and assembler source files are supported.
You should execute this command at the root of the source tree.
.Pp
If your source directory is on a read only device like CDROM, specify
.Ar dbpath
of the directory on which make tags files.
of the directory on which make tag files.
.Pp
.Bl -tag -width Ds
.It Fl e
force a function to end when reach a '}' at the first column in C source file.
.It Fl s
treat assembler source file (*.s, *.S).
.It Fl i
update tag files incrementally by files which modified after the tag files were
last updated.
.It Fl o
suppress making GSYMS file.
Use this option if you don't use -s option of
.Xr global 1 .
.It Fl v
verbose mode.
.Sh FILES
.Bl -tag -width tags -compact
.It Pa GTAGS
tags file for function definitions.
tag file for function definitions.
.It Pa GRTAGS
tags file for function references.
tag file for function references.
.It Pa GSYMS
tag file for other symbols.
.El
.Sh DIAGNOSTICS
.Nm Gtags
exits with a value of 1 if an error occurred, 0 otherwise.
exits with a non 0 value if an error occurred, 0 otherwise.
.Sh SEE ALSO
.Xr btreeop 1 ,
.Xr gctags 1 ,
.Xr global 1 ,
.Xr htags 1 .
.Xr htags 1 ,
.Xr vi 1 .
.Sh BUG
GTAGS, GRTAGS are very large. In advance, check the space of your disk.
GTAGS, GRTAGS and GSYMS are very large.
In advance of using this command, check the space of your disk.
.br
Assembler support is far from completeness. It extracts only ENTRY()
and ALTENTRY() from source file. Probably valid only for FreeBSD and Linux
kernel source.
.br
There is no concurrency control about tag files.
.Sh AUTHORS
Shigio Yamaguchi ([email protected])
.Sh HISTORY
The
.Nm
command appeared in FreeBSD 2.2.
command appeared in FreeBSD 2.2.2.
+305
View File
@@ -0,0 +1,305 @@
/*
* Copyright (c) 1996, 1997 Shigio Yamaguchi. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Shigio Yamaguchi.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* gtags.c 12-Dec-97
*
*/
#include <sys/stat.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "global.h"
char *progname = "gtags"; /* command name */
static void usage __P((void));
void main __P((int, char **));
int incremental __P((char *));
void tagadd __P((int, char *));
void createtags __P((char *, int));
char *current __P((void));
static int iflag;
static int oflag;
static int vflag;
static void
usage()
{
fprintf(stderr, "usage:\t%s [-i][-o][-v][dbpath]\n", progname);
exit(1);
}
void
main(argc, argv)
int argc;
char *argv[];
{
char dbpath[MAXPATHLEN+1];
char env[MAXENVLEN+1];
char *p;
int db;
while (--argc > 0 && (++argv)[0][0] == '-') {
for (p = argv[0] + 1; *p; p++) {
switch (*p) {
case 'i':
iflag++;
break;
case 'o':
oflag++;
break;
case 'v':
vflag++;
break;
/* for compatibility */
case 's':
case 'e':
break;
default:
usage();
}
}
}
if (argc > 0) {
strcpy(dbpath, *argv);
} else {
if (!getcwd(dbpath, MAXPATHLEN))
die("cannot get current directory.");
}
if (!strcmp(dbpath, "/"))
die("It's root directory! What are you doing?");
if (!test("d", dbpath))
die1("directory '%s' not found.", dbpath);
if (vflag)
fprintf(stderr, "[%s] Gtags started\n", current());
/*
* teach gctags(1) where is dbpath.
*/
sprintf(env, "GTAGSDBPATH=%s", dbpath);
putenv(env);
/*
* incremental update.
*/
if (iflag && test("f", makepath(dbpath, dbname(GTAGS))) &&
test("f", makepath(dbpath, dbname(GRTAGS))))
{
(void)incremental(dbpath);
exit(0);
}
if (iflag && vflag)
fprintf(stderr, " GTAGS and GRTAGS not found. -i option ignored.\n");
/*
* create GTAGS, GRTAGS and GSYMS
*/
for (db = GTAGS; db < GTAGLIM; db++) {
if (oflag && db == GSYMS)
continue;
if (vflag)
fprintf(stderr, "[%s] Creating '%s'.\n", current(), dbname(db));
createtags(dbpath, db);
}
if (vflag)
fprintf(stderr, "[%s] Done.\n", current());
exit(0);
}
/*
* incremental: incremental update
*
* i) dbpath dbpath directory
* r) 0: not updated, 1: updated
*/
int
incremental(dbpath)
char *dbpath;
{
struct stat sb;
time_t gtags_mtime;
int updated = 0;
char *path;
int db;
if (vflag) {
fprintf(stderr, " Tag found in '%s'.\n", dbpath);
fprintf(stderr, " Incremental update.\n");
}
/*
* get modified time of GTAGS.
*/
path = makepath(dbpath, dbname(GTAGS));
if (stat(path, &sb) < 0)
die1("stat failed '%s'.", path);
gtags_mtime = sb.st_mtime;
for (findopen(); (path = findread(NULL)) != NULL; ) {
if (stat(path, &sb) < 0)
die1("stat failed '%s'.", path);
/*
* only the path modified after GTAGS was modified.
*/
if (gtags_mtime < sb.st_mtime) {
updated = 1;
if (vflag)
fprintf(stderr, " Updating tags of '%s' ...", path + 2);
for (db = GTAGS; db < GTAGLIM; db++) {
if (db == GSYMS && !test("f", makepath(dbpath, dbname(db))))
continue;
if (vflag)
fprintf(stderr, "%s", dbname(db));
tagopen(dbpath, db, 2);
/*
* GTAGS needed to make GRTAGS.
*/
if (db == GRTAGS)
lookupopen(dbpath);
tagdelete(path);
if (vflag)
fprintf(stderr, "..");
tagadd(db, path);
if (db == GRTAGS)
lookupclose();
tagclose();
}
if (vflag)
fprintf(stderr, " Done.\n");
}
}
findclose();
if (vflag) {
if (updated)
fprintf(stderr, " Global databases have been modified.\n");
else
fprintf(stderr, " Global databases are up to date.\n");
fprintf(stderr, "[%s] Done.\n", current());
fprintf(stderr, " Done.\n");
}
return updated;
}
/*
* tagadd: add records which has specified path.
*
* i) db 0: GTAGS, 1: GRTAGS, 2: GSYMS
* i) path source file
*/
void
tagadd(db, path)
int db;
char *path;
{
char *tagline, *p, *q;
char key[IDENTLEN+1];
FILE *ip;
stropen();
/*
* make command line.
*/
strputs("gctags -Dex");
if (db == GRTAGS)
strputs("r");
if (db == GSYMS)
strputs("sc");
strputc(' ');
strputs(path);
p = strclose();
if (!(ip = popen(p, "r")))
die1("cannot execute '%s'.", p);
while ((tagline = mgets(ip, 0, NULL)) != NULL) {
p = tagline;
q = key;
while (*p && !isspace(*p))
*q++ = *p++;
*q = 0;
tagput(key, tagline);
}
pclose(ip);
}
/*
* createtags: create tags file
*
* i) dbpath dbpath directory
* i) db GTAGS, GRTAGS, GSYMS
*/
void
createtags(dbpath, db)
char *dbpath;
int db;
{
char *path;
/*
* GTAGS needed to make GRTAGS.
*/
if (db == GRTAGS)
lookupopen(dbpath);
tagopen(dbpath, db, 1);
for (findopen(); (path = findread(NULL)) != NULL; ) {
/*
* GSYMS doesn't treat asembler.
*/
if (db == GSYMS) {
char *p = path + strlen(path) - 1;
if ((*p == 's' || *p == 'S') && *(p - 1) == '.')
continue;
}
if (vflag)
fprintf(stderr, " extracting tags of %s.\n", path);
tagadd(db, path);
}
findclose();
tagclose();
if (db == GRTAGS)
lookupclose();
}
/*
* current: current date and time
*
* r) date and time
*/
char *
current(void)
{
static char buf[80];
time_t tval;
if (time(&tval) == -1)
die("cannot get current time.");
(void)strftime(buf, sizeof(buf), "%+", localtime(&tval));
return buf;
}
+7
View File
@@ -0,0 +1,7 @@
MAN1= htags.1
beforeinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${.CURDIR}/htags.pl ${DESTDIR}${BINDIR}/htags
.include <bsd.prog.mk>
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd Apr 21, 1997
.Dd June 28, 1997
.Dt HTAGS 1
.Os BSD 4
.Sh NAME
@@ -37,7 +37,9 @@
.Sh SYNOPSIS
.Nm htags
.Op Fl a
.Op Fl f
.Op Fl l
.Op Fl n
.Op Fl v
.Op Fl w
.Op Fl d Ar tagdir
@@ -64,10 +66,15 @@ by any browsers.
.Bl -tag -width Ds
.It Fl a
make an alphabetical function index. It's suitable for large project.
.It Fl f
support input form and dynamic index by CGI program.
You need to setup HTTP server for it.
.It Fl l
make name tag(<A NAME=lno>) for each line so that outer hypertext
make name tag(<A NAME=line number>) for each line so that outer hypertext
can point any line of this hypertext.
By default, make it only for lines which have referred object.
.It Fl n
print line number. By default, doesn't print it.
.It Fl v
verbose mode.
.It Fl w
@@ -75,13 +82,13 @@ print warning message.
.It Fl d Ar tagdir
the directory in which GTAGS and GRTAGS exist. Default is current directory.
.It Fl t Ar title
Tile of this hypertext. Default is the last conponent of current path.
Tile of this hypertext. Default is the last component of current path.
.It Ar dir
the directory in which hypertext generated. Default is current directory.
.Sh EXAMPLES
% cd /usr/src/sys
# gtags -se
# htags -vat 'Welcom to FreeBSD kernel source tour!'
# htags -fnvat 'Welcom to FreeBSD kernel source tour!'
% lynx HTML/index.html
.Sh FILES
.Bl -tag -width tags -compact
@@ -101,10 +108,9 @@ If this variable is set, its value is used as the directory to make temporary fi
Default is /tmp.
.Sh DIAGNOSTICS
.Nm Htags
exits with a value of 1 if an error occurred, 0 otherwise.
exits with a non 0 value if an error occurred, 0 otherwise.
.Sh SEE ALSO
.Xr btreeop 1 ,
.Xr gctags 1 ,
.Xr global 1 ,
.Xr gtags 1 .
.Sh BUG
@@ -114,4 +120,4 @@ Shigio Yamaguchi ([email protected])
.Sh HISTORY
The
.Nm
command appeared in FreeBSD 2.2.
command appeared in FreeBSD 2.2.2.
+374 -194
View File
@@ -29,11 +29,11 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# htags.pl 21-Apr-97
# htags.pl 20-Jan-98
#
$com = $0;
$com =~ s/.*\///;
$usage = "usage: $com [-a][-l][-v][-w][-t title][-d tagdir][dir]";
$usage = "usage: $com [-a][-f][-l][-n][-v][-w][-t title][-d tagdir][dir]\n";
#-------------------------------------------------------------------------
# CONFIGURATION
#-------------------------------------------------------------------------
@@ -64,8 +64,7 @@ $ESCSEP = &escape($SEP);
$SRCS = 'S';
$DEFS = 'D';
$REFS = 'R';
$FILES = 'files';
$FUNCS = 'funcs';
$INCS = 'I';
#-------------------------------------------------------------------------
# JAVASCRIPT PARTS
#-------------------------------------------------------------------------
@@ -83,13 +82,11 @@ $defaultview=
"if (parent.frames.length)\n" .
" document.write($langle+'BASE TARGET=$f_mains'+$rangle)\n";
$rewrite_href_funcs =
"// IE3.0 seems to be not able to treat following code.\n" .
"if (parent.frames.length && parent.$f_funcs == self) {\n" .
" document.links[0].href = '../funcs.html';\n" .
" document.links[document.links.length - 1].href = '../funcs.html';\n" .
"}\n";
$rewrite_href_files =
"// IE3.0 seems to be not able to treat following code.\n" .
"if (parent.frames.length && parent.$f_files == self) {\n" .
" document.links[0].href = '../files.html';\n" .
" document.links[document.links.length - 1].href = '../files.html';\n" .
@@ -97,6 +94,7 @@ $rewrite_href_files =
#-------------------------------------------------------------------------
# UTIRITIES
#-------------------------------------------------------------------------
$findcom = "find . \\( -type f -o -type l \\) -name '*.[chysS]' -print";
sub getcwd {
local($dir) = `/bin/pwd`;
chop($dir);
@@ -108,9 +106,9 @@ sub date {
$date;
}
sub error {
local($msg) = @_;
&clean();
die($msg);
printf STDERR "$com: $_[0]\n";
exit 1;
}
sub clean {
&anchor'finish();
@@ -122,31 +120,37 @@ sub escape {
}
sub usable {
local($com) = @_;
foreach $path (split(/:/, $ENV{'PATH'})) {
if (-x "$path/$com") {
return 1;
}
foreach (split(/:/, $ENV{'PATH'})) {
return 1 if (-x "$_/$com");
}
return 0;
}
sub copy {
local($from, $to) = @_;
local($ret) = system("cp $from $to");
$ret = $ret / 256;
$ret = ($ret == 0) ? 1 : 0;
$ret;
}
#-------------------------------------------------------------------------
# PROCESS START
#-------------------------------------------------------------------------
#
# options check
# options check.
#
$aflag = $lflag = $vflag = $wflag = $sflag = '';# $sflag is set internally
$aflag = $fflag = $lflag = $nflag = $vflag = $wflag = '';
while ($ARGV[0] =~ /^-/) {
$opt = shift;
if ($opt =~ /[^-alvwtd]/) {
print STDERR "$usage\n";
if ($opt =~ /[^-aflnvwtd]/) {
print STDERR $usage;
exit 1;
}
if ($opt =~ /a/) { $aflag = 1; }
if ($opt =~ /l/) { $lflag = 1; }
if ($opt =~ /v/) { $vflag = 1; }
if ($opt =~ /w/) { $wflag = 1; }
if ($opt =~ /a/) { $aflag = 'a'; }
if ($opt =~ /f/) { $fflag = 'f'; }
if ($opt =~ /l/) { $lflag = 'l'; }
if ($opt =~ /n/) { $nflag = 'n'; }
if ($opt =~ /v/) { $vflag = 'v'; }
if ($opt =~ /w/) { $wflag = 'w'; }
if ($opt =~ /t/) {
$opt = shift;
last if ($opt eq '');
@@ -161,19 +165,17 @@ if (!$title) {
@cwd = split('/', &getcwd);
$title = $cwd[$#cwd];
}
if (!$dbpath) {
$dbpath = '.';
}
$dbpath = &getcwd() if (!$dbpath);
unless (-r "$dbpath/GTAGS" && -r "$dbpath/GRTAGS") {
&error("GTAGS and GRTAGS not found. please type 'gtags[RET]'\n");
&error("GTAGS and GRTAGS not found. please type 'gtags[RET]'");
}
#
# recognize format version
# if version record is not found, it's assumed version 1.
#
$support_version = 1; # understand this format version
$support_version = 1; # I can understand this format version
#
open(GTAGS, "btreeop -K ' __.VERSION' $dbpath/GTAGS |") || die("$com: GTAGS not found.\n");
open(GTAGS, "btreeop -K ' __.VERSION' $dbpath/GTAGS |") || &error("GTAGS not found.");
$rec = <GTAGS>;
close(GTAGS);
if ($rec =~ /^ __\.VERSION[ \t]+([0-9]+)$/) {
@@ -182,7 +184,7 @@ if ($rec =~ /^ __\.VERSION[ \t]+([0-9]+)$/) {
$format_version = 1;
}
if ($format_version != $support_version) {
die("$com: GTAGS format version unmatched. Please remake it.\n");
&error("GTAGS format version unmatched. Please remake it.");
}
#
# check directories
@@ -191,46 +193,64 @@ $html = &getcwd() . '/HTML';
if ($ARGV[0]) {
$cwd = &getcwd();
unless (-w $ARGV[0]) {
&error("$ARGV[0] is not writable directory.\n");
&error("'$ARGV[0]' is not writable directory.");
}
chdir($ARGV[0]) || &error("directory $ARGV[0] not found.\n");
chdir($ARGV[0]) || &error("directory '$ARGV[0]' not found.");
$html = &getcwd() . '/HTML';
chdir($cwd) || &error("cannot return directory.\n");
chdir($cwd) || &error("cannot return to original directory.");
}
#
# set sflag if *.[sS] are included.
# check if GTAGS, GRTAGS is the latest.
#
open(CHECK, "btreeop $dbpath/GTAGS |") || &error("btreeop $dbpath/GTAGS failed.\n");
while (<CHECK>) {
local($tag, $lno, $filename) = split;
if ($filename =~ /\.[sS]$/) {
$'sflag = 1;
last;
$gtags_ctime = (stat("$dbpath/GTAGS"))[10];
open(FIND, "$findcom |") || &error("cannot exec find.");
while (<FIND>) {
chop;
next if /(y\.tab\.c|y\.tab\.h)$/;
next if /(\/SCCS\/|\/RCS\/)/;
if ($gtags_ctime < (stat($_))[10]) {
&error("GTAGS is not the latest one. Please remake it.");
}
}
close(CHECK);
close(FIND);
#-------------------------------------------------------------------------
# MAKE FILES
#-------------------------------------------------------------------------
# HTML/cgi-bin/global.cgi ... CGI program (1)
# HTML/help.html ... help file (2)
# HTML/funcs.html ... function index (3)
# HTML/$FUNCS/* ... function index (3)
# HTML/$REFS/* ... referencies (4)
# HTML/$DEFS/* ... definitions (4)
# HTML/$REFS/* ... referencies (3)
# HTML/$DEFS/* ... definitions (3)
# HTML/funcs.html ... function index (4)
# HTML/funcs/* ... function index (4)
# HTML/files.html ... file index (5)
# HTML/$FILES/* ... file index (5)
# HTML/files/* ... file index (5)
# HTML/index.html ... index file (6)
# HTML/mains.html ... main index (7)
# HTML/$SRCS/ ... source files (8)
# HTML/$INCS/ ... include file index (9)
#-------------------------------------------------------------------------
print STDERR "[", &date, "] ", "Htags started\n" if ($vflag);
#
# (1) make directories
# (0) make directories
#
print STDERR "[", &date, "] ", "(1) making directories ...\n" if ($vflag);
mkdir($html, 0777) || &error("cannot make directory <$html>.\n") if (! -d $html);
foreach $d ($SRCS, $REFS, $DEFS, $FILES, $FUNCS) {
mkdir("$html/$d", 0775) || &error("cannot make HTML directory\n") if (! -d "$html/$d");
print STDERR "[", &date, "] ", "(0) making directories ...\n" if ($vflag);
mkdir($html, 0777) || &error("cannot make directory '$html'.") if (! -d $html);
foreach $d ($SRCS, $INCS, $DEFS, $REFS, files, funcs) {
mkdir("$html/$d", 0775) || &error("cannot make HTML directory") if (! -d "$html/$d");
}
if ($fflag) {
mkdir("$html/cgi-bin", 0775) || &error("cannot make cgi-bin directory") if (! -d "$html/cgi-bin");
}
#
# (1) make CGI program
#
if ($fflag) {
print STDERR "[", &date, "] ", "(1) making CGI program ...\n" if ($vflag);
&makeprogram("$html/cgi-bin/global.cgi") || &error("cannot make CGI program.");
chmod(0755, "$html/cgi-bin/global.cgi") || &error("cannot chmod CGI program.");
unlink("$html/cgi-bin/GTAGS", "$html/cgi-bin/GRTAGS");
link("$dbpath/GTAGS", "$html/cgi-bin/GTAGS") || &copy("$dbpath/GTAGS", "$html/cgi-bin/GTAGS") || &error("cannot copy GTAGS.");
link("$dbpath/GRTAGS", "$html/cgi-bin/GRTAGS") || &copy("$dbpath/GRTAGS", "$html/cgi-bin/GRTAGS") || &error("cannot copy GRTAGS.");
}
#
# (2) make help file
@@ -238,30 +258,30 @@ foreach $d ($SRCS, $REFS, $DEFS, $FILES, $FUNCS) {
print STDERR "[", &date, "] ", "(2) making help.html ...\n" if ($vflag);
&makehelp("$html/help.html");
#
# (3) make function index (funcs.html and $FUNCS/*)
# PRODUCE @funcs
#
print STDERR "[", &date, "] ", "(3) making function index ...\n" if ($vflag);
$func_total = &makefuncindex("$html/funcs.html");
print STDERR "Total $func_total functions.\n" if ($vflag);
#
# (4) make function entries ($DEFS/* and $REFS/*)
# (3) make function entries ($DEFS/* and $REFS/*)
# MAKING TAG CACHE
#
print STDERR "[", &date, "] ", "(4) making duplicate entries ...\n" if ($vflag);
print STDERR "[", &date, "] ", "(3) making duplicate entries ...\n" if ($vflag);
sub suddenly { &clean(); exit 1}
$SIG{'INT'} = 'suddenly';
$SIG{'QUIT'} = 'suddenly';
$SIG{'TERM'} = 'suddenly';
&cache'open(100000);
$func_total = &makedupindex($func_total);
$func_total = &makedupindex();
print STDERR "Total $func_total functions.\n" if ($vflag);
#
# (5) make file index (files.html and $FILES/*)
# PRODUCE @files
# (4) make function index (funcs.html and funcs/*)
# PRODUCE @funcs
#
print STDERR "[", &date, "] ", "(4) making function index ...\n" if ($vflag);
$func_total = &makefuncindex("$html/funcs.html", $func_total);
print STDERR "Total $func_total functions.\n" if ($vflag);
#
# (5) make file index (files.html and files/*)
# PRODUCE @files %includes
#
print STDERR "[", &date, "] ", "(5) making file index ...\n" if ($vflag);
$file_total = &makefileindex("$html/files.html");
$file_total = &makefileindex("$html/files.html", "$html/$INCS");
print STDERR "Total $file_total files.\n" if ($vflag);
#
# [#] make a common part for mains.html and index.html
@@ -286,7 +306,7 @@ print STDERR "[", &date, "] ", "(#) making temporary database ...\n" if ($vflag)
&anchor'create();
#
# (8) make HTML files ($SRCS/*)
# USING TAG CACHE
# USING TAG CACHE, %includes and anchor database.
#
print STDERR "[", &date, "] ", "(8) making hypertext from source code ...\n" if ($vflag);
&makehtml($file_total);
@@ -297,12 +317,86 @@ exit 0;
# SUBROUTINES
#-------------------------------------------------------------------------
#
# makeprogram: make CGI program
#
sub makeprogram {
local($file) = @_;
open(PROGRAM, ">$file") || &error("cannot make CGI program.");
$program = <<'END_OF_SCRIPT';
#!/usr/bin/perl
#------------------------------------------------------------------
# SORRY TO HAVE SURPRISED YOU!
# IF YOU SEE THIS UNREASONABLE FILE WHILE BROUSING, FORGET PLEASE.
# IF YOU ARE A ADMINISTRATOR OF THIS SITE, PLEASE SETUP HTTP SERVER
# SO THAT THIS SCRIPT CAN BE EXECUTED AS A CGI COMMAND. THANK YOU.
#------------------------------------------------------------------
$SRCS = 'S';
$SEP = ' '; # source file path must not include $SEP charactor
$ESCSEP = &escape($SEP);
sub escape {
local($c) = @_;
'%' . sprintf("%x", ord($c));
}
print "Content-type: text/html\n\n";
print "<HTML>\n";
@pairs = split (/&/, $ENV{'QUERY_STRING'});
foreach $p (@pairs) {
($name, $value) = split(/=/, $p);
$value =~ tr/+/ /;
$value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack("C", hex($1))/eg;
$form{$name} = $value;
}
if ($form{'pattern'} eq '') {
print "<H3>Pattern not specified. <A HREF=../mains.html>[return]</A></H3>\n";
print "</HTML>\n";
exit 0;
}
$pattern = $form{'pattern'};
$flag = ($form{'type'} eq 'definition') ? '' : 'r';
$words = ($form{'type'} eq 'definition') ? 'definitions' : 'referencies';
print "<H1><FONT COLOR=#cc0000>\"$pattern\"</FONT></H1>\n";
print "Following $words are matched to above pattern.<HR>\n";
$pattern =~ s/'//g; # to shut security hole
unless (open(PIPE, "/usr/bin/global -x$flag '$pattern' |")) {
print "<H3>Cannot execute global. <A HREF=../mains.html>[return]</A></H3>\n";
print "</HTML>\n";
exit 0;
}
$cnt = 0;
print "<PRE>\n";
while (<PIPE>) {
$cnt++;
local($tag, $lno, $filename) = split;
$filename =~ s/^\.\///;
$filename =~ s/\//$ESCSEP/g;
s/($tag)/<A HREF=..\/$SRCS\/$filename.html#$lno>$1<\/A>/;
print;
}
print "</PRE>\n";
if ($cnt == 0) {
print "<H3>Pattern not found. <A HREF=../mains.html>[return]</A></H3>\n";
}
print "</HTML>\n";
exit 0;
#------------------------------------------------------------------
# SORRY TO HAVE SURPRISED YOU!
# IF YOU SEE THIS UNREASONABLE FILE WHILE BROUSING, FORGET PLEASE.
# IF YOU ARE A ADMINISTRATOR OF THIS SITE, PLEASE SETUP HTTP SERVER
# SO THAT THIS SCRIPT CAN BE EXECUTED AS A CGI COMMAND. THANK YOU.
#------------------------------------------------------------------
END_OF_SCRIPT
print PROGRAM $program;
close(PROGRAM);
}
#
# makehelp: make help file
#
sub makehelp {
local($file) = @_;
open(HELP, ">$file") || &error("cannot make help file.\n");
open(HELP, ">$file") || &error("cannot make help file.");
print HELP "<HTML>\n<HEAD><TITLE>HELP</TITLE></HEAD>\n<BODY>\n";
print HELP "<H2>Usage of Links</H2>\n";
print HELP "<PRE>/* [&lt;][&gt;][^][v] [top][bottom][index][help] */</PRE>\n";
@@ -320,29 +414,102 @@ sub makehelp {
close(HELP);
}
#
# makedupindex: make duplicate entries index ($DEFS/* and $REFS/*)
#
# go) tag cache
# r) $count
#
sub makeline {
$_[0] =~ s/\.\///;
$_[0] =~ s/&/&amp;/g;
$_[0] =~ s/</&lt;/g;
$_[0] =~ s/>/&gt;/g;
local($tag, $lno, $filename) = split(/[ \t\n]+/, $_[0]);;
$filename =~ s/\//$ESCSEP/g;
$_[0] =~ s/^$tag/<A HREF=..\/$SRCS\/$filename.html#$lno>$tag<\/A>/;
}
sub makedupindex {
local($count) = 0;
foreach $db ('GRTAGS', 'GTAGS') {
local($kind) = $db eq 'GTAGS' ? "definitions" : "references";
local($prev) = '';
local($first_line);
local($writing) = 0;
$count = 0;
open(LIST, "btreeop $dbpath/$db | sort +0 -1 +2 -3 +1n -2|") || &error("btreeop $dbpath/$db | sort +0 -1 +2 -3 +1n -2 failed.");
while (<LIST>) {
chop;
local($tag, $lno, $filename) = split;
if ($prev ne $tag) {
$count++;
print STDERR " [$count] adding $tag $kind.\n" if ($vflag);
if ($writing) {
print FILE "</PRE>\n</BODY>\n</HTML>\n";
close(FILE);
$writing = 0;
}
# single entry
if ($first_line) {
&cache'put($db, $prev, $first_line);
}
$first_line = $_;
$prev = $tag;
} else {
# duplicate entry
if ($first_line) {
&cache'put($db, $tag, '');
local($type) = ($db eq 'GTAGS') ? $DEFS : $REFS;
open(FILE, ">$html/$type/$tag.html") || &error("cannot make file '$html/$type/$tag.html'.");
$writing = 1;
print FILE "<HTML>\n<HEAD><TITLE>$tag</TITLE></HEAD>\n<BODY>\n";
print FILE "<PRE>\n";
&makeline($first_line);
print FILE $first_line, "\n";
$first_line = '';
}
&makeline($_);
print FILE $_, "\n";
}
}
close(LIST);
if ($writing) {
print FILE "</PRE>\n</BODY>\n</HTML>\n";
close(FILE);
}
if ($first_line) {
&cache'put($db, $prev, $first_line);
}
}
$count;
}
#
# makefuncindex: make function index (including alphabetic index)
#
# i) file function index file
# i) total functions total
# gi) tag cache
# go) @funcs
#
sub makefuncindex {
local($file) = @_;
local($file, $total) = @_;
local($count) = 0;
open(FUNCTIONS, ">$file") || &error("cannot make function index <$file>.\n");
open(FUNCTIONS, ">$file") || &error("cannot make function index '$file'.");
print FUNCTIONS "<HTML>\n<HEAD><TITLE>FUNCTION INDEX</TITLE>\n";
print FUNCTIONS "$begin_script$defaultview$end_script</HEAD>\n<BODY>\n";
print FUNCTIONS "<H2>FUNCTION INDEX</H2>\n";
print FUNCTIONS "<OL>\n" if (!$aflag);
local($old) = select(FUNCTIONS);
open(TAGS, "btreeop $dbpath/GTAGS | awk '{print \$1}' | sort | uniq |") || &error("btreeop $dbpath/GTAGS failed.\n");
open(TAGS, "btreeop -L $dbpath/GTAGS |") || &error("btreeop -L $dbpath/GTAGS failed.");
local($alpha) = '';
@funcs = (); # [A][B][C]...
while (<TAGS>) {
$count++;
chop;
local($tag) = $_;
print STDERR " [$count] adding $tag\n" if ($vflag);
print STDERR " [$count/$total] adding $tag\n" if ($vflag);
if ($aflag && $alpha ne substr($tag, 0, 1)) {
if ($alpha) {
print ALPHA "</OL>\n";
@@ -352,8 +519,8 @@ sub makefuncindex {
close(ALPHA);
}
$alpha = substr($tag, 0, 1);
push(@funcs, "<A HREF=$FUNCS/$alpha.html TARGET=_self>[$alpha]</A>\n");
open(ALPHA, ">$html/$FUNCS/$alpha.html") || &error("cannot make alphabetical function index.\n");
push(@funcs, "<A HREF=funcs/$alpha.html TARGET=_self>[$alpha]</A>\n");
open(ALPHA, ">$html/funcs/$alpha.html") || &error("cannot make alphabetical function index.");
print ALPHA "<HTML>\n<HEAD><TITLE>$alpha</TITLE>\n";
print ALPHA "$begin_script$defaultview$end_script";
print ALPHA "</HEAD>\n<BODY>\n<H2>[$alpha]</H2>\n";
@@ -361,22 +528,15 @@ sub makefuncindex {
print ALPHA "<OL>\n";
select(ALPHA);
}
open(LIST, "btreeop -K $tag $dbpath/GTAGS |") || &error("btreeop -K $tag $dbpath/GTAGS failed.\n");;
local($line1, $line2);
if ($line1 = <LIST>) {
$line2 = <LIST>;
}
close(LIST);
if ($line2) {
print "<LI><A HREF=", ($aflag) ? "../" : "", "D/$tag.html>$tag</A>\n";
local($line) = &cache'get('GTAGS', $tag);
if (!$line) {
print "<LI><A HREF=", ($aflag) ? "../" : "", "$DEFS/$tag.html>$tag</A>\n";
} else {
local($nouse, $lno, $filename) = split(/[ \t]+/, $line1);
$nouse = ''; # to make perl quiet
local($tag, $lno, $filename) = split(/[ \t]+/, $line);
$filename =~ s/^\.\///;
$filename =~ s/\//$ESCSEP/g;
print "<LI><A HREF=", ($aflag) ? "../" : "", "$SRCS/$filename.html#$lno>$tag</A>\n";
}
close(LIST);
}
close(TAGS);
select($old);
@@ -395,87 +555,33 @@ sub makefuncindex {
$count;
}
#
# makedupindex: make duplicate entries index ($DEFS/* and $REFS/*)
#
# i) $total functions total
# r) $count
#
sub makedupindex {
local($total) = @_;
local($count) = 0;
open(TAGS, "btreeop $dbpath/GTAGS | awk '{print \$1}' | sort | uniq |") || &error("btreeop $dbpath/GTAGS failed.\n");
while (<TAGS>) {
$count++;
chop;
local($tag) = $_;
print STDERR " [$count/$total] adding $tag\n" if ($vflag);
foreach $db ('GTAGS', 'GRTAGS') {
open(LIST, "btreeop -K $tag $dbpath/$db | sort +0b -1 +2b -3 +1n -2|") || &error("btreeop -K $tag $dbpath/$db failed.\n");;
local($line1, $line2);
if ($line1 = <LIST>) {
$line2 = <LIST>;
}
&cache'put($db, $tag, ($line2) ? '' : $line1) if ($line1);
if ($line2) { # two or more entries exist
local($type) = ($db eq 'GTAGS') ? $'DEFS : $'REFS;
open(FILE, ">$html/$type/$tag.html") || &error("cannot make file <$html/$type/$tag.html>.\n");
print FILE "<HTML>\n<HEAD><TITLE>$tag</TITLE></HEAD>\n<BODY>\n";
print FILE "<PRE>\n";
for (;;) {
if ($line1) {
$_ = $line1;
$line1 = '';
} elsif ($line2) {
$_ = $line2;
$line2 = '';
} elsif (!($_ = <LIST>)) {
last;
}
s/\.\///;
s/&/&amp;/g;
s/</&lt;/g;
s/>/&gt;/g;
local($nouse, $lno, $filename) = split;
$nouse = ''; # to make perl quiet
$filename =~ s/\//$ESCSEP/g;
s/^$tag/<A HREF=..\/$SRCS\/$filename.html#$lno>$tag<\/A>/;
print FILE;
}
print FILE "</PRE>\n</BODY>\n</HTML>\n";
close(FILE);
}
close(LIST);
}
}
close(TAGS);
$count;
}
#
# makefileindex: make file index
#
# i) file name
# i) $INC directory
# go) @files
# go) %includes
#
sub makefileindex {
local($file) = @_;
local($file, $incdir) = @_;
local($count) = 0;
open(FILES, ">$file") || &error("cannot make file <$file>.\n");
open(FILES, ">$file") || &error("cannot make file '$file'.");
print FILES "<HTML>\n<HEAD><TITLE>FILES</TITLE>\n";
print FILES "$begin_script$defaultview$end_script";
print FILES "</HEAD>\n<BODY>\n<H2>FILE INDEX</H2>\n";
print FILES "<OL>\n";
local($old) = select(FILES);
open(FIND, "find . -name '*.[chysS]' -print | sort |") || &error("cannot exec find.\n");
open(FIND, "$findcom | sort |") || &error("cannot exec find.");
local($lastdir) = '';
@files = ();
while (<FIND>) {
next if /(y\.tab\.c|y\.tab\.h)$/;
next if /(\/SCCS\/|\/RCS\/)/;
$count++;
chop;
s/^\.\///;
next if /(y\.tab\.c|y\.tab\.h)$/;
next if (!$'sflag && /\.[sS]$/);
local($filename) = $_;
print STDERR " [$count] adding $filename\n" if ($vflag);
local($dir);
@@ -495,8 +601,8 @@ sub makefileindex {
close(DIR);
}
if ($dir) {
push(@files, "<LI><A HREF=$FILES/$dir.html TARGET=_self>$dir/</A>\n");
open(DIR, ">$html/$FILES/$dir.html") || &error("cannot make directory index.\n");
push(@files, "<LI><A HREF=files/$dir.html TARGET=_self>$dir/</A>\n");
open(DIR, ">$html/files/$dir.html") || &error("cannot make directory index.");
print DIR "<HTML>\n<HEAD><TITLE>$dir/</TITLE>\n";
print DIR "$begin_script$defaultview$end_script";
print DIR "</HEAD>\n<BODY>\n<H2>$dir/</H2>\n";
@@ -505,10 +611,21 @@ sub makefileindex {
}
$lastdir = $dir;
}
# collect include files.
if ($filename =~ /.*\.h$/) {
local($last) = $filename;
$last =~ s!.*/!!;
if (! defined $includes{$last}) {
$includes{$last} = $filename;
} else {
# duplicate entries
$includes{$last} = "$includes{$last}\n$filename";
}
}
local($path) = $filename;
$path =~ s/\//$ESCSEP/g;
if ($dir eq '') {
push(@files, "<LI><A HREF=", ($dir) ? "../" : "", "$SRCS/$path.html>$filename</A>\n");
push(@files, "<LI><A HREF=$SRCS/$path.html>$filename</A>\n");
} else {
print DIR "<LI><A HREF=../$SRCS/$path.html>$filename</A>\n";
}
@@ -527,6 +644,22 @@ sub makefileindex {
print FILES "</BODY>\n</HTML>\n";
close(FILES);
foreach $last (keys %includes) {
local(@incs) = split(/\n/, $includes{$last});
if (@incs > 1) {
open(INCLUDE, ">$incdir/$last.html") || &error("cannot open file '$incdir/$last.html'.");
print INCLUDE "<HTML>\n<HEAD><TITLE>$last</TITLE></HEAD>\n<BODY>\n<PRE>\n";
foreach $filename (@incs) {
local($path) = $filename;
$path =~ s/\//$ESCSEP/g;
print INCLUDE "<A HREF=../$SRCS/$path.html>$filename</A>\n";
}
print INCLUDE "</PRE>\n</BODY>\n</HTML>\n";
close(INCLUDE);
# '' means that information already written to file.
$includes{$last} = '';
}
}
$count;
}
#
@@ -548,9 +681,20 @@ sub makecommonpart {
$index .= " document.write($langle+'A HREF=mains.html TARGET=_top'+$rangle+'[No frame version is here.]'+$langle+'/A'+$rangle)\n";
$index .= "$end_script";
$index .= "</P>\n<HR>\n";
if ($fflag) {
$index .= "<H2>FUNCTION SEARCH</H2>\n";
$index .= "Please input function name and select [Search]. Perl's regular expression is allowed.<P>\n";
$index .= "<FORM METHOD=GET ACTION=cgi-bin/global.cgi>\n";
$index .= "<INPUT NAME=pattern>\n";
$index .= "<INPUT TYPE=submit VALUE=Search>\n";
$index .= "<INPUT TYPE=reset VALUE=Reset><BR>\n";
$index .= "<INPUT TYPE=radio NAME=type VALUE=definition CHECKED>Definition\n";
$index .= "<INPUT TYPE=radio NAME=type VALUE=reference>Reference\n";
$index .= "</FORM>\n<HR>\n";
}
$index .= "<H2>MAINS</H2>\n";
$index .= "<PRE>\n";
open(PIPE, "btreeop -K main $dbpath/GTAGS | sort +0b -1 +2b -3 +1n -2 |") || &error("btreeop -K main $dbpath/GTAGS failed.\n");
open(PIPE, "btreeop -K main $dbpath/GTAGS | sort +0 -1 +2 -3 +1n -2|") || &error("btreeop -K main $dbpath/GTAGS failed.");
while (<PIPE>) {
local($nouse, $lno, $filename) = split;
$nouse = ''; # to make perl quiet
@@ -586,7 +730,7 @@ sub makecommonpart {
sub makeindex {
local($file, $title, $index) = @_;
open(FRAME, ">$file") || &error("cannot open file <$file>.\n");
open(FRAME, ">$file") || &error("cannot open file '$file'.");
print FRAME "<HTML>\n<HEAD><TITLE>$title</TITLE></HEAD>\n";
print FRAME "<FRAMESET COLS='200,*'>\n";
print FRAME "<NOFRAME>\n$index</NOFRAME>\n";
@@ -608,7 +752,7 @@ sub makeindex {
sub makemainindex {
local($file, $index) = @_;
open(INDEX, ">$file") || &error("cannot create file <$file>.\n");
open(INDEX, ">$file") || &error("cannot create file '$file'.");
print INDEX "<HTML>\n<HEAD><TITLE>MAINS</TITLE></HEAD>\n";
print INDEX "<BODY>\n$index</BODY>\n</HTML>\n";
close(INDEX);
@@ -616,20 +760,23 @@ sub makemainindex {
#
# makehtml: make html files
#
# i) total number of files.
#
sub makehtml {
local($total) = @_;
local($count) = 0;
open(FIND, "find . -name '*.[chysS]' -print|") || &error("cannot exec find.\n");
open(FIND, "$findcom |") || &error("cannot exec find.");
while (<FIND>) {
next if /y\.tab\.c|y\.tab\.h/;
next if /(\/SCCS\/|\/RCS\/)/;
$count++;
chop;
s/^\.\///;
next if /y\.tab\.c|y\.tab\.h/;
next if (!$'sflag && /\.[sS]$/);
local($path) = $_;
$path =~ s/^\.\///;
print STDERR " [$count/$total] converting $path\n" if ($vflag);
$path =~ s/\//$SEP/g;
print STDERR " [$count/$total] converting $_\n" if ($vflag);
&convert'src2html($_, "$html/$SRCS/$path.html");
}
close(FIND);
@@ -643,23 +790,26 @@ package convert;
#
# i) $file source file - Read from
# i) $html HTML file - Write to
# gi) %includes
# pairs of include file and the path
#
sub src2html {
local($file, $html) = @_;
local($ncol) = $'ncol;
local($expand) = &'usable('expand') ? 'expand' : 'cat';
local(%ctab) = ('&', '&amp;', '<', '&lt;', '>', '&gt;');
open(HTML, ">$html") || &'error("cannot create file <$html>.\n");
open(HTML, ">$html") || &'error("cannot create file '$html'.");
local($old) = select(HTML);
#
# load tags belonging to this file.
#
$file =~ s/^\.\///;
&anchor'load($file);
open(C, "$expand '$file' |") || &'error("cannot open file <$file>.\n");
open(C, "$expand '$file' |") || &'error("cannot open file '$file'.");
#
# print the header
#
$file =~ s/^\.\///;
print "<HTML>\n<HEAD><TITLE>$file</TITLE></HEAD>\n";
print "<BODY><A NAME=TOP><H2>$file</H2>\n";
print &link_format(&anchor'getlinks(0));
@@ -680,14 +830,33 @@ sub src2html {
$INCOMMENT = 0; # initial status is out of comment
local($LNO, $TAG, $TYPE) = &anchor'first();
while (<C>) {
local($converted);
s/\r$//;
s/&/&amp;/g; # '<', '>' and '&' are used for HTML tag
s/</&lt;/g;
s/>/&gt;/g;
# make link for include file
if (!$INCOMMENT && /^#include/) {
local($last, $sep) = m![</"]([^</"]+)([">])!;
local($link);
if (defined $'includes{$last}) {
if ($'includes{$last}) {
$link = $'includes{$last};
$link =~ s/\//$'ESCSEP/g;
} else {
$link = "../$'INCS/$last";
}
if ($sep eq '"') {
s!"(.*$last)"!"<A HREF=$link.html>$1</A>"!;
} else {
s!<(.*$last)>!&lt;<A HREF=$link.html>$1</A>&gt;!;
}
$converted = 1;
}
}
# translate '<', '>' and '&' into entity name
if (!$converted) { s/([&<>])/$ctab{$1}/ge; }
&protect_line(); # protect quoted char, strings and comments
# painting source code
s/({|})/$'brace_begin$1$'brace_end/g;
$sharp = s/^(#\w+)// ? $1 : ''; # protect macro
local($sharp) = s/^(#\w+)// ? $1 : '';
s/\b($'reserved_words)\b/$'reserved_begin$1$'reserved_end/go if ($sharp ne '#include');
s/^/$'sharp_begin$sharp$'sharp_end/ if ($sharp); # recover macro
@@ -709,7 +878,7 @@ sub src2html {
$db = ($TYPE eq 'D') ? 'GRTAGS' : 'GTAGS';
local($line) = &cache'get($db, $TAG);
if (defined($line)) {
local($href, $dir);
local($href);
if ($line) {
local($nouse, $lno, $filename) = split(/[ \t]+/, $line);
$nouse = ''; # to make perl quiet
@@ -717,11 +886,11 @@ sub src2html {
$filename =~ s/\//$'ESCSEP/g;
$href = "<A HREF=../$'SRCS/$filename.html#$lno>$TAG</A>";
} else {
$dir = ($TYPE eq 'D') ? $'REFS : $'DEFS;
local($dir) = ($TYPE eq 'D') ? $'REFS : $'DEFS;
$href = "<A HREF=../$dir/$TAG.html>$TAG</A>";
}
# set tag marks and push hyperlink into @links
if (s/\b$TAG\b/\005$count\005/) {
# set tag marks and save hyperlink into @links
if (s/\b$TAG\b/\005$count\005/ || s/\b_$TAG\b/_\005$count\005/) {
$count++;
push(@links, $href);
} else {
@@ -741,11 +910,11 @@ sub src2html {
}
&unprotect_line();
# print a line
printf "%${ncol}d ", $.;
printf "%${ncol}d ", $. if ($'nflag);
print;
# print hyperlinks
if ($define_line && $file !~ /\.h$/) {
print ' ' x ($ncol + 1);
print ' ' x ($ncol + 1) if ($'nflag);
print &link_format(&anchor'getlinks($define_line));
print "\n";
}
@@ -774,37 +943,31 @@ sub src2html {
#
sub protect_line {
@quoted_char1 = ();
while (/(\\.)/) {
while (s/(\\.)/\001/) {
push(@quoted_char1, $1);
s/\\./\001/;
}
@quoted_char2 = ();
while (/('[^']')/) {
while (s/('[^']')/\002/) {
push(@quoted_char2, $1);
s/'[^']'/\002/;
}
@quoted_strings = ();
while (/("[^"]*")/) {
while (s/("[^"]*")/\003/) {
push(@quoted_strings, $1);
s/"[^"]*"/\003/;
}
@comments = ();
s/^/\032/ if ($INCOMMENT);
while (1) {
if ($INCOMMENT == 0) {
if (/\/\*/) { # start comment
s/\/\*/\032\/\*/;
if (s/\/\*/\032\/\*/) { # start comment
$INCOMMENT = 1;
} else {
last;
}
} else {
# Thanks to Jeffrey Friedl for his code.
if (m!\032(/\*)?[^*]*\*+([^/*][^*]*\*+)*/!) {
$INCOMMENT = 0;
# minimum matching
s!\032((/\*)?[^*]*\*+([^/*][^*]*\*+)*/)!\004!;
if (s!\032((/\*)?[^*]*\*+([^/*][^*]*\*+)*/)!\004!) {
push(@comments, $1);
$INCOMMENT = 0;
} else {
s/\032(.*)$/\004/; # mark comment
push(@comments, $1);
@@ -868,15 +1031,26 @@ package anchor;
#
# create: create anchors temporary database
#
# go) %PATHLIST
#
sub create {
$ANCH = "$'tmp/ANCH$$";
open(ANCH, "| btreeop -C $ANCH") || &'error("btreeop -C $ANCH failed.\n");
open(ANCH, ">$ANCH") || &'error("cannot create file '$ANCH'.");
close(ANCH);
chmod ($ANCH, 0600);
open(ANCH, "| btreeop -C $ANCH") || &'error("btreeop -C $ANCH failed.");
local($fcount) = 1;
local($fnumber);
foreach $db ('GTAGS', 'GRTAGS') {
local($type) = ($db eq 'GTAGS') ? 'D' : 'R';
open(PIPE, "btreeop $'dbpath/$db |") || &'error("btreeop $'dbpath/$db failed.\n");
open(PIPE, "btreeop $'dbpath/$db |") || &'error("btreeop $'dbpath/$db failed.");
while (<PIPE>) {
local($tag, $lno, $filename) = split;
print ANCH "$filename $lno $tag $type\n";
$fnumber = $PATHLIST{$filename};
if (!$fnumber) {
$PATHLIST{$filename} = $fnumber = $fcount++;
}
print ANCH "$fnumber $lno $tag $type\n";
}
close(PIPE);
}
@@ -892,28 +1066,34 @@ sub finish {
# load: load anchors in a file from database
#
# i) $file source file
# gi) %PATHLIST
# go) FIRST first definition
# go) LAST last definition
#
sub load {
local($file) = @_;
$file = './' . $file if ($file !~ /^\.\//);
local($fnumber);
@ANCHORS = ();
open(ANCH, "btreeop -K $file $ANCH|") || &'error("btreeop -K $file $ANCH failed.\n");
$FIRST = $LAST = 0;
$file = './' . $file if ($file !~ /^\.\//);
if (!($fnumber = $PATHLIST{$file})) {
return;
}
open(ANCH, "btreeop -K $fnumber $ANCH |") || &'error("btreeop -K $file $ANCH failed.");
$n = 0;
while (<ANCH>) {
local($filename, $lno, $tag, $type) = split;
local($fnumber, $lno, $tag, $type) = split;
local($line);
# START for DTFLAG
# don't refer to macros which is defined in other C source.
if ($type eq 'R' && ($line = &cache'get('GTAGS', $tag))) {
local($nouse1, $nouse2, $f, $def) = split(/[ \t]+/, $line);
if ($f !~ /\.h$/ && $f !~ $filename && $def =~ /^#/) {
print STDERR "Information: $filename $lno $tag($type) skipped, because this is a macro which is defined in other C source.\n" if ($'wflag);
if ($f !~ /\.h$/ && $f !~ $file && $def =~ /^#/) {
print STDERR "Information: $file $lno $tag($type) skipped, because this is a macro which is defined in other C source.\n" if ($'wflag);
next;
}
}
# END for DTFLAG
push(@ANCHORS, "$lno,$tag,$type");
}
close(ANCH);
@@ -1008,11 +1188,11 @@ sub getlinks {
}
}
}
$first = $FIRST if ($linenumber != $FIRST);
$last = $LAST if ($linenumber != $LAST);
$first = $FIRST if ($FIRST > 0 && $linenumber != $FIRST);
$last = $LAST if ($LAST > 0 && $linenumber != $LAST);
$top = 'TOP' if ($linenumber != 0);
$bottom = 'BOTTOM' if ($linenumber != -1);
if ($FIRST == $LAST) {
if ($FIRST > 0 && $FIRST == $LAST) {
$last = '' if ($linenumber == 0);
$first = '' if ($linenumber == -1);
}
@@ -1055,7 +1235,7 @@ sub put {
$cachecount++;
if ($cachesize >= 0 && $cachecount > $cachesize) {
$CACH = "$'tmp/CACH$$";
dbmopen(%CACH, $CACH, 0600) || &'error("make cache database.\n");
dbmopen(%CACH, $CACH, 0600) || &'error("make cache database.");
$cachesize = -1;
}
$CACH{$label.$tag} = $line;
+8
View File
@@ -0,0 +1,8 @@
LIB= util
SRCS= tag.o tab.o strop.o mgets.o lookup.o gtagsopen.o getdbpath.o \
find.o dbname.o dbio.o test.o makepath.o locatestring.o
NOPROFILE= yes
install:
@echo -n
.include <bsd.lib.mk>
+328
View File
@@ -0,0 +1,328 @@
/*
* Copyright (c) 1996, 1997 Shigio Yamaguchi. All rights reserved.
*
* Redilogibution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redilogibutions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redilogibutions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the dilogibution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Shigio Yamaguchi.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* dbio.c 14-Dec-97
*
*/
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "dbio.h"
#include "die.h"
#include "test.h"
DBT key; /* key of record */
DBT dat; /* data of record */
/*
* db_open: open db database.
*
* i) dbname database name
* i) mode 0: read only, 1: write only, 2: read & write
* i) perm file permission
* i) flags
* DBIO_DUP: allow duplicate records.
* DBIO_REMOVE: remove on closed.
* r) descripter for db_xxx()
*
* db_open leaves database permission 0600. please chmod(2) to make public.
*/
DBIO *
db_open(dbname, mode, perm, flags)
char *dbname;
int mode;
int perm;
int flags;
{
DB *db;
int rw;
BTREEINFO info;
DBIO *dbio;
/*
* setup argments.
*/
if (mode == 0)
rw = O_RDONLY;
else if (mode == 1)
rw = O_RDWR|O_CREAT|O_TRUNC;
else if (mode == 2)
rw = O_RDWR;
else
die("db_open illegal mode.");
info.flags = (flags & DBIO_DUP) ? R_DUP : 0;
info.cachesize = 500000;
info.maxkeypage = 0;
info.minkeypage = 0;
info.psize = 0;
info.compare = NULL;
info.prefix = NULL;
info.lorder = LITTLE_ENDIAN;
/*
* if unlink do job normally, those who already open tag file can use
* it until closing.
*/
if (mode == 1 && test("f", dbname))
(void)unlink(dbname);
db = dbopen(dbname, rw, 0600, DB_BTREE, &info);
if (!db)
die1("db_open failed (dbname = %s).", dbname);
if (!(dbio = (DBIO *)malloc(sizeof(DBIO))))
die("short of memory.");
strcpy(dbio->dbname, dbname);
dbio->db = db;
dbio->openflags = flags;
dbio->perm = (mode == 1) ? perm : 0;
dbio->lastkey = (char *)0;
dbio->lastdat = (char *)0;
return dbio;
}
/*
* db_get: get data by a key.
*
* i) dbio descripter
* i) k key
* r) pointer to data
*/
char *
db_get(dbio, k)
DBIO *dbio;
char *k;
{
DB *db = dbio->db;
int status;
key.data = k;
key.size = strlen(k)+1;
status = (*db->get)(db, &key, &dat, 0);
dbio->lastkey = (char *)key.data;
dbio->lastdat = (char *)dat.data;
switch (status) {
case RET_SUCCESS:
break;
case RET_ERROR:
die("db_get failed.");
case RET_SPECIAL:
return((char *)0);
}
return((char *)dat.data);
}
/*
* db_put: put data by a key.
*
* i) dbio descripter
* i) k key
* i) d data
*/
void
db_put(dbio, k, d)
DBIO *dbio;
char *k;
char *d;
{
DB *db = dbio->db;
int status;
if (strlen(k) > MAXKEYLEN)
die("primary key too long.");
key.data = k;
key.size = strlen(k)+1;
dat.data = d;
dat.size = strlen(d)+1;
status = (*db->put)(db, &key, &dat, 0);
switch (status) {
case RET_SUCCESS:
break;
case RET_ERROR:
case RET_SPECIAL:
die("db_put failed.");
}
}
/*
* db_del: delete record by a key.
*
* i) dbio descripter
* i) k key
*/
void
db_del(dbio, k)
DBIO *dbio;
char *k;
{
DB *db = dbio->db;
int status;
if (k) {
key.data = k;
key.size = strlen(k)+1;
status = (*db->del)(db, &key, 0);
} else
status = (*db->del)(db, &key, R_CURSOR);
if (status == RET_ERROR)
die("db_del failed.");
}
/*
* db_first: get first record.
*
* i) dbio dbio descripter
* i) k key
* !=NULL: indexed read by key
* ==NULL: sequential read
* i) flags following db_next call take over this.
* DBIO_KEY read key part
* DBIO_PREFIX prefix read
* DBIO_SKIPMETA skip META record
* only valied when sequential read
* r) data
*/
char *
db_first(dbio, k, flags)
DBIO *dbio;
char *k;
int flags;
{
DB *db = dbio->db;
int status;
if (flags & DBIO_PREFIX && !k)
flags &= ~DBIO_PREFIX;
if (flags & DBIO_SKIPMETA && k)
flags &= ~DBIO_SKIPMETA;
if (k) {
if (strlen(k) > MAXKEYLEN)
die("primary key too long.");
strcpy(dbio->key, k);
key.data = k;
key.size = strlen(k);
/*
* includes NULL character unless prefix read.
*/
if (!(flags & DBIO_PREFIX))
key.size++;
dbio->keylen = key.size;
status = (*db->seq)(db, &key, &dat, R_CURSOR);
} else {
dbio->keylen = dbio->key[0] = 0;
for (status = (*db->seq)(db, &key, &dat, R_FIRST);
status == RET_SUCCESS &&
flags & DBIO_SKIPMETA &&
*((char *)dat.data) == ' ';
status = (*db->seq)(db, &key, &dat, R_NEXT))
;
}
dbio->lastkey = (char *)key.data;
dbio->lastdat = (char *)dat.data;
switch (status) {
case RET_SUCCESS:
break;
case RET_ERROR:
die("db_first failed.");
case RET_SPECIAL:
return ((char *)0);
}
dbio->ioflags = flags;
if (flags & DBIO_PREFIX) {
if (strncmp((char *)key.data, dbio->key, dbio->keylen))
return (char *)0;
} else if (dbio->keylen) {
if (strcmp((char *)key.data, dbio->key))
return (char *)0;
}
if (flags & DBIO_KEY) {
strcpy(dbio->prev, (char *)key.data);
return (char *)key.data;
}
return ((char *)dat.data);
}
/*
* db_next: get next record.
*
* i) dbio dbio descripter
* r) data
*/
char *
db_next(dbio)
DBIO *dbio;
{
DB *db = dbio->db;
int flags = dbio->ioflags;
int status;
while ((status = (*db->seq)(db, &key, &dat, R_NEXT)) == RET_SUCCESS) {
if (flags & DBIO_SKIPMETA) {
if (*((char *)dat.data) == ' ')
continue;
}
if (flags & DBIO_KEY) {
if (!strcmp(dbio->prev, (char *)key.data))
continue;
if (strlen((char *)key.data) > MAXKEYLEN)
die("primary key too long.");
strcpy(dbio->prev, (char *)key.data);
}
dbio->lastkey = (char *)key.data;
dbio->lastdat = (char *)dat.data;
if (flags & DBIO_PREFIX) {
if (strncmp((char *)key.data, dbio->key, dbio->keylen))
return (char *)0;
} else if (dbio->keylen) {
if (strcmp((char *)key.data, dbio->key))
return (char *)0;
}
return (flags & DBIO_KEY) ? (char *)key.data : (char *)dat.data;
}
if (status == RET_ERROR)
die("db_next failed.");
return (char *)0;
}
/*
* db_close: close db
*
* i) dbio dbio descripter
*/
void
db_close(dbio)
DBIO *dbio;
{
DB *db = dbio->db;
(void)db->close(db);
if (dbio->openflags & DBIO_REMOVE)
(void)unlink(dbio->dbname);
else if (dbio->perm && chmod(dbio->dbname, dbio->perm) < 0)
die("cannot change file mode.");
(void)free(dbio);
}
Loaded 100 of 2312 files, more files were not shown because too many files have changed in this diff. Show more