X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=7276d63fef7bea7a2adb0b4b747e4380424242c0;hb=f517f60a95e2f94edd1efd750024642b5941ef08;hp=342e54666d308ece331283e601113a953de66e8f;hpb=f1fef5aeb2f4aad16d5c66e7ed4b58def0a26464;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 342e546..7276d63 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,14 +1,19 @@ /* - * $Id: zoomsh.c,v 1.25 2004-01-12 12:10:44 adam Exp $ + * Copyright (C) 1995-2005, Index Data ApS + * See the file LICENSE for details. * - * ZOOM-C Shell + * $Id: zoomsh.c,v 1.32 2005-01-15 19:47:15 adam Exp $ */ +/* ZOOM-C Shell */ + #include #include #include #include +#include + #if HAVE_READLINE_READLINE_H #include #endif @@ -264,7 +269,7 @@ static void cmd_debug (ZOOM_connection *c, ZOOM_resultset *r, ZOOM_options options, const char **args) { - yaz_log_init_level(LOG_ALL); + yaz_log_init_level(YLOG_ALL); } static void cmd_search (ZOOM_connection *c, ZOOM_resultset *r, @@ -365,6 +370,25 @@ static void cmd_scan (ZOOM_connection *c, ZOOM_resultset *r, } } +static void cmd_sort (ZOOM_connection *c, ZOOM_resultset *r, + ZOOM_options options, + const char **args) +{ + const char *sort_spec = *args; + int i; + + while (*sort_spec == ' ') + sort_spec++; + + for (i = 0; i