Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Apr 2004 18:12:28 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 51391 for review
Message-ID:  <200404200112.i3K1CSON092304@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=51391

Change 51391 by marcel@marcel_nfs on 2004/04/19 18:12:11

	IFC @51388

Affected files ...

.. //depot/projects/gdb/MAINTAINERS#7 integrate
.. //depot/projects/gdb/bin/df/Makefile#2 integrate
.. //depot/projects/gdb/bin/df/df.1#3 integrate
.. //depot/projects/gdb/bin/df/df.c#6 integrate
.. //depot/projects/gdb/contrib/less/LICENSE#2 integrate
.. //depot/projects/gdb/contrib/less/Makefile.aut#2 integrate
.. //depot/projects/gdb/contrib/less/Makefile.dsg#2 integrate
.. //depot/projects/gdb/contrib/less/Makefile.in#2 integrate
.. //depot/projects/gdb/contrib/less/NEWS#2 integrate
.. //depot/projects/gdb/contrib/less/README#2 integrate
.. //depot/projects/gdb/contrib/less/acconfig.h#2 delete
.. //depot/projects/gdb/contrib/less/brac.c#2 integrate
.. //depot/projects/gdb/contrib/less/ch.c#2 integrate
.. //depot/projects/gdb/contrib/less/charset.c#2 integrate
.. //depot/projects/gdb/contrib/less/cmd.h#2 integrate
.. //depot/projects/gdb/contrib/less/cmdbuf.c#2 integrate
.. //depot/projects/gdb/contrib/less/command.c#2 integrate
.. //depot/projects/gdb/contrib/less/configure#2 integrate
.. //depot/projects/gdb/contrib/less/configure.ac#1 branch
.. //depot/projects/gdb/contrib/less/configure.in#2 delete
.. //depot/projects/gdb/contrib/less/decode.c#2 integrate
.. //depot/projects/gdb/contrib/less/defines.ds#2 integrate
.. //depot/projects/gdb/contrib/less/defines.h.in#2 integrate
.. //depot/projects/gdb/contrib/less/defines.h.top#2 delete
.. //depot/projects/gdb/contrib/less/defines.o2#2 integrate
.. //depot/projects/gdb/contrib/less/defines.wn#2 integrate
.. //depot/projects/gdb/contrib/less/edit.c#2 integrate
.. //depot/projects/gdb/contrib/less/filename.c#2 integrate
.. //depot/projects/gdb/contrib/less/forwback.c#2 integrate
.. //depot/projects/gdb/contrib/less/funcs.h#2 integrate
.. //depot/projects/gdb/contrib/less/help.c#2 integrate
.. //depot/projects/gdb/contrib/less/ifile.c#2 integrate
.. //depot/projects/gdb/contrib/less/input.c#2 integrate
.. //depot/projects/gdb/contrib/less/jump.c#2 integrate
.. //depot/projects/gdb/contrib/less/less.h#2 integrate
.. //depot/projects/gdb/contrib/less/less.hlp#2 integrate
.. //depot/projects/gdb/contrib/less/less.man#2 integrate
.. //depot/projects/gdb/contrib/less/less.nro#2 integrate
.. //depot/projects/gdb/contrib/less/lessecho.c#2 integrate
.. //depot/projects/gdb/contrib/less/lesskey.c#2 integrate
.. //depot/projects/gdb/contrib/less/lesskey.h#2 integrate
.. //depot/projects/gdb/contrib/less/lesskey.man#2 integrate
.. //depot/projects/gdb/contrib/less/lesskey.nro#2 integrate
.. //depot/projects/gdb/contrib/less/lglob.h#2 integrate
.. //depot/projects/gdb/contrib/less/line.c#2 integrate
.. //depot/projects/gdb/contrib/less/linenum.c#2 integrate
.. //depot/projects/gdb/contrib/less/lsystem.c#2 integrate
.. //depot/projects/gdb/contrib/less/main.c#2 integrate
.. //depot/projects/gdb/contrib/less/mark.c#2 integrate
.. //depot/projects/gdb/contrib/less/mkhelp.c#2 integrate
.. //depot/projects/gdb/contrib/less/optfunc.c#2 integrate
.. //depot/projects/gdb/contrib/less/option.c#2 integrate
.. //depot/projects/gdb/contrib/less/option.h#2 integrate
.. //depot/projects/gdb/contrib/less/opttbl.c#2 integrate
.. //depot/projects/gdb/contrib/less/os.c#2 integrate
.. //depot/projects/gdb/contrib/less/output.c#2 integrate
.. //depot/projects/gdb/contrib/less/pckeys.h#2 integrate
.. //depot/projects/gdb/contrib/less/position.c#2 integrate
.. //depot/projects/gdb/contrib/less/position.h#2 integrate
.. //depot/projects/gdb/contrib/less/prompt.c#2 integrate
.. //depot/projects/gdb/contrib/less/screen.c#2 integrate
.. //depot/projects/gdb/contrib/less/scrsize.c#2 integrate
.. //depot/projects/gdb/contrib/less/search.c#2 integrate
.. //depot/projects/gdb/contrib/less/signal.c#2 integrate
.. //depot/projects/gdb/contrib/less/tags.c#2 integrate
.. //depot/projects/gdb/contrib/less/ttyin.c#2 integrate
.. //depot/projects/gdb/contrib/less/version.c#2 integrate
.. //depot/projects/gdb/contrib/pf/man/pf.4#2 integrate
.. //depot/projects/gdb/contrib/pf/man/pflog.4#2 integrate
.. //depot/projects/gdb/contrib/pf/man/pfsync.4#2 integrate
.. //depot/projects/gdb/contrib/traceroute/traceroute.c#3 integrate
.. //depot/projects/gdb/etc/rc.d/sendmail#4 integrate
.. //depot/projects/gdb/gnu/usr.bin/binutils/libbfd/i386/bfd.h#4 integrate
.. //depot/projects/gdb/lib/libarchive/archive_write_set_format_ustar.c#6 integrate
.. //depot/projects/gdb/lib/libc/sys/mmap.2#2 integrate
.. //depot/projects/gdb/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml#2 integrate
.. //depot/projects/gdb/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#11 integrate
.. //depot/projects/gdb/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml#2 integrate
.. //depot/projects/gdb/release/scripts/print-cdrom-packages.sh#4 integrate
.. //depot/projects/gdb/secure/Makefile.inc#2 integrate
.. //depot/projects/gdb/secure/lib/libcrypto/Makefile#4 integrate
.. //depot/projects/gdb/secure/lib/libcrypto/Makefile.inc#4 integrate
.. //depot/projects/gdb/share/man/man4/Makefile#8 integrate
.. //depot/projects/gdb/share/man/man4/ng_bridge.4#2 integrate
.. //depot/projects/gdb/share/man/man4/ng_hub.4#1 branch
.. //depot/projects/gdb/share/man/man4/ng_one2many.4#3 integrate
.. //depot/projects/gdb/sys/alpha/alpha/vm_machdep.c#5 integrate
.. //depot/projects/gdb/sys/alpha/include/sf_buf.h#2 integrate
.. //depot/projects/gdb/sys/amd64/amd64/vm_machdep.c#8 integrate
.. //depot/projects/gdb/sys/amd64/include/sf_buf.h#2 integrate
.. //depot/projects/gdb/sys/boot/i386/boot0/boot0ext.s#2 integrate
.. //depot/projects/gdb/sys/cam/scsi/scsi_da.c#4 integrate
.. //depot/projects/gdb/sys/compat/ndis/subr_hal.c#4 integrate
.. //depot/projects/gdb/sys/compat/ndis/subr_ntoskrnl.c#11 integrate
.. //depot/projects/gdb/sys/conf/NOTES#12 integrate
.. //depot/projects/gdb/sys/conf/options#12 integrate
.. //depot/projects/gdb/sys/dev/acpica/acpi_pcib.c#5 integrate
.. //depot/projects/gdb/sys/dev/arl/if_arl.c#3 integrate
.. //depot/projects/gdb/sys/dev/arl/if_arlreg.h#3 integrate
.. //depot/projects/gdb/sys/dev/ata/ata-lowlevel.c#6 integrate
.. //depot/projects/gdb/sys/dev/awi/awi.c#4 integrate
.. //depot/projects/gdb/sys/dev/ciss/ciss.c#7 integrate
.. //depot/projects/gdb/sys/dev/puc/puc_pccard.c#2 integrate
.. //depot/projects/gdb/sys/dev/puc/pucdata.c#3 integrate
.. //depot/projects/gdb/sys/dev/puc/pucvar.h#2 integrate
.. //depot/projects/gdb/sys/dev/random/nehemiah.c#2 integrate
.. //depot/projects/gdb/sys/dev/random/randomdev.c#7 integrate
.. //depot/projects/gdb/sys/i386/isa/atpic.c#3 integrate
.. //depot/projects/gdb/sys/ia64/ia64/vm_machdep.c#5 integrate
.. //depot/projects/gdb/sys/ia64/include/sf_buf.h#2 integrate
.. //depot/projects/gdb/sys/isa/psm.c#5 integrate
.. //depot/projects/gdb/sys/kern/kern_thr.c#6 integrate
.. //depot/projects/gdb/sys/kern/uipc_mbuf.c#4 integrate
.. //depot/projects/gdb/sys/modules/cam/Makefile#2 integrate
.. //depot/projects/gdb/sys/modules/netgraph/Makefile#4 integrate
.. //depot/projects/gdb/sys/modules/netgraph/hub/Makefile#1 branch
.. //depot/projects/gdb/sys/net/if.c#7 integrate
.. //depot/projects/gdb/sys/net/if_arp.h#3 integrate
.. //depot/projects/gdb/sys/net/if_ethersubr.c#8 integrate
.. //depot/projects/gdb/sys/net/if_fddisubr.c#5 integrate
.. //depot/projects/gdb/sys/net/if_iso88025subr.c#4 integrate
.. //depot/projects/gdb/sys/net/if_ppp.c#4 integrate
.. //depot/projects/gdb/sys/net/if_stf.c#5 integrate
.. //depot/projects/gdb/sys/net/if_var.h#10 integrate
.. //depot/projects/gdb/sys/net/radix.c#3 integrate
.. //depot/projects/gdb/sys/net/radix.h#3 integrate
.. //depot/projects/gdb/sys/net/route.c#6 integrate
.. //depot/projects/gdb/sys/net/route.h#5 integrate
.. //depot/projects/gdb/sys/net/rtsock.c#6 integrate
.. //depot/projects/gdb/sys/netgraph/ng_eiface.c#2 integrate
.. //depot/projects/gdb/sys/netgraph/ng_ether.c#3 integrate
.. //depot/projects/gdb/sys/netgraph/ng_hub.c#1 branch
.. //depot/projects/gdb/sys/netgraph/ng_hub.h#1 branch
.. //depot/projects/gdb/sys/netinet/if_ether.c#6 integrate
.. //depot/projects/gdb/sys/netinet6/nd6.c#3 integrate
.. //depot/projects/gdb/sys/netinet6/nd6_nbr.c#3 integrate
.. //depot/projects/gdb/sys/netinet6/nd6_rtr.c#2 integrate
.. //depot/projects/gdb/sys/netipsec/xform_ipip.c#3 integrate
.. //depot/projects/gdb/sys/pci/if_sk.c#5 integrate
.. //depot/projects/gdb/sys/powerpc/include/sf_buf.h#2 integrate
.. //depot/projects/gdb/sys/powerpc/powerpc/vm_machdep.c#6 integrate
.. //depot/projects/gdb/sys/sys/mbuf.h#5 integrate
.. //depot/projects/gdb/sys/sys/types.h#4 integrate
.. //depot/projects/gdb/tools/tools/usb/print-usb-if-vids.sh#1 branch
.. //depot/projects/gdb/usr.bin/calendar/calendars/calendar.freebsd#6 integrate
.. //depot/projects/gdb/usr.bin/less/defines.h#2 integrate
.. //depot/projects/gdb/usr.bin/talk/init_disp.c#2 integrate
.. //depot/projects/gdb/usr.bin/talk/io.c#2 integrate
.. //depot/projects/gdb/usr.bin/talk/talk.h#2 integrate
.. //depot/projects/gdb/usr.bin/tar/Makefile#4 integrate
.. //depot/projects/gdb/usr.sbin/acpi/acpidump/acpi.c#2 integrate
.. //depot/projects/gdb/usr.sbin/sysinstall/dist.c#3 integrate

