diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8f4782a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,40 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Debug test_stack", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/test_stack.exe", + "cwd": "${workspaceFolder}", + "MIMode": "gdb", + "miDebuggerPath": "C:/ProgramData/mingw64/mingw64/bin/gdb.exe", + "preLaunchTask": "Build via Makefile" + }, + { + "name": "Debug test_numbers", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/test_numbers.exe", + "cwd": "${workspaceFolder}", + "MIMode": "gdb", + "miDebuggerPath": "C:/ProgramData/mingw64/mingw64/bin/gdb.exe", + "preLaunchTask": "Build via Makefile" + }, + { + "name": "Debug test_bintree", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/test_bintree.exe", + "cwd": "${workspaceFolder}", + "MIMode": "gdb", + "miDebuggerPath": "C:/ProgramData/mingw64/mingw64/bin/gdb.exe", + "preLaunchTask": "Build via Makefile" + } + + + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..dad5165 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,27 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build via Makefile", + "type": "shell", + "command": "mingw32-make", + "args": ["${input:target}"], + "options": { + "cwd": "${workspaceFolder}" + }, + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": "$gcc" + } + ], + "inputs": [ + { + "id": "target", + "type": "pickString", + "description": "Welches Makefile-Target soll gebaut werden?", + "options": ["test_stack", "test_numbers", "test_bintree", "doble", "unitTests"] + } + ] +} \ No newline at end of file diff --git a/bintree.o b/bintree.o index 47986c5..1e0c0fc 100644 Binary files a/bintree.o and b/bintree.o differ diff --git a/doble b/doble deleted file mode 100755 index 88b0bc9..0000000 Binary files a/doble and /dev/null differ diff --git a/doble.exe b/doble.exe new file mode 100644 index 0000000..8c669d3 Binary files /dev/null and b/doble.exe differ diff --git a/doble_initial b/doble_initial deleted file mode 100755 index 69c6a2e..0000000 Binary files a/doble_initial and /dev/null differ diff --git a/doble_initial.exe b/doble_initial.exe new file mode 100644 index 0000000..a91c009 Binary files /dev/null and b/doble_initial.exe differ diff --git a/highscore.o b/highscore.o index b268078..cf5a127 100644 Binary files a/highscore.o and b/highscore.o differ diff --git a/highscores.txt b/highscores.txt index 7f7e944..41cccf8 100644 --- a/highscores.txt +++ b/highscores.txt @@ -1,10 +1,10 @@ +Player1;19887 Lena;19811 Lena;19702 +Player1;19578 player_name;9981 Lena;9980 Lena;9978 Lena;9978 Lena;9976 Lena;9975 -Lena;9971 -Lena;9965 diff --git a/main.o b/main.o index f167660..a04c31b 100644 Binary files a/main.o and b/main.o differ diff --git a/numbers.o b/numbers.o index e87e9fe..7824224 100644 Binary files a/numbers.o and b/numbers.o differ diff --git a/stack.c b/stack.c index 0472a36..8c63ec6 100644 --- a/stack.c +++ b/stack.c @@ -1,15 +1,15 @@ #include #include "stack.h" -// Pushes data as pointer onto the stack. +// Push Daten auf den Stack legen. StackNode *push(StackNode *stack, void *data) { StackNode *node = (StackNode *)malloc(sizeof(StackNode)); if(node == NULL) return stack; // allocation failed -> return unchanged stack - node->data = data; - node->next = stack; + node->data = data; // Set the data for the new node + node->next = stack; // New node points to the previous top of the stack return node; } diff --git a/stack.o b/stack.o index 014f77e..3d96b0c 100644 Binary files a/stack.o and b/stack.o differ diff --git a/test_stack b/test_stack deleted file mode 100755 index fe4df87..0000000 Binary files a/test_stack and /dev/null differ diff --git a/test_stack.exe b/test_stack.exe new file mode 100644 index 0000000..b2c0199 Binary files /dev/null and b/test_stack.exe differ diff --git a/timer.o b/timer.o index c5283e8..80d7bf2 100644 Binary files a/timer.o and b/timer.o differ