Exemplo n.º 1
0
COUNT
GetIndexFromStarShip (QUEUE *pShipQ, HLINK hStarShip)
{
	COUNT Index;

	Index = 0;
	while (hStarShip != GetHeadLink (pShipQ))
	{
		HLINK hNextShip;
		LINK *StarShipPtr;

		StarShipPtr = LockLink (pShipQ, hStarShip);
		hNextShip = _GetPredLink (StarShipPtr);
		UnlockLink (pShipQ, hStarShip);

		hStarShip = hNextShip;
		++Index;
	}

	return Index;
}
Exemplo n.º 2
0
COUNT
GetIndexFromStarShip (PQUEUE pShipQ, HSTARSHIP hStarShip)
{
	COUNT Index;

	Index = 0;
	while (hStarShip != GetHeadLink (pShipQ))
	{
		HSTARSHIP hNextShip;
		STARSHIPPTR StarShipPtr;

		StarShipPtr = LockStarShip (pShipQ, hStarShip);
		hNextShip = _GetPredLink (StarShipPtr);
		UnlockStarShip (pShipQ, hStarShip);

		hStarShip = hNextShip;
		++Index;
	}

	return (Index);
}