Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Aug 2006 23:07:53 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 104630 for review
Message-ID:  <200608202307.k7KN7r1m085815@repoman.freebsd.org>

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

Change 104630 by imp@imp_paco-paco on 2006/08/20 23:07:23

	IFC @104629

Affected files ...

.. //depot/projects/arm/src/UPDATING#3 integrate
.. //depot/projects/arm/src/bin/date/netdate.c#2 integrate
.. //depot/projects/arm/src/bin/df/df.c#2 integrate
.. //depot/projects/arm/src/bin/ed/main.c#2 integrate
.. //depot/projects/arm/src/bin/ps/ps.1#2 integrate
.. //depot/projects/arm/src/contrib/less/LICENSE#2 integrate
.. //depot/projects/arm/src/contrib/less/Makefile.aut#2 integrate
.. //depot/projects/arm/src/contrib/less/Makefile.in#2 integrate
.. //depot/projects/arm/src/contrib/less/Makefile.wnb#2 integrate
.. //depot/projects/arm/src/contrib/less/NEWS#2 integrate
.. //depot/projects/arm/src/contrib/less/README#2 integrate
.. //depot/projects/arm/src/contrib/less/brac.c#2 integrate
.. //depot/projects/arm/src/contrib/less/ch.c#2 integrate
.. //depot/projects/arm/src/contrib/less/charset.c#2 integrate
.. //depot/projects/arm/src/contrib/less/charset.h#1 branch
.. //depot/projects/arm/src/contrib/less/cmd.h#2 integrate
.. //depot/projects/arm/src/contrib/less/cmdbuf.c#2 integrate
.. //depot/projects/arm/src/contrib/less/command.c#2 integrate
.. //depot/projects/arm/src/contrib/less/configure#2 integrate
.. //depot/projects/arm/src/contrib/less/configure.ac#2 integrate
.. //depot/projects/arm/src/contrib/less/decode.c#2 integrate
.. //depot/projects/arm/src/contrib/less/defines.ds#2 integrate
.. //depot/projects/arm/src/contrib/less/defines.h.in#2 integrate
.. //depot/projects/arm/src/contrib/less/defines.o2#2 integrate
.. //depot/projects/arm/src/contrib/less/defines.o9#2 integrate
.. //depot/projects/arm/src/contrib/less/defines.wn#2 integrate
.. //depot/projects/arm/src/contrib/less/edit.c#2 integrate
.. //depot/projects/arm/src/contrib/less/filename.c#2 integrate
.. //depot/projects/arm/src/contrib/less/forwback.c#2 integrate
.. //depot/projects/arm/src/contrib/less/funcs.h#2 integrate
.. //depot/projects/arm/src/contrib/less/ifile.c#2 integrate
.. //depot/projects/arm/src/contrib/less/input.c#2 integrate
.. //depot/projects/arm/src/contrib/less/jump.c#2 integrate
.. //depot/projects/arm/src/contrib/less/less.h#2 integrate
.. //depot/projects/arm/src/contrib/less/less.man#2 integrate
.. //depot/projects/arm/src/contrib/less/less.nro#2 integrate
.. //depot/projects/arm/src/contrib/less/lessecho.c#2 integrate
.. //depot/projects/arm/src/contrib/less/lessecho.man#1 branch
.. //depot/projects/arm/src/contrib/less/lessecho.nro#1 branch
.. //depot/projects/arm/src/contrib/less/lesskey.c#2 integrate
.. //depot/projects/arm/src/contrib/less/lesskey.h#2 integrate
.. //depot/projects/arm/src/contrib/less/lesskey.man#2 integrate
.. //depot/projects/arm/src/contrib/less/lesskey.nro#2 integrate
.. //depot/projects/arm/src/contrib/less/lglob.h#2 integrate
.. //depot/projects/arm/src/contrib/less/line.c#2 integrate
.. //depot/projects/arm/src/contrib/less/linenum.c#2 integrate
.. //depot/projects/arm/src/contrib/less/lsystem.c#2 integrate
.. //depot/projects/arm/src/contrib/less/main.c#2 integrate
.. //depot/projects/arm/src/contrib/less/mark.c#2 integrate
.. //depot/projects/arm/src/contrib/less/mkhelp.c#2 integrate
.. //depot/projects/arm/src/contrib/less/optfunc.c#2 integrate
.. //depot/projects/arm/src/contrib/less/option.c#2 integrate
.. //depot/projects/arm/src/contrib/less/option.h#2 integrate
.. //depot/projects/arm/src/contrib/less/opttbl.c#2 integrate
.. //depot/projects/arm/src/contrib/less/os.c#2 integrate
.. //depot/projects/arm/src/contrib/less/output.c#2 integrate
.. //depot/projects/arm/src/contrib/less/pckeys.h#2 integrate
.. //depot/projects/arm/src/contrib/less/position.c#2 integrate
.. //depot/projects/arm/src/contrib/less/position.h#2 integrate
.. //depot/projects/arm/src/contrib/less/prompt.c#2 integrate
.. //depot/projects/arm/src/contrib/less/screen.c#2 integrate
.. //depot/projects/arm/src/contrib/less/scrsize.c#2 integrate
.. //depot/projects/arm/src/contrib/less/search.c#2 integrate
.. //depot/projects/arm/src/contrib/less/signal.c#2 integrate
.. //depot/projects/arm/src/contrib/less/tags.c#2 integrate
.. //depot/projects/arm/src/contrib/less/ttyin.c#2 integrate
.. //depot/projects/arm/src/contrib/less/version.c#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/FREEBSD-upgrade#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/RELEASE_NOTES#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/cf/cf/submit.cf#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/cf/m4/version.m4#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/contrib/cidrexpand#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/src/main.c#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/src/queue.c#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/src/srvrsmtp.c#2 integrate
.. //depot/projects/arm/src/contrib/sendmail/src/version.c#2 integrate
.. //depot/projects/arm/src/etc/defaults/rc.conf#4 integrate
.. //depot/projects/arm/src/etc/network.subr#2 integrate
.. //depot/projects/arm/src/etc/pccard_ether#2 integrate
.. //depot/projects/arm/src/etc/rc.d/dhclient#2 integrate
.. //depot/projects/arm/src/etc/rc.subr#3 integrate
.. //depot/projects/arm/src/etc/sendmail/freebsd.mc#2 integrate
.. //depot/projects/arm/src/etc/sendmail/freebsd.submit.mc#2 integrate
.. //depot/projects/arm/src/gnu/lib/libsupc++/Makefile#2 integrate
.. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#5 integrate
.. //depot/projects/arm/src/sbin/dhclient/dhclient.8#2 integrate
.. //depot/projects/arm/src/sbin/dhclient/dhclient.c#2 integrate
.. //depot/projects/arm/src/sbin/ipf/libipf/Makefile#3 integrate
.. //depot/projects/arm/src/sbin/ipfw/ipfw.8#3 integrate
.. //depot/projects/arm/src/sbin/ipfw/ipfw2.c#3 integrate
.. //depot/projects/arm/src/share/man/man4/amdsmb.4#2 integrate
.. //depot/projects/arm/src/share/man/man4/ixgb.4#2 integrate
.. //depot/projects/arm/src/share/man/man4/nfsmb.4#2 integrate
.. //depot/projects/arm/src/share/man/man4/uplcom.4#2 integrate
.. //depot/projects/arm/src/share/man/man5/rc.conf.5#2 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/linux.h#4 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/linux32_machdep.c#6 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/linux32_sysvec.c#9 integrate
.. //depot/projects/arm/src/sys/boot/arm/Makefile#2 integrate
.. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#9 integrate
.. //depot/projects/arm/src/sys/boot/common/help.common#3 integrate
.. //depot/projects/arm/src/sys/boot/common/loader.8#4 integrate
.. //depot/projects/arm/src/sys/boot/ficl/arm/sysdep.c#1 branch
.. //depot/projects/arm/src/sys/boot/ficl/arm/sysdep.h#1 branch
.. //depot/projects/arm/src/sys/boot/forth/loader.conf#8 integrate
.. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32.h#2 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_emul.c#2 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_emul.h#2 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_futex.c#2 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_misc.c#11 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_signal.c#6 integrate
.. //depot/projects/arm/src/sys/compat/ndis/ntoskrnl_var.h#4 integrate
.. //depot/projects/arm/src/sys/conf/NOTES#30 integrate
.. //depot/projects/arm/src/sys/conf/files.pc98#9 integrate
.. //depot/projects/arm/src/sys/conf/options#29 integrate
.. //depot/projects/arm/src/sys/dev/arl/if_arlreg.h#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#24 integrate
.. //depot/projects/arm/src/sys/dev/ath/if_athvar.h#11 integrate
.. //depot/projects/arm/src/sys/dev/bge/if_bge.c#19 integrate
.. //depot/projects/arm/src/sys/dev/ips/ips.h#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb_port.h#6 integrate
.. //depot/projects/arm/src/sys/fs/msdosfs/denode.h#4 integrate
.. //depot/projects/arm/src/sys/geom/vinum/geom_vinum_raid5.h#2 integrate
.. //depot/projects/arm/src/sys/i386/linux/linux.h#5 integrate
.. //depot/projects/arm/src/sys/i386/linux/linux_machdep.c#6 integrate
.. //depot/projects/arm/src/sys/i386/linux/linux_sysvec.c#9 integrate
.. //depot/projects/arm/src/sys/kern/sys_process.c#7 integrate
.. //depot/projects/arm/src/sys/kern/uipc_socket.c#21 integrate
.. //depot/projects/arm/src/sys/modules/Makefile#28 integrate
.. //depot/projects/arm/src/sys/net/if_bridge.c#21 integrate
.. //depot/projects/arm/src/sys/netinet/ip_fastfwd.c#7 integrate
.. //depot/projects/arm/src/sys/netinet/ip_fw.h#8 integrate
.. //depot/projects/arm/src/sys/netinet/ip_fw2.c#17 integrate
.. //depot/projects/arm/src/sys/netinet/ip_input.c#12 integrate
.. //depot/projects/arm/src/sys/netinet/ip_output.c#12 integrate
.. //depot/projects/arm/src/sys/pci/nfsmb.c#3 integrate
.. //depot/projects/arm/src/sys/ufs/ufs/ufs_vnops.c#7 integrate
.. //depot/projects/arm/src/usr.bin/calendar/calendars/calendar.freebsd#2 integrate
.. //depot/projects/arm/src/usr.bin/less/defines.h#2 integrate
.. //depot/projects/arm/src/usr.bin/lessecho/Makefile#2 integrate
.. //depot/projects/arm/src/usr.bin/locate/locate/locate.1#2 integrate
.. //depot/projects/arm/src/usr.bin/pkill/Makefile#2 integrate
.. //depot/projects/arm/src/usr.sbin/arp/arp.8#2 integrate
.. //depot/projects/arm/src/usr.sbin/newsyslog/newsyslog.c#2 integrate
.. //depot/projects/arm/src/usr.sbin/rpc.lockd/kern.c#3 integrate

