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-14 15:25:55 +0300
commit8f4f87eabec13330a2b3a974975053c1e4632a11 (patch)
tree58b0eae595fd62063287ca8fc727127166469e65 /queue.c
parent1ee0911f2def54f1b63d18b0924ac65c2db92f11 (diff)
downloadshell-8f4f87eabec13330a2b3a974975053c1e4632a11.tar.gz
shell-8f4f87eabec13330a2b3a974975053c1e4632a11.tar.bz2
shell-8f4f87eabec13330a2b3a974975053c1e4632a11.zip
Shell-V release
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)
{