back to scratko.xyz
summaryrefslogtreecommitdiff
path: root/queue.h
blob: fedcd0bf101ac8413f798828825188a555d10c87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef QUEUE_H_SENTRY
#define QUEUE_H_SENTRY

struct word_item {
    char *word;
    struct word_item *next;
};

struct queue {
    struct word_item *first;
    struct word_item *last;
};

void queue_init(struct queue *q);
void queue_push(struct queue *q, char *word);
void queue_clear(struct queue *q);
#if 0
void queue_processing(const struct queue *q, void (*callback)(char*));
#endif
int queue_get_word_count(const struct queue *q);
void queue_copy_words_to_args(const struct queue *q, char **cmdline);

#endif