1 /* $Id: safari1.c,v 1.2 2004-12-02 11:28:20 adam Exp $
5 This file is part of the Zebra server.
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with Zebra; see the file LICENSE.zebra. If not, write to the
19 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 /* safari1 - insert a few Safari records */
27 const char *myrec[] = {
28 "1234\n" /* first record */
29 "00024338 125060 1 any the\n"
30 "00024338 125060 2 any art\n"
31 "00024338 125060 3 any of\n",
33 "5678\n" /* other record */
34 "00024339 125060 1 any den\n"
35 "00024339 125060 2 any gamle\n"
36 "00024339 125060 3 any mand\n",
38 "5678\n" /* same record identifier as before .. */
39 "00024339 125060 1 any the\n"
40 "00024339 125060 2 any gamle\n"
41 "00024339 125060 3 any mand\n",
45 int main(int argc, char **argv)
48 ZebraService zs = start_up("safari.cfg", argc, argv);
50 ZebraHandle zh = zebra_open(zs);
53 do_query(__LINE__, zh, "@attr 1=1016 the", 1);
54 do_query(__LINE__, zh, "@attr 1=1016 {the art}", 1);
55 do_query(__LINE__, zh, "@attr 1=1016 {den gamle}", 1);
56 do_query(__LINE__, zh, "@attr 1=1016 {the of}", 0);
59 meta_query(__LINE__, zh, "@attr 1=1016 the", 1, ids);
61 return close_down(zh, zs, 0);