back to scratko.xyz
summaryrefslogtreecommitdiff
path: root/queue.c
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-06-14 15:15:41 +0300
committerscratko <m@scratko.xyz>2024-06-23 23:11:18 +0300
commitff38bddd4253b5adf08a84df34bfae32c8ae988d (patch)
tree69e39bf16cb93af3b9a592cf0fa3c489b13db499 /queue.c
parent1ee0911f2def54f1b63d18b0924ac65c2db92f11 (diff)
downloadshell-V.tar.gz
shell-V.tar.bz2
shell-V.zip
Shell-V releaseshell-V
Added pipeline. Formatting shell.c (created lexical_analysys.c). Error codes. Some functions of queue.c are created by preprocessor.
Diffstat (limited to 'queue.c')
-rw-r--r--queue.c58
1 files changed, 0 insertions, 58 deletions
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 <stdlib.h>
-#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)
{