From cb803e4d0614c524dad992c101826e49ef276726 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 16 May 2017 23:42:07 +0200 Subject: [PATCH] Improve markup in some manual pages. Use .Fa uniformly for struct members (see mdoc(7)). --- share/man/man4/mouse.4 | 50 ++++++++++++++++----------------- share/man/man4/psm.4 | 42 ++++++++++++++-------------- share/man/man4/sysmouse.4 | 70 +++++++++++++++++++++++------------------------ 3 files changed, 81 insertions(+), 81 deletions(-) diff --git a/share/man/man4/mouse.4 b/share/man/man4/mouse.4 index 3d2445db6b..17d306054e 100644 --- a/share/man/man4/mouse.4 +++ b/share/man/man4/mouse.4 @@ -150,7 +150,7 @@ These commands manipulate the operation level of the mouse driver. .It Dv MOUSE_GETHWINFO Ar mousehw_t *hw Returns the hardware information of the attached device in the following Except for the -.Dv iftype +.Fa iftype field, the device driver may not always fill the structure with correct values. Consult manual pages of individual drivers for details of support. @@ -165,14 +165,14 @@ typedef struct mousehw { .Ed .Pp The -.Dv buttons +.Fa buttons field holds the number of buttons detected by the driver. The driver may put an arbitrary value, such as two, in this field, if it cannot determine the exact number. .Pp The -.Dv iftype +.Fa iftype is the type of interface: .Dv MOUSE_IF_SERIAL , .Dv MOUSE_IF_BUS , @@ -184,7 +184,7 @@ or .Dv MOUSE_IF_UNKNOWN . .Pp The -.Dv type +.Fa type tells the device type: .Dv MOUSE_MOUSE , .Dv MOUSE_TRACKBALL , @@ -194,7 +194,7 @@ or .Dv MOUSE_UNKNOWN . .Pp The -.Dv model +.Fa model may be .Dv MOUSE_MODEL_GENERIC or one of @@ -202,7 +202,7 @@ or one of constants. .Pp The -.Dv hwid +.Fa hwid is the ID value returned by the pointing device. It depend on the interface type; refer to the manual page of @@ -223,7 +223,7 @@ typedef struct mousemode { .Ed .Pp The -.Dv protocol +.Fa protocol field tells the format in which the device status is returned when the mouse data is read by the user program. It is one of @@ -231,38 +231,38 @@ It is one of constants. .Pp The -.Dv rate +.Fa rate field is the status report rate (reports/sec) at which the device will send movement reports to the host computer. -1 if unknown or not applicable. .Pp The -.Dv resolution +.Fa resolution field holds a value specifying resolution of the pointing device. It is a positive value or one of .Dv MOUSE_RES_XXX constants. .Pp The -.Dv accelfactor +.Fa accelfactor field holds a value to control acceleration feature. It must be zero or greater. If it is zero, acceleration is disabled. .Pp The -.Dv packetsize +.Fa packetsize field tells the length of the fixed-size data packet or the length of the fixed part of the variable-length packet. The size depends on the interface type, the device type and model, the protocol and the operation level of the driver. .Pp The array -.Dv syncmask +.Fa syncmask holds a bit mask and pattern to detect the first byte of the data packet. -.Dv syncmask[0] +.Fa syncmask Ns Bq 0 is the bit mask to be ANDed with a byte. If the result is equal to -.Dv syncmask[1] , +.Fa syncmask Ns Bq 1 , the byte is likely to be the first byte of the data packet. Note that this method of detecting the first byte is not 100% reliable, thus, should be taken only as an advisory measure. @@ -272,11 +272,11 @@ The command changes the current operation parameters of the mouse driver as specified in .Ar mode . Only -.Dv rate , -.Dv resolution , -.Dv level +.Fa rate , +.Fa resolution , +.Fa level and -.Dv accelfactor +.Fa accelfactor may be modifiable. Setting values in the other field does not generate error and has no effect. @@ -284,9 +284,9 @@ error and has no effect. If you do not want to change the current setting of a field, put -1 there. You may also put zero in -.Dv resolution +.Fa resolution and -.Dv rate , +.Fa rate , and the default value for the fields will be selected. .\" .Pp .\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars @@ -320,7 +320,7 @@ typedef struct mousedata { .Ed .Pp The calling process must fill the -.Dv len +.Fa len field with the number of bytes to be read into the buffer. This command may not be supported by all drivers. .Pp @@ -344,9 +344,9 @@ typedef struct mousestatus { .Ed .Pp The -.Dv button +.Fa button and -.Dv obutton +.Fa obutton fields hold the current and the previous state of the mouse buttons. When a button is pressed, the corresponding bit is set. The mouse drivers may support up to 31 buttons with the bit 0 through 31. @@ -359,12 +359,12 @@ The first three buttons correspond to left, middle and right buttons. If the state of the button has changed since the last .Dv MOUSE_GETSTATUS call, the corresponding bit in the -.Dv flags +.Fa flags field will be set. If the mouse has moved since the last call, the .Dv MOUSE_POSCHANGED bit in the -.Dv flags +.Fa flags field will also be set. .Pp The other fields hold movement counts since the last diff --git a/share/man/man4/psm.4 b/share/man/man4/psm.4 index eae5134cec..97996322a1 100644 --- a/share/man/man4/psm.4 +++ b/share/man/man4/psm.4 @@ -396,7 +396,7 @@ typedef struct mousehw { .Ed .Pp The -.Dv buttons +.Fa buttons field holds the number of buttons on the device. The .Nm @@ -408,12 +408,12 @@ However, it will not affect the operation of the driver. .Pp The -.Dv iftype +.Fa iftype is always .Dv MOUSE_IF_PS2 . .Pp The -.Dv type +.Fa type tells the device type: .Dv MOUSE_MOUSE , .Dv MOUSE_TRACKBALL , @@ -426,7 +426,7 @@ driver may not always, in fact it is very rarely able to, identify the device type. .Pp The -.Dv model +.Fa model is always .Dv MOUSE_MODEL_GENERIC at the operation level 0. @@ -440,7 +440,7 @@ Again the driver may or may not set an appropriate value in this field. .Pp The -.Dv hwid +.Fa hwid is the ID value returned by the device. Known IDs include: .Pp @@ -499,7 +499,7 @@ typedef struct mousemode { .Ed .Pp The -.Dv protocol +.Fa protocol is .Dv MOUSE_PROTO_PS2 at the operation level zero and two. @@ -507,14 +507,14 @@ at the operation level zero and two. at the operation level one. .Pp The -.Dv rate +.Fa rate is the status report rate (reports/sec) at which the device will send movement report to the host computer. Typical supported values are 10, 20, 40, 60, 80, 100 and 200. Some mice may accept other arbitrary values too. .Pp The -.Dv resolution +.Fa resolution of the pointing device must be one of .Dv MOUSE_RES_XXX constants or a positive value. @@ -537,14 +537,14 @@ Typical resolutions are: .El .Pp The -.Dv accelfactor +.Fa accelfactor field holds a value to control acceleration feature (see .Sx Acceleration ) . It must be zero or greater. If it is zero, acceleration is disabled. .Pp The -.Dv packetsize +.Fa packetsize field specifies the length of the data packet. It depends on the operation level and the model of the pointing device. @@ -559,13 +559,13 @@ Depends on the model of the device .El .Pp The array -.Dv syncmask +.Fa syncmask holds a bit mask and pattern to detect the first byte of the data packet. -.Dv syncmask[0] +.Fa syncmask Ns Bq 0 is the bit mask to be ANDed with a byte. If the result is equal to -.Dv syncmask[1] , +.Fa syncmask Ns Bq 1 , the byte is likely to be the first byte of the data packet. Note that this detection method is not 100% reliable, thus, should be taken only as an advisory measure. @@ -575,11 +575,11 @@ The command changes the current operation parameters of the mouse driver as specified in .Ar mode . Only -.Dv rate , -.Dv resolution , -.Dv level +.Fa rate , +.Fa resolution , +.Fa level and -.Dv accelfactor +.Fa accelfactor may be modifiable. Setting values in the other field does not generate error and has no effect. @@ -587,9 +587,9 @@ error and has no effect. If you do not want to change the current setting of a field, put -1 there. You may also put zero in -.Dv resolution +.Fa resolution and -.Dv rate , +.Fa rate , and the default value for the fields will be selected. .\" .Pp .\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars @@ -609,14 +609,14 @@ and the default value for the fields will be selected. .\" .Pp .\" Upon returning to the user program, the driver will place the number .\" of valid data bytes in the buffer in the -.\" .Dv len +.\" .Fa len .\" field. .\" .Pp .It Dv MOUSE_READSTATE Ar mousedata_t *state .\" The command reads the hardware settings from the device. .\" Upon returning to the user program, the driver will place the number .\" of valid data bytes in the buffer in the -.\" .Dv len +.\" .Fa len .\" field. It is usually 3 bytes. .\" The buffer is formatted as follows: .\" .Pp diff --git a/share/man/man4/sysmouse.4 b/share/man/man4/sysmouse.4 index 63ec61d468..cda1101c66 100644 --- a/share/man/man4/sysmouse.4 +++ b/share/man/man4/sysmouse.4 @@ -144,7 +144,7 @@ These commands manipulate the operation level of the mouse driver. .It Dv MOUSE_GETHWINFO Ar mousehw_t *hw Returns the hardware information of the attached device in the following structure. Only the -.Dv iftype +.Fa iftype field is guaranteed to be filled with the correct value in the current version of the .Nm @@ -160,16 +160,16 @@ typedef struct mousehw { .Ed .Pp The -.Dv buttons +.Fa buttons field holds the number of buttons detected by the driver. .Pp The -.Dv iftype +.Fa iftype is always .Dv MOUSE_IF_SYSMOUSE . .Pp The -.Dv type +.Fa type tells the device type: .Dv MOUSE_MOUSE , .Dv MOUSE_TRACKBALL , @@ -179,7 +179,7 @@ or .Dv MOUSE_UNKNOWN . .Pp The -.Dv model +.Fa model is always .Dv MOUSE_MODEL_GENERIC at the operation level 0. @@ -190,7 +190,7 @@ or one of constants at higher operation levels. .Pp The -.Dv hwid +.Fa hwid is always zero. .Pp .It Dv MOUSE_GETMODE Ar mousemode_t *mode @@ -209,7 +209,7 @@ typedef struct mousemode { .Ed .Pp The -.Dv protocol +.Fa protocol field tells the format in which the device status is returned when the mouse data is read by the user program. It is @@ -219,19 +219,19 @@ at the operation level zero. at the operation level one. .Pp The -.Dv rate +.Fa rate is always set to -1. .Pp The -.Dv resolution +.Fa resolution is always set to -1. .Pp The -.Dv accelfactor +.Fa accelfactor is always 0. .Pp The -.Dv packetsize +.Fa packetsize field specifies the length of the data packet. It depends on the operation level. @@ -244,13 +244,13 @@ operation level. .El .Pp The array -.Dv syncmask +.Fa syncmask holds a bit mask and pattern to detect the first byte of the data packet. -.Dv syncmask[0] +.Fa syncmask Ns Bq 0 is the bit mask to be ANDed with a byte. If the result is equal to -.Dv syncmask[1] , +.Fa syncmask Ns Bq 1 , the byte is likely to be the first byte of the data packet. Note that this method of detecting the first byte is not 100% reliable; thus, it should be taken only as an advisory measure. @@ -260,7 +260,7 @@ The command changes the current operation parameters of the mouse driver as specified in .Ar mode . Only -.Dv level +.Fa level may be modifiable. Setting values in the other field does not generate error and has no effect. @@ -319,7 +319,7 @@ struct mouse_info { .Ed .Pp .Bl -tag -width operation -compact -.It Dv operation +.It Fa operation This can be one of .Pp .Bl -tag -width MOUSE_MOVEABS -compact @@ -329,21 +329,21 @@ Enables and displays mouse cursor. Disables and hides mouse cursor. .It Dv MOUSE_MOVEABS Moves mouse cursor to position supplied in -.Dv u.data . +.Fa u.data . .It Dv MOUSE_MOVEREL Adds position supplied in -.Dv u.data +.Fa u.data to current position. .It Dv MOUSE_GETINFO Returns current mouse position in the current virtual console and button status in -.Dv u.data . +.Fa u.data . .It Dv MOUSE_MODE This sets the .Xr signal 3 to be delivered to the current process when a button is pressed. The signal to be delivered is set in -.Dv u.mode . +.Fa u.mode . .El .Pp The above operations are for virtual consoles. @@ -356,7 +356,7 @@ to pass mouse data to the console driver. .It Dv MOUSE_ACTION .It Dv MOUSE_MOTIONEVENT These operations take the information in -.Dv u.data +.Fa u.data and act upon it. Mouse data will be sent to the .Nm driver if it is open. @@ -365,7 +365,7 @@ also processes button press actions and sends signal to the process if requested or performs cut and paste operations if the current console is a text interface. .It Dv MOUSE_BUTTONEVENT -.Dv u.data +.Fa u.data specifies a button and its click count. The console driver will use this information for signal delivery if requested or @@ -380,11 +380,11 @@ They are intended to replace functions performed by .Dv MOUSE_ACTION alone. .Pp -.It Dv u +.It Fa u This union is one of .Pp .Bl -tag -width data -compact -.It Dv data +.It Fa data .Bd -literal struct mouse_data { int x; @@ -394,17 +394,17 @@ struct mouse_data { }; .Ed .Pp -.Dv x , -.Dv y +.Fa x , +.Fa y and -.Dv z +.Fa z represent movement of the mouse along respective directions. -.Dv buttons +.Fa buttons tells the state of buttons. It encodes up to 31 buttons in the bit 0 though the bit 30. If a button is held down, the corresponding bit is set. .Pp -.It Dv mode +.It Fa mode .Bd -literal struct mouse_mode { int mode; @@ -413,16 +413,16 @@ struct mouse_mode { .Ed .Pp The -.Dv signal +.Fa signal field specifies the signal to be delivered to the process. It must be one of the values defined in .In signal.h . The -.Dv mode +.Fa mode field is currently unused. .Pp -.It Dv event +.It Fa event .Bd -literal struct mouse_event { int id; @@ -431,12 +431,12 @@ struct mouse_event { .Ed .Pp The -.Dv id +.Fa id field specifies a button number as in -.Dv u.data.buttons . +.Fa u.data.buttons . Only one bit/button is set. The -.Dv value +.Fa value field holds the click count: the number of times the user has clicked the button successively. -- 2.11.4.GIT