Lines Matching +full:group +full:- +full:index +full:- +full:shift
1 // SPDX-License-Identifier: GPL-2.0
57 [MSG_CTRL] = "control-",
73 [MSG_CTL_SHIFT] = "shift",
77 [MSG_CTL_LSHIFT] = "l shift",
81 [MSG_CTL_CAPSSHIFT] = "caps shift",
107 [MSG_STATE_SHIFT] = "shift",
151 [MSG_KEYNAME_LEFTSHFT] = "left shift",
163 [MSG_KEYNAME_RIGHTSHFT] = "right shift",
402 char *spk_msg_get(enum msg_index_t index) in spk_msg_get() argument
404 return speakup_msgs[index]; in spk_msg_get()
438 while ((*input != '\0') && strchr(" 0+-#", *input)) in skip_flags()
460 * the default group of formatted messages.
496 size_t length1 = end1 - *input1; in compare_specifiers()
497 size_t length2 = end2 - *input2; in compare_specifiers()
539 * Description: Add a user-supplied message to the user_messages array.
543 * - index: a message number, as found in i18n.h.
544 * - text: text of message. Not NUL-terminated.
545 * - length: number of bytes in text.
547 * -EINVAL - Invalid format specifiers in formatted message or illegal index.
548 * -ENOMEM - Unable to allocate memory.
550 ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) in spk_msg_set() argument
555 if ((index < MSG_FIRST_INDEX) || (index >= MSG_LAST_INDEX)) in spk_msg_set()
556 return -EINVAL; in spk_msg_set()
560 return -ENOMEM; in spk_msg_set()
562 if (index >= MSG_FORMATTED_START && in spk_msg_set()
563 index <= MSG_FORMATTED_END && in spk_msg_set()
564 !fmt_validate(speakup_default_msgs[index], newstr)) { in spk_msg_set()
566 return -EINVAL; in spk_msg_set()
569 if (speakup_msgs[index] != speakup_default_msgs[index]) in spk_msg_set()
570 kfree(speakup_msgs[index]); in spk_msg_set()
571 speakup_msgs[index] = newstr; in spk_msg_set()
577 * Find a message group, given its name. Return a pointer to the structure
582 struct msg_group_t *group = NULL; in spk_find_msg_group() local
587 group = &all_groups[i]; in spk_find_msg_group()
591 return group; in spk_find_msg_group()
594 void spk_reset_msg_group(struct msg_group_t *group) in spk_reset_msg_group() argument
601 for (i = group->start; i <= group->end; i++) { in spk_reset_msg_group()
616 /* Free user-supplied strings when module is unloaded: */
619 enum msg_index_t index; in spk_free_user_msgs() local
623 for (index = MSG_FIRST_INDEX; index < MSG_LAST_INDEX; index++) { in spk_free_user_msgs()
624 if (speakup_msgs[index] != speakup_default_msgs[index]) { in spk_free_user_msgs()
625 kfree(speakup_msgs[index]); in spk_free_user_msgs()
626 speakup_msgs[index] = speakup_default_msgs[index]; in spk_free_user_msgs()