From 167a0300de7466b7e1fc3dd95e59c7b5d04cb104 Mon Sep 17 00:00:00 2001
From: jaob99 <32195842+jaob99@users.noreply.github.com>
Date: Mon, 2 Oct 2017 06:34:54 +0100
Subject: [PATCH] more funcrtions + macros
added l_reverse(), l_swap_e(void*,int,int), l_create_t, l_create_td
---
build/liblist.a | Bin 16732 -> 17338 bytes
build/test.exe | Bin 49370 -> 49939 bytes
include/list.h | 5 ++++-
obj/list.o | Bin 13395 -> 13972 bytes
obj/sorting.o | Bin 2705 -> 2705 bytes
src/list.c | 24 +++++++++++++++++++++---
6 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/build/liblist.a b/build/liblist.a
index ab5e1ff360c8c23e151c15e32a868c8f1cb1fdc0..24a3f890764477f4df56a691dc8e69a3d0888f52 100644
GIT binary patch
delta 5594
zcmb_g3vg7`89wLk-OWNa56Bww+-$-U5(r7ii=%T9WL3JEF`AH
zwT-B0q$VEQ(#rJZOttMmokpp}M-c+*=s4KN3{z8UXV9uxl@<^zWBUE)+
C`ZXA=TT&z0U~uzH##k|9
zM#2C2xA=b)YkG!-95BKWaU);t4fjNLM|yfAVn5%SU{3TeF+(Xb>Cu-&z3(P&h;R88aZ5bqo68>;lfH$ScYcD#Wk<;Qon|p7?d!89
zE;*zer8AesBWXAD>%`@>1^h-4N^daUx**!p@7Uft^nU1RXHY(q+}U!$y!_bk
zDYW2I9h{!zYz*+waZZkG_}KIB74cKAU1~a=IH59Ei4RSLHr^&)OFw8l{IR$z<7>uO
zJ{G4kuFE}gd1`9!(Tst?(8r*0F<`X5kCCcXv^Z
zn*qYiEeqK!5`D9mCQ6zNFjk~%TYNh+=e|g??)V+u5oU(^fK6W}UFVU(>z1O`%q%4#
zA2TSKFofq{#(k>KEboV!53bByK#;j3R%BtW`i>%bXdE8N`^>5O)?$B{~%SfACz>&1gvRlGqQ%lZY+6g&NI@Cvc!s*~I;
zva)~9-Q&+@dw5138sPoZfHAgxPOfmJ+hRS@`1YM}8^+90#vL*0z?GL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->>~4ZzpHkB2@Oe;)`X7)}3K2-KC8R@bnI-{YfzjXxQXdU+LJ2Dd=~2SwNz1c2
zo@#Ih0?|$&b_)?j?H&-i!X5fD$lZ$m8z6sD$cKTba8`c<36Cl%Mtf*F;R;J95K%@i
zALOtiJqe^yDP|_fD#d37$O*-#0R+N~^77B%7NaaZlr*778H5hFol^pz{7s-&wjIhb
zodmzEH2SW5?NG8ORf+zR^c1gtkgpWN2I7+&(h84)34}3gM8{-F&%N)lHjA}elRWuCvgb@FF}(ZfJ(ZwT*onCC
ziAt$H269wUIs!shL@y9gviKR~k`iUa0L)R>n2E*&D={oI8bsY|rs_VC3;HGydb_6;0)+az{Bilkk>vOyrT!z*a5Tqr3eFu$_8)_o5gA^0UxQc`
zpKBna;S-+iCbV}{(JunYReY=T)dmhcc92I)|0{UeCFiar53sQ7#j
zQlTiv#N%s>BZTmo7T-H+Sbr!XTi^@IDn-bG7j>F$;XWG=qV`z@NCh$u`>X?LMqv0Q
zx)o#zjbeBLJ^-Yyl}AAih7y7^I|wo*lr)jkAb$;!54;85Bw^Hl#p9!>cg2e@5B^_W
C-$Zu+
diff --git a/include/list.h b/include/list.h
index fb4c9bf..09ee453 100644
--- a/include/list.h
+++ b/include/list.h
@@ -10,6 +10,8 @@
/* Functional Macros */
#define l_create_d(type) l_create(type, L_DEFAULT_BLOCKSIZE)
+#define l_create_t(type, bs) l_create(sizeof(type), bs)
+#define l_create_td(type) l_create_d(sizeof(type))
#define l_create_from_d(from, length, type) l_create_from(from,length, type, L_DEFAULT_BLOCKSIZE)
#define l_get_v(list,index, type) *(type*)l_get(list,index)
@@ -72,6 +74,7 @@ void l_nullify_if(list_t *t, _l_predicate f); /** Nullifies elements that s
void l_do(list_t *t, _l_action act); /** Calls on all elements of **/
void l_do_if(list_t *t, _l_action act, _l_predicate f); /** Calls on elements that satisfy **/
void l_swap(list_t *t, int index1, int index2); /** Swap elements at and **/
+void l_swap_e(list_t *t, void* temp, int index1, int index2); /** Swap elements, using specified memory location as temp stoarge (or NULL to alloc) **/
void l_sort(list_t *t, _l_sort_alg alg, _l_comparator comp); /** Sorts with algorithm using comparator **/
list_t* l_clone(const list_t *t); /** Creates new list from **/
list_t* l_clone_if(const list_t *t, _l_predicate f); /** Creates new list from with all elements that satisfy **/
@@ -79,6 +82,7 @@ int l_count(const list_t *t, _l_predicate f); /** Count all elements that s
void* l_push(list_t *t, const void* o); /** Adds new element at end of , updates ->length, and returns pointer to element **/
int l_pop(list_t *t, void* pop_into); /** Removes last element after copying it into (if not NULL), then updates ->length and returns new length. returns -1 if ->length is 0 **/
void* l_pop_n(list_t *t); /** Copies last element into newly malloc'd memory and calls l_pop, returns pointer to new memory. returns NULL if ->length is 0 **/
+void l_reverse(list_t *t); /** Reverse all elements in array **/
l_iterator li_create(list_t *list); /** Creates iterator from and initialises at index 0 **/
int li_next(l_iterator *it); /** Updates current element and increments pointer in and returns non-zero if index is in bounds **/
@@ -86,7 +90,6 @@ void* li_get(l_iterator *i); /** Updates and returns current element o
void* li_iterate(l_iterator *i); /** Updates and returns current element of iterator and increments pointer, or returns NULL if not in bounds **/
void* li_set(l_iterator *i,int index); /** Sets current index to then updates and returns current element, or NULL if index is not in bounds **/
-
/* Predefined Predicates */
L_P_FUNCTION(not_null); /** Allows all non-null elements **/
diff --git a/obj/list.o b/obj/list.o
index c566ac91f485586537b54f4a75f6e607af75aab2..6b4c53f837da9e86cfa3d42e4ce25b4ab0dcca01 100644
GIT binary patch
delta 4989
zcmY*ddvH|M9X{vg?y|}5h7DQrf^3q_nh*$iAqa{kAmLH127@CAvJIPsY`N^lWP$hy
zYbRpOq*UUelo6&r`iI(%)Hcdkw5SkJ$JWuYol%S0Kfo$z5zA9E((iZ9y(h3UY`*<|
z-|suG-#zynKIq)J(SHl~GWvX6&)A|Ne_`HgKVyI6jQzVt@~nJl<_2TR_@Sr6bw|fD
zHXHxSr>RgY{xq||g8If;im<IxZaO@AI)up~05mz`}@UuqA*$=3t9wz>IwH
z6qH}?6n)u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(?0mf2CDw187l6ms+*4TV-yu`(@X<0RDxv~eAiiy6jfCj3jaz#h6*LkEKJh-ss5k=
zvILbGUin_rp1I#50zY`%Ay0o?tX22-UV7#B#eNZ!KV0meOKXlkIBe)o|5aFoV)bQQ
z{sa9FN?Wtvb;L4b#^_IfUj*c`<{|M5`Eqkb)@uS}W9w#F)pEk2CJ5i3*+GK)*%fyS#(
PzQdx*Xu6q+wVxFL3pyO1
delta 127
zcmbOzI#G0k6^oSgJVpiv*1Xh;5(X9-5SxKDC9x!tfkk$52#d9^f*2D}Bqud5y(EKy
zMe#IHo`JQbvLKa#MX3tNW?@ar$xqHM&a488D1)RqAR-0~EGi)5co>*+GK)*%fyS#&
PzQdx*XuO$;wVxFL21*=@
diff --git a/src/list.c b/src/list.c
index a103292..0ef2f23 100644
--- a/src/list.c
+++ b/src/list.c
@@ -232,13 +232,20 @@ void l_do(list_t *t, _l_action act)
act(t, i);
}
+void l_swap_e(list_t *t, void* temp, int index1, int index2)
+{
+ if(temp==NULL) l_swap(t,index1,index2);
+ else {
+ memcpy(temp, l_get(t, index1), t->type);
+ memcpy(l_get(t, index1), l_get(t,index2), t->type);
+ memcpy(l_get(t,index2), temp, t->type);
+ }
+}
void l_swap(list_t *t, int index1, int index2)
{
void* temp = malloc(t->type);
- memcpy(temp, l_get(t, index1), t->type);
- memcpy(l_get(t, index1), l_get(t,index2), t->type);
- memcpy(l_get(t,index2), temp, t->type);
+ l_swap_e(t, temp, index1,index2);
free(temp);
}
@@ -316,6 +323,17 @@ void* l_pop_n(list_t *t)
} else return NULL;
}
+void l_reverse(list_t *t)
+{
+ register int i=0;
+ void* temp = malloc(t->type);
+ for(;ilength/2;i++)
+ {
+ l_swap_e(t,temp, i, t->length-(1+i));
+ }
+ free(temp);
+}
+
/* Iterator stuff */
int li_next(l_iterator *it)