From 84a1ce65f1057e1bf7236fabcf16905d6ca10b13 Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Sun, 1 Nov 2015 04:50:25 +0100 Subject: [PATCH] Testing function and header files --- misc/my_math_lib/mymath.c | 7 +++++++ misc/my_math_lib/mymath.h | 3 +++ misc/my_math_lib/test.c | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 misc/my_math_lib/mymath.c create mode 100644 misc/my_math_lib/mymath.h create mode 100644 misc/my_math_lib/test.c diff --git a/misc/my_math_lib/mymath.c b/misc/my_math_lib/mymath.c new file mode 100644 index 0000000..8a11739 --- /dev/null +++ b/misc/my_math_lib/mymath.c @@ -0,0 +1,7 @@ +#include + +int plusone(int nr) +{ + return ++nr; +} + diff --git a/misc/my_math_lib/mymath.h b/misc/my_math_lib/mymath.h new file mode 100644 index 0000000..1a0d448 --- /dev/null +++ b/misc/my_math_lib/mymath.h @@ -0,0 +1,3 @@ +/* Specification of mymath libs */ + +extern int plusone(int nr); diff --git a/misc/my_math_lib/test.c b/misc/my_math_lib/test.c new file mode 100644 index 0000000..895bb02 --- /dev/null +++ b/misc/my_math_lib/test.c @@ -0,0 +1,7 @@ +#include +#include "mymath.h" + +int main() +{ + printf("Nr: %d\n", plusone(5)); +}