ClientData	d;
void 	*d;
Lst_Append(l, ln, d)    Lst	  	l;	/* affected list */    LstNode	ln;	/* node after which to append the datum */    ClientData	d;	/* said datum */{    register List 	list;    register ListNode	lNode;    register ListNode	nLNode;    if (LstValid (l) && (ln == NULL && LstIsEmpty (l))) {	goto ok;    }    if (!LstValid (l) || LstIsEmpty (l)  || ! LstNodeValid (ln, l)) {	return;    }    ok:    list = (List)l;    lNode = (ListNode)ln;    PAlloc (nLNode, ListNode);    nLNode->datum = d;    nLNode->useCount = nLNode->flags = 0;    if (lNode == NULL) {	nLNode->nextPtr = nLNode->prevPtr = NULL;	list->firstPtr = list->lastPtr = nLNode;    } else {	nLNode->prevPtr = lNode;	nLNode->nextPtr = lNode->nextPtr;	lNode->nextPtr = nLNode;	if (nLNode->nextPtr != NULL) {	    nLNode->nextPtr->prevPtr = nLNode;	}	if (lNode == list->lastPtr) {	    list->lastPtr = nLNode;	}    }}