Subject: misc/28444: XFree86: resource configuration examples broken in man pages
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <igor@string1.ciencias.uniovi.es>
List: netbsd-bugs
Date: 11/28/2004 16:51:00
>Number:         28444
>Category:       misc
>Synopsis:       XFree86: resource configuration examples broken in man pages
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    misc-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 28 16:51:00 +0000 2004
>Originator:     Igor Sobrado
>Release:        NetBSD 2.0_RC5
>Organization:
	University of Oviedo
>Environment:
System: NetBSD altair.ciencias.uniovi.es 2.0_RC5 NetBSD 2.0_RC5 (GENERIC_LAPTOP) #0: Sat Nov 13 06:57:47 CET 2004 tecneeq@ascent:/home/tecneeq/builds/NetBSD-2.0_RC5-i386-obj/sys/arch/i386/compile/GENERIC_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
	It seems that NetBSD 2.0 RC5 XFree86 man pages have some
	problems.  All examples of resource configuration files
	have format problems.  For example, let me show the output
	of xclipboard(1):

[...]
SENDING/RETRIEVING CLIPBOARD CONTENTS
       Text  is copied to the clipboard whenever a client asserts ownership of
       the CLIPBOARD selection.  Text is copied from the clipboard whenever  a
       client  requests  the contents of the CLIPBOARD selection.  Examples of
       event bindings that a user may wish to include in a resource configura-
       tion file to use the clipboard are:

       *VT100.Translations: #override <Btn3Up>:select-end(CLIPBOARD) \n<Btn2Up>:
insert-selection(PRIMARY,CLIPBOARD) \n<Btn2Down>:ignore ()
[...]

Obviously, it should look something like:

[...]
SENDING/RETRIEVING CLIPBOARD CONTENTS
       Text  is copied to the clipboard whenever a client asserts ownership of
       the CLIPBOARD selection.  Text is copied from the clipboard whenever  a
       client  requests  the contents of the CLIPBOARD selection.  Examples of
       event bindings that a user may wish to include in a resource configura-
       tion file to use the clipboard are:

       *VT100.Translations: #override \
            <Btn3Up>:                select-end(CLIPBOARD) \n\
            <Btn2Up>:                insert-selection(PRIMARY,CLIPBOARD) \n\
            <Btn2Down>:              ignore ()
[...]

It is even worst in man pages like xterm(1)!

[...]
       The default bindings in the VT102 window are:

                     Shift <KeyPress> Prior:scroll-back(1,halfpage) \n
 Shift <KeyPress> Next:scroll-forw(1,halfpage) \n         Shift <KeyPress> Selec
t:select-cursor-start()                                  select-cursor-end(PRIMA
RY, CUT_BUFFER0) \n         Shift <KeyPress> Insert:insert-selection(PRIMARY, CU
T_BUFFER0) \n    Shift~Ctrl <KeyPress> KP_Add:larger-vt-font() \n    Shift Ctrl
<KeyPress> KP_Add:smaller-vt-font() \n    Shift <KeyPress> KP_Subtract:smaller-v
t-font() \n                ~Meta <KeyPress>:insert-seven-bit() \n
  Meta <KeyPress>:insert-eight-bit() \n                !Ctrl <Btn1Down>:popup-me
nu(mainMenu) \n           !Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \n !Lock Ct
rl @Num_Lock <Btn1Down>:popup-menu(mainMenu) \n     ! @Num_Lock Ctrl <Btn1Down>:
popup-menu(mainMenu) \n                ~Meta <Btn1Down>:select-start() \n
[...]

>How-To-Repeat:
	Reading the man pages related with XFree86.
>Fix:
	I have identified SOME broken pages:


--- Xaw.3	2004-11-13 04:27:10.000000000 +0100
+++ Xaw.3.new	2004-11-28 17:23:55.000000000 +0100
@@ -90,9 +90,9 @@
 Here is a sample translation to make a label widget behave like a button:
 .PP
 .nf
