-/* $Id: safari1.c,v 1.1 2004-11-29 21:55:28 adam Exp $
+/* $Id: safari1.c,v 1.2 2004-12-02 11:28:20 adam Exp $
Copyright (C) 2004
Index Data Aps
zint ids[2];
ZebraService zs = start_up("safari.cfg", argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
init_data(zh, myrec);
do_query(__LINE__, zh, "@attr 1=1016 the", 1);
-/* $Id: t1.c,v 1.10 2004-10-29 13:02:39 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
+/* $Id: t1.c,v 1.11 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
int main(int argc, char **argv)
{
ZebraService zs = start_up(0, argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
- return close_down(zh,zs,0);
+ return close_down(zh, zs, 0);
}
-/* $Id: t2.c,v 1.14 2004-10-29 13:02:39 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: t2.c,v 1.15 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
int main(int argc, char **argv)
{
ZebraService zs = start_up(0, argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
- init_data(zh,myrec);
+ init_data(zh, myrec);
do_query(__LINE__,zh, "@attr 1=4 my", 1);
- return close_down(zh,zs,0);
+ return close_down(zh, zs, 0);
}
-/* $Id: t3.c,v 1.12 2004-10-29 13:02:39 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: t3.c,v 1.13 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
{
int i;
ZebraService zs = start_up(0, argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
- init_data(zh,myrec);
+ init_data(zh, myrec);
for (i = 0; i<4; i++)
{
yaz_pqf_destroy(parser);
#if 0
/*FIXME Why is this disabled ??? */
- zebra_records_retrieve (zh, odr_output, setname, 0,
- VAL_TEXT_XML, 1, &retrievalRecord);
+ zebra_records_retrieve(zh, odr_output, setname, 0,
+ VAL_TEXT_XML, 1, &retrievalRecord);
#endif
#if 1
zebra_deleleResultSet(zh, Z_DeleteRequest_list,
1, &setnamep, &status);
#endif
- odr_destroy (odr_input);
- odr_destroy (odr_output);
+ odr_destroy(odr_input);
+ odr_destroy(odr_output);
}
- zebra_commit (zh);
+ zebra_commit(zh);
- return close_down(zh,zs,0);
+ return close_down(zh, zs, 0);
}
-/* $Id: t4.c,v 1.12 2004-11-19 15:52:59 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: t4.c,v 1.13 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
{
int i;
ZebraService zs = start_up(0, argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
- init_data(zh,myrec);
+ init_data(zh, myrec);
zebra_begin_trans (zh, 1);
for (i = 0; i<1200; i++)
- zebra_add_record (zh, myrec[0], strlen(myrec[0]));
- zebra_end_trans (zh);
+ zebra_add_record(zh, myrec[0], strlen(myrec[0]));
+ zebra_end_trans(zh);
zebra_close(zh);
zebra_stop(zs);
zs = start_service("");
- zh = zebra_open (zs);
+ zh = zebra_open(zs);
zebra_select_database(zh, "Default");
for (i = 0; i<2; i++)
ZebraRetrievalRecord retrievalRecord[1001];
char setname[20];
int j;
- ODR odr_input = odr_createmem (ODR_DECODE);
- ODR odr_output = odr_createmem (ODR_DECODE);
+ ODR odr_input = odr_createmem(ODR_DECODE);
+ ODR odr_output = odr_createmem(ODR_DECODE);
YAZ_PQF_Parser parser = yaz_pqf_create();
Z_RPNQuery *query = yaz_pqf_parse(parser, odr_input,
"@attr 1=4 my");
int hits;
sprintf(setname, "s%d", i+1);
- zebra_search_RPN (zh, odr_input, query, setname, &hits);
+ zebra_search_RPN(zh, odr_input, query, setname, &hits);
yaz_pqf_destroy(parser);
- odr_destroy (odr_input);
+ odr_destroy(odr_input);
- zebra_begin_trans (zh, 1);
+ zebra_begin_trans(zh, 1);
for (j = 0; j<1001; j++)
retrievalRecord[j].position = j+1;
- zebra_records_retrieve (zh, odr_output, setname, 0,
- VAL_TEXT_XML, 1001, retrievalRecord);
-
+ zebra_records_retrieve(zh, odr_output, setname, 0,
+ VAL_TEXT_XML, 1001, retrievalRecord);
+
- odr_destroy (odr_output);
+ odr_destroy(odr_output);
- zebra_end_trans (zh);
+ zebra_end_trans(zh);
}
- zebra_commit (zh);
- return close_down(zh,zs,0);
+ zebra_commit(zh);
+ return close_down(zh, zs, 0);
}
-/* $Id: t5.c,v 1.9 2004-10-29 13:02:39 heikki Exp $
+/* $Id: t5.c,v 1.10 2004-12-02 11:28:20 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
int main(int argc, char **argv)
{
ZebraService zs = start_up(0, argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
- init_data(zh,myrec);
+ init_data(zh, myrec);
do_query(__LINE__,zh, "@attr 1=4 my", 3);
do_query(__LINE__,zh, "@attr 1=4 {my x}", 1);
/* exl=1 distance=2 order=0 relation=3 (=), known, unit=word */
do_query(__LINE__,zh, "@prox 1 2 1 3 k 2 my x", 1);
- return close_down(zh,zs,0);
+ return close_down(zh, zs, 0);
}
-/* $Id: t6.c,v 1.5 2004-10-29 13:02:39 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: t6.c,v 1.6 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
#include "testlib.h"
-
int main(int argc, char **argv)
{
int i;
ZebraService zs = start_up(0, argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
-
srand(17);
zebra_select_database(zh, "Default");
strcat(rec_buf, "</Control-Identifier></gils>");
zebra_add_record (zh, rec_buf, strlen(rec_buf));
- zebra_end_trans (zh);
+ zebra_end_trans(zh);
zebra_close(zh);
}
- return close_down(0 /*zh*/ ,zs,0);
+ return close_down(0 /*zh*/, zs, 0);
}
-/* $Id: t7.c,v 1.4 2004-10-29 13:02:39 heikki Exp $
+/* $Id: t7.c,v 1.5 2004-12-02 11:28:20 adam Exp $
Copyright (C) 2004
Index Data Aps
yaz_sort_spec (odr_output, "@attr 1=4 id");
int hits;
- init_data(zh,recs);
+ init_data(zh, recs);
-
- zebra_begin_trans (zh, 0);
+ zebra_begin_trans(zh, 0);
- zebra_search_RPN (zh, odr_input, query, setname1, &hits);
+ zebra_search_RPN(zh, odr_input, query, setname1, &hits);
rc=zebra_sort(zh, odr_output, 1, &setname1, setname2, spec, &status);
if (rc)
exit(1);
}
- zebra_end_trans (zh);
+ zebra_end_trans(zh);
yaz_pqf_destroy(parser);
/*
zebra_deleleResultSet(zh, Z_DeleteRequest_list,
1, &setnamep, &status);
*/
- odr_destroy (odr_input);
- odr_destroy (odr_output);
+ odr_destroy(odr_input);
+ odr_destroy(odr_output);
- zebra_commit (zh);
+ zebra_commit(zh);
- return close_down(zh,zs,0);
+ return close_down(zh, zs, 0);
}
-/* $Id: t8.c,v 1.5 2004-10-29 13:02:39 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: t8.c,v 1.6 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
#include "testlib.h"
-
-
const char *recs[] = {
"<gils>\n"
" <title>My title</title>\n"
int main(int argc, char **argv)
{
ZebraService zs = start_up("zebra8.cfg", argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open (zs);
init_data(zh, recs);
/* N=41 and N=49 get only rec2 */
Q( "@attr 2=3 @attr gils 1=2040 @attr 4=109 \"41 49\" ",1);
- return close_down(zh,zs,0);
+ return close_down(zh, zs, 0);
}
-/* $Id: t9.c,v 1.3 2004-10-29 13:02:39 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: t9.c,v 1.4 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
/** t9.c - test rank-1 */
-
#include "testlib.h"
#include "rankingrecords.h"
int main(int argc, char **argv)
{
ZebraService zs = start_up(0, argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
init_data(zh, recs);
qry( zh, "@attr 1=1016 @attr 2=102 @or @or the foo bar",
3, "third title", 895 );
-
- return close_down(zh,zs,0);
+ return close_down(zh, zs, 0);
}
-/* $Id: xpath1.c,v 1.2 2004-11-19 10:27:16 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: xpath1.c,v 1.3 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
0};
zs = start_up("zebraxpath.cfg", argc, argv);
- zh = zebra_open (zs);
- init_data(zh,myrec);
+ zh = zebra_open(zs);
+ init_data(zh, myrec);
do_query(__LINE__,zh, "@attr 1=/sgml/tag before", 0);
do_query(__LINE__,zh, "@attr 1=/sgml/tag inside", 1);
-/* $Id: xpath2.c,v 1.1 2004-10-29 14:16:22 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: xpath2.c,v 1.2 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
{
ZebraService zs = start_up("zebraxpath.cfg", argc, argv);
ZebraHandle zh = zebra_open (zs);
- init_data(zh,myrec);
+ init_data(zh, myrec);
do_query(__LINE__,zh, "@attr 1=/Zthes/termName Sauropoda", 1);
do_query(__LINE__,zh, "@attr 1=/Zthes/relation/termName Sauropoda",1);
-/* $Id: xpath3.c,v 1.1 2004-10-29 14:16:22 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: xpath3.c,v 1.2 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
int main(int argc, char **argv)
{
ZebraService zs = start_up("zebraxpath.cfg", argc, argv);
- ZebraHandle zh = zebra_open (zs);
- init_data(zh,myrec);
+ ZebraHandle zh = zebra_open(zs);
+ init_data(zh, myrec);
#define q(qry,hits) do_query(__LINE__,zh,qry,hits)
-
-
-/* $Id: xpath4.c,v 1.4 2004-11-05 18:08:06 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: xpath4.c,v 1.5 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
int main(int argc, char **argv)
{
ZebraService zs = start_up("zebraxpath.cfg", argc, argv);
- ZebraHandle zh = zebra_open (zs);
+ ZebraHandle zh = zebra_open(zs);
#if 0
yaz_log_init_level( yaz_log_mask_str_x("xpath4,rsbetween", LOG_DEFAULT_LEVEL));
#endif
- init_data(zh,myrec);
+ init_data(zh, myrec);
#define q(qry,hits) do_query(__LINE__,zh,qry,hits)
-
-
-/* $Id: xpath5.c,v 1.3 2004-11-05 17:44:32 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: xpath5.c,v 1.4 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
int main(int argc, char **argv)
{
ZebraService zs = start_up("zebraxpath.cfg", argc, argv);
- ZebraHandle zh = zebra_open (zs);
- init_data(zh,recs);
+ ZebraHandle zh = zebra_open(zs);
+ init_data(zh, recs);
// yaz_log_init_level(LOG_ALL);