summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-07-03 06:36:13 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-04 21:09:16 -0700
commit81f179e777ebe8d5bc2cc80a7e11bb9559df24fd (patch)
tree29df88454f48a86dd84485e0671daf839361493d /src
parentfde7b0b847aeb4f0c62abcc4bc7206ac858902eb (diff)
til_str: mechanical rename s/seed/string/
I get why I called this seed at the time as it was the starting string of a potentially larger buildup... but it's just ambiguous naming with the other more descriptive uses of seed in the tree, and isn't even really appropriate.
Diffstat (limited to 'src')
-rw-r--r--src/til_str.c10
-rw-r--r--src/til_str.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/til_str.c b/src/til_str.c
index 6b85556..298e88d 100644
--- a/src/til_str.c
+++ b/src/til_str.c
@@ -49,20 +49,20 @@ static til_str_t * til_str_nulstr(size_t minsize)
}
-/* allocate a new til_str, starting with a dup of seed, just use "" for an empty str, there is no NULL str */
-til_str_t * til_str_new(const char *seed)
+/* allocate a new til_str, starting with a dup of string, just use "" for an empty str, there is no NULL str */
+til_str_t * til_str_new(const char *string)
{
til_str_t *str;
size_t len;
- assert(seed);
+ assert(string);
- len = strlen(seed);
+ len = strlen(string);
str = til_str_nulstr(len + 1);
if (!str)
return NULL;
- memcpy(str->buf, seed, len);
+ memcpy(str->buf, string, len);
str->size.used += len;
return str;
diff --git a/src/til_str.h b/src/til_str.h
index 544185c..d7fa5bf 100644
--- a/src/til_str.h
+++ b/src/til_str.h
@@ -3,7 +3,7 @@
typedef struct til_str_t til_str_t;
-til_str_t * til_str_new(const char *seed);
+til_str_t * til_str_new(const char *string);
void * til_str_free(til_str_t *str);
til_str_t * til_str_newf(const char *format, ...);
int til_str_appendf(til_str_t *str, const char *format, ...);
© All Rights Reserved