-<Map>:      get-values(1, $fg, foreground, $bg, background)\\n\<Btn1Down>: set-values(1, foreground, yellow, background, gray30)\\n\<Btn1Up>:   set-values(1, foreground, $fg, background, $bg)
-
-
+<Map>:      get-values(1, $fg, foreground, $bg, background)\\n\\
+<Btn1Down>: set-values(1, foreground, yellow, background, gray30)\\n\\
+<Btn1Up>:   set-values(1, foreground, $fg, background, $bg)
 .fi
 .SH DISPLAY LISTS
 All of the \fBXaw\fP widgets have now the additional resource
@@ -398,10 +398,10 @@
 .PP
 Example for drawing a shadow effect in a widget:
 .nf
-foreground gray30;\draw-lines +1,-1,-1,-1,-1,+1;\foreground gray85;\draw-lines -1,+0,+0,+0,+0,-1
-
-
-
+foreground gray30;\\
+draw-lines +1,-1,-1,-1,-1,+1;\\
+foreground gray85;\\
+draw-lines -1,+0,+0,+0,+0,-1
 .fi
 .SH PIXMAPS
 A String to Pixmap converter has been  added to \fBXaw\fP.  This converter



--- xclipboard.1	2004-11-13 04:49:54.000000000 +0100
+++ xclipboard.1.new	2004-11-28 16:56:05.000000000 +0100
@@ -122,10 +122,10 @@
 .nf
 .TA .5i
 .ta .5i 3.0i
-*VT100.Translations: #override \	<Btn3Up>:	select-end(CLIPBOARD) \\n\	<Btn2Up>:	insert-selection(PRIMARY,CLIPBOARD) \\n\	<Btn2Down>:	ignore ()
-
-
-
+*VT100.Translations: #override \\
+	<Btn3Up>:	select-end(CLIPBOARD) \\n\\
+	<Btn2Up>:	insert-selection(PRIMARY,CLIPBOARD) \\n\\
+	<Btn2Down>:	ignore ()
 
 .fi
 .sp



--- xdm.1	2004-11-13 04:50:36.000000000 +0100
+++ xdm.1.new	2004-11-28 16:59:36.000000000 +0100
@@ -855,10 +855,10 @@
 .nf
 .ta .5i 1i
 
-	xlogin*login.translations: #override\		Ctrl<Key>R: abort-display()\\n\		<Key>F1: set-session-argument(failsafe) finish-field()\\n\		<Key>Return: set-session-argument() finish-field()
-
-
-
+	xlogin*login.translations: #override\\
+		Ctrl<Key>R: abort-display()\\n\\
+		<Key>F1: set-session-argument(failsafe) finish-field()\\n\\
+		<Key>Return: set-session-argument() finish-field()
 	xlogin*borderWidth: 3
 	xlogin*greeting: CLIENTHOST
 \&	#ifdef COLOR



--- xmh.1	2004-11-13 04:54:17.000000000 +0100
+++ xmh.1.new	2004-11-28 17:06:09.000000000 +0100
@@ -1344,35 +1344,45 @@
 Xmh*CommandButtonCount:		5
 
 Xmh*commandBox.button1.label:	Inc
-Xmh*commandBox.button1.translations: #override\	<Btn1Down>,<Btn1Up>: XmhIncorporateNewMail() unset()
-
+Xmh*commandBox.button1.translations: #override\\
+	<Btn1Down>,<Btn1Up>: XmhIncorporateNewMail() unset()
 
 Xmh*commandBox.button2.label:	Compose
-Xmh*commandBox.button2.translations: #override\	<Btn1Down>,<Btn1Up>: XmhComposeMessage() unset()
-
+Xmh*commandBox.button2.translations: #override\\
+	<Btn1Down>,<Btn1Up>: XmhComposeMessage() unset()
 
 Xmh*commandBox.button3.label:	Next
-Xmh*commandBox.button3.translations: #override\	<Btn1Down>,<Btn1Up>: XmhViewNextMessage() unset()
-
+Xmh*commandBox.button3.translations: #override\\
+	<Btn1Down>,<Btn1Up>: XmhViewNextMessage() unset()
 
 Xmh*commandBox.button4.label:	Delete
-Xmh*commandBox.button4.translations: #override\	<Btn1Down>,<Btn1Up>: XmhMarkDelete() unset()
-
+Xmh*commandBox.button4.translations: #override\\
+	<Btn1Down>,<Btn1Up>: XmhMarkDelete() unset()
 
 Xmh*commandBox.button5.label:	Commit
