logo

Grimgrains

Unnamed repository; edit this file 'description' to name the repository.
commit: e433ae6e61ed29dd1b447c0e415afd5b75d12a77
parent 90e4ce8b632835df105ad909fd7e045da7faca6c
Author: neauoire <aliceffekt@gmail.com>
Date:   Thu, 19 Dec 2019 16:44:36 -0500

Progress on new site builder

Diffstat:

Msource/build.sh2+-
Msource/main0
Msource/recipe.c8+++++---
3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/source/build.sh b/source/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -cc -std=c99 -DDEBUG -Wall -Wpedantic -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -lm -Og -fsanitize=address -fsanitize=undefined main.c -o main +cc -std=c99 -DDEBUG -Wall -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -lm -Og -fsanitize=address -fsanitize=undefined main.c -o main ./main \ No newline at end of file diff --git a/source/main b/source/main Binary files differ. diff --git a/source/recipe.c b/source/recipe.c @@ -58,10 +58,12 @@ void print_recipe(Recipe *recipe) { printf("name:%s, portions:%s date:%d time:%d\n",recipe->name,recipe->portions,recipe->date,recipe->time); printf("===========\nParts:\n"); for(int i = 0; i < recipe->parts_len; ++i) { - printf("- %s(%d ingredients %d instructions)\n", recipe->parts[i]->name, recipe->parts[i]->servings_len, recipe->parts[i]->instructions_len); + printf("-- %s(%d ingredients %d instructions)\n", recipe->parts[i]->name, recipe->parts[i]->servings_len, recipe->parts[i]->instructions_len); for(int i2 = 0; i2 < recipe->parts[i]->instructions_len; ++i2) { - printf("-- %s\n", recipe->parts[i]->instructions[i2]); - + printf("---- %s\n", recipe->parts[i]->instructions[i2]); + } + for(int i2 = 0; i2 < recipe->parts[i]->servings_len; ++i2) { + printf("------ %s\n", recipe->parts[i]->servings[i2].ingredient->name); } } // printf("===========\nIngredients:\n");