X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebrash.c;h=2374646b5a4599ed666cf8e4b85ef9650b11a59b;hb=21f90a8618faec6bee8d125c12088b74db8eb8b9;hp=9ac13992daec8f9030fe4cac9bd7223fe913c20d;hpb=4478d785b7769691261005c98063b98a5a5971b3;p=idzebra-moved-to-github.git diff --git a/index/zebrash.c b/index/zebrash.c index 9ac1399..2374646 100644 --- a/index/zebrash.c +++ b/index/zebrash.c @@ -1,5 +1,5 @@ -/* $Id: zebrash.c,v 1.39 2006-08-14 10:40:15 adam Exp $ - Copyright (C) 1995-2006 +/* $Id: zebrash.c,v 1.43 2007-03-14 11:48:32 adam Exp $ + Copyright (C) 1995-2007 Index Data ApS This file is part of the Zebra server. @@ -351,18 +351,18 @@ static int cmd_end_trans( char *args[], WRBUF outbuff) static int cmd_record_insert( char *args[], WRBUF outbuff) { - SYSNO sysno=0; + zint sysno = 0; int rc; char *rec=restargs(args,1); - rc = zebra_insert_record(zh, + rc = zebra_update_record(zh, + action_insert, 0, /* record type */ &sysno, 0, /* match */ 0, /* fname */ rec, - strlen(rec), - 0); + strlen(rec)); if (0==rc) { wrbuf_printf(outbuff,"ok sysno=" ZINT_FORMAT "\n",sysno); @@ -383,8 +383,12 @@ static int cmd_exchange_record( char *args[], WRBUF outbuff) onecommand("help exchange_record", outbuff, ""); return -90; } - rc=zebra_admin_exchange_record(zh, rec, strlen(rec), - id, strlen(id), atoi(action)); + + rc = zebra_update_record(zh, action_update, 0 /* record_type */, + 0 /* sysno */, + id /* match */, + 0 /* fname */, + rec, strlen(rec)); return rc; } @@ -764,7 +768,7 @@ static void Zerrors (WRBUF outbuff) * The shell */ -void shell() +void shell(void) { int rc=0; WRBUF outbuff=wrbuf_alloc(); @@ -827,7 +831,7 @@ void shell() } /* shell() */ -static void usage() +static void usage(void) { printf ("usage:\n"); printf ("zebrash [-c config]\n");