+static void cmd_ext (ZOOM_connection *c, ZOOM_resultset *r,
+ ZOOM_options options,
+ const char **args)
+{
+ ZOOM_package p[MAX_CON];
+
+ int i;
+
+ for (i = 0; i<MAX_CON; i++)
+ {
+ if (c[i])
+ {
+ p[i] = ZOOM_connection_package (c[i], 0);
+ ZOOM_package_send(p[i], "itemorder");
+ }
+ else
+ p[i] = 0;
+ }
+
+ while (ZOOM_event (MAX_CON, c))
+ ;
+
+ for (i = 0; i<MAX_CON; i++)
+ {
+ int error;
+ const char *errmsg, *addinfo;
+ /* display errors if any */
+ if (!p[i])
+ continue;
+ if ((error = ZOOM_connection_error(c[i], &errmsg, &addinfo)))
+ fprintf (stderr, "%s error: %s (%d) %s\n",
+ ZOOM_connection_option_get(c[i], "host"), errmsg,
+ error, addinfo);
+ else if (p[i])
+ {
+ printf ("ok\n");
+ }
+ ZOOM_package_destroy (p[i]);
+ }
+}
+
+static void cmd_search (ZOOM_connection *c, ZOOM_resultset *r,
+ ZOOM_options options,