ClientData	  	d;
void		*d;
Lst_Insert (l, ln, d)    Lst	    	  	l;	/* list to manipulate */    LstNode	  	ln;	/* node before which to insert d */    ClientData	  	d;	/* datum to be inserted */{    register ListNode	nLNode;	/* new lnode for d */    register ListNode	lNode = (ListNode)ln;    register List 	list = (List)l;    /*     * check validity of arguments     */    if (LstValid (l) && (LstIsEmpty (l) && ln == NULL))	goto ok;    if (!LstValid (l) || LstIsEmpty (l) || !LstNodeValid (ln, l)) {	return;    }    ok:    PAlloc (nLNode, ListNode);    nLNode->datum = d;    nLNode->useCount = nLNode->flags = 0;    if (ln == NULL) {	nLNode->prevPtr = nLNode->nextPtr = NULL;	list->firstPtr = list->lastPtr = nLNode;    } else {	nLNode->prevPtr = lNode->prevPtr;	nLNode->nextPtr = lNode;	if (nLNode->prevPtr != NULL) {	    nLNode->prevPtr->nextPtr = nLNode;	}	lNode->prevPtr = nLNode;	if (lNode == list->firstPtr) {	    list->firstPtr = nLNode;	}    }}