]> Kevux Git Server - fll/commitdiff
Update: Change "exists" to "exist" in fakefile syntax.
authorKevin Day <thekevinday@gmail.com>
Thu, 14 Jul 2022 02:05:08 +0000 (21:05 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 14 Jul 2022 02:05:08 +0000 (21:05 -0500)
The use of "exists" is grammatically correct and the use of "exist" is grammatically incorrect.
This is not in English grammar.
The practices of this project are to focus on using "s" strictly for plural.
The practices of this project are to use simple or base words more often.

The area in which proper grammar is allowed is when interacting with the user rather than with code.
A project like Fake has a target user who is a programmer.
This is a grey area.

The project is already using "if define" rather than "if defined".
For the purpose of keeping a consistent design, I am favoring "exist" over "exists" for this grey area.
Another bonus is that "exist" is shorter than "exists" (however trivial).

level_3/fake/c/private-common.c
level_3/fake/c/private-common.h
level_3/fake/c/private-make-operate_process.c
level_3/fake/c/private-make-operate_process_type.c
level_3/fake/c/private-make-operate_process_type.h
level_3/fake/c/private-make-operate_validate.c
level_3/fake/documents/fakefile.txt
level_3/fake/specifications/fakefile.txt

index 5042d4bb8b91d9d598347824b49730f4d74bb1a9..ab235743fff59873d38c9f85f6d32fda7e1bcbfd 100644 (file)
@@ -229,7 +229,7 @@ extern "C" {
   const f_string_static_t fake_make_operation_argument_if_define_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_define_s, 0, FAKE_make_operation_argument_if_define_s_length);
   const f_string_static_t fake_make_operation_argument_if_equal_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_equal_s, 0, FAKE_make_operation_argument_if_equal_s_length);
   const f_string_static_t fake_make_operation_argument_if_equal_not_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_equal_not_s, 0, FAKE_make_operation_argument_if_equal_not_s_length);
-  const f_string_static_t fake_make_operation_argument_if_exists_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_exists_s, 0, FAKE_make_operation_argument_if_exists_s_length);
+  const f_string_static_t fake_make_operation_argument_if_exist_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_exist_s, 0, FAKE_make_operation_argument_if_exist_s_length);
   const f_string_static_t fake_make_operation_argument_if_failure_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_failure_s, 0, FAKE_make_operation_argument_if_failure_s_length);
   const f_string_static_t fake_make_operation_argument_if_greater_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_greater_s, 0, FAKE_make_operation_argument_if_greater_s_length);
   const f_string_static_t fake_make_operation_argument_if_greater_equal_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_greater_equal_s, 0, FAKE_make_operation_argument_if_greater_equal_s_length);
