commit: 8e0ed59df4939a08ce6075d753505f8524dfbee2
parent 34b5b561e4d57fdb782ac958502c665e965a990f
Author: neauoire <aliceffekt@gmail.com>
Date: Thu, 19 Dec 2019 16:12:36 -0500
Progress on new site builder
Diffstat:
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/source/main b/source/main
Binary files differ.
diff --git a/source/main.c b/source/main.c
@@ -8,7 +8,7 @@ int main(void) {
#include "ingredients.c"
#include "recipes.c"
- print_recipe(sweet_sour_lentils);
+ print_recipe(&sweet_sour_lentils);
return (0);
}
\ No newline at end of file
diff --git a/source/recipe.c b/source/recipe.c
@@ -54,13 +54,13 @@ void add_part(Recipe *r, RecipePart *p){
r->parts_len++;
}
-void print_recipe(Recipe recipe) {
- printf("name:%s, portions:%s date:%d time:%d\n",recipe.name,recipe.portions,recipe.date,recipe.time);
+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);
- // for(int i = 0; i < recipe.parts[i].servings_len; ++i) {
- // printf("-- %s\n", recipe.parts[i].servings[i].ingredient->name);
+ 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);
+ // for(int i = 0; i < recipe->parts[i]->instructions_len; ++i) {
+ // printf("-- %s\n", recipe->parts[i]->instructions[i]);
// }
}