+/*=*/
+
+/***en
+ @brief Call a callback function
+
+ The minput_callback () functions calls a callback function
+ $COMMAND assigned for the input context $IC. The caller must set
+ specific elements in $IC->plist if the callback function requires.
+
+ @return
+ If there exists a specified callback function, 0 is returned.
+ Otherwise -1 is returned. By side effects, $IC->plist may be
+ modified. */
+
+int
+minput_callback (MInputContext *ic, MSymbol command)
+{
+ MInputCallbackFunc func;
+
+ if (! ic->im->driver.callback_list)
+ return -1;
+ func = (MInputCallbackFunc) mplist_get (ic->im->driver.callback_list,
+ command);
+ if (! func)
+ return -1;
+ (func) (ic, command);
+ return 0;
+}
+