summaryrefslogtreecommitdiff
path: root/drivers/accessibility/speakup/i18n.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-02 10:59:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-09 18:15:50 +0100
commit508155944752f6e51dbc0a7273d933e954e4ed64 (patch)
tree66b9165b5dfa73f4c3d4f64cde89fd28d392066c /drivers/accessibility/speakup/i18n.h
parenta79db45fa54e2420c9fe977a6a5835c466888b5a (diff)
speakup: document the usage of enum values
The cursor tracking modes enum, the edge enum, and the read_all commands enum should be used as such in the source code, to make it more readable and make gcc catch missing values in switches. Also, some values of enums are coupled with others, we at least need to document these. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Link: https://lore.kernel.org/r/20201102095945.ap4pdff2dn47hijh@function Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/accessibility/speakup/i18n.h')
-rw-r--r--drivers/accessibility/speakup/i18n.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/accessibility/speakup/i18n.h b/drivers/accessibility/speakup/i18n.h
index 2ec6e659d02b..2a607d263234 100644
--- a/drivers/accessibility/speakup/i18n.h
+++ b/drivers/accessibility/speakup/i18n.h
@@ -23,12 +23,15 @@ enum msg_index_t {
MSG_OFF = MSG_STATUS_START,
MSG_ON,
MSG_NO_WINDOW,
+
+ /* These must be ordered the same as enum cursor_track */
MSG_CURSOR_MSGS_START,
MSG_CURSORING_OFF = MSG_CURSOR_MSGS_START,
MSG_CURSORING_ON,
MSG_HIGHLIGHT_TRACKING,
MSG_READ_WINDOW,
MSG_READ_ALL,
+
MSG_EDIT_DONE,
MSG_WINDOW_ALREADY_SET,
MSG_END_BEFORE_START,
@@ -41,11 +44,14 @@ enum msg_index_t {
MSG_LEAVING_HELP,
MSG_IS_UNASSIGNED,
MSG_HELP_INFO,
+
+ /* These must be ordered the same as enum edge */
MSG_EDGE_MSGS_START,
MSG_EDGE_TOP = MSG_EDGE_MSGS_START,
MSG_EDGE_BOTTOM,
MSG_EDGE_LEFT,
MSG_EDGE_RIGHT,
+
MSG_NUMBER,
MSG_SPACE,
MSG_START, /* A little confusing, given our convention. */