File: objects.c

package info (click to toggle)
elk 3.0-6
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 4,068 kB
  • ctags: 3,123
  • sloc: ansic: 20,686; lisp: 5,232; makefile: 419; awk: 91; sh: 21
file content (19 lines) | stat: -rw-r--r-- 559 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <varargs.h>

#include "xt.h"

Match_Xt_Obj (x, v) Object x; va_list v; {
    register type = TYPE(x);

    if (type == T_Context) {
	return va_arg (v, XtAppContext) == CONTEXT(x)->context;
    } else if (type == T_Class) {
	return va_arg (v, WidgetClass) == CLASS(x)->wclass;
    } else if (type == T_Widget) {
	return va_arg (v, Widget) == WIDGET(x)->widget;
    } else if (type == T_Identifier) {
	return va_arg (v, int) == IDENTIFIER(x)->type
	    && va_arg (v, XtPointer) == IDENTIFIER(x)->val;
    } else Panic ("Match_Xt_Obj");
    return 0;
}