Differences ...

==== //depot/projects/gdb/MAINTAINERS#7 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/MAINTAINERS,v 1.86 2004/04/08 01:43:34 vkashyap Exp $
+$FreeBSD: src/MAINTAINERS,v 1.88 2004/04/19 17:47:45 tackerman Exp $
 
 subsystem	login	notes
 -----------------------------
@@ -45,6 +45,7 @@
 ch(4)		ken	Pre-commit review requested.
 isp(4)		mjacob	Pre-commit review requested.
 mpt(4)		mjacob	Pre-commit review requested.
+em(4)		tackerman	Pre-commit review requested.
 tdfx(4)		cokane  Just keep me informed of changes, try not to break it.
 sendmail	gshapiro	Pre-commit review requested.
 etc/mail	gshapiro	Pre-commit review requested.
@@ -73,7 +74,6 @@
 libz		peter	Try not to break it.
 pppd/chat	peter	Try not to break it.
 groff		ru	Recommends pre-commit review.
-natd(8)		ru	Recommends pre-commit review.
 share/mk	ru	Recommends pre-commit review.
 ipfw		ipfw	Pre-commit review preferred. send to ipfw@freebsd.org
 drm		anholt	Just keep me informed of changes, try not to break it.

==== //depot/projects/gdb/bin/df/Makefile#2 (text+ko) ====