-Xmh*commandBox.button5.translations: #override\	<Btn1Down>,<Btn1Up>: XmhCommitChanges() unset()
-
+Xmh*commandBox.button5.translations: #override\\
+	<Btn1Down>,<Btn1Up>: XmhCommitChanges() unset()
 
 ! To redefine the accelerator bindings to exclude modifier keys,
 ! and add your own keyboard accelerator for Compose Message:
 
-Xmh*tocMenu.accelerators: #override\\n\	!:<Key>I:	XmhIncorporateNewMail()\\n\	!:<Key>C: 	XmhCommitChanges()\\n\	!:<Key>R:	XmhForceRescan()\\n\	!:<Key>P:	XmhPackFolder()\\n\	!:<Key>S:	XmhSortFolder()\\n
-
-
-
-
-
-Xmh*messageMenu.accelerators: #override\\n\	!:<Key>E:	XmhComposeMessage()\\n\	!<Key>space:    XmhViewNextMessage()\\n\	!:<Key>c:	XmhMarkCopy()\\n\	!:<Key>d:	XmhMarkDelete()\\n\	!:<Key>f:	XmhForward()\\n\	!:<Key>m:	XmhMarkMove()\\n\	!:<Key>n:	XmhViewNextMessage()\\n\	!:<Key>p:	XmhViewPreviousMessage()\\n\	!:<Key>r:	XmhReply()\\n\	!:<Key>u:	XmhUnmark()\\n
+Xmh*tocMenu.accelerators: #override\\n\\
+	!:<Key>I:	XmhIncorporateNewMail()\\n\\
+	!:<Key>C: 	XmhCommitChanges()\\n\\
+	!:<Key>R:	XmhForceRescan()\\n\\
+	!:<Key>P:	XmhPackFolder()\\n\\
+	!:<Key>S:	XmhSortFolder()\\n
+Xmh*messageMenu.accelerators: #override\\n\\
+	!:<Key>E:	XmhComposeMessage()\\n\\
+	!<Key>space:    XmhViewNextMessage()\\n\\
+	!:<Key>c:	XmhMarkCopy()\\n\\
+	!:<Key>d:	XmhMarkDelete()\\n\\
+	!:<Key>f:	XmhForward()\\n\\
+	!:<Key>m:	XmhMarkMove()\\n\\
+	!:<Key>n:	XmhViewNextMessage()\\n\\
+	!:<Key>p:	XmhViewPreviousMessage()\\n\\
+	!:<Key>r:	XmhReply()\\n\\
+	!:<Key>u:	XmhUnmark()\\n
 .fi
 .PP
 \fIxmh\fR provides action procedures



--- xterm.1	2004-11-13 04:55:34.000000000 +0100
+++ xterm.1.new	2004-11-28 17:16:16.000000000 +0100
@@ -3140,7 +3140,47 @@
 .ta 2.5i
 .ft C			\" Courier
 .nf
