]> git.ozlabs.org Git - ccan/blobdiff - tools/manifest.h
tools: manifest.c should use path_canon.
[ccan] / tools / manifest.h
index 588efe5f0185f0c5941cfaeb489d8ff930a589d9..d2de6437ed81d6ebb5197a0a2a56bbee528759d8 100644 (file)
@@ -13,7 +13,9 @@ enum compile_type {
 
 struct manifest {
        char *dir;
-       /* The module name, ie. final element of dir name */
+       /* The name of the module, ie. elements of dir name after ccan/. */
+       char *modname;
+       /* The final element of dir name */
        char *basename;
        struct ccan_file *info_file;
 
@@ -38,6 +40,7 @@ struct manifest {
 
        /* From tests/check_depends_exist.c */
        struct list_head deps;
+       struct list_head test_deps;
 
        /* From tests/license_exists.c */
        enum license license;
@@ -61,7 +64,6 @@ struct ccan_file {
        size_t contents_size;
 
        /* Use get_ccan_file_lines / get_ccan_line_info to fill these. */
-       unsigned int num_lines;
        char **lines;
        struct line_info *line_info;
 
@@ -80,8 +82,9 @@ struct ccan_file {
        char *simplified;
 };
 
-/* A new ccan_file, with the given name (talloc_steal onto returned value). */
-struct ccan_file *new_ccan_file(const void *ctx, const char *dir, char *name);
+/* A new ccan_file, with the given dir and name (either can be take()). */
+struct ccan_file *new_ccan_file(const void *ctx,
+                               const char *dir, const char *name);
 
 /* Use this rather than accessing f->contents directly: loads on demand. */
 const char *get_ccan_file_contents(struct ccan_file *f);
@@ -89,7 +92,4 @@ const char *get_ccan_file_contents(struct ccan_file *f);
 /* Use this rather than accessing f->lines directly: loads on demand. */
 char **get_ccan_file_lines(struct ccan_file *f);
 
-/* Where is the ccan dir?  Available after first manifest. */
-extern const char *ccan_dir;
-
 #endif /* CCAN_TOOLS_MANIFEST_H */