Differences ...

==== //depot/projects/arm/src/UPDATING#3 (text+ko) ====

@@ -21,6 +21,11 @@
 	developers choose to disable these features on build machines
 	to maximize performance.
 
+20060816:
+	The IPFIREWALL_FORWARD_EXTENDED option is gone and the behaviour
+	for IP_FIREWALL_FORWARD is now as it was before when it was first
+	committed and for years after. The behaviour is now ON.
+
 20060725:
 	enigma(1)/crypt(1) utility has been changed on 64 bit architectures.
 	Now it can decrypt files created from different architectures.
@@ -598,4 +603,4 @@
 Contact Warner Losh if you have any questions about your use of
 this document.
 
-$FreeBSD: src/UPDATING,v 1.452 2006/07/26 16:31:10 jkim Exp $
+$FreeBSD: src/UPDATING,v 1.453 2006/08/17 00:41:05 julian Exp $

==== //depot/projects/arm/src/bin/date/netdate.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/date/netdate.c,v 1.18 2004/04/06 20:06:45 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/date/netdate.c,v 1.19 2006/08/20 06:31:24 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/time.h>
@@ -108,14 +108,14 @@
 		warnx("all ports in use");
 		goto bad;
 	}
+	memset(&msg, 0, sizeof(msg));
 	msg.tsp_type = TSP_SETDATE;
 	msg.tsp_vers = TSPVERSION;
 	if (gethostname(hostname, sizeof(hostname))) {
 		warn("gethostname");
 		goto bad;
 	}
