Insert an indev in the chain, always in LIFO way.
| 179 | |
| 180 | // Insert an indev in the chain, always in LIFO way. |
| 181 | bool InputDevices::insert(FILE* fp, const char* name, const char* display) |
| 182 | { |
| 183 | if (!m_head) |
| 184 | { |
| 185 | fb_assert(m_count == 0); |
| 186 | m_head = FB_NEW indev(fp, name, display); |
| 187 | } |
| 188 | else |
| 189 | { |
| 190 | fb_assert(m_count > 0); |
| 191 | indev* p = m_head; |
| 192 | m_head = FB_NEW indev(fp, name, display); |
| 193 | m_head->indev_next = p; |
| 194 | } |
| 195 | ++m_count; |
| 196 | return true; |
| 197 | } |
| 198 | |
| 199 | // Shortcut for inserting the currently input file in the indev chain. |
| 200 | bool InputDevices::insertIfp() |
no test coverage detected