-          Shift <KeyPress> Prior:scroll-back(1,halfpage) \\n\           Shift <KeyPress> Next:scroll-forw(1,halfpage) \\n\         Shift <KeyPress> Select:select-cursor-start() \                                 select-cursor-end(PRIMARY, CUT_BUFFER0) \\n\         Shift <KeyPress> Insert:insert-selection(PRIMARY, CUT_BUFFER0) \\n\    Shift~Ctrl <KeyPress> KP_Add:larger-vt-font() \\n\    Shift Ctrl <KeyPress> KP_Add:smaller-vt-font() \\n\    Shift <KeyPress> KP_Subtract:smaller-vt-font() \\n\                ~Meta <KeyPress>:insert-seven-bit() \\n\                 Meta <KeyPress>:insert-eight-bit() \\n\                !Ctrl <Btn1Down>:popup-menu(mainMenu) \\n\           !Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \\n\ !Lock Ctrl @Num_Lock <Btn1Down>:popup-menu(mainMenu) \\n\     ! @Num_Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \\n\                ~Meta <Btn1Down>:select-start() \\n\              ~Meta <Btn1Motion>:select-extend() \\n\                !Ctrl <Btn2Down>:popup-menu(v
 tMenu) \\n\           !Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \\n\ !Lock Ctrl @Num_Lock <Btn2Down>:popup-menu(vtMenu) \\n\     ! @Num_Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \\n\          ~Ctrl ~Meta <Btn2Down>:ignore() \\n\                 Meta <Btn2Down>:clear-saved-lines() \\n\            ~Ctrl ~Meta <Btn2Up>:insert-selection(PRIMARY, CUT_BUFFER0) \\n\                !Ctrl <Btn3Down>:popup-menu(fontMenu) \\n\           !Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \\n\ !Lock Ctrl @Num_Lock <Btn3Down>:popup-menu(fontMenu) \\n\     ! @Num_Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \\n\          ~Ctrl ~Meta <Btn3Down>:start-extend() \\n\              ~Meta <Btn3Motion>:select-extend() \\n\                 Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \\n\            Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \\n\  Lock @Num_Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \\n\       @Num_Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \\n\                      <Btn4Down>:scroll-ba
 ck(5,line,m)     \\n\                 Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \\n\            Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \\n\  Lock @Num_Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \\n\       @Num_Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \\n\                      <Btn5Down>:scroll-forw(5,line,m)     \\n\                         <BtnUp>:select-end(PRIMARY, CUT_BUFFER0) \\n\                       <BtnDown>:bell(0)
+          Shift <KeyPress> Prior:scroll-back(1,halfpage) \\n\\
+           Shift <KeyPress> Next:scroll-forw(1,halfpage) \\n\\
+         Shift <KeyPress> Select:select-cursor-start() \\
+                                 select-cursor-end(PRIMARY, CUT_BUFFER0) \\n\\
+         Shift <KeyPress> Insert:insert-selection(PRIMARY, CUT_BUFFER0) \\n\\
+    Shift~Ctrl <KeyPress> KP_Add:larger-vt-font() \\n\\
+    Shift Ctrl <KeyPress> KP_Add:smaller-vt-font() \\n\\
+    Shift <KeyPress> KP_Subtract:smaller-vt-font() \\n\\
+                ~Meta <KeyPress>:insert-seven-bit() \\n\\
+                 Meta <KeyPress>:insert-eight-bit() \\n\\
+                !Ctrl <Btn1Down>:popup-menu(mainMenu) \\n\\
+           !Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \\n\\
+ !Lock Ctrl @Num_Lock <Btn1Down>:popup-menu(mainMenu) \\n\\
+     ! @Num_Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \\n\\
+                ~Meta <Btn1Down>:select-start() \\n\\
+              ~Meta <Btn1Motion>:select-extend() \\n\\
+                !Ctrl <Btn2Down>:popup-menu(vtMenu) \\n\\
+           !Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \\n\\
+ !Lock Ctrl @Num_Lock <Btn2Down>:popup-menu(vtMenu) \\n\\
+     ! @Num_Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \\n\\
+          ~Ctrl ~Meta <Btn2Down>:ignore() \\n\\
+                 Meta <Btn2Down>:clear-saved-lines() \\n\\
+            ~Ctrl ~Meta <Btn2Up>:insert-selection(PRIMARY, CUT_BUFFER0) \\n\\
+                !Ctrl <Btn3Down>:popup-menu(fontMenu) \\n\\
+           !Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \\n\\
+ !Lock Ctrl @Num_Lock <Btn3Down>:popup-menu(fontMenu) \\n\\
+     ! @Num_Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \\n\\
+          ~Ctrl ~Meta <Btn3Down>:start-extend() \\n\\
+              ~Meta <Btn3Motion>:select-extend() \\n\\
+                 Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \\n\\
+            Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \\n\\
+  Lock @Num_Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \\n\\
+       @Num_Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \\n\\
+                      <Btn4Down>:scroll-back(5,line,m)     \\n\\
+                 Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \\n\\
+            Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \\n\\
+  Lock @Num_Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \\n\\
+       @Num_Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \\n\\
+                      <Btn5Down>:scroll-forw(5,line,m)     \\n\\
+                         <BtnUp>:select-end(PRIMARY, CUT_BUFFER0) \\n\\
+                       <BtnDown>:bell(0)
 .fi
 .ft P
 .sp
