Reformated comments and long lines
[mmh] / sbr / crawl_folders.c
index 28116b7..2691a78 100644 (file)
@@ -1,18 +1,20 @@
 /*
- * crawl_folders.c -- crawl folder hierarchy
- *
- * This code is Copyright (c) 2008, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
+** crawl_folders.c -- crawl folder hierarchy
+**
+** This code is Copyright (c) 2008, by the authors of nmh.  See the
+** COPYRIGHT file in the root directory of the nmh distribution for
+** complete copyright information.
+*/
 
 #include <h/mh.h>
 #include <h/crawl_folders.h>
 #include <h/utils.h>
 
 struct crawl_context {
-       int max;    /* how many folders we currently can hold in the array
-               * `folders', increased by CRAWL_NUMFOLDERS at a time */
+       int max;    /*
+                   ** how many folders we currently can hold in the array
+                   ** `folders', increased by CRAWL_NUMFOLDERS at a time
+                   */
        int total;  /* how many `folders' actually has */
        char **folders;  /* the array of folders */
        int start;
@@ -20,9 +22,9 @@ struct crawl_context {
 };
 
 /*
- * Add the folder name into the
- * list in a sorted fashion.
- */
+** Add the folder name into the
+** list in a sorted fashion.
+*/
 
 static void
 add_folder (char *fold, struct crawl_context *crawl)
@@ -70,8 +72,10 @@ add_children (char *name, struct crawl_context *crawl)
        }
 
        while ((dp = readdir (dd))) {
-               /* If the system supports it, try to skip processing of
-                * children we know are not directories or symlinks. */
+               /*
+               ** If the system supports it, try to skip processing of
+               ** children we know are not directories or symlinks.
+               */
                child_is_folder = -1;
 #if defined(HAVE_STRUCT_DIRENT_D_TYPE)
                if (dp->d_type == DT_DIR) {
@@ -84,8 +88,10 @@ add_children (char *name, struct crawl_context *crawl)
                        continue;
                }
                child = concat (prefix, dp->d_name, (void *)NULL);
-               /* If we have no d_type or d_type is DT_LNK or DT_UNKNOWN, stat the
-                * child to see what it is. */
+               /*
+               ** If we have no d_type or d_type is DT_LNK or DT_UNKNOWN,
+               ** stat the child to see what it is.
+               */
                if (child_is_folder == -1) {
                        child_is_folder = (stat (child, &st) != -1 && S_ISDIR(st.st_mode));
                }
@@ -140,8 +146,10 @@ crawl_folders (char *dir, crawl_callback_t *callback, void *baton)
 
        crawl_folders_body (crawl, dir, callback, baton);
 
-       /* Note that we "leak" the folder names, on the assumption that the caller
-        * is using them. */
+       /*
+       ** Note that we "leak" the folder names, on the assumption that the
+       ** caller is using them.
+       */
        free (crawl->folders);
        free (crawl);
 }