diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2021-09-02 17:23:42 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2021-09-02 17:23:42 +0300 |
commit | 9deed51aa2df7ca5979963f7452a6439ad2d3767 (patch) | |
tree | 7ceea0494c01eeff7e7fdaaa8b1bfc7e5adf62c1 /types.h | |
download | foodtools-9deed51aa2df7ca5979963f7452a6439ad2d3767.tar.gz foodtools-9deed51aa2df7ca5979963f7452a6439ad2d3767.tar.bz2 foodtools-9deed51aa2df7ca5979963f7452a6439ad2d3767.zip |
initial
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 46 |
1 files changed, 46 insertions, 0 deletions
@@ -0,0 +1,46 @@ +#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 */ |