@@ -1,8 +1,8 @@
 #	@(#)Makefile	8.3 (Berkeley) 5/8/95
-# $FreeBSD: src/bin/df/Makefile,v 1.16 2003/06/13 07:04:01 markm Exp $
+# $FreeBSD: src/bin/df/Makefile,v 1.17 2004/04/18 20:56:31 obrien Exp $
 
 MOUNT=	${.CURDIR}/../../sbin/mount
-.PATH:	${MOUNT}
+.PATH: ${MOUNT}
 
 PROG=	df
 SRCS=	df.c vfslist.c

==== //depot/projects/gdb/bin/df/df.1#3 (text+ko) ====

@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)df.1	8.3 (Berkeley) 5/8/95
-.\" $FreeBSD: src/bin/df/df.1,v 1.31 2004/04/06 20:06:46 markm Exp $
+.\" $FreeBSD: src/bin/df/df.1,v 1.32 2004/04/18 20:56:31 obrien Exp $
 .\"
 .Dd May 8, 1995
 .Dt DF 1
@@ -40,7 +40,7 @@
 .Fl b | h | H | k |
 .Fl m | P
 .Oc
-.Op Fl ailn
+.Op Fl aciln
 .Op Fl t Ar type
 .Op Ar file | filesystem ...
 .Sh DESCRIPTION
