From ff38bddd4253b5adf08a84df34bfae32c8ae988d Mon Sep 17 00:00:00 2001 From: scratko Date: Fri, 14 Jun 2024 15:15:41 +0300 Subject: Shell-V release Added pipeline. Formatting shell.c (created lexical_analysys.c). Error codes. Some functions of queue.c are created by preprocessor. --- queue.c | 58 ---------------------------------------------------------- 1 file changed, 58 deletions(-) (limited to 'queue.c') diff --git a/queue.c b/queue.c index 3787236..9d77d00 100644 --- a/queue.c +++ b/queue.c @@ -1,27 +1,6 @@ #include "queue.h" #include -#if 0 -void w_queue_init(struct w_queue *q) -{ - q->first = NULL; - q->last = NULL; -} - -void w_queue_push(struct w_queue *q, char *word) -{ - struct word_item *tmp = malloc(sizeof(struct word_item)); - tmp->word = word; - tmp->next = NULL; - if(!q->first) { - q->first = tmp; - q->last = q->first; - } else { - q->last->next = tmp; - q->last = q->last->next; - } -} -#endif void w_queue_clear(struct w_queue *q) { struct word_item *tmp; @@ -58,22 +37,6 @@ void c_queue_init(struct c_queue *q) q->last_extracted_item = NULL; } -#if 0 -void c_queue_push(struct c_queue *q, char **cmdline) -{ - struct cmdline_item *tmp = malloc(sizeof(struct cmdline_item)); - tmp->cmdline = cmdline; - tmp->next = NULL; - if(!q->first) { - q->first = tmp; - q->last = q->first; - } else { - q->last->next = tmp; - q->last = q->last->next; - } -} -#endif - int c_queue_is_empty(struct c_queue *q) { return q->last_extracted_item->next == NULL; @@ -111,27 +74,6 @@ void c_queue_clear(struct c_queue *q) q->last = NULL; q->last_extracted_item = NULL; } -#if 0 -void p_queue_init(struct p_queue *q) -{ - q->first = NULL; - q->last = NULL; -} - -void p_queue_push(struct p_queue *q, int pid) -{ - struct pid_item *tmp = malloc(sizeof(struct pid_item)); - tmp->pid = pid; - tmp->next = NULL; - if(!q->first) { - q->first = tmp; - q->last = q->first; - } else { - q->last->next = tmp; - q->last = q->last->next; - } -} -#endif int p_queue_find_pid(struct p_queue *q, int pid) { -- cgit v1.2.3