summaryrefslogtreecommitdiff
path: root/Base/home/anon/Source/little
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2020-08-15 10:58:22 +0300
committerAndreas Kling <kling@serenityos.org>2020-08-15 15:06:35 +0200
commite793cc3d1312c48f1f994a5eeec9f7a1d18487f3 (patch)
tree5ed342716aa9457265cd1a7d5e27baacd2448242 /Base/home/anon/Source/little
parent7eac9fe10e6917aaa24b6ca8f332f275aab74206 (diff)
downloadserenity-e793cc3d1312c48f1f994a5eeec9f7a1d18487f3.zip
Base: Modify "little" project
Diffstat (limited to 'Base/home/anon/Source/little')
-rw-r--r--Base/home/anon/Source/little/Makefile2
-rw-r--r--Base/home/anon/Source/little/little.hackstudio2
-rw-r--r--Base/home/anon/Source/little/main.cpp2
-rw-r--r--Base/home/anon/Source/little/other.cpp12
-rw-r--r--Base/home/anon/Source/little/other.h1
5 files changed, 18 insertions, 1 deletions
diff --git a/Base/home/anon/Source/little/Makefile b/Base/home/anon/Source/little/Makefile
index 7c29668846..53de0e50e3 100644
--- a/Base/home/anon/Source/little/Makefile
+++ b/Base/home/anon/Source/little/Makefile
@@ -1,5 +1,5 @@
PROGRAM = little
-OBJS = main.o
+OBJS = main.o other.o
CXXFLAGS = -g
all: $(PROGRAM)
diff --git a/Base/home/anon/Source/little/little.hackstudio b/Base/home/anon/Source/little/little.hackstudio
index 771584922f..ee2283a2fd 100644
--- a/Base/home/anon/Source/little/little.hackstudio
+++ b/Base/home/anon/Source/little/little.hackstudio
@@ -2,3 +2,5 @@ main.cpp
Makefile
little.hackstudio
test.frm
+other.cpp
+other.h
diff --git a/Base/home/anon/Source/little/main.cpp b/Base/home/anon/Source/little/main.cpp
index 1e8d4a58c0..2fa2d31126 100644
--- a/Base/home/anon/Source/little/main.cpp
+++ b/Base/home/anon/Source/little/main.cpp
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <sys/stat.h>
+#include "other.h"
enum TestEnum {
ValueOne,
@@ -19,6 +20,7 @@ int main(int, char**)
printf("my_struct.x is %d\n", my_struct.x);
for (int i = 0; i < 3; ++i) {
// This is a comment :^)
+ func();
printf("Hello friends!\n");
mkdir("/tmp/xyz", 0755);
}
diff --git a/Base/home/anon/Source/little/other.cpp b/Base/home/anon/Source/little/other.cpp
new file mode 100644
index 0000000000..69d7173c9f
--- /dev/null
+++ b/Base/home/anon/Source/little/other.cpp
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include "other.h"
+
+int func()
+{
+ int x = 1;
+ int y = 2;
+ printf("x: %d\n", x);
+ printf("y: %d\n", y);
+ printf("x+y: %d\n", x+y);
+ return x + y;
+}
diff --git a/Base/home/anon/Source/little/other.h b/Base/home/anon/Source/little/other.h
new file mode 100644
index 0000000000..45588fbf88
--- /dev/null
+++ b/Base/home/anon/Source/little/other.h
@@ -0,0 +1 @@
+int func();