diff --git a/doc/variables.xml b/doc/variables.xml index 18001005..ce3b05f5 100644 --- a/doc/variables.xml +++ b/doc/variables.xml @@ -3843,7 +3843,7 @@ - + @@ -3853,7 +3853,7 @@ - + @@ -3863,7 +3863,7 @@ - + diff --git a/src/core.cc b/src/core.cc index 63d46103..66eeab75 100644 --- a/src/core.cc +++ b/src/core.cc @@ -882,15 +882,18 @@ struct text_object *construct_text_object(char *s, const char *arg, long line, #ifdef __x86_64__ END OBJ(freq2, 0) obj->callbacks.print = &print_freq2; #endif /* __x86_64__ */ - + END OBJ(startcase, 0) obj->data.s = STRNDUP_ARG; + obj->callbacks.print = &print_startcase; + obj->callbacks.free = &gen_free_opaque; + // Deprecated, for compatibility purposes only END OBJ(start_case, 0) obj->data.s = STRNDUP_ARG; - obj->callbacks.print = &print_cap; + obj->callbacks.print = &print_startcase; obj->callbacks.free = &gen_free_opaque; - END OBJ(lower_case, 0) obj->data.s = STRNDUP_ARG; - obj->callbacks.print = &print_lower; + END OBJ(lowercase, 0) obj->data.s = STRNDUP_ARG; + obj->callbacks.print = &print_lowercase; obj->callbacks.free = &gen_free_opaque; - END OBJ(upper_case, 0) obj->data.s = STRNDUP_ARG; - obj->callbacks.print = &print_upper; + END OBJ(uppercase, 0) obj->data.s = STRNDUP_ARG; + obj->callbacks.print = &print_uppercase; obj->callbacks.free = &gen_free_opaque; END OBJ(catp, 0) obj->data.s = STRNDUP_ARG; obj->callbacks.print = &print_catp; diff --git a/src/misc.cc b/src/misc.cc index 6d00d219..61890538 100644 --- a/src/misc.cc +++ b/src/misc.cc @@ -85,7 +85,7 @@ void print_catp(struct text_object *obj, char *p, unsigned int p_max_size) { delete[] buf; } -void print_cap(struct text_object *obj, char *p, unsigned int p_max_size) { +void print_startcase(struct text_object *obj, char *p, unsigned int p_max_size) { unsigned int x = 0; int z = 0; char buf[DEFAULT_TEXT_BUFFER_SIZE]; @@ -108,7 +108,7 @@ void print_cap(struct text_object *obj, char *p, unsigned int p_max_size) { snprintf(p, p_max_size, "%s", buf); } -void print_lower(struct text_object *obj, char *p, unsigned int p_max_size) { +void print_lowercase(struct text_object *obj, char *p, unsigned int p_max_size) { evaluate(obj->data.s, p, p_max_size); for (unsigned int x = 0; x < p_max_size - 1 && p[x]; x++) { p[x] = tolower(p[x]); @@ -116,7 +116,7 @@ void print_lower(struct text_object *obj, char *p, unsigned int p_max_size) { p[p_max_size - 1] = '\0'; } -void print_upper(struct text_object *obj, char *p, unsigned int p_max_size) { +void print_uppercase(struct text_object *obj, char *p, unsigned int p_max_size) { evaluate(obj->data.s, p, p_max_size); for (unsigned int x = 0; x < p_max_size - 1 && p[x]; x++) { p[x] = toupper(p[x]); diff --git a/src/misc.h b/src/misc.h index 7033dbdb..2870f1c4 100644 --- a/src/misc.h +++ b/src/misc.h @@ -35,8 +35,8 @@ void print_cat(struct text_object *, char *, unsigned int); void print_catp(struct text_object *, char *, unsigned int); -void print_cap(struct text_object *, char *, unsigned int); -void print_lower(struct text_object *, char *, unsigned int); -void print_upper(struct text_object *, char *, unsigned int); +void print_startcase(struct text_object *, char *, unsigned int); +void print_lowercase(struct text_object *, char *, unsigned int); +void print_uppercase(struct text_object *, char *, unsigned int); long long apply_base_multiplier(const char *, long long int); #endif /* _MISC_H */