1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
typedef struct input { struct input *next; } input_t; static input_t *inputs = (input_t *)((void *)0); void RemoveInput(unsigned long id) { input_t *ip; input_t *prev; while (1) if (ip == (input_t *)id) break; if (ip == (input_t *)((void *)0)) return; prev->next = ip->next; }