aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test2.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-05 10:28:57 +0200
committerlemon <lsof@mailbox.org>2023-06-05 10:58:35 +0200
commited47a54958f5bd48dc364d4a0f77f778768696bb (patch)
treec68f7b1426c198964b37238c6195f0569a15ab2b /test/test2.c
parentefc0cf8039cbff5e0f0d52fd7414c7186129b6ac (diff)
strlits
Diffstat (limited to 'test/test2.c')
-rw-r--r--test/test2.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test2.c b/test/test2.c
new file mode 100644
index 0000000..7d39164
--- /dev/null
+++ b/test/test2.c
@@ -0,0 +1,23 @@
+typedef struct v2d { double x,y; } v2d;
+
+
+
+void addp(v2d *a, const v2d *b)
+{
+ a->x += b->x;
+ a->y += b->y;
+}
+
+v2d add(v2d a, v2d b)
+{
+ addp(&a, &b);
+ return a;
+}
+
+short s(int a, int b) {
+ return a + b;
+}
+
+int i() {
+ return s(1,2);
+}