@@ -3152,7 +3192,22 @@
 .ta 2.5i
 .nf
 .ft C			\" Courier
-                ~Meta<KeyPress>: 	insert-seven-bit() \\n\                 Meta<KeyPress>: 	insert-eight-bit() \\n\               !Ctrl <Btn1Down>: 	popup-menu(mainMenu) \\n\          !Lock Ctrl <Btn1Down>: 	popup-menu(mainMenu) \\n\!Lock Ctrl @Num_Lock <Btn1Down>:	popup-menu(mainMenu) \\n\     !Ctrl @Num_Lock <Btn1Down>:	popup-menu(mainMenu) \\n\               !Ctrl <Btn2Down>: 	popup-menu(tekMenu) \\n\          !Lock Ctrl <Btn2Down>: 	popup-menu(tekMenu) \\n\!Lock Ctrl @Num_Lock <Btn2Down>:	popup-menu(tekMenu) \\n\     !Ctrl @Num_Lock <Btn2Down>:	popup-menu(tekMenu) \\n\          Shift ~Meta<Btn1Down>:	gin-press(L) \\n\                ~Meta<Btn1Down>:	gin-press(l) \\n\          Shift ~Meta<Btn2Down>:	gin-press(M) \\n\                ~Meta<Btn2Down>:	gin-press(m) \\n\          Shift ~Meta<Btn3Down>:	gin-press(R) \\n\                ~Meta<Btn3Down>:	gin-press(r)
+                ~Meta<KeyPress>: 	insert-seven-bit() \\n\\
+                 Meta<KeyPress>: 	insert-eight-bit() \\n\\
+               !Ctrl <Btn1Down>: 	popup-menu(mainMenu) \\n\\
+          !Lock Ctrl <Btn1Down>: 	popup-menu(mainMenu) \\n\\
+!Lock Ctrl @Num_Lock <Btn1Down>:	popup-menu(mainMenu) \\n\\
+     !Ctrl @Num_Lock <Btn1Down>:	popup-menu(mainMenu) \\n\\
+               !Ctrl <Btn2Down>: 	popup-menu(tekMenu) \\n\\
+          !Lock Ctrl <Btn2Down>: 	popup-menu(tekMenu) \\n\\
+!Lock Ctrl @Num_Lock <Btn2Down>:	popup-menu(tekMenu) \\n\\
+     !Ctrl @Num_Lock <Btn2Down>:	popup-menu(tekMenu) \\n\\
+          Shift ~Meta<Btn1Down>:	gin-press(L) \\n\\
+                ~Meta<Btn1Down>:	gin-press(l) \\n\\
+          Shift ~Meta<Btn2Down>:	gin-press(M) \\n\\
+                ~Meta<Btn2Down>:	gin-press(m) \\n\\
+          Shift ~Meta<Btn3Down>:	gin-press(R) \\n\\
+                ~Meta<Btn3Down>:	gin-press(r)
 .fi
 .ft P
 .sp
@@ -3167,12 +3222,12 @@
 .nf
 .ft C			\" Courier
 *VT100.Translations: #override <Key>F13: keymap(dbx)
-*VT100.dbxKeymap.translations: \	<Key>F14:	keymap(None) \\n\	<Key>F17:	string("next") string(0x0d) \\n\	<Key>F18:	string("step") string(0x0d) \\n\	<Key>F19:	string("continue") string(0x0d) \\n\	<Key>F20:	string("print ") insert-selection(PRIMARY, CUT_BUFFER0)
-
-
-
-
-
+*VT100.dbxKeymap.translations: \\
+	<Key>F14:	keymap(None) \\n\\
+	<Key>F17:	string("next") string(0x0d) \\n\\
+	<Key>F18:	string("step") string(0x0d) \\n\\
+	<Key>F19:	string("continue") string(0x0d) \\n\\
+	<Key>F20:	string("print ") insert-selection(PRIMARY, CUT_BUFFER0)
 .fi
 .ft P
 .sp



Next environment in GLwDrawingArea(3) SHOULD be a table:

.sp 1
.ne 18
.TS
center allbox;
[...]
.TE
.sp 1

I do not have a patch for it, sorry.