#ifndef __TYPES_H #define __TYPES_H typedef struct item_t { char *name; char *qty; } item; enum step_type { PREP = 0, COOK, }; typedef struct step_t { char *inst; char *duration; char *result; enum step_type type; } step; typedef struct recipe_t { char * filename; char * path; char * title; item **i; int in; step **s; int sn; } recipe; recipe * new_recipe(); void new_item(recipe * r); void new_step(recipe * r); void free_recipe(recipe * r); void free_item(item * i); void free_step(step * s); void show(recipe * r); void tojson(recipe * r); void tohtml(recipe * r); void torcp(recipe * r); void copy_items(recipe * dst, recipe * src); #endif /* __TYPES_H */