mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
Renamed start_case to startcase, lower_case to lowercase and upper_case to uppercase
This commit is contained in:
parent
12bced05fe
commit
f7c15b027a
@ -3843,7 +3843,7 @@
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>
|
||||
<option>start_case</option>
|
||||
<option>startcase</option>
|
||||
</command>
|
||||
<option>text</option>
|
||||
</term>
|
||||
@ -3853,7 +3853,7 @@
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>
|
||||
<option>lower_case</option>
|
||||
<option>lowercase</option>
|
||||
</command>
|
||||
<option>text</option>
|
||||
</term>
|
||||
@ -3863,7 +3863,7 @@
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>
|
||||
<option>upper_case</option>
|
||||
<option>uppercase</option>
|
||||
</command>
|
||||
<option>text</option>
|
||||
</term>
|
||||
|
15
src/core.cc
15
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;
|
||||
|
@ -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]);
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user