-	(void)strncpy(msg.tsp_name, hostname, sizeof(msg.tsp_name) - 1);
-	msg.tsp_name[sizeof(msg.tsp_name) - 1] = '\0';
+	(void)strlcpy(msg.tsp_name, hostname, sizeof(msg.tsp_name));
 	msg.tsp_seq = htons((u_short)0);
 	msg.tsp_time.tv_sec = htonl((u_long)tval);
 	msg.tsp_time.tv_usec = htonl((u_long)0);

==== //depot/projects/arm/src/bin/df/df.c#2 (text+ko) ====

@@ -44,7 +44,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.64 2005/01/10 08:39:21 imp Exp $");
+__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.65 2006/08/20 06:32:40 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -113,7 +113,7 @@
 
 	memset(&totalbuf, 0, sizeof(totalbuf));
 	totalbuf.f_bsize = DEV_BSIZE;
-	strncpy(totalbuf.f_mntfromname, "total", MNAMELEN);
+	strlcpy(totalbuf.f_mntfromname, "total", MNAMELEN);
 	vfslist = NULL;
 	while ((ch = getopt(argc, argv, "abcgHhiklmnPt:")) != -1)
 		switch (ch) {
@@ -552,7 +552,7 @@
 
 	*str = 'n'; *(str + 1) = 'o';
 	for (i = 0, strptr = str + 2; i < cnt; i++, strptr++) {
-		strncpy(strptr, listptr[i], 32);
+		strlcpy(strptr, listptr[i], 32);
 		strptr += strlen(listptr[i]);
 		*strptr = ',';
 		free(listptr[i]);

==== //depot/projects/arm/src/bin/ed/main.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
 #endif /* not lint */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/ed/main.c,v 1.28 2005/02/09 17:37:37 ru Exp $");
+__FBSDID("$FreeBSD: src/bin/ed/main.c,v 1.29 2006/08/17 23:00:33 imp Exp $");
 
 /*
  * CREDITS
@@ -292,7 +292,7 @@
 		errmsg = "invalid address";			\
 		return ERR;					\
 	}							\
-} while (0);
+} while (0)
 
 /*  next_addr: return the next line address in the command buffer */
 long

==== //depot/projects/arm/src/bin/ps/ps.1#2 (text+ko) ====

@@ -27,9 +27,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)ps.1	8.3 (Berkeley) 4/18/94
-.\" $FreeBSD: src/bin/ps/ps.1,v 1.86 2005/04/29 11:10:27 maxim Exp $
+.\" $FreeBSD: src/bin/ps/ps.1,v 1.87 2006/08/18 14:12:38 yar Exp $
 .\"
-.Dd March 20, 2005
+.Dd August 18, 2006
 .Dt PS 1
 .Os
 .Sh NAME
@@ -179,14 +179,15 @@
 .It Fl o
 Display information associated with the space or comma separated
 list of keywords specified.
+The last keyword in the list may be appended with an equals
+.Pq Ql =
+sign and a string spanning the rest of the argument.
+This causes the printed header to use the specified string instead of
+the standard header.
 Multiple keywords may also be given in the form of more than one
 .Fl o
 option.
-Keywords may be appended with an equals
-.Pq Ql =
-sign and a string.
-This causes the printed header to use the specified string instead of
-the standard header.
+So the header texts for multiple keywords can be changed.
 If all keywords have empty header texts, no header line is written.
 .It Fl p
 Display information about processes which match the specified process IDs.

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

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

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

@@ -24,9 +24,10 @@
 	${SRC} regexp.c regexp.h \
 	COPYING INSTALL LICENSE Makefile.in Makefile.aut NEWS README \
 	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 \
+	charset.h cmd.h funcs.h lglob.h less.h lesskey.h option.h pckeys.h position.h \
 	install.sh defines.h.in mkinstalldirs \
-	less.nro lesskey.nro less.man lesskey.man less.hlp \
+	less.nro less.man lesskey.nro lesskey.man lessecho.nro lessecho.man \
+	less.hlp \
 	mkfuncs.awk mkhelp.c \
 	${DISTFILES_W}
 
@@ -55,7 +56,8 @@
 
 clean: 
 	rm -f Makefile config.status config.log config.cache defines.h stamp-h \
-		README NEWS less.nro lesskey.nro  less.man lesskey.man
+		README NEWS \
+		less.nro less.man lesskey.nro lesskey.man lessecho.nro lessecho.man 
 
 distclean: clean
 realclean: clean
@@ -78,6 +80,8 @@
 	${REPLACE_VERSION} ${srcdir}/less.nro.VER
 ${srcdir}/lesskey.nro: ${srcdir}/lesskey.nro.VER ${srcdir}/version.c
 	${REPLACE_VERSION} ${srcdir}/lesskey.nro.VER
+${srcdir}/lessecho.nro: ${srcdir}/lessecho.nro.VER ${srcdir}/version.c
+	${REPLACE_VERSION} ${srcdir}/lessecho.nro.VER
 ${srcdir}/less.hlp: ${srcdir}/less.hlp.VER ${srcdir}/version.c
 	${REPLACE_VERSION} ${srcdir}/less.hlp.VER
 
@@ -85,6 +89,8 @@
 	${NROFF} ${srcdir}/less.nro >${srcdir}/less.man
 ${srcdir}/lesskey.man: ${srcdir}/lesskey.nro
 	${NROFF} ${srcdir}/lesskey.nro >${srcdir}/lesskey.man
+${srcdir}/lessecho.man: ${srcdir}/lessecho.nro
+	${NROFF} ${srcdir}/lessecho.nro >${srcdir}/lessecho.man
 
 
 distfiles: ${DISTFILES}

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

@@ -59,12 +59,13 @@
 
 ${OBJ}: ${srcdir}/less.h ${srcdir}/funcs.h defines.h 
 
-install: all ${srcdir}/less.nro ${srcdir}/lesskey.nro installdirs
+install: all ${srcdir}/less.nro ${srcdir}/lesskey.nro ${srcdir}/lessecho.nro installdirs
 	${INSTALL_PROGRAM} less ${bindir}/${binprefix}less
 	${INSTALL_PROGRAM} lesskey ${bindir}/${binprefix}lesskey
 	${INSTALL_PROGRAM} lessecho ${bindir}/${binprefix}lessecho
 	${INSTALL_DATA} ${srcdir}/less.nro ${mandir}/man${manext}/${manprefix}less.${manext}
 	${INSTALL_DATA} ${srcdir}/lesskey.nro ${mandir}/man${manext}/${manprefix}lesskey.${manext}
+	${INSTALL_DATA} ${srcdir}/lessecho.nro ${mandir}/man${manext}/${manprefix}lessecho.${manext}
 
 install-strip:
 	${MAKE} INSTALL_PROGRAM='${INSTALL_PROGRAM} -s' install

==== //depot/projects/arm/src/contrib/less/Makefile.wnb#2 (text+ko) ====

@@ -1,20 +1,27 @@
 # Makefile for less.
 # Windows version
+# Bolarnd C++ 5.5.1 free command line tools
 
 #### Start of system configuration section. ####
+# 
+# Borland's make knows its own location in the
+# filesystem.
+#
 
 CC = bcc32
-LIBDIR = d:\bc45\lib
+LIBDIR = $(MAKEDIR)\..\lib
 
 CFLAGS = -O2 -w-pro -TWC -P-c -v- -d -f- -ff- -vi
-LDFLAGS = /Tpe /v- /ap /c /x
-LD = tlink32
+LDFLAGS = -Tpe -v- -ap -c -x -V4.0 -GF:AGGRESSIVE
+LD = ilink32
 LIBS = ${LIBDIR}\import32.lib ${LIBDIR}\cw32.lib
 
 #### End of system configuration section. ####
 
+# 
 # This rule allows us to supply the necessary -D options
 # in addition to whatever the user asks for.
+# 
 .c.obj:
 	${CC} -c -I. ${CPPFLAGS} ${CFLAGS} $<
 
@@ -25,16 +32,20 @@
 	position.obj prompt.obj search.obj signal.obj tags.obj \
 	ttyin.obj version.obj regexp.obj
 
-all: less lesskey
+all: less lesskey lessecho
 
+# 
 # This is really horrible, but the command line is too long for 
 # MS-DOS if we try to link ${OBJ}.
+# 
 less: ${OBJ}
-	-del lesskey.obj
-	${LD} ${LDFLAGS} ${LIBDIR}\c0x32.obj *.obj, $@,,${LIBS}
+	${LD} ${LDFLAGS} ${LIBDIR}\c0x32.obj $**, $@,,${LIBS}
 
 lesskey: lesskey.obj version.obj
-	${LD} ${LDFLAGS} ${LIBDIR}\c0x32.obj lesskey.obj version.obj, $@,,${LIBS}
+	${LD} ${LDFLAGS} ${LIBDIR}\c0x32.obj $**, $@,,${LIBS}
+
+lessecho: lessecho.obj version.obj
+	${LD} ${LDFLAGS} ${LIBDIR}\c0x32.obj $**, $@,,${LIBS}
 
 defines.h: defines.wn
 	-del defines.h
@@ -44,6 +55,16 @@
 
 clean:
 	-del *.obj 
+	-del *.il? 
+	-del *.tds 
+	-del defines.h
+
+spotless: clean
 	-del less.exe
 	-del lesskey.exe
+	-del lessecho.exe
+
+realclean: spotless
+
+distclean: spotless
 

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

@@ -7,11 +7,66 @@
       http://www.greenwoodsoftware.com/less
   You can also download the latest version of less from there.
 
-  To report bugs, suggestions or comments, send email to 
-  bug-less@gnu.org or markn@greenwoodsoftware.com.
+  To report bugs, suggestions or comments, send email to bug-less@gnu.org.
+
+======================================================================
+
+
+	Major changes between "less" versions 382 and 394
+
+* Add history file to save search and shell command history between
+  invocations of less.
+
+* Improve behavior of history list for search and shell commands.
+
+* Add -K (or --quit-on-intr) option to make less exit immediately on ctrl-C.
+
+* Improve handling of UTF-8 files and commands, including better
+  line wrapping and handling double-width chars.
+
+* Added LESSUTFBINFMT environment variable to control display of
+  non-printable characters in a UTF-8 file.
+
+* Add --with-secure option to configure, to make it easier to
+  build a secure version of less.
+
+* Show search matches in the status column even if search highlights
+  are disabled via the -G option or the ESC-u command.
+
+* Improve performance when the file contains very long lines.
+
+* Add "windows" charset.
+
+* Add man page for lessecho.
+
+* Add support for erase2 character, treated same as erase.
+
+* Use ASCII lowercase/uppercase logic when operating on the command line.
+
+* Update makefile for Borland C++ 5.5.1.
+
+* Fix bug in calculating number of pages for %D prompt.
+
+* Fix bug in handling tag file error.
+
+* Fix obscure bug if input file is deleted while viewing help.
+
+* Fix bug handling filenames which include square brackets.
+
+* Fix possible buffer overflow in "global" tag search.
+
+* Fix possible buffer overflow in usage of LESSOPEN and LESSCLOSE.
+
+* Fix buffer overflow in reverse search.
 
 ======================================================================
 
+	Major changes between "less" versions 381 and 382
+
+* Removed some old copyrighted code.
+  This probably breaks OS/9 support.
+
+======================================================================
 
 	Major changes between "less" versions 378 and 381
 

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

@@ -1,7 +1,7 @@
 
-                            Less, version 381
+                            Less, version 394
 
-    This is the distribution of less, version 381, released 17 Jan 2003.
+    This is the distribution of less, version 394, released 03 Dec 2005.
     This program is part of the GNU project (http://www.gnu.org).
 
     This program is free software.  You may redistribute it and/or
@@ -57,6 +57,10 @@
         regcomp        Use the V8-compatible regcomp.
         regcomp-local  Use Henry Spencer's V8-compatible regcomp
                        (source is supplied with less).
+   --with-secure
+     Builds a "secure" version of less, with some features disabled
+	 to prevent users from viewing other files, accessing shell
+	 commands, etc.
 
 3. It is a good idea to look over the generated Makefile and defines.h
    and make sure they look ok.  If you know of any peculiarities of
@@ -67,9 +71,6 @@
        -lncurses  -lcurses  -ltermcap  -ltermlib
 
    If you wish, you may edit defines.h to remove some optional features.
-   If you wish to build a "secure" version of less (which disables all
-   features which might allow a user to do unintended things to the system
-   on which less is running), edit defines.h and define SECURE to 1.
    If you choose not to include some features in your version, you may
    wish to edit the manual page "less.nro" and the help page "less.hlp" 
    to remove the descriptions of the features which you are removing.

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

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2002  Mark Nudelman
+ * Copyright (C) 1984-2004  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/arm/src/contrib/less/ch.c#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2002  Mark Nudelman
+ * Copyright (C) 1984-2004  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/arm/src/contrib/less/charset.c#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2002  Mark Nudelman
+ * Copyright (C) 1984-2005  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.
@@ -18,8 +18,11 @@
 #if HAVE_LOCALE
 #include <locale.h>
 #include <ctype.h>
+#include <langinfo.h>
 #endif
 
+#include "charset.h"
+
 public int utf_mode = 0;
 
 /*
@@ -31,23 +34,76 @@
 	int *p_flag;
 	char *desc;
 } charsets[] = {
-	{ "ascii",	NULL,       "8bcccbcc18b95.b" },
-	{ "dos",	NULL,       "8bcccbcc12bc5b223.b" },
-	{ "ebcdic",	NULL,       "5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b." },
-	{ "IBM-1047",	NULL,       "4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc191.b" },
-	{ "iso8859",	NULL,       "8bcccbcc18b95.33b." },
-	{ "koi8-r",	NULL,       "8bcccbcc18b95.b128." },
-	{ "next",	NULL,       "8bcccbcc18b95.bb125.bb" },
-	{ "utf-8",	&utf_mode,  "8bcccbcc18b." },
+	{ "ascii",		NULL,       "8bcccbcc18b95.b" },
+	{ "utf-8",		&utf_mode,  "8bcccbcc18b95.b126.bb" },
+	{ "iso8859",		NULL,       "8bcccbcc18b95.33b." },
+	{ "latin3",		NULL,       "8bcccbcc18b95.33b5.b8.b15.b4.b12.b18.b12.b." },
+	{ "arabic",		NULL,       "8bcccbcc18b95.33b.3b.7b2.13b.3b.b26.5b19.b" },
+	{ "greek",		NULL,       "8bcccbcc18b95.33b4.2b4.b3.b35.b44.b" },
+	{ "greek2005",		NULL,       "8bcccbcc18b95.33b14.b35.b44.b" },
+	{ "hebrew",		NULL,       "8bcccbcc18b95.33b.b29.32b28.2b2.b" },
+	{ "koi8-r",		NULL,       "8bcccbcc18b95.b." },
+	{ "KOI8-T",		NULL,       "8bcccbcc18b95.b8.b6.b8.b.b.5b7.3b4.b4.b3.b.b.3b." },
+	{ "georgianps",		NULL,       "8bcccbcc18b95.3b11.4b12.2b." },
+	{ "tcvn",		NULL,       "b..b...bcccbccbbb7.8b95.b48.5b." },
+	{ "TIS-620",		NULL,       "8bcccbcc18b95.b.4b.11b7.8b." },
+	{ "next",		NULL,       "8bcccbcc18b95.bb125.bb" },
+	{ "dos",		NULL,       "8bcccbcc12bc5b95.b." },
+	{ "windows-1251",	NULL,       "8bcccbcc12bc5b95.b24.b." },
+	{ "windows-1252",	NULL,       "8bcccbcc12bc5b95.b.b11.b.2b12.b." },
+	{ "windows-1255",	NULL,       "8bcccbcc12bc5b95.b.b8.b.5b9.b.4b." },
+	{ "ebcdic",		NULL,       "5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b." },
+	{ "IBM-1047",		NULL,       "4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc191.b" },
 	{ NULL, NULL, NULL }
 };
 
+/*
+ * Support "locale charmap"/nl_langinfo(CODESET) values, as well as others.
+ */
 struct cs_alias {
 	char *name;
 	char *oname;
 } cs_aliases[] = {
-	{ "latin1",	"iso8859" },
-	{ "latin9",	"iso8859" },
+	{ "UTF-8",		"utf-8" },
+	{ "ANSI_X3.4-1968",	"ascii" },
+	{ "US-ASCII",		"ascii" },
+	{ "latin1",		"iso8859" },
+	{ "ISO-8859-1",		"iso8859" },
+	{ "latin9",		"iso8859" },
+	{ "ISO-8859-15",	"iso8859" },
+	{ "latin2",		"iso8859" },
+	{ "ISO-8859-2",		"iso8859" },
+	{ "ISO-8859-3",		"latin3" },
+	{ "latin4",		"iso8859" },
+	{ "ISO-8859-4",		"iso8859" },
+	{ "cyrillic",		"iso8859" },
+	{ "ISO-8859-5",		"iso8859" },
+	{ "ISO-8859-6",		"arabic" },
+	{ "ISO-8859-7",		"greek" },
+	{ "IBM9005",		"greek2005" },
+	{ "ISO-8859-8",		"hebrew" },
+	{ "latin5",		"iso8859" },
+	{ "ISO-8859-9",		"iso8859" },
+	{ "latin6",		"iso8859" },
+	{ "ISO-8859-10",	"iso8859" },
+	{ "latin7",		"iso8859" },
+	{ "ISO-8859-13",	"iso8859" },
+	{ "latin8",		"iso8859" },
+	{ "ISO-8859-14",	"iso8859" },
+	{ "latin10",		"iso8859" },
+	{ "ISO-8859-16",	"iso8859" },
+	{ "IBM437",		"dos" },
+	{ "EBCDIC-US",		"ebcdic" },
+	{ "IBM1047",		"IBM-1047" },
+	{ "KOI8-R",		"koi8-r" },
+	{ "KOI8-U",		"koi8-r" },
+	{ "GEORGIAN-PS",	"georgianps" },
+	{ "TCVN5712-1", 	"tcvn" },
+	{ "NEXTSTEP",		"next" },
+	{ "windows",		"windows-1252" }, /* backward compatibility */
+	{ "CP1251",		"windows-1251" },
+	{ "CP1252",		"windows-1252" },
+	{ "CP1255",		"windows-1255" },
 	{ NULL, NULL }
 };
 
@@ -56,6 +112,7 @@
 
 static char chardef[256];
 static char *binfmt = NULL;
+static char *utfbinfmt = NULL;
 public int binattr = AT_STANDOUT;
 
 
@@ -131,8 +188,9 @@
  * The valid charset names are listed in the "charsets" array.
  */
 	static int
-icharset(name)
+icharset(name, no_error)
 	register char *name;
+	int no_error;
 {
 	register struct charset *p;
 	register struct cs_alias *a;
@@ -161,9 +219,10 @@
 		}
 	}
 
-	error("invalid charset name", NULL_PARG);
-	quit(QUIT_ERROR);
-	/*NOTREACHED*/
+	if (!no_error) {
+		error("invalid charset name", NULL_PARG);
+		quit(QUIT_ERROR);
+	}
 	return (0);
 }
 
