tAdd comments to all functions - pm - barely a pack manager
 (HTM) git clone git://z3bra.org/pm
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 93c90c6b9d04d01fc6d7b5eefcb0ca488512beb7
 (DIR) parent 2c21ea32dfdc263efdc030050d16a88f28c2dd48
 (HTM) Author: z3bra <willyatmailoodotorg>
       Date:   Tue,  5 Jan 2016 18:57:36 +0100
       
       Add comments to all functions
       
       Diffstat:
         M pm.c                                |      30 +++++++++++++++++++-----------
       
       1 file changed, 19 insertions(+), 11 deletions(-)
       ---
 (DIR) diff --git a/pm.c b/pm.c
       t@@ -68,7 +68,7 @@ usage(char *name)
        
        
        /*
       - * returns 0 if a directory is empty, -1 otherwise
       + * Returns 0 if a directory is empty, -1 otherwise
         */
        int
        is_empty(char *dir)
       t@@ -92,7 +92,7 @@ is_empty(char *dir)
        
        
        /*
       - * recursive mkdir, taken from the ii project
       + * Recursive mkdir, taken from the ii project
         * http://nion.modprobe.de/blog/archives/357-Recursive-directory-creation.html
         */
        int
       t@@ -117,7 +117,7 @@ mkdir_parents(char *dir, mode_t mode)
        
        
        /*
       - * return a pointer to the basename, or NULL if path ends with '/'
       + * Return a pointer to the basename, or NULL if path ends with '/'
         */
        char *
        base_name(char *path)
       t@@ -126,6 +126,10 @@ base_name(char *path)
                return b ? b + 1 : path;
        }
        
       +/*
       + * Inspect the system, either by looking into a pack, checking installed
       + * files, or listing packs actually installed
       + */
        int
        inspect(char *name)
        {
       t@@ -145,7 +149,7 @@ inspect(char *name)
        
        
        /*
       - * write the content of an archive to a filedes
       + * Write the content of an archive to a filedes
         */
        int
        list_archive(int fd, char *filename)
       t@@ -178,7 +182,7 @@ list_archive(int fd, char *filename)
        
        
        /*
       - * write files installed by a pack to a filedes
       + * Write files installed by a pack to a filedes
         */
        int
        list_content(int fd, char *name)
       t@@ -200,7 +204,7 @@ list_content(int fd, char *name)
        
        
        /*
       - * write packs installed in PACKAGE_ROOT to a filedes
       + * Write packs installed in PACKAGE_ROOT to a filedes
         */
        int
        list_local(int fd, char *datadir)
       t@@ -237,7 +241,7 @@ list_local(int fd, char *datadir)
        
        
        /*
       - * write metadata about a pack file
       + * Write metadata about a pack file
         *
         * TODO:
         *        + /deps /asdep
       t@@ -290,7 +294,7 @@ metadata(char *datadir, struct pack *pack)
        }
        
        /*
       - * extract files into the given directory
       + * Extract files into the given directory
         */
        int
        unpack(char *root, char *in)
       t@@ -430,6 +434,9 @@ delete(const char *datadir, const char *rootfs, const char *name)
        }
        
        
       +/*
       + * Load a pack from a tarball and return a pack structure
       + */
        struct pack *
        pack_load_file(char *path)
        {
       t@@ -471,9 +478,7 @@ pack_load_file(char *path)
        }
        
        /*
       - * build a package structure from the given argument
       - *
       - * TODO: handle pack names (built from cache/repo file
       + * Build a package structure from the argument
         */
        struct pack *
        pack_load(char *name)
       t@@ -494,6 +499,9 @@ pack_load(char *name)
                return p;
        }
        
       +/*
       + * Free a pack structure
       + */
        void
        pack_unload(struct pack *p)
        {