AmendHub

Download:

jcs

/

subtext

/

amendments

/

196

mail+sysop+user_settings: Make menu options const


jcs made amendment 196 over 2 years ago
--- mail.c Wed Jun 22 15:59:54 2022 +++ mail.c Tue Jul 12 09:46:00 2022 @@ -117,7 +117,7 @@ get_id_done: void mail_menu(struct session *s) { - static struct session_menu_option opts[] = { + static const struct session_menu_option opts[] = { { '#', "#0123456789", "Read mail message [#]" }, { '<', "<", "Previous page of messages" }, { 'l', "Ll", "List mail messages" }, @@ -436,7 +436,7 @@ mail_list(struct session *s, size_t nmail_ids, unsigne short mail_read(struct session *s, unsigned long id, short idx) { - static struct session_menu_option opts[] = { + static const struct session_menu_option opts[] = { { 'r', "Rr", "Reply to this message" }, { 'd', "Dd", "Delete this message" }, { 'u', "Uu", "Mark this message unread" }, --- sysop.c Tue Jun 28 11:33:14 2022 +++ sysop.c Tue Jul 12 09:46:55 2022 @@ -35,7 +35,7 @@ void sysop_edit_user(struct session *s, unsigned long void sysop_menu(struct session *s) { - static struct session_menu_option opts[] = { + static const struct session_menu_option opts[] = { { 'b', "Bb", "Manage Boards" }, { 'f', "Ff", "Manage File Folders" }, { 'u', "Uu", "Manage Users" }, @@ -108,7 +108,7 @@ sysop_edit_settings(struct session *s) void sysop_edit_boards(struct session *s) { - static struct session_menu_option opts[] = { + static const struct session_menu_option opts[] = { { 'n', "Nn", "Create new board" }, { 'q', "QqXx", "Return to sysop menu" }, { '?', "?", "List menu options" }, @@ -228,7 +228,7 @@ sysop_edit_boards(struct session *s) void sysop_edit_folders(struct session *s) { - static struct session_menu_option opts[] = { + static const struct session_menu_option opts[] = { { 'n', "Nn", "Create new folder" }, { 'q', "QqXx", "Return to sysop menu" }, { '?', "?", "List menu options" }, @@ -349,7 +349,7 @@ sysop_edit_folders(struct session *s) void sysop_edit_users(struct session *s) { - static struct session_menu_option opts[] = { + static const struct session_menu_option opts[] = { { '#', "#0123456789", "Edit user [#]" }, { '<', "<", "Previous page of users" }, { 'l', "Ll", "List users" }, @@ -496,7 +496,7 @@ sysop_find_user_ids(size_t nall_user_ids, unsigned lon void sysop_edit_user(struct session *s, unsigned long id) { - static struct session_menu_option opts[] = { + static const struct session_menu_option opts[] = { { 'd', "Dd", "Delete account" }, { 'e', "Ee", "Enable/disable account" }, { 'p', "Pp", "Change password" }, --- user_settings.c Mon Jun 6 14:15:56 2022 +++ user_settings.c Tue Jul 12 09:47:11 2022 @@ -177,7 +177,7 @@ user_settings_username(struct session *s) void user_settings_menu(struct session *s) { - static struct session_menu_option opts[] = { + static const struct session_menu_option opts[] = { { 'r', "Rr", "Renegotiate terminal" }, { 'p', "Pp", "Change password" }, { 'u', "Uu", "Change username" },