Module Name:    src
Committed By:   uwe
Date:           Tue Jan 18 23:36:07 UTC 2011

Modified Files:
        src/share/man/man7: operator.7
        src/share/misc: operator

Log Message:
Bring over improvements from FreeBSD.

  List all of the assignment operators explicitly, for those who have
  been traumatized by perl.

  Add C++ operators (from Christoph Mallon <[email protected]>)

Markup improvements to make PostScript output pretty.

Bring back FILES section now that /usr/share/misc/operator is
resurrected.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man7/operator.7
cvs rdiff -u -r1.3 -r1.4 src/share/misc/operator

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man7/operator.7
diff -u src/share/man/man7/operator.7:1.10 src/share/man/man7/operator.7:1.11
--- src/share/man/man7/operator.7:1.10	Mon Jan 17 11:19:07 2011
+++ src/share/man/man7/operator.7	Tue Jan 18 23:36:07 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: operator.7,v 1.10 2011/01/17 11:19:07 jruoho Exp $
+.\"	$NetBSD: operator.7,v 1.11 2011/01/18 23:36:07 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,31 +29,78 @@
 .\"
 .\"	@(#)operator.7	8.1 (Berkeley) 6/9/93
 .\"
-.Dd January 17, 2011
+.Dd January 18, 2011
 .Dt OPERATOR 7
 .Os
 .Sh NAME
 .Nm operator
-.Nd C operator precedence and associativity
+.Nd C and C++ operator precedence and associativity
 .Sh DESCRIPTION
-.Bl -column \
-"! ~ ++ -- - (type) * \*[Am] sizeof" "Associativity" -offset indent
-.It Sy Operator	Associativity
-.It \&() [] -\*[Gt] .	left to right
-.It "! ~ ++ -- - (type) * \*[Am] sizeof"	right to left
-.It \&* / %	left to right
-.It \&+ -	left to right
-.It \&\*[Lt]\*[Lt] \*[Gt]\*[Gt]	left to right
-.It \&\*[Lt] \*[Le] \*[Gt] \*[Ge]	left to right
-.It \&== !=	left to right
-.It \&\*[Am]	left to right
-.It \&^	left to right
-.It \&|	left to right
-.It \&\*[Am]\*[Am]	left to right
-.It \&||	left to right
-.It \&?:	right to left
-.It \&= += -= etc.	right to left
-.It \&,	left to right
+.Bl -column -offset indent \
+    ".Li \&! ~ ++ \-\- \- (type) * \*[Am] sizeof new delete" \
+    ".Sy Associativity"
+.\"
+.It Sy Operator \
+ Ta Sy Associativity
+.\"
+.\" XXX: For some reason if anything but tab follows the last dot
+.\" XXX: the space before it is lost and we get ->. in the output.
+.\" XXX: My troff fu is weak, just work around with explicit \<space>.
+.It Li \&() [] \-\*[Gt]\ \. \
+ Ta left to right
+.\"
+.It Li \&! ~ ++ \-\- \- (type) * \*[Am] sizeof new delete \
+ Ta right to left
+.\"
+.It Li \&\-\*[Gt]* .* \
+ Ta left to right
+.\"
+.It Li \&* / % \
+ Ta left to right
+.\"
+.It Li \&+ \- \
+ Ta left to right
+.\"
+.It Li \&\*[Lt]\*[Lt] \*[Gt]\*[Gt] \
+ Ta left to right
+.\"
+.It Li \&\*[Lt] \*[Lt]= \*[Gt] \*[Gt]= \
+ Ta left to right
+.\"
+.It Li \&== != \
+ Ta left to right
+.\"
+.It Li \&\*[Am] \
+ Ta left to right
+.\"
+.It Li \&^ \
+ Ta left to right
+.\"
+.It Li \&| \
+ Ta left to right
+.\"
+.It Li \&\*[Am]\*[Am] \
+ Ta left to right
+.\"
+.It Li \&|| \
+ Ta left to right
+.\"
+.It Li \&?: \
+ Ta right to left
+.\"
+.It Li \&= += \-= *= /= %= \*[Lt]\*[Lt]= \*[Gt]\*[Gt]= \*[Am]= ^= |= throw \
+ Ta right to left
+.\"
+.It Li \&?: No (C++, third operand)\
+ Ta right to left
+.\"
+.It Li \&, \
+ Ta left to right
+.\"
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/misc/operator" -compact
+.It Pa /usr/share/misc/operator
 .El
 .Sh SEE ALSO
 .Xr iso646 3

Index: src/share/misc/operator
diff -u src/share/misc/operator:1.3 src/share/misc/operator:1.4
--- src/share/misc/operator:1.3	Tue Jan 18 23:12:38 2011
+++ src/share/misc/operator	Tue Jan 18 23:36:06 2011
@@ -1,17 +1,19 @@
-Operator			Associativity
------------------------------------------------
-() [] -> .			left to right
-! ~ ++ -- - (type) * & sizeof	right to left
-* / %				left to right
-+ -				left to right
-<< >>				left to right
-< <= > >=			left to right
-== !=				left to right
-&				left to right
-^				left to right
-|				left to right
-&&				left to right
-||				left to right
-?:				right to left
-= += -= etc.			right to left
-,				left to right
+Operator					Associativity
+-------------------------------------------------------------
+() [] -> .					left to right
+! ~ ++ -- - (type) * & sizeof new delete	right to left
+->* .*						left to right
+* / %						left to right
++ -						left to right
+<< >>						left to right
+< <= > >=					left to right
+== !=						left to right
+&						left to right
+^						left to right
+|						left to right
+&&						left to right
+||						left to right
+?:						right to left
+= += -= *= /= %= <<= >>= &= ^= |= throw		right to left
+?: (C++, third operand)				right to left
+,						left to right

Reply via email to