mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Base: Modify "little" project
This commit is contained in:
parent
7eac9fe10e
commit
e793cc3d13
Notes:
sideshowbarker
2024-07-19 03:36:59 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/e793cc3d131 Pull-request: https://github.com/SerenityOS/serenity/pull/3153 Issue: https://github.com/SerenityOS/serenity/issues/3152 Reviewed-by: https://github.com/awesomekling
5 changed files with 18 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
PROGRAM = little
|
PROGRAM = little
|
||||||
OBJS = main.o
|
OBJS = main.o other.o
|
||||||
CXXFLAGS = -g
|
CXXFLAGS = -g
|
||||||
|
|
||||||
all: $(PROGRAM)
|
all: $(PROGRAM)
|
||||||
|
|
|
@ -2,3 +2,5 @@ main.cpp
|
||||||
Makefile
|
Makefile
|
||||||
little.hackstudio
|
little.hackstudio
|
||||||
test.frm
|
test.frm
|
||||||
|
other.cpp
|
||||||
|
other.h
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include "other.h"
|
||||||
|
|
||||||
enum TestEnum {
|
enum TestEnum {
|
||||||
ValueOne,
|
ValueOne,
|
||||||
|
@ -19,6 +20,7 @@ int main(int, char**)
|
||||||
printf("my_struct.x is %d\n", my_struct.x);
|
printf("my_struct.x is %d\n", my_struct.x);
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
// This is a comment :^)
|
// This is a comment :^)
|
||||||
|
func();
|
||||||
printf("Hello friends!\n");
|
printf("Hello friends!\n");
|
||||||
mkdir("/tmp/xyz", 0755);
|
mkdir("/tmp/xyz", 0755);
|
||||||
}
|
}
|
||||||
|
|
12
Base/home/anon/Source/little/other.cpp
Normal file
12
Base/home/anon/Source/little/other.cpp
Normal file
|
@ -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;
|
||||||
|
}
|
1
Base/home/anon/Source/little/other.h
Normal file
1
Base/home/anon/Source/little/other.h
Normal file
|
@ -0,0 +1 @@
|
||||||
|
int func();
|
Loading…
Reference in a new issue