@@ -176,7 +235,6 @@
 {
 	register int c;
 
-	setlocale(LC_ALL, "");
 	for (c = 0;  c < (int) sizeof(chardef);  c++)
 	{
 		if (isprint(c))
@@ -190,17 +248,39 @@
 #endif
 
 /*
- * Define the printing format for control chars.
+ * Define the printing format for control (or binary utf) chars.
  */
-   	public void
-setbinfmt(s)
+   	static void
+setbinfmt(s, fmtvarptr, default_fmt)
 	char *s;
+	char **fmtvarptr;
+	char *default_fmt;
 {
-	if (s == NULL || *s == '\0')
-		s = "*s<%X>";
+	if (s && utf_mode)
+	{
+		/* It would be too hard to account for width otherwise.  */
+		char *t = s;
+		while (*t)
+		{
+			if (*t < ' ' || *t > '~')
+			{
+				s = default_fmt;
+				goto attr;
+			}
+			t++;
+		}
+	}
+
+	/* %n is evil */
+	if (s == NULL || *s == '\0' ||
+	    (*s == '*' && (s[1] == '\0' || s[2] == '\0' || strchr(s + 2, 'n'))) ||
+	    (*s != '*' && strchr(s, 'n')))
+		s = default_fmt;
+
 	/*
 	 * Select the attributes if it starts with "*".
 	 */
+ attr:
 	if (*s == '*')
 	{
 		switch (s[1])
@@ -213,26 +293,24 @@
 		}
 		s += 2;
 	}
-	binfmt = s;
+	*fmtvarptr = s;
 }
 
 /*
- * Initialize charset data structures.
+ *
  */
-	public void
-init_charset()
+	static void
+set_charset()
 {
-	register char *s;
+	char *s;
 
-	s = lgetenv("LESSBINFMT");
-	setbinfmt(s);
-	
 	/*
 	 * See if environment variable LESSCHARSET is defined.
 	 */
 	s = lgetenv("LESSCHARSET");
-	if (icharset(s))
+	if (icharset(s, 0))
 		return;
+
 	/*
 	 * LESSCHARSET is not defined: try LESSCHARDEF.
 	 */
@@ -243,6 +321,15 @@
 		return;
 	}
 
+#if HAVE_LOCALE
+	/*
+	 * Try using the codeset name as the charset name.
+	 */
+	s = nl_langinfo(CODESET);
+	if (icharset(s, 1))
+		return;
+#endif
+
 #if HAVE_STRSTR
 	/*
 	 * Check whether LC_ALL, LC_CTYPE or LANG look like UTF-8 is used.
@@ -251,33 +338,55 @@
 	    (s = lgetenv("LC_CTYPE")) != NULL ||
 	    (s = lgetenv("LANG")) != NULL)
 	{
-		if (strstr(s, "UTF-8") != NULL || strstr(s, "utf-8") != NULL)
-			if (icharset("utf-8"))
+		if (   strstr(s, "UTF-8") != NULL || strstr(s, "utf-8") != NULL
+		    || strstr(s, "UTF8")  != NULL || strstr(s, "utf8")  != NULL)
+			if (icharset("utf-8", 1))
 				return;
 	}
 #endif
 
 #if HAVE_LOCALE
 	/*
-	 * Use setlocale.
+	 * Get character definitions from locale functions,
+	 * rather than from predefined charset entry.
 	 */
 	ilocale();
-#else
 #if MSDOS_COMPILER
 	/*
 	 * Default to "dos".
 	 */
-	(void) icharset("dos");
+	(void) icharset("dos", 1);
 #else
 	/*
 	 * Default to "latin1".
 	 */
-	(void) icharset("latin1");
+	(void) icharset("latin1", 1);
 #endif
 #endif
 }
 
 /*
+ * Initialize charset data structures.
+ */
+	public void
+init_charset()
+{
+	char *s;
+
+#if HAVE_LOCALE
+	setlocale(LC_ALL, "");
+#endif
+
+	set_charset();
+
+	s = lgetenv("LESSBINFMT");
+	setbinfmt(s, &binfmt, "*s<%02X>");
+	
+	s = lgetenv("LESSUTFBINFMT");
+	setbinfmt(s, &utfbinfmt, "<U+%04lX>");
+}
+
+/*
  * Is a given character a "binary" character?
  */
 	public int
