summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjonsykkel <jonrevold@gmail.com>2021-09-07 15:58:29 +0200
committerjonsykkel <jonrevold@gmail.com>2021-09-07 15:58:29 +0200
commit7fcac9ec012ef93f604f31d1f73fe6a0c2c24912 (patch)
treee1d6524973d355c8c9b5f9acd4cd9f8a8e2b3d23
parenta7ede3150171dc1d637b6972d2006cd82b3a6d08 (diff)
downloadokeffa-7fcac9ec012ef93f604f31d1f73fe6a0c2c24912.tar.gz
gopy
-rw-r--r--inc/okeffa/fz_basic.h2
-rw-r--r--src/fz_basic.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/inc/okeffa/fz_basic.h b/inc/okeffa/fz_basic.h
index a67ed8f..b7d6590 100644
--- a/inc/okeffa/fz_basic.h
+++ b/inc/okeffa/fz_basic.h
@@ -3,6 +3,8 @@
#include <okeffa/word.h>
+void fz_copy (word_t *a,word_t *o,size_t len);
+
void fz_clear (word_t *a,size_t len);
void fz_swap (word_t *a,word_t *b,size_t len);
void fz_mux (word_t *a,word_t *b,word_t *o,size_t len,wbool_t sel);
diff --git a/src/fz_basic.c b/src/fz_basic.c
index e8238de..a22e485 100644
--- a/src/fz_basic.c
+++ b/src/fz_basic.c
@@ -1,6 +1,12 @@
#include <okeffa/fz_basic.h>
#include <okeffa/w_op.h>
+void fz_copy(word_t *a,word_t *o,size_t len){
+ for(size_t x = 0;x < len;x++){
+ o[x] = a[x];
+ }
+}
+
void fz_clear(word_t *a,size_t len){
for(size_t x = 0;x < len;x++){
a[x] = 0;