| 313 | return history.data_size() / hist_entry_size; |
| 314 | } |
| 315 | int history_value(int idx, HistoryItem item) { |
| 316 | size_t hsize = history_size(); |
| 317 | size_t base = ((history.ival(0)+1+idx) % hsize) * hist_entry_size; |
| 318 | return history.get_int28(base + item*int28_size); |
| 319 | } |
| 320 | int history_count(int idx) { return history_value(idx, HIST_COUNT); } |
| 321 | int history_amount(int idx) { return history_value(idx, HIST_AMOUNT); } |
| 322 | int history_inuse_count(int idx) { return history_value(idx, HIST_INUSE_COUNT); } |