add a key to the command queue */
| 271 | |
| 272 | /* add a key to the command queue */ |
| 273 | void |
| 274 | cmdq_add_key(int q, char key) |
| 275 | { |
| 276 | struct _cmd_queue *tmp = (struct _cmd_queue *) alloc(sizeof *tmp); |
| 277 | struct _cmd_queue *cq = gc.command_queue[q]; |
| 278 | |
| 279 | tmp->typ = CMDQ_KEY; |
| 280 | tmp->key = key; |
| 281 | tmp->next = NULL; |
| 282 | |
| 283 | while (cq && cq->next) |
| 284 | cq = cq->next; |
| 285 | |
| 286 | if (cq) |
| 287 | cq->next = tmp; |
| 288 | else |
| 289 | gc.command_queue[q] = tmp; |
| 290 | } |
| 291 | |
| 292 | /* add a direction to the command queue */ |
| 293 | void |
no test coverage detected