index cf1fcb2810b16c50d23f0dd443355c2f9c9b015e..294ca74b9302499719d3326324ef5d40abe93b26 100644 (file)
@@ -1378,7 +1378,7 @@ extern "C" {
   #define FAKE_make_operation_argument_if_define_s        "define"
   #define FAKE_make_operation_argument_if_equal_s         "=="
   #define FAKE_make_operation_argument_if_equal_not_s     "<>"
-  #define FAKE_make_operation_argument_if_exists_s        "exists"
+  #define FAKE_make_operation_argument_if_exist_s         "exist"
   #define FAKE_make_operation_argument_if_failure_s       "failure"
   #define FAKE_make_operation_argument_if_greater_s       ">"
   #define FAKE_make_operation_argument_if_greater_equal_s ">="
@@ -1396,7 +1396,7 @@ extern "C" {
   #define FAKE_make_operation_argument_if_define_s_length        6
   #define FAKE_make_operation_argument_if_equal_s_length         2
   #define FAKE_make_operation_argument_if_equal_not_s_length     2
-  #define FAKE_make_operation_argument_if_exists_s_length        6
+  #define FAKE_make_operation_argument_if_exist_s_length         5
   #define FAKE_make_operation_argument_if_failure_s_length       7
   #define FAKE_make_operation_argument_if_greater_s_length       1
   #define FAKE_make_operation_argument_if_greater_equal_s_length 2
@@ -1414,7 +1414,7 @@ extern "C" {
   extern const f_string_static_t fake_make_operation_argument_if_define_s;
   extern const f_string_static_t fake_make_operation_argument_if_equal_s;
   extern const f_string_static_t fake_make_operation_argument_if_equal_not_s;
-  extern const f_string_static_t fake_make_operation_argument_if_exists_s;
+  extern const f_string_static_t fake_make_operation_argument_if_exist_s;
   extern const f_string_static_t fake_make_operation_argument_if_failure_s;
   extern const f_string_static_t fake_make_operation_argument_if_greater_s;
   extern const f_string_static_t fake_make_operation_argument_if_greater_equal_s;
@@ -1435,7 +1435,7 @@ extern "C" {
     fake_make_operation_if_type_if_define_e,
     fake_make_operation_if_type_if_equal_e,
     fake_make_operation_if_type_if_equal_not_e,
-    fake_make_operation_if_type_if_exists_e,
+    fake_make_operation_if_type_if_exist_e,
     fake_make_operation_if_type_if_failure_e,
     fake_make_operation_if_type_if_greater_e,
     fake_make_operation_if_type_if_greater_equal_e,
@@ -1446,7 +1446,7 @@ extern "C" {
     fake_make_operation_if_type_if_mode_e,
     fake_make_operation_if_type_if_not_e,
     fake_make_operation_if_type_if_not_define_e,
-    fake_make_operation_if_type_if_not_exists_e,
+    fake_make_operation_if_type_if_not_exist_e,
     fake_make_operation_if_type_if_not_group_e,
     fake_make_operation_if_type_if_not_is_e,
     fake_make_operation_if_type_if_not_mode_e,
index 8c1fce9880469aa3dfbaa046951e09835518e3d6..7b7c81bf58dc86b9dbb10e78fe16b1d3f8fdfacb 100644 (file)
@@ -227,8 +227,8 @@ extern "C" {
           } // for
         } // for
       }
-      else if (state_process->condition == fake_make_operation_if_type_if_exists_e) {
-        *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_false, state_process);
+      else if (state_process->condition == fake_make_operation_if_type_if_exist_e) {
+        *status = fake_make_operate_process_type_if_exist(data_make, arguments, F_false, state_process);
       }
       else if (state_process->condition == fake_make_operation_if_type_if_failure_e) {
         if (state_process->success) {
@@ -256,8 +256,8 @@ extern "C" {
       else if (state_process->condition == fake_make_operation_if_type_if_not_parameter_e) {
         fake_make_operate_process_type_if_parameter(data_make, arguments, F_true, state_process);
       }
-      else if (state_process->condition == fake_make_operation_if_type_if_not_exists_e) {
-        *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_true, state_process);
+      else if (state_process->condition == fake_make_operation_if_type_if_not_exist_e) {
+        *status = fake_make_operate_process_type_if_exist(data_make, arguments, F_true, state_process);
       }
       else if (state_process->condition == fake_make_operation_if_type_if_not_group_e) {
         *status = fake_make_operate_process_type_if_group(data_make, arguments, F_true, state_process);
index c769eda179345dbc2822a9a752b2129e953e258f..63227a3fd9d75ce1fc6641ac85b6b84e91845b41 100644 (file)
@@ -355,8 +355,8 @@ extern "C" {
   }
 #endif // _di_fake_make_operate_process_type_if_define_
 
-#ifndef _di_fake_make_operate_process_type_if_exists_
-  f_status_t fake_make_operate_process_type_if_exists(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
+#ifndef _di_fake_make_operate_process_type_if_exist_
+  f_status_t fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
 
     f_status_t status = F_none;
     f_array_length_t i = if_not ? 2 : 1;
@@ -412,7 +412,7 @@ extern "C" {
 
     return F_none;
   }
-#endif // _di_fake_make_operate_process_type_if_exists_
+#endif // _di_fake_make_operate_process_type_if_exist_
 
 #ifndef _di_fake_make_operate_process_type_if_is_
   f_status_t fake_make_operate_process_type_if_is(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
index 98676f748ca3640108512326197593f0ebe2a552..2e6661ebba12eb49f10c21a149ada85f34323b9f 100644 (file)
@@ -149,9 +149,9 @@ extern "C" {
  *
  * @see f_file_exists()
  */
-#ifndef _di_fake_make_operate_process_type_if_exists_
-  extern f_status_t fake_make_operate_process_type_if_exists(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
-#endif // _di_fake_make_operate_process_type_if_exists_
+#ifndef _di_fake_make_operate_process_type_if_exist_
+  extern f_status_t fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
+#endif // _di_fake_make_operate_process_type_if_exist_
 
 /**
  * Perform the if >, >=, <, and <= operation processes.
index 39955e50eac37cf8ea06d67054cc39f95351cc88..daf13a31045589417cd07b0c6f1b14c031e8d336 100644 (file)
@@ -618,7 +618,7 @@ extern "C" {
           fake_make_operation_argument_if_define_s,
           fake_make_operation_argument_if_equal_s,
           fake_make_operation_argument_if_equal_not_s,
-          fake_make_operation_argument_if_exists_s,
+          fake_make_operation_argument_if_exist_s,
           fake_make_operation_argument_if_failure_s,
           fake_make_operation_argument_if_greater_s,
           fake_make_operation_argument_if_greater_equal_s,
@@ -629,7 +629,7 @@ extern "C" {
           fake_make_operation_argument_if_mode_s,
           fake_make_operation_argument_if_not_s,
           fake_make_operation_argument_if_define_s,    // If not define, represented by just "define".
-          fake_make_operation_argument_if_exists_s,    // If not exists, represented by just "exists".
+          fake_make_operation_argument_if_exist_s,    // If not exist, represented by just "exist".
           fake_make_operation_argument_if_group_s,     // If not group, represented by just "group".
           fake_make_operation_argument_if_is_s,        // If not is, represented by just "is".
           fake_make_operation_argument_if_mode_s,      // If not mode, represented by just "mode".
@@ -644,7 +644,7 @@ extern "C" {
           fake_make_operation_if_type_if_define_e,
           fake_make_operation_if_type_if_equal_e,
           fake_make_operation_if_type_if_equal_not_e,
-          fake_make_operation_if_type_if_exists_e,
+          fake_make_operation_if_type_if_exist_e,
           fake_make_operation_if_type_if_failure_e,
           fake_make_operation_if_type_if_greater_e,
           fake_make_operation_if_type_if_greater_equal_e,
@@ -655,7 +655,7 @@ extern "C" {
           fake_make_operation_if_type_if_mode_e,
           fake_make_operation_if_type_if_not_e,
           fake_make_operation_if_type_if_not_define_e,
-          fake_make_operation_if_type_if_not_exists_e,
+          fake_make_operation_if_type_if_not_exist_e,
           fake_make_operation_if_type_if_not_group_e,
           fake_make_operation_if_type_if_not_is_e,
           fake_make_operation_if_type_if_not_mode_e,
@@ -668,7 +668,7 @@ extern "C" {
 
         const f_string_static_t if_not_type_strings[] = {
           fake_make_operation_argument_if_define_s,
-          fake_make_operation_argument_if_exists_s,
+          fake_make_operation_argument_if_exist_s,
           fake_make_operation_argument_if_group_s,
           fake_make_operation_argument_if_is_s,
           fake_make_operation_argument_if_mode_s,
@@ -678,7 +678,7 @@ extern "C" {
 
         const uint8_t if_not_type_codes[] = {
           fake_make_operation_if_type_if_not_define_e,
-          fake_make_operation_if_type_if_not_exists_e,
+          fake_make_operation_if_type_if_not_exist_e,
           fake_make_operation_if_type_if_not_group_e,
           fake_make_operation_if_type_if_not_is_e,
           fake_make_operation_if_type_if_not_mode_e,
@@ -711,7 +711,7 @@ extern "C" {
           dereference ? 3 : 4, // If define.
           dereference ? 2 : 3, // If equal (==).
           dereference ? 2 : 3, // If equal not (<>).
-          dereference ? 2 : 3, // If exists.
+          dereference ? 2 : 3, // If exist.
           dereference ? 1 : 2, // If failure.
           dereference ? 2 : 3, // If greater (>).
           dereference ? 2 : 3, // If greater equal (>=).
@@ -722,7 +722,7 @@ extern "C" {
           dereference ? 4 : 5, // If mode.
           dereference ? 3 : 4, // If not.
           dereference ? 5 : 6, // If not define.
-          dereference ? 3 : 4, // If not exists.
+          dereference ? 3 : 4, // If not exist.
           dereference ? 4 : 5, // If not group.
           dereference ? 4 : 5, // If not is.
           dereference ? 5 : 6, // If not mode.
@@ -735,7 +735,7 @@ extern "C" {
 
         const uint8_t if_not_type_minimum[] = {
           dereference ? 4 : 5, // If not define.
-          dereference ? 3 : 4, // If not exists.
+          dereference ? 3 : 4, // If not exist.
           dereference ? 4 : 5, // If not group.
           dereference ? 4 : 5, // If not is.
           dereference ? 5 : 6, // If not mode.
@@ -841,11 +841,11 @@ extern "C" {
             return;
           }
 
-          if (state_process->condition == fake_make_operation_if_type_if_exists_e || state_process->condition == fake_make_operation_if_type_if_not_exists_e) {
+          if (state_process->condition == fake_make_operation_if_type_if_exist_e || state_process->condition == fake_make_operation_if_type_if_not_exist_e) {
             return;
           }
 
-          if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_is_e || state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition > fake_make_operation_if_type_if_not_exists_e && state_process->condition < fake_make_operation_if_type_if_success_e) {
+          if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_is_e || state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition > fake_make_operation_if_type_if_not_exist_e && state_process->condition < fake_make_operation_if_type_if_success_e) {
             if (state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition == fake_make_operation_if_type_if_not_mode_e) {
               if (fl_string_dynamic_compare(fake_make_operation_argument_is_s, arguments.array[k]) == F_equal_to_not) {
                 if (fl_string_dynamic_compare(fake_make_operation_argument_has_s, arguments.array[k]) == F_equal_to_not) {
@@ -965,7 +965,7 @@ extern "C" {
                     }
                   }
                 }
-                else if (state_process->condition != fake_make_operation_if_type_if_exists_e && state_process->condition != fake_make_operation_if_type_if_is_e) {
+                else if (state_process->condition != fake_make_operation_if_type_if_exist_e && state_process->condition != fake_make_operation_if_type_if_is_e) {
 
                   // The existence tests do not need to happen here for *_if_exists and *_if_is as those two types will handle performing them during the process stage.
                   status_file = f_file_exists(arguments.array[i], dereference);
index 7ceeffb726427fd2519b9e632a1793e187107884..b10ee075ebf42424825d69f3cfee5dc155d9627b 100644 (file)
@@ -253,9 +253,9 @@ Fakefile Documentation:
           Test if one or more names are defined as an environment variable.
           For example, "if define PWD SHELL" would test if both the "PWD" and the "SHELL" variables are defined via the environment variables.
 
-        - exists "file path"\:
+        - exist "file path"\:
           Test if file exists.
-          For example, "if exists "a.txt" "b.txt" would test if both the file a.txt and b.txt exist.
+          For example, "if exist "a.txt" "b.txt" would test if both the file a.txt and b.txt exist.
 
         - failure\:
           Test if the previous section operation failed.
@@ -279,7 +279,7 @@ Fakefile Documentation:
 
           Only the following if conditions are supported\:
           - define.
-          - exists.
+          - exist.
           - group.
           - is.
           - mode.
@@ -288,7 +288,7 @@ Fakefile Documentation:
 
           Examples\:
           - "if not parameter work"
-          - "if not exists documentation.txt"
+          - "if not exist documentation.txt"
 
         - owner "some mode" "some file"\:
           Test if one or more files has the given owner.
@@ -594,7 +594,7 @@ Fakefile Documentation:
   The default behavior is normally to dereference the link target.
 
   For example, consider a symbolic link, called "some_file", that points to a file that does not exist (which means that the link in question is a broken link).
-  The Operation "if exists some_file" would return false.
-  The Operation "if no_dereference exists some_file" would return true.
+  The Operation "if exist some_file" would return false.
+  The Operation "if no_dereference exist some_file" would return true.
   This is because the symbolic link itself, "some_file", does exist but the file it is pointing to does not.
   The "no_dereference" is ignored for conditions that do not need it.
index 0669089731d4683c325727635f6ebe83f5abdb80..40d06aee69812ad79c1e061b8adfe1cf08003654 100644 (file)
@@ -86,13 +86,13 @@ Fakefile Specification:
   - <=: Two or more Content.
   - <>: Two or more Content.
   - define: One or more Content are valid environment variable name.
-  - exists: One or more Content representing the files to check the existence of.
+  - exist: One or more Content representing the files to check the existence of.
   - failure: has no other Content.
   - group: First Content is the name of a group. Second or more Content are paths to files.
   - is: First Content is a list of "block", "character", "no_dereference", "directory", "fifo", "link", "regular" , or "socket" followed by "for" and then the Remaining Content that are paths to files.
   - mode: First Content is either "has", "is", or "no_dereference". Second Content is a valid file mode. Third or more Content are paths to files.
-  - no_dereference: A non-condition inserted before any of "exists", "is", and "mode" (then the second Content is the actual condition followed by any Content associated with that condition).
-  - not: First Content is one of "define", "exists", "group", "is", "mode", "no_dereference", "owner", or "parameter" and all remaining Content are based on the First Content's "if" Section Operation Content rules.
+  - no_dereference: A non-condition inserted before any of "exist", "is", and "mode" (then the second Content is the actual condition followed by any Content associated with that condition).
+  - not: First Content is one of "define", "exist", "group", "is", "mode", "no_dereference", "owner", or "parameter" and all remaining Content are based on the First Content's "if" Section Operation Content rules.
   - owner: First Content is the name of an owner. Second or more Content are paths to files.
   - parameter: One or more Content are valid IKI names.
   - success: has no other Content.