Bug 117798

Summary: formatting oddity in sysmouse(4)
Product: Documentation Reporter: Poul-Henning Kamp <phk>
Component: Books & ArticlesAssignee: Tom Rhodes <trhodes>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Poul-Henning Kamp 2007-11-03 22:00:01 UTC
	man 4 sysmouse has a formatting oddity:

                MOUSE_MOTION_EVENT and MOUSE_BUTTON_EVENT are newer interface
                and are designed to be used together.  They are intended to
                replace functions performed by MOUSE_ACTION alone.

     u          This union is one of

                data

                      struct mouse_data {
                          int x;
Comment 1 Maxim Konovalov 2007-11-03 22:23:13 UTC
> >Description:
> 	man 4 sysmouse has a formatting oddity:
>
>                 MOUSE_MOTION_EVENT and MOUSE_BUTTON_EVENT are newer interface
>                 and are designed to be used together.  They are intended to
>                 replace functions performed by MOUSE_ACTION alone.
>
>      u          This union is one of
>
>                 data
>
>                       struct mouse_data {
>                           int x;
>
>
Why do you think so?  This section describes "union u" from struct
mouse_info.

-- 
Maxim Konovalov
Comment 2 Poul-Henning Kamp 2007-11-03 23:11:45 UTC
In message <20071104012124.S24106@mp2.macomnet.net>, Maxim Konovalov writes:
>> >Description:
>> 	man 4 sysmouse has a formatting oddity:
>>
>>                 MOUSE_MOTION_EVENT and MOUSE_BUTTON_EVENT are newer interface
>>                 and are designed to be used together.  They are intended to
>>                 replace functions performed by MOUSE_ACTION alone.
>>
>>      u          This union is one of
>>
>>                 data
>>
>>                       struct mouse_data {
>>                           int x;
>>
>>
>Why do you think so?  This section describes "union u" from struct
>mouse_info.

While it may be technically correctly formatted, it certainly looks
confusing to the casual user.

The the union had been more sensibly named, it would not be a problem,
but for a single letter name like 'u', I'd propos quoting it, to make
it clear that it is the actual and entire name.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-01-11 21:59:56 UTC
Author: trhodes
Date: Sun Jan 11 21:59:42 2009
New Revision: 187066
URL: http://svn.freebsd.org/changeset/base/187066

Log:
  Quote the "u" as it's the name of the union, this may prevent
  some confusion when reading the manual page.
  
  PR:		117798
  Discussed with:	keramida, brueffer
  Recommended by:	phk

Modified:
  head/share/man/man4/sysmouse.4

Modified: head/share/man/man4/sysmouse.4
==============================================================================
--- head/share/man/man4/sysmouse.4	Sun Jan 11 21:45:23 2009	(r187065)
+++ head/share/man/man4/sysmouse.4	Sun Jan 11 21:59:42 2009	(r187066)
@@ -385,7 +385,7 @@ They are intended to replace functions p
 .Dv MOUSE_ACTION
 alone.
 .Pp
-.It Dv u
+.It Dv Sq u
 This union is one of
 .Pp
 .Bl -tag -width data -compact
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 4 Tom Rhodes freebsd_committer freebsd_triage 2009-01-11 22:06:58 UTC
State Changed
From-To: open->patched

Fix committed, thanks! 


Comment 5 Tom Rhodes freebsd_committer freebsd_triage 2009-01-11 22:06:58 UTC
Responsible Changed
From-To: freebsd-doc->trhodes

Over to me, MFC reminder.
Comment 6 Glen Barber freebsd_committer freebsd_triage 2011-06-14 23:37:20 UTC
State Changed
From-To: patched->closed

MFCd to stable/7.
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-06-14 23:37:37 UTC
Author: gjb (doc committer)
Date: Tue Jun 14 22:37:09 2011
New Revision: 223100
URL: http://svn.freebsd.org/changeset/base/223100

Log:
  MFC 187066 by trhodes:
  
  Quote the "u" as it's the name of the union, this may prevent
  some confusion when reading the manual page.
  
  PR:		117798

Modified:
  stable/7/share/man/man4/sysmouse.4
Directory Properties:
  stable/7/share/man/man4/   (props changed)

Modified: stable/7/share/man/man4/sysmouse.4
==============================================================================
--- stable/7/share/man/man4/sysmouse.4	Tue Jun 14 21:37:25 2011	(r223099)
+++ stable/7/share/man/man4/sysmouse.4	Tue Jun 14 22:37:09 2011	(r223100)
@@ -385,7 +385,7 @@ They are intended to replace functions p
 .Dv MOUSE_ACTION
 alone.
 .Pp
-.It Dv u
+.It Dv Sq u
 This union is one of
 .Pp
 .Bl -tag -width data -compact
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"