MCPcopy Create free account
hub / github.com/NetHack/NetHack / ListItemSelected

Function ListItemSelected

outdated/sys/mac/macwin.c:1461–1474  ·  view source on GitHub ↗

* Check to see if given item is selected, return index if it is */

Source from the content-addressed store, hash-verified

1459 * Check to see if given item is selected, return index if it is
1460 */
1461static int
1462ListItemSelected(NhWindow *aWin, int item)
1463{
1464 int i;
1465
1466 HLock((char **) aWin->menuSelected);
1467 /* Find item in selection list */
1468 for (i = aWin->miSelLen - 1; i >= 0; i--) {
1469 if ((*aWin->menuSelected)[i] == item)
1470 break;
1471 }
1472 HUnlock((char **) aWin->menuSelected);
1473 return i;
1474}
1475
1476/*
1477 * Add item to selection list if it's not selected already

Callers 2

MenwClickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected