]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - src/apply-default-acl.c
Begin using Doxygen-style comments.
[apply-default-acl.git] / src / apply-default-acl.c
index 4f7b3b06a0e1f2cc835038f5701550c57c696859..f6aa5be75e860a6cf459fbf788d77614dfabcbe5 100644 (file)
@@ -1,3 +1,10 @@
+/**
+ * @file apply-default-acl.c
+ *
+ * @brief The entire implementation.
+ *
+ */
+
 /* On Linux, ftw.h needs this special voodoo to work. */
 #define _XOPEN_SOURCE 500
 
 static bool no_exec_mask = false;
 
 
+/**
+ * @brief Get the mode bits from the given path.
+ *
+ * @param path
+ *   The path (file or directory) whose mode we want.
+ *
+ * @return A mode_t (st_mode) structure containing the mode bits.
+ *   See sys/stat.h for details.
+ */
 mode_t get_mode(const char* path) {
-  /*
-   * Get the mode bits from path.
-   */
   if (path == NULL) {
     errno = ENOENT;
     return -1;
@@ -45,10 +58,15 @@ mode_t get_mode(const char* path) {
 }
 
 
+/**
+ * @brief Determine whether or not the given path is a regular file.
+ *
+ * @param path
+ *   The path to test.
+ *
+ * @return true if @c path is a regular file, false otherwise.
+ */
 bool is_regular_file(const char* path) {
-  /*
-   * Returns true if path is a regular file, false otherwise.
-   */
   if (path == NULL) {
     return false;
   }
@@ -63,10 +81,16 @@ bool is_regular_file(const char* path) {
   }
 }
 
+
+/**
+ * @brief Determine whether or not the given path is a directory.
+ *
+ * @param path
+ *   The path to test.
+ *
+ * @return true if @c path is a directory, false otherwise.
+ */
 bool is_directory(const char* path) {
-  /*
-   * Returns true if path is a directory, false otherwise.
-   */
   if (path == NULL) {
     return false;
   }