@@ -69,6 +69,8 @@
 this overrides the
 .Ev BLOCKSIZE
 specification from the environment.
+.It Fl c
+Display a grand total.
 .It Fl g
 Use 1073741824-byte (1-Gbyte) blocks rather than the default.  Note that
 this overrides the

==== //depot/projects/gdb/bin/df/df.c#6 (text+ko) ====

@@ -44,7 +44,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.57 2004/04/06 20:06:46 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.58 2004/04/18 20:56:31 obrien Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -121,6 +121,7 @@
 static void	  prthuman(const struct statfs *, int64_t);
 static void	  prthumanval(double);
 static void	  prtstat(struct statfs *, struct maxwidths *);
+static void	  addstat(struct statfs *, struct statfs *);
 static size_t	  regetmntinfo(struct statfs **, long, const char **);
 static unit_t	  unit_adjust(double *);
 static void	  update_maxwidths(struct maxwidths *, const struct statfs *);
@@ -132,14 +133,14 @@
 	return (a > b ? a : b);
 }
 
-static int	aflag = 0, hflag, iflag, nflag;
+static int	aflag = 0, cflag, hflag, iflag, nflag;
 static struct	ufs_args mdev;
 
 int
 main(int argc, char *argv[])
 {
 	struct stat stbuf;
-	struct statfs statfsbuf, *mntbuf;
+	struct statfs statfsbuf, totalbuf, *mntbuf;
 	struct maxwidths maxwidths;
 	const char *fstype;
 	char *mntpath, *mntpt;
@@ -149,12 +150,18 @@
 
 	fstype = "ufs";
 
+	memset (&totalbuf, 0, sizeof (totalbuf));
+	totalbuf.f_bsize = DEV_BSIZE;
+	strncpy (totalbuf.f_mntfromname, "total", MNAMELEN);
 	vfslist = NULL;
-	while ((ch = getopt(argc, argv, "abgHhiklmnPt:")) != -1)
+	while ((ch = getopt(argc, argv, "abcgHhiklmnPt:")) != -1)
 		switch (ch) {
 		case 'a':
 			aflag = 1;
 			break;
+		case 'c':
+			cflag = 1;
+			break;
 		case 'b':
 				/* FALLTHROUGH */
 		case 'P':
@@ -214,12 +221,18 @@
 	if (!*argv) {
 		mntsize = regetmntinfo(&mntbuf, mntsize, vfslist);
 		bzero(&maxwidths, sizeof(maxwidths));
+		for (i = 0; i < mntsize; i++) {
+			if (cflag)
+				addstat(&totalbuf, &mntbuf[i]);
+			update_maxwidths(&maxwidths, &mntbuf[i]);
+		}
+		if (cflag)
+			update_maxwidths(&maxwidths, &totalbuf);
 		for (i = 0; i < mntsize; i++)
-			update_maxwidths(&maxwidths, &mntbuf[i]);
-		for (i = 0; i < mntsize; i++) {
 			if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0)
 				prtstat(&mntbuf[i], &maxwidths);
-		}
+		if (cflag)
+			prtstat(&totalbuf, &maxwidths);
 		exit(rv);
 	}
 
@@ -256,6 +269,8 @@
 				} else if (statfs(mntpt, &statfsbuf) == 0) {
 					statfsbuf.f_mntonname[0] = '\0';
 					prtstat(&statfsbuf, &maxwidths);
+					if (cflag)
+						addstat(&totalbuf, &statfsbuf);
 				} else {
 					warn("%s", *argv);
 					rv = 1;
@@ -294,7 +309,11 @@
 			update_maxwidths(&maxwidths, &statfsbuf);
 		}
 		prtstat(&statfsbuf, &maxwidths);
+		if (cflag)
+			addstat(&totalbuf, &statfsbuf);
 	}
+	if (cflag)
+		prtstat(&totalbuf, &maxwidths);
 	return (rv);
 }
 
@@ -383,11 +402,11 @@
 	unit = unit_adjust(&bytes);
 
 	if (bytes == 0)
-		(void)printf("     0B");
+		(void)printf("      0B");
 	else if (bytes > 10)
-		(void)printf(" %5.0f%c", bytes, "BKMGTPE"[unit]);
+		(void)printf(" % 6.0f%c", bytes, "BKMGTPE"[unit]);
 	else
