summaryrefslogtreecommitdiff
path: root/src/GetResList.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/GetResList.c')
-rw-r--r--src/GetResList.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/GetResList.c b/src/GetResList.c
index 7def21e..7b60b33 100644
--- a/src/GetResList.c
+++ b/src/GetResList.c
@@ -32,6 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xt/GetResList.c,v 3.6 2001/12/14 19:56:16 dawes Exp $ */
/*
@@ -60,11 +61,14 @@ in this Software without prior written authorization from The Open Group.
*/
#include "IntrinsicI.h"
+#include "Intrinsic.h"
/*
* XtGetResourceList(), XtGetConstraintResourceList()
*/
+#define TOXRMQUARK(p) ((XrmQuark)(long)(p)) /* avoid LP64 warnings */
+
void XtGetResourceList(widget_class, resources, num_resources)
WidgetClass widget_class;
XtResourceList *resources;
@@ -95,17 +99,17 @@ void XtGetResourceList(widget_class, resources, num_resources)
for (i = 0; i < widget_class->core_class.num_resources; i++) {
if (list[i] != NULL) {
dlist[dest].resource_name = (String)
- XrmQuarkToString((XrmQuark) list[i]->resource_name);
+ XrmQuarkToString(TOXRMQUARK(list[i]->resource_name));
dlist[dest].resource_class = (String)
- XrmQuarkToString((XrmQuark) list[i]->resource_class);
+ XrmQuarkToString(TOXRMQUARK(list[i]->resource_class));
dlist[dest].resource_type = (String)
- XrmQuarkToString((XrmQuark) list[i]->resource_type);
+ XrmQuarkToString(TOXRMQUARK(list[i]->resource_type));
dlist[dest].resource_size = list[i]->resource_size;
/* trust that resource_offset isn't that big */
dlist[dest].resource_offset = (Cardinal)
-((int)(list[i]->resource_offset + 1));
dlist[dest].default_type = (String)
- XrmQuarkToString((XrmQuark) list[i]->default_type);
+ XrmQuarkToString(TOXRMQUARK(list[i]->default_type));
dlist[dest].default_addr = list[i]->default_addr;
dest++;
}
@@ -115,8 +119,7 @@ void XtGetResourceList(widget_class, resources, num_resources)
}
-static Boolean ClassIsSubclassOf(class, superclass)
- WidgetClass class, superclass;
+static Boolean ClassIsSubclassOf(WidgetClass class, WidgetClass superclass)
{
for (; class != NULL; class = class->core_class.superclass) {
if (class == superclass) return True;
@@ -167,17 +170,17 @@ void XtGetConstraintResourceList(widget_class, resources, num_resources)
for (i = 0; i < class->constraint_class.num_resources; i++) {
if (list[i] != NULL) {
dlist[dest].resource_name = (String)
- XrmQuarkToString((XrmQuark) list[i]->resource_name);
+ XrmQuarkToString(TOXRMQUARK(list[i]->resource_name));
dlist[dest].resource_class = (String)
- XrmQuarkToString((XrmQuark) list[i]->resource_class);
+ XrmQuarkToString(TOXRMQUARK(list[i]->resource_class));
dlist[dest].resource_type = (String)
- XrmQuarkToString((XrmQuark) list[i]->resource_type);
+ XrmQuarkToString(TOXRMQUARK(list[i]->resource_type));
dlist[dest].resource_size = list[i]->resource_size;
/* trust that resource_offset isn't that big */
dlist[dest].resource_offset = (Cardinal)
-((int)(list[i]->resource_offset + 1));
dlist[dest].default_type = (String)
- XrmQuarkToString((XrmQuark) list[i]->default_type);
+ XrmQuarkToString(TOXRMQUARK(list[i]->default_type));
dlist[dest].default_addr = list[i]->default_addr;
dest++;
}