patch 9.0.1330: handling new value of an option has a long "else if" chain

Problem:    Handling new value of an option has a long "else if" chain.
Solution:   Use a function pointer. (Yegappan Lakshmanan, closes #12015)
diff --git a/src/gui_xim.c b/src/gui_xim.c
index 86273b5..0d7b56e 100644
--- a/src/gui_xim.c
+++ b/src/gui_xim.c
@@ -13,6 +13,18 @@
 
 #include "vim.h"
 
+#if !defined(GTK_CHECK_VERSION)
+# define GTK_CHECK_VERSION(a, b, c) 0
+#endif
+#if !defined(FEAT_GUI_GTK) && defined(PROTO)
+typedef int GtkWidget;
+typedef int GtkIMContext;
+typedef int gchar;
+typedef int gpointer;
+typedef int PangoAttrIterator;
+typedef int GdkEventKey;
+#endif
+
 #if defined(FEAT_GUI_GTK) && defined(FEAT_XIM)
 # if GTK_CHECK_VERSION(3,0,0)
 #  include <gdk/gdkkeysyms-compat.h>
@@ -74,7 +86,7 @@
 static callback_T imsf_cb;	    // 'imstatusfunc' callback function
 
     char *
-set_imactivatefunc_option(void)
+did_set_imactivatefunc(optset_T *args UNUSED)
 {
     if (option_set_callback_func(p_imaf, &imaf_cb) == FAIL)
 	return e_invalid_argument;
@@ -83,7 +95,7 @@
 }
 
     char *
-set_imstatusfunc_option(void)
+did_set_imstatusfunc(optset_T *args UNUSED)
 {
     if (option_set_callback_func(p_imsf, &imsf_cb) == FAIL)
 	return e_invalid_argument;