From 210cfc2f5987f3ece14925c02aaeed699cb058eb Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 4 May 2020 22:41:25 -0500 Subject: [PATCH] Cleanup: remove useless macros for f_string_location and update comments --- level_0/f_string/c/string.h | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/level_0/f_string/c/string.h b/level_0/f_string/c/string.h index 167b9da..b93b4b3 100644 --- a/level_0/f_string/c/string.h +++ b/level_0/f_string/c/string.h @@ -154,13 +154,11 @@ extern "C" { #endif // _di_f_string_lengths_ /** - * A structure designating a start and stop position that represents a sub-string inside of some parent string. - * - * Use this to avoid resizing, restructuring, and reallocating the parent string to separate the sub-string. + * A structure designating a start and stop range for some string. * * In general, this project uses the start and stop position inclusively, meaning that a range of 0 to 1 would include positions 0 and position 1. - * Therefore, 0 to 0 would be a position of 0. - * Set start to some value larger than stop to designate no range. + * Therefore, a range from 0 to 0 would be include position 0. + * Set start to some value larger than stop to designate that there is no range (such as start = 1, stop = 0). * * start: the start position. * stop: the stop position. @@ -172,19 +170,6 @@ extern "C" { } f_string_location; #define f_string_location_initialize { 1, 0 } - - #define f_macro_string_location_new(status, string_location, length) status = f_memory_new((void **) & string_location, sizeof(f_string_location), length) - #define f_macro_string_location_delete(status, string_location, length) status = f_memory_delete((void **) & string_location, sizeof(f_string_location), length) - #define f_macro_string_location_destroy(status, string_location, length) status = f_memory_destroy((void **) & string_location, sizeof(f_string_location), length) - - #define f_macro_string_location_delete_simple(string_location, length) f_memory_delete((void **) & string_location, sizeof(f_string_location), length) - #define f_macro_string_location_destroy_simple(string_location, length) f_memory_destroy((void **) & string_location, sizeof(f_string_location), length) - - #define f_macro_string_location_resize(status, string_location, old_length, new_length) \ - status = f_memory_resize((void **) & string_location, sizeof(f_string_location), old_length, new_length) - - #define f_macro_string_location_adjust(status, string_location, old_length, new_length) \ - status = f_memory_adjust((void **) & string_location, sizeof(f_string_location), old_length, new_length) #endif // _di_f_string_location_ /** -- 1.8.3.1