@@ -307,16 +416,17 @@
 prchar(c)
 	int c;
 {
-	static char buf[8];
+	/* {{ This buffer can be overrun if LESSBINFMT is a long string. }} */
+	static char buf[32];
 
 	c &= 0377;
-	if (!control_char(c))
-		sprintf(buf, "%c", c);
+	if ((c < 128 || !utf_mode) && !control_char(c))
+		SNPRINTF1(buf, sizeof(buf), "%c", c);
 	else if (c == ESC)
-		sprintf(buf, "ESC");
+		strcpy(buf, "ESC");
 #if IS_EBCDIC_HOST
 	else if (!binary_char(c) && c < 64)
-		sprintf(buf, "^%c",
+		SNPRINTF1(buf, sizeof(buf), "^%c",
 		/*
 		 * This array roughly inverts CONTROL() #defined in less.h,
 	 	 * and should be kept in sync with CONTROL() and IBM-1047.
@@ -328,9 +438,598 @@
 		"..V....D....TU.Z"[c]);
 #else
   	else if (c < 128 && !control_char(c ^ 0100))
-  		sprintf(buf, "^%c", c ^ 0100);
+  		SNPRINTF1(buf, sizeof(buf), "^%c", c ^ 0100);
 #endif
 	else
-		sprintf(buf, binfmt, c);
+		SNPRINTF1(buf, sizeof(buf), binfmt, c);
+	return (buf);
+}
+
+/*
+ * Return the printable form of a UTF-8 character.
+ */
+	public char *
+prutfchar(ch)
+	LWCHAR ch;
+{
+	static char buf[32];
+
+	if (ch == ESC)
+		strcpy(buf, "ESC");
+  	else if (ch < 128 && control_char(ch))
+	{
+		if (!control_char(ch ^ 0100))
+			SNPRINTF1(buf, sizeof(buf), "^%c", ((char) ch) ^ 0100);
+		else
+			SNPRINTF1(buf, sizeof(buf), binfmt, (char) ch);
+	} else if (is_ubin_char(ch))
+		SNPRINTF1(buf, sizeof(buf), utfbinfmt, ch);
+	else
+	{
+		int len;
+		if (ch >= 0x80000000)
+		{
+			len = 3;
+			ch = 0xFFFD;
+		} else
+		{
+			len =   (ch < 0x80) ? 1
+			      : (ch < 0x800) ? 2
+			      : (ch < 0x10000) ? 3
+			      : (ch < 0x200000) ? 4
+			      : (ch < 0x4000000) ? 5
+			      : 6;
+		}
+		buf[len] = '\0';
+		if (len == 1)
+			*buf = (char) ch;
+		else
+		{
+			*buf = ((1 << len) - 1) << (8 - len);
+			while (--len > 0)
+			{
+				buf[len] = (char) (0x80 | (ch & 0x3F));
+				ch >>= 6;
+			}
+			*buf |= ch;
+		}
+	}
 	return (buf);
 }
+
+/*
+ * Get the length of a UTF-8 character in bytes.
+ */
+	public int
+utf_len(ch)
+	char ch;
+{
+	if ((ch & 0x80) == 0)
+		return 1;
+	if ((ch & 0xE0) == 0xC0)
+		return 2;
+	if ((ch & 0xF0) == 0xE0)
+		return 3;
+	if ((ch & 0xF8) == 0xF0)
+		return 4;
+	if ((ch & 0xFC) == 0xF8)
+		return 5;
+	if ((ch & 0xFE) == 0xFC)
+		return 6;
+	/* Invalid UTF-8 encoding. */
+	return 1;
+}
+
+/*
+ * Is a UTF-8 character well-formed?
+ */
+	public int
+is_utf8_well_formed(s)
+	unsigned char *s;
+{
+	int i;
+	int len;
+
+	if (IS_UTF8_INVALID(s[0]))
+		return (0);
+
+	len = utf_len((char) s[0]);
+	if (len == 1)
+		return (1);

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



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