-		(void)printf(" %5.1f%c", bytes, "BKMGTPE"[unit]);
+		(void)printf(" % 6.1f%c", bytes, "BKMGTPE"[unit]);
 }
 
 /*
@@ -409,6 +428,7 @@
 	static int headerlen, timesthrough = 0;
 	static const char *header;
 	int64_t used, availblks, inodes;
+	int total;
 
 	if (++timesthrough == 1) {
 		mwp->mntfrom = imax(mwp->mntfrom, (int)strlen("Filesystem"));
@@ -450,15 +470,29 @@
 	}
 	(void)printf(" %5.0f%%",
 	    availblks == 0 ? 100.0 : (double)used / (double)availblks * 100.0);
+	total = !*sfsp->f_mntonname &&
+	    strncmp(sfsp->f_mntfromname, "total", MNAMELEN) == 0;
 	if (iflag) {
 		inodes = sfsp->f_files;
 		used = inodes - sfsp->f_ffree;
 		(void)printf(" %*jd %*jd %4.0f%% ", mwp->iused, (intmax_t)used,
 		    mwp->ifree, (intmax_t)sfsp->f_ffree, inodes == 0 ? 100.0 :
 		    (double)used / (double)inodes * 100.0);
-	} else
-		(void)printf("  ");
-	(void)printf("  %s\n", sfsp->f_mntonname);
+	} else if (!total)
+		(void)printf("  %s", sfsp->f_mntonname);
+	(void)printf("\n");
+}
+
+void
+addstat(struct statfs *totalfsp, struct statfs *statfsp)
+{
+	double bsize = statfsp->f_bsize / totalfsp->f_bsize;
+
+	totalfsp->f_blocks += statfsp->f_blocks * bsize;
+	totalfsp->f_bfree += statfsp->f_bfree * bsize;
+	totalfsp->f_bavail += statfsp->f_bavail * bsize;
+	totalfsp->f_files += statfsp->f_files;
+	totalfsp->f_ffree += statfsp->f_ffree;
 }
 
 /*
@@ -512,7 +546,7 @@
 {
 
 	(void)fprintf(stderr,
-	    "usage: df [-b | -H | -h | -k | -m | -P] [-ailn] [-t type] [file | filesystem ...]\n");
+	    "usage: df [-b | -H | -h | -k | -m | -P] [-aciln] [-t type] [file | filesystem ...]\n");
 	exit(EX_USAGE);
 }
 

==== //depot/projects/gdb/contrib/less/LICENSE#2 (text+ko) ====

@@ -2,7 +2,7 @@
                           ------------
 
 Less
-Copyright (C) 1984-2000  Mark Nudelman
+Copyright (C) 1984-2002  Mark Nudelman
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

==== //depot/projects/gdb/contrib/less/Makefile.aut#2 (text+ko) ====

@@ -23,9 +23,9 @@
 DISTFILES = \
 	${SRC} regexp.c regexp.h \
 	COPYING INSTALL LICENSE Makefile.in Makefile.aut NEWS README \
-	configure configure.in acconfig.h lesskey.c lessecho.c scrsize.c \
+	configure configure.ac lesskey.c lessecho.c scrsize.c \
 	cmd.h funcs.h lglob.h less.h lesskey.h option.h pckeys.h position.h \
-	install.sh defines.h.in defines.h.top mkinstalldirs \
+	install.sh defines.h.in mkinstalldirs \
 	less.nro lesskey.nro less.man lesskey.man less.hlp \
 	mkfuncs.awk mkhelp.c \
 	${DISTFILES_W}
@@ -41,10 +41,8 @@
 mkhelp: mkhelp.c
 	${CC} -o mkhelp mkhelp.c
 
-${srcdir}/configure: ${srcdir}/configure.in \
-		${srcdir}/Makefile.in \
-		${srcdir}/defines.h.top \
-		${srcdir}/acconfig.h
+${srcdir}/configure: ${srcdir}/configure.ac \
+		${srcdir}/Makefile.in
 	cd ${srcdir}; autoheader; autoconf
 
 funcs.h: ${SRC:%=${srcdir}/%}

==== //depot/projects/gdb/contrib/less/Makefile.dsg#2 (text+ko) ====

@@ -6,6 +6,9 @@
 VPATH = .
 
 CC = gcc
+INSTALL = ginstall -c
+INSTALL_PROGRAM = ginstall
+INSTALL_DATA = ginstall -m 644
 AWK = gawk
 
 CFLAGS = -O2 -g
@@ -15,13 +18,20 @@
 O=o
 
 LIBS =
+prefix = /dev/env/DJDIR
+exec_prefix = ${prefix}
 
+bindir = ${exec_prefix}/bin
+sysconfdir = ${prefix}/etc
+mandir = ${prefix}/man
+manext = 1
+
 #### End of system configuration section. ####
 
 # This rule allows us to supply the necessary -D options
 # in addition to whatever the user asks for.
 .c.o:
-	${CC} -I. ${CFLAGS_COMPILE_ONLY} ${CPPFLAGS} ${CFLAGS} $<
+	${CC} -I. ${CFLAGS_COMPILE_ONLY} -DBINDIR=\"${bindir}\" -DSYSDIR=\"${sysconfdir}\" ${CPPFLAGS} ${CFLAGS} $<
 
 OBJ =	main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \
 	command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \
@@ -44,7 +54,14 @@
 defines.h: defines.ds
 	command.com /c copy $< $@
 
-${OBJ}: less.h defines.h funcs.h
+${OBJ}: ${srcdir}/less.h defines.h ${srcdir}/funcs.h
+
+install: all ${srcdir}/less.man ${srcdir}/lesskey.man
+	${INSTALL_PROGRAM} less.exe ${bindir}/less.exe
+	${INSTALL_PROGRAM} lesskey.exe ${bindir}/lesskey.exe
+	${INSTALL_PROGRAM} lessecho.exe ${bindir}/lessecho.exe
+	${INSTALL_DATA} ${srcdir}/less.man ${mandir}/man${manext}/less.${manext}
+	${INSTALL_DATA} ${srcdir}/lesskey.man ${mandir}/man${manext}/lesskey.${manext}
 
 info:
 install-info:

==== //depot/projects/gdb/contrib/less/Makefile.in#2 (text+ko) ====

@@ -96,7 +96,7 @@
 config.status: ${srcdir}/configure
 	./config.status --recheck
 
-${srcdir}/configure: ${srcdir}/configure.in
+${srcdir}/configure: ${srcdir}/configure.ac
 	cd ${srcdir}; autoheader; autoconf
 
 clean:

==== //depot/projects/gdb/contrib/less/NEWS#2 (text+ko) ====

@@ -13,7 +13,38 @@
 ======================================================================
 
 
-	Major changes between "less" versions 358 and 371
+	Major changes between "less" versions 378 and 381
+
+* New -L option to disable LESSOPEN processing.
+
+* Further support for large (64 bit) file addressing.
+  Large file support is now set up by the configure script.
+
+* Use autoconf 2.54.
+  Replace configure.in, acconfig.h, defines.h.top with configure.ac.
+
+* Overstriking underscore with underscore is now bold or underlined 
+  depending on context.
+
+* Use only 7 spaces for line numbers in -N mode, if possible.
+
+* Fix some bugs in handling overstriking in UTF-8 files.
+
+* Fix some nroff issues in the man page.
+
+======================================================================
+
+	Major changes between "less" versions 376 and 378
+
+* Bug fixes:
+  Default buffer space is now 64K as documented.
+  Search highlighting works properly when used with -R.
+  Windows version works properly when input file contains carriage returns.
+  Clean up some compiler warnings.
+
+======================================================================
+
+	Major changes between "less" versions 358 and 376
 
 * -x option can now specify multiple variable-width tab stops.
 
@@ -41,7 +72,10 @@
 
 * Default LESSCHARSET for MS-DOS versions is now "dos".
 
-* Improved performance in reading very large files.
+* Searching works better with ANSI (SGR) escape sequences.
+  ANSI color escape sequences are now supported in the MS-DOS (DJGPP) version.
+
+* Improved performance in reading very large pipes.
 
 * Eliminated some dependencies on file offets being 32 bits.
 
@@ -51,6 +85,8 @@
 
 * Improved horizontal shifting of text using -R option with ANSI color.
 
+* Improved handling of filenames containing shell metacharacters.
+
 * Some fixes for EBCDIC systems.
 
 * Some fixes for OS/2 systems.

==== //depot/projects/gdb/contrib/less/README#2 (text+ko) ====

@@ -1,7 +1,7 @@
 
-                            Less, version 371
+                            Less, version 381
 
-    This is the distribution of less, version 371, released 26 Dec 2001.
+    This is the distribution of less, version 381, released 17 Jan 2003.
     This program is part of the GNU project (http://www.gnu.org).
 
     This program is free software.  You may redistribute it and/or

==== //depot/projects/gdb/contrib/less/brac.c#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2000  Mark Nudelman
+ * Copyright (C) 1984-2002  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.

==== //depot/projects/gdb/contrib/less/ch.c#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2000  Mark Nudelman
+ * Copyright (C) 1984-2002  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -93,10 +93,10 @@
 
 static struct filestate *thisfile;
 static int ch_ungotchar = -1;
+static int maxbufs = -1;
 
 extern int autobuf;
 extern int sigs;
-extern int cbufs;
 extern int secure;
 extern constant char helpdata[];
 extern constant int size_helpdata;
@@ -162,7 +162,7 @@
 		 * 2. We haven't allocated the max buffers for this file yet.
 		 */
 		if ((autobuf && !(ch_flags & CH_CANSEEK)) ||
-		    (cbufs == -1 || ch_nbufs < cbufs))
+		    (maxbufs < 0 || ch_nbufs < maxbufs))
 			if (ch_addbuf())
 				/*
 				 * Allocation failed: turn off autobuf.
@@ -561,32 +561,21 @@
 }
 
 /*
- * Allocate buffers.
- * Caller wants us to have a total of at least want_nbufs buffers.
+ * Set max amount of buffer space.
+ * bufspace is in units of 1024 bytes.  -1 mean no limit.
  */
