#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(objectContainer(nObject) = malloc(sizeof(XtAppContext)))) { typeSystemError; } target((sXtAppContext *) objectContainer(nObject)).widget = target((sXtAppContext *) objectContainer(oObject)).widget; target((sXtAppContext *) objectContainer(nObject)).context = target((sXtAppContext *) objectContainer(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(objectContainer(nObject) = malloc(sizeof(sXtAppContext)))) { typeSystemError; } target((Widget *) objectContainer(nObject)) = target((Widget *) objectContainer(oObject)); } else { typeError; } target((struct_objet **) arg) = nObject; typeSuccess; endTypeExtension declareTypeExtension(drop) declareObject(oObject); oObject = (*((structObject **) arg)); if (subType(oObject) == APPCONTEXT) { free(objectContainer(oObject)); } else if (subType(oObject) == CALLBACK) { free(objectContainer(oObject)); } else if (subType(oObject) == WIDGET) { free(objectContainer(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) objectContainer(oObject)); } else if (subType(oObject) == CALLBACK) { if ((s = malloc(28 * sizeof(unsigned char))) == NULL) { typeSystemError; } sprintf(s, "Callback $ %016llX", (long long unsigned int) objectContainer(oObject)); } else if (subType(oObject) == WIDGET) { if ((s = malloc(26 * sizeof(unsigned char))) == NULL) { typeSystemError; } sprintf(s, "Widget $ %016llX", (long long unsigned int) objectContainer(oObject)); } else { typeSystemError; } (*arg) = s; typeSuccess; endTypeExtension // vim: ts=4