diff options
| author | Mason Reed <mason@vector35.com> | 2024-10-23 20:47:31 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2024-10-24 17:03:11 -0400 |
| commit | e151425087b6c0ee8c4d099bfc2d6d1268201db0 (patch) | |
| tree | 25160cf81aa6d650cf1497a078acc50f0062757c /plugins/warp/fixtures/src/library.c | |
| parent | 0f53c21d6a7abbfd48fd59ec7c15586f02777b7e (diff) | |
Add WARP integration
https://github.com/Vector35/warp/
Diffstat (limited to 'plugins/warp/fixtures/src/library.c')
| -rw-r--r-- | plugins/warp/fixtures/src/library.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/warp/fixtures/src/library.c b/plugins/warp/fixtures/src/library.c new file mode 100644 index 00000000..66a84ad5 --- /dev/null +++ b/plugins/warp/fixtures/src/library.c @@ -0,0 +1,33 @@ +#include <stdio.h> + +#include "library.h" + +int myFunction(int x) +{ + printf("%d\n", x); + return x; +} + +int recursiveFunc(int x); +int otherFunction(int x) +{ + x += 5; + if (x < 10) return otherFunction(x); + return recursiveFunc(x); +} + +int recursiveFunc(int x) +{ + if (x <= 0) return 0; + return x + otherFunction(x - 1); +} + +struct MyStruct myFunction2(int x) +{ + printf("MyStruct %d\n", x); + struct MyStruct myStruct; + myStruct.a = recursiveFunc(x); + myStruct.b = x * 10; + myStruct.c = "my struct"; + return myStruct; +}
\ No newline at end of file |