-	public int
-ch_nbuf(want_nbufs)
-	int want_nbufs;
+	public void
+ch_setbufspace(bufspace)
+	int bufspace;
 {
-	PARG parg;
-
-	while (ch_nbufs < want_nbufs)
+	if (bufspace < 0)
+		maxbufs = -1;
+	else
 	{
-		if (ch_addbuf())
-		{
-			/*
-			 * Cannot allocate enough buffers.
-			 * If we don't have ANY, then quit.
-			 * Otherwise, just report the error and return.
-			 */
-			parg.p_int = want_nbufs - ch_nbufs;
-			error("Cannot allocate %d buffers", &parg);
-			if (ch_nbufs == 0)
-				quit(QUIT_ERROR);
-			break;
-		}
+		maxbufs = ((bufspace * 1024) + LBUFSIZE-1) / LBUFSIZE;
+		if (maxbufs < 1)
+			maxbufs = 1;
 	}
-	return (ch_nbufs);
 }
 
 /*

==== //depot/projects/gdb/contrib/less/charset.c#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2000  Mark Nudelman
+ * Copyright (C) 1984-2002  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -164,6 +164,7 @@
 	error("invalid charset name", NULL_PARG);
 	quit(QUIT_ERROR);
 	/*NOTREACHED*/
+	return (0);
 }
 
 #if HAVE_LOCALE

