X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=7276d63fef7bea7a2adb0b4b747e4380424242c0;hb=f517f60a95e2f94edd1efd750024642b5941ef08;hp=0196c81e88ad524c05fba937b7aa02279a21253e;hpb=4fb9818b0657f561397b29e55d87cc8d4f194436;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 0196c81..7276d63 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 2002-2004, Index Data. + * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: zoomsh.c,v 1.26 2004-01-16 10:04:55 adam Exp $ + * $Id: zoomsh.c,v 1.32 2005-01-15 19:47:15 adam Exp $ */ /* ZOOM-C Shell */ @@ -12,6 +12,8 @@ #include #include +#include + #if HAVE_READLINE_READLINE_H #include #endif @@ -267,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, @@ -368,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