X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=7276d63fef7bea7a2adb0b4b747e4380424242c0;hb=f517f60a95e2f94edd1efd750024642b5941ef08;hp=20894e0aa45aec026f5537413cf90e76057c97fe;hpb=79c6d1159a62591c6fe14452fd09a3bd7394344f;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 20894e0..7276d63 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,14 +1,19 @@ /* - * $Id: zoomsh.c,v 1.24 2003-11-25 23:19:59 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, @@ -355,7 +360,8 @@ static void cmd_scan (ZOOM_connection *c, ZOOM_resultset *r, { int occ = 0; int len = 0; - const char *term = ZOOM_scanset_term(s[i], p, &occ, &len); + const char *term = ZOOM_scanset_display_term(s[i], p, + &occ, &len); fwrite(term, 1, len, stdout); printf (" %d\n", occ); } @@ -364,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