==== //depot/projects/gdb/contrib/less/cmd.h#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2000  Mark Nudelman
+ * Copyright (C) 1984-2002  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.

==== //depot/projects/gdb/contrib/less/cmdbuf.c#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2000  Mark Nudelman
+ * Copyright (C) 1984-2002  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -64,25 +64,25 @@
  */
 struct mlist mlist_search =  
 	{ &mlist_search,  &mlist_search,  &mlist_search,  NULL };
-public void constant *ml_search = (void *) &mlist_search;
+public void * constant ml_search = (void *) &mlist_search;
 
 struct mlist mlist_examine = 
 	{ &mlist_examine, &mlist_examine, &mlist_examine, NULL };
-public void constant *ml_examine = (void *) &mlist_examine;
+public void * constant ml_examine = (void *) &mlist_examine;
 
 #if SHELL_ESCAPE || PIPEC
 struct mlist mlist_shell =   
 	{ &mlist_shell,   &mlist_shell,   &mlist_shell,   NULL };
-public void constant *ml_shell = (void *) &mlist_shell;
+public void * constant ml_shell = (void *) &mlist_shell;
 #endif
 
 #else /* CMD_HISTORY */
 
 /* If CMD_HISTORY is off, these are just flags. */
-public void constant *ml_search = (void *)1;
-public void constant *ml_examine = (void *)2;
+public void * constant ml_search = (void *)1;
+public void * constant ml_examine = (void *)2;
 #if SHELL_ESCAPE || PIPEC
-public void constant *ml_shell = (void *)3;
+public void * constant ml_shell = (void *)3;
 #endif
 
 #endif /* CMD_HISTORY */
@@ -730,7 +730,10 @@
 	char *word;
 #if SPACES_IN_FILENAMES
 	char *p;
-	int quoted;
+	int delim_quoted = 0;
+	int meta_quoted = 0;
+	char *esc = get_meta_escape();
+	int esclen = strlen(esc);
 #endif
 	
 	/*
@@ -751,6 +754,7 @@
 		 * We're already at the end of the word.
 		 */
 		;
+#if 0
 	} else
 	{
 		/*
@@ -758,9 +762,10 @@
 		 * Huh? There's no word here.
 		 */
 		return (NULL);
+#endif
 	}
 	/*
-	 * Search backwards for beginning of the word.
+	 * Find the beginning of the word which the cursor is in.
 	 */
 	if (cp == cmdbuf)
 		return (NULL);
@@ -770,24 +775,34 @@
 	 * without a corresponding close quote), we return everything
 	 * from the open quote, including spaces.
 	 */
-	quoted = 0;
+	for (word = cmdbuf;  word < cp;  word++)
+		if (*word != ' ')
+			break;
+	if (word >= cp)
+		return (cp);
 	for (p = cmdbuf;  p < cp;  p++)
 	{
-		if (!quoted && *p == openquote)
+		if (meta_quoted)
+		{
+			meta_quoted = 0;
+		} else if (esclen > 0 && p + esclen < cp &&
+		           strncmp(p, esc, esclen) == 0)
+		{
+			meta_quoted = 1;
+			p += esclen - 1;
+		} else if (delim_quoted)
 		{
-			quoted = 1;
-			word = p;
-		} else if (quoted && *p == closequote)
+			if (*p == closequote)
+				delim_quoted = 0;
+		} else /* (!delim_quoted) */
 		{
-			quoted = 0;
+			if (*p == openquote)
+				delim_quoted = 1;
+			else if (*p == ' ')
+				word = p+1;
 		}
 	}
-	if (quoted)
-		return (word);
 #endif
-	for (word = cp-1;  word > cmdbuf;  word--)
-		if (word[-1] == ' ')
-			break;
 	return (word);
 }
 
@@ -835,11 +850,20 @@
 	 */
 	c = *cp;
 	*cp = '\0';
-#if SPACES_IN_FILENAMES
-	if (*word == openquote)
-		word++;
-#endif
-	tk_text = fcomplete(word);
+	if (*word != openquote)
+	{
+		tk_text = fcomplete(word);
+	} else
+	{
+		char *qword = shell_quote(word+1);
+		if (qword == NULL)
+			tk_text = fcomplete(word+1);
+		else
+		{
+			tk_text = fcomplete(qword);
+			free(qword);
+		}
+	}
 	*cp = c;
 }
 
