|
IDZEBRA
2.0.54
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <idzebra/api.h>#include <yaz/log.h>#include <yaz/proto.h>#include <yaz/sortspec.h>#include <yaz/options.h>#include <yaz/wrbuf.h>#include <yaz/oid_db.h>Go to the source code of this file.
Data Structures | |
| struct | cmdstruct |
Macros | |
| #define | MAX_NO_ARGS 32 |
| #define | MAX_OUT_BUFF 4096 |
| #define | MAX_ARG_LEN 1024 |
| #define | PROMPT "ZebraSh>" |
| #define | DEFAULTCONFIG "./zebra.cfg" |
| #define | DEFAULTDATABASE "Default" |
| #define | DEFAULTRESULTSET "MyResultSet" |
Functions | |
| static int | split_args (char *line, char **args) |
| static char * | defarg (char *arg, char *def) |
| static int | defargint (char *arg, int def) |
| static char * | restargs (char *args[], int n) |
| int | onecommand (char *line, WRBUF outbuff, const char *prevout) |
| int | cmd_echo (char *args[], WRBUF outbuff) |
| int | cmd_quit (char *args[], WRBUF outbuff) |
| static int | cmd_help (char *args[], WRBUF outbuff) |
| static int | cmd_zebra_start (char *args[], WRBUF outbuff) |
| static int | cmd_zebra_stop (char *args[], WRBUF outbuff) |
| static int | cmd_zebra_open (char *args[], WRBUF outbuff) |
| static int | cmd_zebra_close (char *args[], WRBUF outbuff) |
| static int | cmd_quickstart (char *args[], WRBUF outbuff) |
| static int | cmd_yaz_log_file (char *args[], WRBUF outbuff) |
| static int | cmd_yaz_log_level (char *args[], WRBUF outbuff) |
| static int | cmd_yaz_log_prefix (char *args[], WRBUF outbuff) |
| static int | cmd_logf (char *args[], WRBUF outbuff) |
| static int | cmd_err (char *args[], WRBUF outbuff) |
| static int | cmd_errcode (char *args[], WRBUF outbuff) |
| static int | cmd_errstr (char *args[], WRBUF outbuff) |
| static int | cmd_erradd (char *args[], WRBUF outbuff) |
| static int | cmd_init (char *args[], WRBUF outbuff) |
| static int | cmd_select_database (char *args[], WRBUF outbuff) |
| static int | cmd_create_database (char *args[], WRBUF outbuff) |
| static int | cmd_drop_database (char *args[], WRBUF outbuff) |
| static int | cmd_begin_trans (char *args[], WRBUF outbuff) |
| static int | cmd_end_trans (char *args[], WRBUF outbuff) |
| static int | cmd_record_insert (char *args[], WRBUF outbuff) |
| static int | cmd_exchange_record (char *args[], WRBUF outbuff) |
| static int | cmd_search_pqf (char *args[], WRBUF outbuff) |
| static int | cmd_find (char *args[], WRBUF outbuff) |
| static int | cmd_show (char *args[], WRBUF outbuff) |
| static int | cmd_sort (char *args[], WRBUF outbuff) |
| static void | Zerrors (WRBUF outbuff) |
| void | shell (void) |
| static void | usage (void) |
| int | main (int argc, char **argv) |
Variables | |
| ZebraService | zs = 0 |
| ZebraHandle | zh = 0 |
| int | nextrecno = 1 |
| static char * | default_config = DEFAULTCONFIG |
| static int | log_level = 0 |
| struct cmdstruct | cmds [] |
| #define DEFAULTDATABASE "Default" |
Definition at line 55 of file zebrash.c.
Referenced by cmd_create_database(), and cmd_select_database().
| #define DEFAULTRESULTSET "MyResultSet" |
Definition at line 56 of file zebrash.c.
Referenced by cmd_find(), cmd_show(), and cmd_sort().
| #define MAX_ARG_LEN 1024 |
Definition at line 52 of file zebrash.c.
Referenced by onecommand(), and shell().
| #define MAX_NO_ARGS 32 |
Definition at line 50 of file zebrash.c.
Referenced by onecommand(), and split_args().
|
static |
Definition at line 337 of file zebrash.c.
References zebra_begin_trans().
|
static |
Definition at line 320 of file zebrash.c.
References defarg(), DEFAULTDATABASE, and zebra_create_database().
|
static |
Definition at line 328 of file zebrash.c.
References zebra_drop_database().
| int cmd_echo | ( | char * | args[], |
| WRBUF | outbuff | ||
| ) |
Definition at line 137 of file zebrash.c.
References restargs().
|
static |
Definition at line 345 of file zebrash.c.
References zebra_end_trans().
|
static |
Definition at line 276 of file zebrash.c.
References zebra_errAdd(), zebra_errCode(), and zebra_errString().
|
static |
Definition at line 296 of file zebrash.c.
References zebra_errAdd().
|
static |
Definition at line 284 of file zebrash.c.
References zebra_errCode().
|
static |
Definition at line 290 of file zebrash.c.
References zebra_errString().
|
static |
Definition at line 375 of file zebrash.c.
References action_update, onecommand(), restargs(), and zebra_update_record().
|
static |
Definition at line 412 of file zebrash.c.
References DEFAULTRESULTSET, nextrecno, onecommand(), restargs(), zebra_search_PQF(), and ZINT_FORMAT.
|
static |
Definition at line 707 of file zebrash.c.
References cmdstruct::cmd, and cmdstruct::explanation.
|
static |
Definition at line 307 of file zebrash.c.
References zebra_init().
|
static |
Definition at line 261 of file zebrash.c.
References defargint(), and restargs().
|
static |
Definition at line 210 of file zebrash.c.
References log_level, and onecommand().
| int cmd_quit | ( | char * | args[], |
| WRBUF | outbuff | ||
| ) |
Definition at line 143 of file zebrash.c.
References onecommand().
|
static |
Definition at line 353 of file zebrash.c.
References action_insert, restargs(), zebra_update_record(), and ZINT_FORMAT.
|
static |
Definition at line 400 of file zebrash.c.
References restargs(), zebra_search_PQF(), and ZINT_FORMAT.
|
static |
Definition at line 313 of file zebrash.c.
References defarg(), DEFAULTDATABASE, and zebra_select_database().
|
static |
Definition at line 434 of file zebrash.c.
References defarg(), defargint(), DEFAULTRESULTSET, nextrecno, and zebra_records_retrieve().
|
static |
Definition at line 473 of file zebrash.c.
References DEFAULTRESULTSET, restargs(), and zebra_sort().
|
static |
|
static |
Definition at line 245 of file zebrash.c.
References defargint().
|
static |
|
static |
Definition at line 201 of file zebrash.c.
References zebra_close().
|
static |
Definition at line 192 of file zebrash.c.
References zebra_open().
|
static |
Definition at line 165 of file zebrash.c.
References default_config, and zebra_start().
|
static |
Definition at line 182 of file zebrash.c.
References zebra_stop().
|
static |
Definition at line 104 of file zebrash.c.
Referenced by cmd_create_database(), cmd_select_database(), cmd_show(), cmd_yaz_log_file(), cmd_yaz_log_prefix(), and defargint().
|
static |
Definition at line 112 of file zebrash.c.
References defarg().
Referenced by cmd_logf(), cmd_show(), and cmd_yaz_log_level().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
| int onecommand | ( | char * | line, |
| WRBUF | outbuff, | ||
| const char * | prevout | ||
| ) |
Definition at line 654 of file zebrash.c.
References cmdstruct::args, cmdstruct::cmd, log_level, MAX_ARG_LEN, MAX_NO_ARGS, split_args(), and cmdstruct::testfunc.
Referenced by cmd_exchange_record(), cmd_find(), cmd_quickstart(), cmd_quit(), and shell().
|
static |
Definition at line 121 of file zebrash.c.
Referenced by cmd_echo(), cmd_exchange_record(), cmd_find(), cmd_logf(), cmd_record_insert(), cmd_search_pqf(), and cmd_sort().
| void shell | ( | void | ) |
Definition at line 771 of file zebrash.c.
References log_level, MAX_ARG_LEN, MAX_OUT_BUFF, onecommand(), PROMPT, and Zerrors().
Referenced by main().
|
static |
|
static |
Definition at line 750 of file zebrash.c.
References log_level, zebra_errAdd(), zebra_errCode(), and zebra_errString().
Referenced by shell().
|
static |
Definition at line 67 of file zebrash.c.
Referenced by cmd_zebra_start(), and main().
|
static |
Definition at line 68 of file zebrash.c.
Referenced by cmd_quickstart(), main(), onecommand(), shell(), and Zerrors().
| int nextrecno = 1 |
Definition at line 66 of file zebrash.c.
Referenced by cmd_find(), and cmd_show().
| ZebraHandle zh = 0 |
Definition at line 64 of file zebrash.c.
Referenced by bend_delete(), bend_esrequest(), bend_fetch(), bend_init(), bend_scan(), bend_search(), bend_segment(), bend_sort(), extract_snippet(), facet_fetch(), grep_info_prepare(), key_heap_init_file(), main(), map_basenames(), snippet_fetch(), snippet_token_add(), sort_fetch(), special_index_fetch(), zebra_extract_explain(), zebra_extract_record_stream(), zebra_open(), zebra_record_fetch(), zebra_register_statistics(), zebra_special_fetch(), and zebra_start_res().
| ZebraService zs = 0 |
Definition at line 63 of file zebrash.c.
Referenced by main(), zebra_admin_start(), zebra_auth(), zebra_close(), and zebra_open().
1.8.1.2