X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2F_infotojson%2Finfotojson.h;h=7b979240eaac17b751a6a886a86a2458ac26fb93;hp=5fb4ad3d42c64cd0064719250e34bf628b626af2;hb=a0cf074ca2bb5335a28df003fd52bc287b133dff;hpb=f51dd128c16fd6c654bdfbdcb19204bf9a867fe5 diff --git a/tools/_infotojson/infotojson.h b/tools/_infotojson/infotojson.h index 5fb4ad3d..7b979240 100644 --- a/tools/_infotojson/infotojson.h +++ b/tools/_infotojson/infotojson.h @@ -13,24 +13,27 @@ #include #include "database.h" #include "ccan/talloc/talloc.h" +#include "ccan/string/string.h" #include "utils.h" +#include "tools/tools.h" struct json { char *module; char *title; char *author; + char **depends; char **desc; }; /* Function for storing json structure to file given struct json*/ -int storejsontofile(struct json *jsonobj, char *jsonfile); +static int storejsontofile(const struct json *jsonobj, const char *jsonfile); /*Function to store in database*/ -int storejsontodb(struct json *jsonobj, char *db); +static int storejsontodb(const struct json *jsonobj, const char *db); /*create json structure*/ -struct json * createjson(char **infofile, char *author); +static struct json *createjson(char **infofile, const char *author, const char *directory); /*Extract info from file*/ -char ** extractinfo(char **file); +static char **extractinfo(char **file);