#define TYPE_DECLARATION #include "src/rplexternals.h" #include "motif.h" declareTypeExtension(dup) declareObject(nObject); declareObject(oObject); oObject = (*((structObject **) arg)); if (subType(oObject) == APPCONTEXT) { if (nullified(nObject = allocation(s_etat_processus, EXT))) { typeSystemError; } initializeObject(nObject, oObject); if (nullified(objectOf(nObject) = malloc(sizeof(XtAppContext)))) { typeSystemError; } target(objectContainer(sXtAppContext, nObject)).widget = target(objectContainer(sXtAppContext, oObject)).widget; target(objectContainer(sXtAppContext, nObject)).context = target(objectContainer(sXtAppContext, oObject)).context; } else if (subType(oObject) == CALLBACK) { typeError; } else if (subType(oObject) == WIDGET) { if (nullified(nObject = allocation(s_etat_processus, EXT))) { typeSystemError; } initializeObject(nObject, oObject); if (nullified(objectOf(nObject) = malloc(sizeof(sXtAppContext)))) { typeSystemError; } target(objectContainer(Widget, nObject)) = target(objectContainer(Widget, oObject)); } else { typeError; } target((struct_objet **) arg) = nObject; typeSuccess; endTypeExtension declareTypeExtension(drop) declareObject(oObject); oObject = (*((structObject **) arg)); if (subType(oObject) == APPCONTEXT) { free(objectOf(oObject)); } else if (subType(oObject) == CALLBACK) { free(objectOf(oObject)); } else if (subType(oObject) == WIDGET) { free(objectOf(oObject)); } else { typeError; } typeSuccess; endTypeExtension declareTypeExtension(disp) declareObject(oObject); string s; oObject = (*((structObject **) arg)); if (subType(oObject) == APPCONTEXT) { if ((s = malloc(32 * sizeof(unsigned char))) == NULL) { typeSystemError; } sprintf(s, "XtAppContext $ %016llX", (long long unsigned int) objectOf(oObject)); } else if (subType(oObject) == CALLBACK) { if ((s = malloc(28 * sizeof(unsigned char))) == NULL) { typeSystemError; } sprintf(s, "Callback $ %016llX", (long long unsigned int) objectOf(oObject)); } else if (subType(oObject) == WIDGET) { if ((s = malloc(26 * sizeof(unsigned char))) == NULL) { typeSystemError; } sprintf(s, "Widget $ %016llX", (long long unsigned int) objectOf(oObject)); } else { typeSystemError; } (*arg) = s; typeSuccess; endTypeExtension // vim: ts=4