Commit b7f09ae1 authored by Walter Harms's avatar Walter Harms

Replace home-grown .Ds .De macro with man page .EX/.EE macro

Same pages use the man page .EX/.EE macro. Replace all occurences
of .De/.Ds with the std. macros to make the code better to maintain.
Signed-off-by: Walter Harms's avatarWalter Harms <wharms@bfs.de>
parent 951e772b
......@@ -165,13 +165,13 @@ The
structure provides an interface to the pixmap format information
that is returned at the time of a connection setup.
It contains:
.Ds 0
.EX
typedef struct {
int depth;
int bits_per_pixel;
int scanline_pad;
} XPixmapFormatValues;
.De
.EE
.SH "SEE ALSO"
AllPlanes(__libmansuffix__),
BlackPixelOfScreen(__libmansuffix__),
......
......@@ -256,13 +256,13 @@ The
.B XHostAddress
structure contains:
.LP
.Ds 0
.EX
typedef struct {
int family; /\&* for example FamilyInternet */
int length; /\&* length of address, in bytes */
char *address; /\&* pointer to where to find the address */
} XHostAddress;
.De
.EE
.LP
The family member specifies which protocol address family to use
(for example, TCP/IP or DECnet) and can be
......@@ -280,14 +280,14 @@ member is a pointer to a
.B XServerInterpretedAddress
structure which contains:
.LP
.Ds 0
.EX
typedef struct {
int typelength; /\&* length of type string, in bytes */
int valuelength; /\&* length of value string, in bytes */
char *type; /\&* pointer to where to find the type string */
char *value; /\&* pointer to where to find the address */
} XServerInterpretedAddress;
.De
.EE
.LP
The type and value members point to strings representing the type and value of
the server interpreted entry. These strings may not be NULL-terminated so care
......
......@@ -159,7 +159,7 @@ The
structure contains:
.LP
.IN "XClassHint" "" "@DEF@"
.Ds 0
.EX
typedef struct {
char *res_name;
char *res_class;
......
......@@ -162,13 +162,13 @@ The
structure contains:
.LP
.IN "XIconSize" "" "@DEF@"
.Ds 0
.EX
typedef struct {
int min_width, min_height;
int max_width, max_height;
int width_inc, height_inc;
} XIconSize;
.De
.EE
.LP
The width_inc and height_inc members define an arithmetic progression of
sizes (minimum to maximum) that represent the supported icon sizes.
......
......@@ -166,18 +166,18 @@ If
returns successfully and a pre-ICCCM size hints property is read,
the supplied_return argument will contain the following bits:
.LP
.Ds
.EX
(USPosition|USSize|PPosition|PSize|PMinSize|
PMaxSize|PResizeInc|PAspect)
.De
.EE
.LP
If the property is large enough to contain the base size
and window gravity fields as well,
the supplied_return argument will also contain the following bits:
.LP
.Ds
.EX
PBaseSize|PWinGravity
.De
.EE
.LP
.B XGetWMNormalHints
can generate a
......@@ -231,18 +231,18 @@ If
returns successfully and a pre-ICCCM size hints property is read,
the supplied_return argument will contain the following bits:
.LP
.Ds
.EX
(USPosition|USSize|PPosition|PSize|PMinSize|
PMaxSize|PResizeInc|PAspect)
.De
.EE
.LP
If the property is large enough to contain the base size
and window gravity fields as well,
the supplied_return argument will also contain the following bits:
.LP
.Ds
.EX
PBaseSize|PWinGravity
.De
.EE
.LP
.B XGetWMSizeHints
can generate
......@@ -364,7 +364,7 @@ T} T{
T}
.TE
.IN "XSizeHints" "" "@DEF@"
.Ds 0
.EX
/\&* Values */
typedef struct {
......@@ -382,7 +382,7 @@ typedef struct {
int win_gravity;
/\&* this structure may be extended in the future */
} XSizeHints;
.De
.EE
.LP
The x, y, width, and height members are now obsolete
and are left solely for compatibility reasons.
......
......@@ -232,7 +232,7 @@ T}
.TE
/\&* Values */
.IN "XStandardColormap" "" "@DEF@"
.Ds 0
.EX
typedef struct {
Colormap colormap;
unsigned long red_max;
......@@ -245,7 +245,7 @@ typedef struct {
VisualID visualid;
XID killid;
} XStandardColormap;
.De
.EE
.LP
The colormap member is the colormap created by the
.B XCreateColormap
......@@ -278,9 +278,9 @@ Given integer red, green, and blue coefficients in their appropriate
ranges, one then can compute a corresponding pixel value by
using the following expression:
.LP
.Ds
.EX
(r * red_mult + g * green_mult + b * blue_mult + base_pixel) & 0xFFFFFFFF
.De
.EE
.LP
For
.B GrayScale
......@@ -292,9 +292,9 @@ To compute a
.B GrayScale
pixel value, use the following expression:
.LP
.Ds
.EX
(gray * red_mult + base_pixel) & 0xFFFFFFFF
.De
.EE
.LP
Negative multipliers can be represented by converting the 2's
complement representation of the multiplier into an unsigned long and
......
......@@ -226,7 +226,7 @@ IconMaskHint|WindowGroupHint)
T}
.TE
.IN "XWMHints" "" "@DEF@"
.Ds 0
.EX
/\&* Values */
typedef struct {
......@@ -241,7 +241,7 @@ typedef struct {
XID window_group; /\&* id of related window group */
/\&* this structure may be extended in the future */
} XWMHints;
.De
.EE
.LP
The input member is used to communicate to the window manager the input focus
model used by the application.
......
......@@ -85,7 +85,7 @@ XAnyEvent, XEvent \- generic X event structures
All the event structures declared in
.Pn < X11/Xlib.h >
have the following common members:
.Ds 0
.EX
typedef struct {
int type;
unsigned long serial; /\&* # of last request processed by server */
......@@ -93,7 +93,7 @@ typedef struct {
Display *display; /\&* Display the event was read from */
Window window;
} XAnyEvent;
.De
.EE
.LP
The type member is set to the event type constant name that uniquely identifies
it.
......@@ -117,7 +117,7 @@ dispatchers.
The
.B XEvent
structure is a union of the individual structures declared for each event type:
.Ds 0
.EX
typedef union _XEvent {
int type; /\&* must not be changed */
XAnyEvent xany;
......@@ -153,7 +153,7 @@ typedef union _XEvent {
XKeymapEvent xkeymap;
long pad[24];
} XEvent;
.De
.EE
.LP
An
.B XEvent
......@@ -185,7 +185,7 @@ XColormapEvent(__libmansuffix__),
XConfigureEvent(__libmansuffix__),
XConfigureRequestEvent(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),
.EEstroyWindowEvent(__libmansuffix__),
XErrorEvent(__libmansuffix__),
XExposeEvent(__libmansuffix__),
XFocusChangeEvent(__libmansuffix__),
......
......@@ -91,7 +91,7 @@ and
.B MotionNotify
events contain:
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* ButtonPress or ButtonRelease */
unsigned long serial; /\&* # of last request processed by server */
......@@ -109,9 +109,9 @@ typedef struct {
} XButtonEvent;
typedef XButtonEvent XButtonPressedEvent;
typedef XButtonEvent XButtonReleasedEvent;
.De
.EE
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* KeyPress or KeyRelease */
unsigned long serial; /\&* # of last request processed by server */
......@@ -129,9 +129,9 @@ typedef struct {
} XKeyEvent;
typedef XKeyEvent XKeyPressedEvent;
typedef XKeyEvent XKeyReleasedEvent;
.De
.EE
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* MotionNotify */
unsigned long serial; /\&* # of last request processed by server */
......@@ -148,7 +148,7 @@ typedef struct {
Bool same_screen; /\&* same screen flag */
} XMotionEvent;
typedef XMotionEvent XPointerMovedEvent;
.De
.EE
.LP
When you receive these events,
their structure members are set as follows.
......@@ -267,7 +267,7 @@ XColormapEvent(__libmansuffix__),
XConfigureEvent(__libmansuffix__),
XConfigureRequestEvent(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),
.EEstroyWindowEvent(__libmansuffix__),
XErrorEvent(__libmansuffix__),
XExposeEvent(__libmansuffix__),
XFocusChangeEvent(__libmansuffix__),
......
......@@ -249,7 +249,7 @@ T} T{
T}
.TE
.IN "XKeyboardControl" "" "@DEF@"
.Ds 0
.EX
/\&* Values */
typedef struct {
......@@ -263,7 +263,7 @@ typedef struct {
int auto_repeat_mode; /\&* AutoRepeatModeOff, AutoRepeatModeOn,
AutoRepeatModeDefault */
} XKeyboardControl;
.De
.EE
.LP
The key_click_percent member sets the volume for key clicks between 0 (off)
and 100 (loud) inclusive, if possible.
......@@ -341,7 +341,7 @@ The
.B XKeyboardState
structure contains:
.LP
.Ds 0
.EX
typedef struct {
int key_click_percent;
int bell_percent;
......@@ -350,7 +350,7 @@ typedef struct {
int global_auto_repeat;
char auto_repeats[32];
} XKeyboardState;
.De
.EE
.LP
For the LEDs,
the least significant bit of led_mask corresponds to LED one,
......
......@@ -145,9 +145,9 @@ starting with first_keycode.
The symbols for KeyCodes outside this range remain unchanged.
The number of elements in keysyms must be:
.LP
.Ds
.EX
num_codes * keysyms_per_keycode
.De
.EE
.LP
The specified first_keycode must be greater than or equal to min_keycode
returned by
......@@ -162,16 +162,16 @@ or a
.B BadValue
error results:
.LP
.Ds
.EX
first_keycode + num_codes \- 1
.De
.EE
.LP
KeySym number N, counting from zero, for KeyCode K has the following index
in keysyms, counting from zero:
.LP
.Ds
.EX
(K \- first_keycode) * keysyms_per_keycode + N
.De
.EE
.LP
The specified keysyms_per_keycode can be chosen arbitrarily by the client
to be large enough to hold all desired symbols.
......@@ -212,24 +212,24 @@ In addition, the following expression must be less than or equal
to max_keycode as returned by
.BR XDisplayKeycodes :
.LP
.Ds
.EX
first_keycode + keycode_count \- 1
.De
.EE
.LP
If this is not the case, a
.B BadValue
error results.
The number of elements in the KeySyms list is:
.LP
.Ds
.EX
keycode_count * keysyms_per_keycode_return
.De
.EE
.LP
KeySym number N, counting from zero, for KeyCode K has the following index
in the list, counting from zero:
.Ds
.EX
(K \- first_code) * keysyms_per_code_return + N
.De
.EE
.LP
The X server arbitrarily chooses the keysyms_per_keycode_return value
to be large enough to report all requested symbols.
......@@ -360,12 +360,12 @@ The
.B XModifierKeymap
structure contains:
.LP
.Ds 0
.EX
typedef struct {
int max_keypermod; /\&* This server's max number of keys per modifier */
KeyCode *modifiermap; /\&* An 8 by max_keypermod array of the modifiers */
} XModifierKeymap;
.De
.EE
.SH DIAGNOSTICS
.TP 1i
.B BadAlloc
......
......@@ -86,7 +86,7 @@ The structure for
.B CirculateNotify
events contains:
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* CirculateNotify */
unsigned long serial; /\&* # of last request processed by server */
......@@ -96,7 +96,7 @@ typedef struct {
Window window;
int place; /\&* PlaceOnTop, PlaceOnBottom */
} XCirculateEvent;
.De
.EE
.LP
When you receive this event,
the structure members are set as follows.
......@@ -147,7 +147,7 @@ XColormapEvent(__libmansuffix__),
XConfigureEvent(__libmansuffix__),
XConfigureRequestEvent(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),
.EEstroyWindowEvent(__libmansuffix__),
XErrorEvent(__libmansuffix__),
XExposeEvent(__libmansuffix__),
XFocusChangeEvent(__libmansuffix__),
......
......@@ -86,7 +86,7 @@ The structure for
.B CirculateRequest
events contains:
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* CirculateRequest */
unsigned long serial; /\&* # of last request processed by server */
......@@ -96,7 +96,7 @@ typedef struct {
Window window;
int place; /\&* PlaceOnTop, PlaceOnBottom */
} XCirculateRequestEvent;
.De
.EE
.LP
When you receive this event,
the structure members are set as follows.
......@@ -142,7 +142,7 @@ XColormapEvent(__libmansuffix__),
XConfigureEvent(__libmansuffix__),
XConfigureRequestEvent(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),
.EEstroyWindowEvent(__libmansuffix__),
XErrorEvent(__libmansuffix__),
XExposeEvent(__libmansuffix__),
XFocusChangeEvent(__libmansuffix__),
......
......@@ -86,7 +86,7 @@ The structure for
.B ClientMessage
events contains:
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* ClientMessage */
unsigned long serial; /\&* # of last request processed by server */
......@@ -101,7 +101,7 @@ typedef struct {
long l[5];
} data;
} XClientMessageEvent;
.De
.EE
.LP
When you receive this event,
the structure members are set as follows.
......@@ -145,7 +145,7 @@ XColormapEvent(__libmansuffix__),
XConfigureEvent(__libmansuffix__),
XConfigureRequestEvent(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),
.EEstroyWindowEvent(__libmansuffix__),
XErrorEvent(__libmansuffix__),
XExposeEvent(__libmansuffix__),
XFocusChangeEvent(__libmansuffix__),
......
......@@ -86,7 +86,7 @@ The structure for
.B ColormapNotify
events contains:
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* ColormapNotify */
unsigned long serial; /\&* # of last request processed by server */
......@@ -97,7 +97,7 @@ typedef struct {
Bool new;
int state; /\&* ColormapInstalled, ColormapUninstalled */
} XColormapEvent;
.De
.EE
.LP
When you receive this event,
the structure members are set as follows.
......@@ -156,7 +156,7 @@ XConfigureEvent(__libmansuffix__),
XConfigureRequestEvent(__libmansuffix__),
XCreateColormap(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),
.EEstroyWindowEvent(__libmansuffix__),
XErrorEvent(__libmansuffix__),
XExposeEvent(__libmansuffix__),
XFocusChangeEvent(__libmansuffix__),
......
......@@ -86,7 +86,7 @@ The structure for
.B ConfigureNotify
events contains:
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* ConfigureNotify */
unsigned long serial; /\&* # of last request processed by server */
......@@ -100,7 +100,7 @@ typedef struct {
Window above;
Bool override_redirect;
} XConfigureEvent;
.De
.EE
.LP
When you receive this event,
the structure members are set as follows.
......@@ -165,7 +165,7 @@ XCirculateRequestEvent(__libmansuffix__),
XColormapEvent(__libmansuffix__),
XConfigureRequestEvent(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),
.EEstroyWindowEvent(__libmansuffix__),
XErrorEvent(__libmansuffix__),
XExposeEvent(__libmansuffix__),
XFocusChangeEvent(__libmansuffix__),
......
......@@ -86,7 +86,7 @@ The structure for
.B ConfigureRequest
events contains:
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* ConfigureRequest */
unsigned long serial; /\&* # of last request processed by server */
......@@ -101,7 +101,7 @@ typedef struct {
int detail; /\&* Above, Below, TopIf, BottomIf, Opposite */
unsigned long value_mask;
} XConfigureRequestEvent;
.De
.EE
.LP
When you receive this event,
the structure members are set as follows.
......@@ -148,7 +148,7 @@ XCirculateRequestEvent(__libmansuffix__),
XColormapEvent(__libmansuffix__),
XConfigureEvent(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),
.EEstroyWindowEvent(__libmansuffix__),
XErrorEvent(__libmansuffix__),
XExposeEvent(__libmansuffix__),
XFocusChangeEvent(__libmansuffix__),
......
......@@ -322,7 +322,7 @@ T} T{
T}
.TE
.IN "XWindowChanges" "" "@DEF@"
.Ds 0
.EX
/\&* Values */
typedef struct {
......@@ -332,7 +332,7 @@ typedef struct {
Window sibling;
int stack_mode;
} XWindowChanges;
.De
.EE
.LP
The x and y members are used to set the window's x and y coordinates,
which are relative to the parent's origin
......@@ -383,7 +383,7 @@ A value for a Window argument does not name a defined Window.
.SH "SEE ALSO"
XChangeWindowAttributes(__libmansuffix__),
XCreateWindow(__libmansuffix__),
XDestroyWindow(__libmansuffix__),
.EEstroyWindow(__libmansuffix__),
XMapWindow(__libmansuffix__),
XRaiseWindow(__libmansuffix__),
XUnmapWindow(__libmansuffix__)
......
......@@ -244,14 +244,14 @@ The
.B XColor
structure contains:
.LP
.Ds 0
.EX
typedef struct {
unsigned long pixel; /\&* pixel value */
unsigned short red, green, blue; /\&* rgb values */
char flags; /\&* DoRed, DoGreen, DoBlue */
char pad;
} XColor;
.De
.EE
.LP
The red, green, and blue values are always in the range 0 to 65535
inclusive, independent of the number of bits actually used in the
......
......@@ -180,44 +180,44 @@ manner to one or more fonts that support imaging text in the charset.
.LP
For example, assume that a locale required the charsets:
.LP
.Ds 0
.EX
ISO8859-1
JISX0208.1983
JISX0201.1976
GB2312-1980.0
.De
.EE
.LP
The user could supply a base_font_name_list that explicitly specifies the
charsets, ensuring that specific fonts are used if they exist.
For example:
.LP
.Ds 0
.EX
"-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240-JISX0208.1983-0,\\
-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120-JISX0201.1976-0,\\
-GB-Fixed-Medium-R-Normal--26-180-100-100-C-240-GB2312-1980.0,\\
-Adobe-Courier-Bold-R-Normal--25-180-75-75-M-150-ISO8859-1"
.De
.EE
.LP
Alternatively, the user could supply a base_font_name_list
that omits the charsets,
letting Xlib select font charsets required for the locale.
For example:
.LP
.Ds 0
.EX
"-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240,\\
-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120,\\
-GB-Fixed-Medium-R-Normal--26-180-100-100-C-240,\\
-Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150"
.De
.EE
.LP
Alternatively, the user could simply supply a single base font name
that allows Xlib to select from all available fonts
that meet certain minimum XLFD property requirements.
For example:
.LP
.Ds 0
.EX
"-*-*-*-R-Normal--*-180-100-100-*-*"
.De
.EE
.LP
If
.B XCreateFontSet
......
......@@ -367,7 +367,7 @@ T}
.TE
.IN "XGCValues" "" "@DEF@"
.LP
.Ds 0
.EX
/\&* Values */
typedef struct {
......@@ -395,7 +395,7 @@ typedef struct {
int dash_offset; /\&* patterned/dashed line information */
char dashes;
} XGCValues;
.De
.EE
.LP
The function attributes of a GC are used when you update a section of
a drawable (the destination) with bits from somewhere else (the source).
......@@ -557,9 +557,9 @@ A macro constant
can be used to refer to all planes of the screen simultaneously.
The result is computed by the following:
.LP
.Ds
.EX
((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask))
.De
.EE
.LP
Range checking is not performed on the values for foreground,
background, or plane_mask.
......@@ -573,10 +573,10 @@ Unless otherwise specified by the join-style or cap-style,
the bounding box of a wide line with endpoints [x1, y1], [x2, y2] and
width w is a rectangle with vertices at the following real coordinates:
.LP
.Ds
.EX
[x1-(w*sn/2), y1+(w*cs/2)], [x1+(w*sn/2), y1-(w*cs/2)],
[x2-(w*sn/2), y2+(w*cs/2)], [x2+(w*sn/2), y2-(w*cs/2)]
.De
.EE
.LP
Here sn is the sine of the angle of the line,
and cs is the cosine of the angle of the line.
......
......@@ -365,7 +365,7 @@ T} T{
T}
.TE
.IN "XSetWindowAttributes" "" "@DEF@"
.Ds 0
.EX
/\&* Values */
typedef struct {
......@@ -385,7 +385,7 @@ typedef struct {
Colormap colormap; /\&* color map to be associated with window */
Cursor cursor; /\&* cursor to be displayed (or None) */
} XSetWindowAttributes;
.De
.EE
.LP
For a detailed explanation of the members of this structure,
see \fI\*(xL\fP\^.
......@@ -423,8 +423,8 @@ A value for a Window argument does not name a defined Window.
.SH "SEE ALSO"
XChangeWindowAttributes(__libmansuffix__),
XConfigureWindow(__libmansuffix__),
XDefineCursor(__libmansuffix__),
XDestroyWindow(__libmansuffix__),
.EEfineCursor(__libmansuffix__),
.EEstroyWindow(__libmansuffix__),
XMapWindow(__libmansuffix__),
XRaiseWindow(__libmansuffix__),
XUnmapWindow(__libmansuffix__)
......
......@@ -86,7 +86,7 @@ The structure for
.B CreateNotify
events contains:
.LP
.Ds 0
.EX
typedef struct {
int type; /\&* CreateNotify */
unsigned long serial; /\&* # of last request processed by server */
......@@ -99,7 +99,7 @@ typedef struct {
int border_width; /\&* border width */
Bool override_redirect; /\&* creation should be overridden */
} XCreateWindowEvent;
.De
.EE
.LP
When you receive this event,
the structure members are set as follows.
......@@ -145,7 +145,7 @@ XColormapEvent(__libmansuffix__),
XConfigureEvent(__libmansuffix__),
XConfigureRequestEvent(__libmansuffix__),
XCrossingEvent(__libmansuffix__),
XDestroyWindowEvent(__libmansuffix__),