]> Kevux Git Server - fll/commitdiff
Cleanup: rename delimit_slash_count to slash_count
authorKevin Day <kevin@kevux.org>
Wed, 21 Mar 2012 03:23:03 +0000 (22:23 -0500)
committerKevin Day <kevin@kevux.org>
Wed, 21 Mar 2012 03:23:03 +0000 (22:23 -0500)
I see no reason to prepend delimit_ to the slash count.
Shrinking it makes things a little easier to read.

level_1/fl_fss/c/fss_basic.c
level_1/fl_fss/c/fss_extended.c

index a4cc3f350967403da22918917de80cfeadb9428b..05b11c14fcbd291c93b328ed758cac144cbd0312 100644 (file)
@@ -300,7 +300,7 @@ extern "C"{
     object_position.stop  = object->used;
 
     if (buffer.string[input->start] == f_fss_delimit_slash) {
-      f_string_length delimit_slash_count = 0;
+      f_string_length slash_count = 0;
 
       while (input->start <= input->stop && input->start < buffer.used) {
         if (buffer.string[input->start] == f_fss_delimit_placeholder) {
@@ -312,12 +312,12 @@ extern "C"{
 
         object->string[object_position.stop] = buffer.string[input->start];
         object_position.stop++;
-        delimit_slash_count++;
+        slash_count++;
         input->start++;
       } // while
 
       if (buffer.string[input->start] == f_fss_delimit_single_quote || buffer.string[input->start] == f_fss_delimit_double_quote) {
-        pre_allocate_size += delimit_slash_count + 1;
+        pre_allocate_size += slash_count + 1;
 
         if (pre_allocate_size > object->size) {
           f_resize_dynamic_string(status, (*object), pre_allocate_size + f_fss_default_allocation_step);
@@ -325,10 +325,10 @@ extern "C"{
           if (f_macro_test_for_allocation_errors(status)) return status;
         }
 
-        while (delimit_slash_count > 0) {
+        while (slash_count > 0) {
           object->string[object_position.stop] = f_fss_delimit_slash;
           object_position.stop++;
-          delimit_slash_count--;
+          slash_count--;
         } // while
 
         object->string[object_position.stop] = buffer.string[input->start];
@@ -378,12 +378,12 @@ extern "C"{
             object->string[object_position.stop] = f_fss_delimit_slash;
             object_position.stop++;
           } else if (buffer.string[input->start] == f_fss_delimit_slash) {
-            f_string_length delimit_slash_count = 0;
+            f_string_length slash_count = 0;
 
             do {
               object->string[object_position.stop] = buffer.string[input->start];
               object_position.stop++;
-              delimit_slash_count++;
+              slash_count++;
               input->start++;
 
               fl_macro_fss_skip_past_delimit_placeholders(buffer, (*input));
@@ -393,7 +393,7 @@ extern "C"{
               }
 
               if (buffer.string[input->start] == f_fss_delimit_double_quote) {
-                pre_allocate_size += delimit_slash_count;
+                pre_allocate_size += slash_count;
 
                 if (pre_allocate_size > object->size) {
                   f_resize_dynamic_string(status, (*object), pre_allocate_size + f_fss_default_allocation_step);
@@ -403,15 +403,15 @@ extern "C"{
 
                 break;
               } else if (buffer.string[input->start] != f_fss_delimit_slash) {
-                delimit_slash_count = 0;
+                slash_count = 0;
                 break;
               }
             } while (f_true);
 
-            while (delimit_slash_count > 0) {
+            while (slash_count > 0) {
               object->string[object_position.stop] = f_fss_delimit_slash;
               object_position.stop++;
-              delimit_slash_count--;
+              slash_count--;
             } // while
 
             continue;
index 25f345d7822383f0b6a0efd2b06e5334b696f9de..d5dc9846c50265165d4196ff99aaa29a82a8f931 100644 (file)
@@ -432,7 +432,7 @@ extern "C"{
     object_position.stop  = object->used;
 
     if (buffer.string[input->start] == f_fss_delimit_slash) {
-      f_string_length delimit_slash_count = 0;
+      f_string_length slash_count = 0;
 
       while (input->start <= input->stop && input->start < buffer.used) {
         if (buffer.string[input->start] == f_fss_delimit_placeholder) {
@@ -444,12 +444,12 @@ extern "C"{
 
         object->string[object_position.stop] = buffer.string[input->start];
         object_position.stop++;
-        delimit_slash_count++;
+        slash_count++;
         input->start++;
       } // while
 
       if (buffer.string[input->start] == f_fss_delimit_single_quote || buffer.string[input->start] == f_fss_delimit_double_quote) {
-        pre_allocate_size += delimit_slash_count + 1;
+        pre_allocate_size += slash_count + 1;
 
         if (pre_allocate_size > object->size) {
           f_resize_dynamic_string(status, (*object), pre_allocate_size + f_fss_default_allocation_step);
@@ -457,10 +457,10 @@ extern "C"{
           if (f_macro_test_for_allocation_errors(status)) return status;
         }
 
-        while (delimit_slash_count > 0) {
+        while (slash_count > 0) {
           object->string[object_position.stop] = f_fss_delimit_slash;
           object_position.stop++;
-          delimit_slash_count--;
+          slash_count--;
         } // while
 
         object->string[object_position.stop] = buffer.string[input->start];
@@ -524,12 +524,12 @@ extern "C"{
             object->string[object_position.stop] = f_fss_delimit_slash;
             object_position.stop++;
           } else if (buffer.string[input->start] == f_fss_delimit_slash) {
-            f_string_length delimit_slash_count = 0;
+            f_string_length slash_count = 0;
 
             do {
               object->string[object_position.stop] = buffer.string[input->start];
               object_position.stop++;
-              delimit_slash_count++;
+              slash_count++;
               input->start++;
 
               fl_macro_fss_skip_past_delimit_placeholders(buffer, (*input));
@@ -539,7 +539,7 @@ extern "C"{
               }
 
               if (buffer.string[input->start] == f_fss_delimit_double_quote) {
-                pre_allocate_size += delimit_slash_count;
+                pre_allocate_size += slash_count;
 
                 if (pre_allocate_size > object->size) {
                   f_resize_dynamic_string(status, (*object), pre_allocate_size + f_fss_default_allocation_step);
@@ -549,15 +549,15 @@ extern "C"{
 
                 break;
               } else if (buffer.string[input->start] != f_fss_delimit_slash) {
-                delimit_slash_count = 0;
+                slash_count = 0;
                 break;
               }
             } while (f_true);
 
-            while (delimit_slash_count > 0) {
+            while (slash_count > 0) {
               object->string[object_position.stop] = f_fss_delimit_slash;
               object_position.stop++;
-              delimit_slash_count--;
+              slash_count--;
             } // while
 
             continue;