[Xcb] Should we use <bit> instead of <value>?
Peter Harris
peter.harris at hummingbird.com
Tue Dec 11 09:47:37 PST 2007
I was browsing the XML files when I noticed that some of them use <value> for
items that look like they should be <bit> instead.
Is there a policy on this? Should this patch be applied?
Thanks,
Peter Harris
From 80001cd21f00b0e62ed8d1479c64b4686ea13767 Mon Sep 17 00:00:00 2001
From: Peter Harris <peter.harris at hummingbird.com>
Date: Mon, 10 Dec 2007 19:58:48 -0500
Subject: [PATCH] Use <bit> instead of <value> where appropriate
---
src/glx.xml | 40 ++++++++++++++++++++--------------------
src/record.xml | 6 +++---
src/xprint.xml | 6 +++---
src/xv.xml | 14 +++++++-------
4 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/glx.xml b/src/glx.xml
index feaffce..ae5c0ac 100644
--- a/src/glx.xml
+++ b/src/glx.xml
@@ -201,26 +201,26 @@ The patch that fixed this server bug in X.org CVS is here:
<!-- Enum for CopyContext: mask -->
<enum name="GC">
- <item name="GL_CURRENT_BIT"><value>0x00000001</value></item>
- <item name="GL_POINT_BIT"><value>0x00000002</value></item>
- <item name="GL_LINE_BIT"><value>0x00000004</value></item>
- <item name="GL_POLYGON_BIT"><value>0x00000008</value></item>
- <item name="GL_POLYGON_STIPPLE_BIT"><value>0x00000010</value></item>
- <item name="GL_PIXEL_MODE_BIT"><value>0x00000020</value></item>
- <item name="GL_LIGHTING_BIT"><value>0x00000040</value></item>
- <item name="GL_FOG_BIT"><value>0x00000080</value></item>
- <item name="GL_DEPTH_BUFFER_BIT"><value>0x00000100</value></item>
- <item name="GL_ACCUM_BUFFER_BIT"><value>0x00000200</value></item>
- <item name="GL_STENCIL_BUFFER_BIT"><value>0x00000400</value></item>
- <item name="GL_VIEWPORT_BIT"><value>0x00000800</value></item>
- <item name="GL_TRANSFORM_BIT"><value>0x00001000</value></item>
- <item name="GL_ENABLE_BIT"><value>0x00002000</value></item>
- <item name="GL_COLOR_BUFFER_BIT"><value>0x00004000</value></item>
- <item name="GL_HINT_BIT"><value>0x00008000</value></item>
- <item name="GL_EVAL_BIT"><value>0x00010000</value></item>
- <item name="GL_LIST_BIT"><value>0x00020000</value></item>
- <item name="GL_TEXTURE_BIT"><value>0x00040000</value></item>
- <item name="GL_SCISSOR_BIT"><value>0x00080000</value></item>
+ <item name="GL_CURRENT_BIT"><bit>0</bit></item>
+ <item name="GL_POINT_BIT"><bit>1</bit></item>
+ <item name="GL_LINE_BIT"><bit>2</bit></item>
+ <item name="GL_POLYGON_BIT"><bit>3</bit></item>
+ <item name="GL_POLYGON_STIPPLE_BIT"><bit>4</bit></item>
+ <item name="GL_PIXEL_MODE_BIT"><bit>5</bit></item>
+ <item name="GL_LIGHTING_BIT"><bit>6</bit></item>
+ <item name="GL_FOG_BIT"><bit>7</bit></item>
+ <item name="GL_DEPTH_BUFFER_BIT"><bit>8</bit></item>
+ <item name="GL_ACCUM_BUFFER_BIT"><bit>9</bit></item>
+ <item name="GL_STENCIL_BUFFER_BIT"><bit>10</bit></item>
+ <item name="GL_VIEWPORT_BIT"><bit>11</bit></item>
+ <item name="GL_TRANSFORM_BIT"><bit>12</bit></item>
+ <item name="GL_ENABLE_BIT"><bit>13</bit></item>
+ <item name="GL_COLOR_BUFFER_BIT"><bit>14</bit></item>
+ <item name="GL_HINT_BIT"><bit>15</bit></item>
+ <item name="GL_EVAL_BIT"><bit>16</bit></item>
+ <item name="GL_LIST_BIT"><bit>17</bit></item>
+ <item name="GL_TEXTURE_BIT"><bit>18</bit></item>
+ <item name="GL_SCISSOR_BIT"><bit>19</bit></item>
<item name="GL_ALL_ATTRIB_BITS"><value>0x000ffffff</value></item>
</enum>
diff --git a/src/record.xml b/src/record.xml
index 464f4d8..624d122 100644
--- a/src/record.xml
+++ b/src/record.xml
@@ -61,9 +61,9 @@ authorization from the authors.
<typedef oldname="CARD8" newname="ElementHeader" />
<enum name="HType">
- <item name="FromServerTime"><value>0x01</value></item>
- <item name="FromClientTime"><value>0x02</value></item>
- <item name="FromClientSequence"><value>0x04</value></item>
+ <item name="FromServerTime"><bit>0</bit></item>
+ <item name="FromClientTime"><bit>1</bit></item>
+ <item name="FromClientSequence"><bit>2</bit></item>
</enum>
<typedef oldname="CARD32" newname="ClientSpec" />
diff --git a/src/xprint.xml b/src/xprint.xml
index 1fa2ab6..0dcff1d 100644
--- a/src/xprint.xml
+++ b/src/xprint.xml
@@ -59,9 +59,9 @@ authorization from the authors.
<!-- Event Mask ("PrintSelectInput") -->
<enum name="EvMask">
- <item name="NoEventMask"><value>0x00000000</value></item>
- <item name="PrintMask"><value>0x00000001</value></item>
- <item name="AttributeMask"><value>0x00000002</value></item>
+ <item name="NoEventMask"><value>0</value></item>
+ <item name="PrintMask"><bit>0</bit></item>
+ <item name="AttributeMask"><bit>1</bit></item>
</enum>
<!-- "PrintNotify" detail -->
diff --git a/src/xv.xml b/src/xv.xml
index 2edd6e4..ebf4837 100644
--- a/src/xv.xml
+++ b/src/xv.xml
@@ -36,11 +36,11 @@ authorization from the authors.
<xidtype name="ENCODING" />
<enum name="Type">
- <item name="InputMask"><value>0x00000001</value></item>
- <item name="OutputMask"><value>0x00000002</value></item>
- <item name="VideoMask"><value>0x00000004</value></item>
- <item name="StillMask"><value>0x00000008</value></item>
- <item name="ImageMask"><value>0x00000010</value></item>
+ <item name="InputMask"><bit>0</bit></item>
+ <item name="OutputMask"><bit>1</bit></item>
+ <item name="VideoMask"><bit>2</bit></item>
+ <item name="StillMask"><bit>3</bit></item>
+ <item name="ImageMask"><bit>4</bit></item>
</enum>
<enum name="ImageFormatInfoType">
@@ -54,8 +54,8 @@ authorization from the authors.
</enum>
<enum name="AttributeFlag">
- <item name="Gettable"><value>0x01</value></item>
- <item name="Settable"><value>0x02</value></item>
+ <item name="Gettable"><bit>0</bit></item>
+ <item name="Settable"><bit>1</bit></item>
</enum>
<struct name="Rational">
--
1.5.3.7
--
Hummingbird Connectivity - A Division of Open Text
Peter Harris http://connectivity.hummingbird.com
Research and Development Phone: +1 905 762 6001
peter.harris at hummingbird.com Toll Free: 1 877 359 4866
More information about the Xcb
mailing list