@@ -1006,10 +1030,15 @@
 /*
  * Return the number currently in the command buffer.
  */
-	public int
+	public LINENUM
 cmd_int()
 {
-	return (atoi(cmdbuf));
+	register char *p;
+	LINENUM n = 0;
+
+	for (p = cmdbuf;  *p != '\0';  p++)
+		n = (10 * n) + (*p - '0');
+	return (n);
 }
 
 /*

==== //depot/projects/gdb/contrib/less/command.c#2 (text+ko) ====

@@ -1,6 +1,6 @@
-/* $FreeBSD: src/contrib/less/command.c,v 1.4 2002/01/07 20:37:09 ps Exp $ */
+/* $FreeBSD: src/contrib/less/command.c,v 1.5 2004/04/17 07:24:09 tjr Exp $ */
 /*
- * Copyright (C) 1984-2000  Mark Nudelman
+ * Copyright (C) 1984-2002  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -64,7 +64,7 @@
 #endif
 static int mca;			/* The multicharacter command (action) */
 static int search_type;		/* The previous type of search */
-static int number;		/* The number typed by the user */
+static LINENUM number;		/* The number typed by the user */
 static char optchar;
 static int optflag;
 static int optgetname;
@@ -189,7 +189,7 @@
 	{
 	case A_F_SEARCH:
 	case A_B_SEARCH:
-		multi_search(cbuf, number);
+		multi_search(cbuf, (int) number);
 		break;
 	case A_FIRSTCMD:
 		/*
@@ -209,18 +209,20 @@
 		optchar = '\0';
 		break;
 	case A_F_BRACKET:
-		match_brac(cbuf[0], cbuf[1], 1, number);
+		match_brac(cbuf[0], cbuf[1], 1, (int) number);
 		break;
 	case A_B_BRACKET:
-		match_brac(cbuf[1], cbuf[0], 0, number);
+		match_brac(cbuf[1], cbuf[0], 0, (int) number);
 		break;
 #if EXAMINE
 	case A_EXAMINE:
 		if (secure)
 			break;
 		edit_list(cbuf);
+#if TAGS
 		/* If tag structure is loaded then clean it up. */
 		cleantags();
+#endif
 		break;
 #endif
 #if SHELL_ESCAPE
@@ -363,7 +365,7 @@
 			 * If so, display the complete name and stop 
 			 * accepting chars until user hits RETURN.
 			 */
-			struct option *o;
+			struct loption *o;
 			char *oname;
 			int lc;
 
@@ -987,7 +989,7 @@
 			 * Forward one window (and set the window size).
 			 */
 			if (number > 0)
-				swindow = number;
+				swindow = (int) number;
 			/* FALLTHRU */
 		case A_F_SCREEN:
 			/*
@@ -998,7 +1000,7 @@
 			cmd_exec();
 			if (show_attn)
 				set_attnpos(bottompos);
-			forward(number, 0, 1);
+			forward((int) number, 0, 1);
 			break;
 
 		case A_B_WINDOW:
@@ -1006,7 +1008,7 @@
 			 * Backward one window (and set the window size).
 			 */
 			if (number > 0)
-				swindow = number;
+				swindow = (int) number;
 			/* FALLTHRU */
 		case A_B_SCREEN:
 			/*
@@ -1015,7 +1017,7 @@
 			if (number <= 0)
 				number = get_swindow();
 			cmd_exec();
-			backward(number, 0, 1);
+			backward((int) number, 0, 1);
 			break;
 
 		case A_F_LINE:
@@ -1027,7 +1029,7 @@
 			cmd_exec();
 			if (show_attn == OPT_ONPLUS && number > 1)
 				set_attnpos(bottompos);
-			forward(number, 0, 0);
+			forward((int) number, 0, 0);
 			break;
 
 		case A_B_LINE:
@@ -1037,7 +1039,7 @@
 			if (number <= 0)
 				number = 1;
 			cmd_exec();
-			backward(number, 0, 0);
+			backward((int) number, 0, 0);
 			break;
 
 		case A_FF_LINE:
@@ -1049,7 +1051,7 @@
 			cmd_exec();
 			if (show_attn == OPT_ONPLUS && number > 1)
 				set_attnpos(bottompos);
-			forward(number, 1, 0);
+			forward((int) number, 1, 0);
 			break;
 
 		case A_BF_LINE:
@@ -1059,7 +1061,7 @@
 			if (number <= 0)
 				number = 1;
 			cmd_exec();
-			backward(number, 1, 0);
+			backward((int) number, 1, 0);
 			break;
 		
 		case A_FF_SCREEN:
@@ -1071,7 +1073,7 @@
 			cmd_exec();
 			if (show_attn == OPT_ONPLUS)
 				set_attnpos(bottompos);
-			forward(number, 1, 0);
+			forward((int) number, 1, 0);
 			break;
 
 		case A_F_FOREVER:
@@ -1101,7 +1103,7 @@
 			 * (default same as last 'd' or 'u' command).
 			 */
 			if (number > 0)
-				wscroll = number;
+				wscroll = (int) number;

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404200112.i3K1CSON092304>