* Check to see if given item is selected, return index if it is */
| 1459 | * Check to see if given item is selected, return index if it is |
| 1460 | */ |
| 1461 | static int |
| 1462 | ListItemSelected(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 |
no outgoing calls
no test coverage detected