From 031f0b4c6a42b18cd2d991283c9a6246826d6b9f Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Wed, 13 Mar 2024 16:16:55 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=D0=9E=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D0=B8?= =?UTF-8?q?=20'cv4/list=5Fops.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv4/list_ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cv4/list_ops.c b/cv4/list_ops.c index 0c7dd34..8c66e6f 100644 --- a/cv4/list_ops.c +++ b/cv4/list_ops.c @@ -1,6 +1,9 @@ #include "list_ops.h" list_t *new_list(size_t length, list_element_t elements[]){ + list_t* list = (list_t*)malloc(sizeof(list_t) + length * sizeof(list_element_t)); + list->length = length; + memcpy(list->elements,elements, length*sizeof(list_element_t)); return NULL; } From 94f39b89eeff4027715ea58cd236d5995d3038ba Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Wed, 13 Mar 2024 16:17:43 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=D0=9E=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D0=B8?= =?UTF-8?q?=20'cv4/list=5Fops.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv4/list_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv4/list_ops.c b/cv4/list_ops.c index 8c66e6f..b535771 100644 --- a/cv4/list_ops.c +++ b/cv4/list_ops.c @@ -8,7 +8,7 @@ list_t *new_list(size_t length, list_element_t elements[]){ } -list_t *append_list(list_t *list1, list_t *list2){ +/*list_t *append_list(list_t *list1, list_t *list2){ return NULL; } @@ -51,4 +51,4 @@ list_t *reverse_list(list_t *list){ void delete_list(list_t *list){ -} \ No newline at end of file +}*/ \ No newline at end of file From 00566020a82667f786be2a4e35a90d48ded274ed Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Wed, 13 Mar 2024 16:19:24 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=D0=9E=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D0=B8?= =?UTF-8?q?=20'cv4/list=5Fops.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv4/list_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cv4/list_ops.c b/cv4/list_ops.c index b535771..8d7a0f8 100644 --- a/cv4/list_ops.c +++ b/cv4/list_ops.c @@ -1,4 +1,5 @@ #include "list_ops.h" +#include list_t *new_list(size_t length, list_element_t elements[]){ list_t* list = (list_t*)malloc(sizeof(list_t) + length * sizeof(list_element_t)); From 9e54510ffc401c05b2f8789dd4624ae1332dce7b Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Wed, 13 Mar 2024 16:20:15 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=D0=9E=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D0=B8?= =?UTF-8?q?=20'cv4/list=5Fops.h'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv4/list_ops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cv4/list_ops.h b/cv4/list_ops.h index 14a56d8..39dfabe 100644 --- a/cv4/list_ops.h +++ b/cv4/list_ops.h @@ -1,6 +1,7 @@ #ifndef LIST_OPS_H #define LIST_OPS_H +#include #include #include From fd4d599dee773e7219aac52f9e28dc6a97be2d26 Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Wed, 13 Mar 2024 16:34:03 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=D0=9E=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D0=B8?= =?UTF-8?q?=20'cv4/list=5Fops.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv4/list_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv4/list_ops.c b/cv4/list_ops.c index 8d7a0f8..7cc74dc 100644 --- a/cv4/list_ops.c +++ b/cv4/list_ops.c @@ -9,7 +9,7 @@ list_t *new_list(size_t length, list_element_t elements[]){ } -/*list_t *append_list(list_t *list1, list_t *list2){ +list_t *append_list(list_t *list1, list_t *list2){ return NULL; } @@ -52,4 +52,4 @@ list_t *reverse_list(list_t *list){ void delete_list(list_t *list){ -}*/ \ No newline at end of file +} \ No newline at end of file