|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T X
Length: 2048 (0x800)
Types: TextFile
Names: »XMLISTEXTENSION_C«
└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
└─⟦124ff5788⟧ »DATA«
└─⟦this⟧
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
└─⟦6f12a12be⟧ »DATA«
└─⟦this⟧
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
/*=================================================================
; IRP MULHOUSE AVRIL 92
;-------------------------------------------------------------------
; PROJECT : Z80 SIMULATOR
; STUDENTS : MOREAUX & VERGER
;
; FILE : XmListExtension.c
==================================================================
; DESCRIPTION :
; Definition de la fonction "Boolean XmListGetSelectedPos ()" non
; presente dans la version XFM intallee .
;----------------------------------------------------------------*/
#include <X11/Intrinsic.h>
#include <X11/IntrinsicP.h>
#include <Xm/XmP.h>
#include <Xm/Xm.h>
#include <Xm/List.h>
#include <Xm/ListP.h>
#include "XmListExtension.h"
/************************************************************************
* *
* XmListGetSelectedPositions - returns the positions of the selected *
* items in the list. CALLER MUST FREE SPACE! *
* *
************************************************************************/
Boolean XmListGetSelectedPos (Widget w, int **pos_list, int *pos_count)
{
XmListWidget lw = (XmListWidget) w;
register int i, *pos;
int j;
register int selectedCount=0;
if ((lw->list.items == NULL) ||
(lw->list.itemCount <= 0) ||
(lw->list.selectedItemCount <= 0))
return(FALSE);
/*
** lw->list.selectedItemCount may not give the real number of selected
** items; run through list and precalculate number of selected items.
*/
for (i = 0; i < lw->list.itemCount; i++)
if (lw->list.InternalList[i]->selected)
selectedCount++;
if (0 == selectedCount) return (FALSE);
pos = (int *)XtMalloc((sizeof(int) * selectedCount));
j = 0;
for (i = 0; i < lw->list.itemCount; i++)
if (lw->list.InternalList[i]->selected)
pos[j++] = (i+1);
*pos_list = pos; *pos_count = j;
return(TRUE);
}
/*----- End --------------------------------------------------------------*/