static void _OwnSelection(termw, selections, count) register XtermWidget termw; String *selections; Cardinal count;
_OwnSelection( register XtermWidget termw, String *selections, Cardinal count)
static void _OwnSelection(termw, selections, count)    register XtermWidget termw;    String *selections;    Cardinal count;{    Atom* atoms = termw->screen.selection_atoms;    Cardinal i;    Boolean have_selection = False;    if (termw->screen.selection_length < 0) return;    if (count > termw->screen.sel_atoms_size) {	XtFree((char*)atoms);	atoms = (Atom*)XtMalloc(count*sizeof(Atom));	termw->screen.selection_atoms = atoms;	termw->screen.sel_atoms_size = count;    }    XmuInternStrings( XtDisplay((Widget)termw), selections, count, atoms );    for (i = 0; i < count; i++) {	int cutbuffer;	switch (atoms[i]) {	  case XA_CUT_BUFFER0: cutbuffer = 0; break;	  case XA_CUT_BUFFER1: cutbuffer = 1; break;	  case XA_CUT_BUFFER2: cutbuffer = 2; break;	  case XA_CUT_BUFFER3: cutbuffer = 3; break;	  case XA_CUT_BUFFER4: cutbuffer = 4; break;	  case XA_CUT_BUFFER5: cutbuffer = 5; break;	  case XA_CUT_BUFFER6: cutbuffer = 6; break;	  case XA_CUT_BUFFER7: cutbuffer = 7; break;	  default:	       cutbuffer = -1;	}	if (cutbuffer >= 0)	    if ( termw->screen.selection_length >		 4*XMaxRequestSize(XtDisplay((Widget)termw))-32)		fprintf(stderr,			"%s: selection too big (%d bytes), not storing in CUT_BUFFER%d\n",			xterm_name, termw->screen.selection_length, cutbuffer);	    else		XStoreBuffer( XtDisplay((Widget)termw), termw->screen.selection,			      termw->screen.selection_length, cutbuffer );	else if (!replyToEmacs) {	    have_selection |=		XtOwnSelection( (Widget)termw, atoms[i],			    termw->screen.selection_time,			    ConvertSelection, LoseSelection, SelectionDone );	}    }    if (!replyToEmacs)	termw->screen.selection_count = count;    if (!have_selection)	TrackText(0, 0, 0, 0);}