+Update Perl internals so that it matches the current Zebra API.
+The recordGroup structure is no longer available. A group of resources
+can still be referenced by setting groupName=>.. in various methods.
+
Maximum number of records to be sorted in a result set can be
specified by setting "sortmax". Default is 1000.
-/* $Id: zebraapi.h,v 1.12 2004-01-22 11:27:21 adam Exp $
+/* $Id: zebraapi.h,v 1.13 2004-07-28 08:15:45 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
/* Start Zebra using file 'configName' (usually zebra.cfg) */
/* There should be exactly one ZebraService */
-YAZ_EXPORT ZebraService zebra_start (const char *configName,
- Res def_res, Res over_res);
+YAZ_EXPORT ZebraService zebra_start (const char *configName);
+YAZ_EXPORT ZebraService zebra_start_res (const char *configName,
+ Res def_res, Res over_res);
/* Close the whole Zebra */
YAZ_EXPORT int zebra_stop (ZebraService zs);
int zebra_insert_record (ZebraHandle zh,
const char *recordType,
int *sysno, const char *match, const char *fname,
- const char *buf, int buf_size);
+ const char *buf, int buf_size,
+ int force_update);
int zebra_update_record (ZebraHandle zh,
const char *recordType,
int* sysno, const char *match, const char *fname,
Z_SortKeySpecList *sort_sequence,
int *sort_status);
-
YAZ_EXPORT
int zebra_select_databases (ZebraHandle zh, int num_bases,
const char **basenames);
-/* $Id: apitest.c,v 1.15 2004-01-22 11:27:21 adam Exp $
+/* $Id: apitest.c,v 1.16 2004-07-28 08:15:45 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
odr_input = odr_createmem (ODR_DECODE);
odr_output = odr_createmem (ODR_ENCODE);
- zs = zebra_start ("zebra.cfg", 0, 0);
+ zs = zebra_start ("zebra.cfg");
if (!zs)
{
printf ("zebra_start failed; missing zebra.cfg?\n");
-/* $Id: extract.c,v 1.155 2004-06-03 11:45:28 adam Exp $
+/* $Id: extract.c,v 1.156 2004-07-28 08:15:45 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
extract_flushSortKeys (zh, *sysno, -1, &zh->reg->sortKeys);
rec_rm (&rec);
logRecord(zh);
- return 0;
+ return -1;
}
}
-/* $Id: main.c,v 1.111 2004-05-30 18:05:30 adam Exp $
+/* $Id: main.c,v 1.112 2004-07-28 08:15:45 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
const char *config = configName ? configName : "zebra.cfg";
logf (LOG_LOG, "Zebra version %s %s",
ZEBRAVER, ZEBRADATE);
- zs = zebra_start (config, 0, res);
+ zs = zebra_start_res (config, 0, res);
if (!zs)
{
yaz_log (LOG_FATAL, "Cannot read config %s", config);
-/* $Id: zebraapi.c,v 1.119 2004-05-10 08:47:54 adam Exp $
+/* $Id: zebraapi.c,v 1.120 2004-07-28 08:15:45 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
return zh;
}
-ZebraService zebra_start (const char *configName, Res def_res, Res over_res)
+ZebraService zebra_start (const char *configName)
+{
+ return zebra_start_res(configName, 0, 0);
+}
+
+ZebraService zebra_start_res (const char *configName, Res def_res, Res over_res)
{
Res res;
(zh->trans_no++);
if (zh->trans_w_no)
+ {
+ read_res_for_transaction(zh);
return 0;
+ }
if (zh->trans_no != 1)
{
zh->errCode = 2;
int zebra_insert_record (ZebraHandle zh,
const char *recordType,
int *sysno, const char *match, const char *fname,
- const char *buf, int buf_size)
+ const char *buf, int buf_size, int force_update)
{
int res;
yaz_log(LOG_API,"zebra_insert_record sysno=%d", *sysno);
match, fname,
force_update,
1); /* allow_update */
+ yaz_log(LOG_LOG, "zebra_update_record returned res=%d", res);
zebra_end_trans(zh);
return res;
}
zebra_end_read(zh);
return sort_status;
}
+
-/* $Id: zebrash.c,v 1.26 2004-06-15 07:42:45 adam Exp $
+/* $Id: zebrash.c,v 1.27 2004-07-28 08:15:45 adam Exp $
Copyright (C) 2002,2003,2004
Index Data Aps
wrbuf_puts(outbuff, "\n");
conf=default_config;
}
- zs=zebra_start(conf, 0, 0);
+ zs=zebra_start(conf);
if (!zs) {
wrbuf_puts(outbuff, "zebra_start failed" );
return 2;
0, /* match */
0, /* fname */
rec,
- strlen(rec));
+ strlen(rec),
+ 0);
if (0==rc)
{
wrbuf_printf(outbuff,"ok sysno=%d\n",sysno);
-/* $Id: zserver.c,v 1.115 2004-05-05 16:22:18 mike Exp $
+/* $Id: zserver.c,v 1.116 2004-07-28 08:15:45 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
0, /* match */
0, /* fname */
rec->u.octet_aligned->buf,
- rec->u.octet_aligned->len);
+ rec->u.octet_aligned->len,
+ 0);
if (r)
{
rr->errcode = 224;
{
if (sob->handle)
zebra_stop((ZebraService) sob->handle);
- sob->handle = zebra_start(sob->configname, 0, 0);
+ sob->handle = zebra_start(sob->configname);
if (!sob->handle)
{
yaz_log (LOG_FATAL, "Failed to read config `%s'", sob->configname);
/*%include "zebra_perl.h" */
-typedef struct {
- char *groupName;
- char *databaseName;
- char *path;
- char *recordId;
- char *recordType;
- int flagStoreData;
- int flagStoreKeys;
- int flagRw;
- int fileVerboseLimit;
- int databaseNamePath;
- int explainDatabase;
- int followLinks;
-} recordGroup;
typedef struct {
int noOfRecords;
char * zebra_errAdd (ZebraHandle zh);
-/* == Record groups and database selection ================================= */
+/* == Zebra resources and database selection =============================== */
-/* initialize a recordGroup (zebra_api_ext.c); */
-void init_recordGroup (recordGroup *rg);
+/* set a resource */
+%name(set_resource)
+void zebra_set_resource(ZebraHandle zh, const char *name, const char *value);
-/* set up a recordGroup for a specific file extension from zebra.cfg
- (zebra_api_ext.c); */
-void res_get_recordGroup (ZebraHandle zh, recordGroup *rg,
- const char *ext);
-/* set current record group for update purposes (zebraapi.c) */
-%name(set_group)
-void zebra_set_group (ZebraHandle zh, struct recordGroup *rg);
+/* get a resource */
+%name(get_resource)
+const char *zebra_set_resource(ZebraHandle zh, const char *name,
+ const char *defaultvalue);
/* select database for update purposes (zebraapi.c) */
%name(select_database)
const char *match,
const char *fname,
const char *buf,
- int buf_size);
+ int buf_size,
+ int force_update);
%name(update_record)
int zebra_update_record (ZebraHandle zh,
*errCode = *IDZebrac::errCode;
*errString = *IDZebrac::errString;
*errAdd = *IDZebrac::errAdd;
-*init_recordGroup = *IDZebrac::init_recordGroup;
-*res_get_recordGroup = *IDZebrac::res_get_recordGroup;
-*set_group = *IDZebrac::set_group;
+*set_resource = *IDZebrac::set_resource;
+*get_resource = *IDZebrac::get_resource;
*select_database = *IDZebrac::select_database;
*select_databases = *IDZebrac::select_databases;
*begin_trans = *IDZebrac::begin_trans;
*grs_perl_get_mem = *IDZebrac::grs_perl_get_mem;
*grs_perl_set_res = *IDZebrac::grs_perl_set_res;
-############# Class : IDZebra::recordGroup ##############
-
-package IDZebra::recordGroup;
-@ISA = qw( IDZebra );
-%OWNER = ();
-%BLESSEDMEMBERS = (
-);
-
-%ITERATORS = ();
-*swig_groupName_get = *IDZebrac::recordGroup_groupName_get;
-*swig_groupName_set = *IDZebrac::recordGroup_groupName_set;
-*swig_databaseName_get = *IDZebrac::recordGroup_databaseName_get;
-*swig_databaseName_set = *IDZebrac::recordGroup_databaseName_set;
-*swig_path_get = *IDZebrac::recordGroup_path_get;
-*swig_path_set = *IDZebrac::recordGroup_path_set;
-*swig_recordId_get = *IDZebrac::recordGroup_recordId_get;
-*swig_recordId_set = *IDZebrac::recordGroup_recordId_set;
-*swig_recordType_get = *IDZebrac::recordGroup_recordType_get;
-*swig_recordType_set = *IDZebrac::recordGroup_recordType_set;
-*swig_flagStoreData_get = *IDZebrac::recordGroup_flagStoreData_get;
-*swig_flagStoreData_set = *IDZebrac::recordGroup_flagStoreData_set;
-*swig_flagStoreKeys_get = *IDZebrac::recordGroup_flagStoreKeys_get;
-*swig_flagStoreKeys_set = *IDZebrac::recordGroup_flagStoreKeys_set;
-*swig_flagRw_get = *IDZebrac::recordGroup_flagRw_get;
-*swig_flagRw_set = *IDZebrac::recordGroup_flagRw_set;
-*swig_fileVerboseLimit_get = *IDZebrac::recordGroup_fileVerboseLimit_get;
-*swig_fileVerboseLimit_set = *IDZebrac::recordGroup_fileVerboseLimit_set;
-*swig_databaseNamePath_get = *IDZebrac::recordGroup_databaseNamePath_get;
-*swig_databaseNamePath_set = *IDZebrac::recordGroup_databaseNamePath_set;
-*swig_explainDatabase_get = *IDZebrac::recordGroup_explainDatabase_get;
-*swig_explainDatabase_set = *IDZebrac::recordGroup_explainDatabase_set;
-*swig_followLinks_get = *IDZebrac::recordGroup_followLinks_get;
-*swig_followLinks_set = *IDZebrac::recordGroup_followLinks_set;
-sub new {
- my $pkg = shift;
- my @args = @_;
- my $self = IDZebrac::new_recordGroup(@args);
- return undef if (!defined($self));
- $OWNER{$self} = 1;
- my %retval;
- tie %retval, "IDZebra::recordGroup", $self;
- return bless \%retval, $pkg;
-}
-
-sub DESTROY {
- return unless $_[0]->isa('HASH');
- my $self = tied(%{$_[0]});
- return unless defined $self;
- delete $ITERATORS{$self};
- if (exists $OWNER{$self}) {
- IDZebrac::delete_recordGroup($self);
- delete $OWNER{$self};
- }
-}
-
-sub DISOWN {
- my $self = shift;
- my $ptr = tied(%$self);
- delete $OWNER{$ptr};
- };
-
-sub ACQUIRE {
- my $self = shift;
- my $ptr = tied(%$self);
- $OWNER{$ptr} = 1;
- };
-
-sub FETCH {
- my ($self,$field) = @_;
- my $member_func = "swig_${field}_get";
- my $val = $self->$member_func();
- if (exists $BLESSEDMEMBERS{$field}) {
- return undef if (!defined($val));
- my %retval;
- tie %retval,$BLESSEDMEMBERS{$field},$val;
- return bless \%retval, $BLESSEDMEMBERS{$field};
- }
- return $val;
-}
-
-sub STORE {
- my ($self,$field,$newval) = @_;
- my $member_func = "swig_${field}_set";
- if (exists $BLESSEDMEMBERS{$field}) {
- $self->$member_func(tied(%{$newval}));
- } else {
- $self->$member_func($newval);
- }
-}
-
-
############# Class : IDZebra::RetrievalObj ##############
package IDZebra::RetrievalObj;
-# $Id: Resultset.pm,v 1.10 2003-07-26 16:27:46 pop Exp $
+# $Id: Resultset.pm,v 1.11 2004-07-28 08:15:46 adam Exp $
#
# Zebra perl API header
# =============================================================================
use IDZebra::Logger qw(:flags :calls);
use Scalar::Util qw(weaken);
use Carp;
- our $VERSION = do { my @r = (q$Revision: 1.10 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+ our $VERSION = do { my @r = (q$Revision: 1.11 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
our @ISA = qw(IDZebra::Logger);
}
my $class = $args{class} ? $args{class} : '';
+ # ADAM: Reset before we use it (not after)
+ IDZebra::odr_reset($self->{odr_stream});
my $ro = IDZebra::RetrievalObj->new();
IDZebra::records_retrieve($self->{session}{zh},
}
}
- IDZebra::odr_reset($self->{odr_stream});
-
return (@res);
}
-# $Id: Session.pm,v 1.19 2003-07-26 16:27:46 pop Exp $
+# $Id: Session.pm,v 1.20 2004-07-28 08:15:46 adam Exp $
#
# Zebra perl API header
# =============================================================================
use IDZebra::ScanList;
use IDZebra::RetrievalRecord;
require Exporter;
- our $VERSION = do { my @r = (q$Revision: 1.19 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+ our $VERSION = do { my @r = (q$Revision: 1.20 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
our @ISA = qw(IDZebra::Logger Exporter);
our @EXPORT = qw (TRANS_RW TRANS_RO);
}
# This is needed in order to somehow initialize the service
$self->databases("Default");
-
+
+ # ADAM: group call deleted
# Load the default configuration
- $self->group(%args);
+ # $self->group(%args);
+ # ADAM: Set group resource instead
+ if (defined($args{groupName})) {
+ IDZebra::set_resource($self->{zh}, "group", $args{groupName});
+ }
# Set shadow usage
my $shadow = defined($args{shadow}) ? $args{shadow} : 0;
# -----------------------------------------------------------------------------
# Record group selection This is a bit nasty... but used at many places
# -----------------------------------------------------------------------------
-sub group {
+
+# ADAM: All these group functions have been disabled.
+sub group_deleted {
my ($self,%args) = @_;
$self->checkzh;
if ($#_ > 0) {
return($self->{rg});
}
-sub selectRecordGroup {
+sub selectRecordGroup_deleted {
my ($self, $groupName) = @_;
$self->checkzh;
$self->{rg} = $self->_getRecordGroup($groupName);
$self->_selectRecordGroup($self->{rg});
}
-sub _displayRecordGroup {
+sub _displayRecordGroup_deleted {
my ($self, $rg) = @_;
print STDERR "-----\n";
foreach my $key qw (groupName
}
}
-sub _cloneRecordGroup {
+sub _cloneRecordGroup_deleted {
my ($self, $orig) = @_;
my $rg = IDZebra::recordGroup->new();
my $r = IDZebra::init_recordGroup($rg);
return ($rg);
}
-sub _getRecordGroup {
+sub _getRecordGroup_deleted {
my ($self, $groupName, $ext) = @_;
my $rg = IDZebra::recordGroup->new();
my $r = IDZebra::init_recordGroup($rg);
return ($rg);
}
-sub _makeRecordGroup {
+sub _makeRecordGroup_deleted {
my ($self, %args) = @_;
my $rg;
return ($rg);
}
-sub _setRecordGroupOptions {
+sub _setRecordGroupOptions_deleted {
my ($self, $rg, %args) = @_;
foreach my $key qw (databaseName
}
}
}
-sub _selectRecordGroup {
+sub _selectRecordGroup_deleted {
my ($self, $rg) = @_;
my $r = IDZebra::set_group($self->{zh}, $rg);
sub update {
my ($self, %args) = @_;
$self->checkzh;
- my $rg = $self->_update_args(%args);
- $self->_selectRecordGroup($rg);
+ # ADAM: Set group resource
+ if (defined($args{groupName})) {
+ IDZebra::set_resource($self->{zh}, "group", $args{groupName});
+ }
+ # ADAM: disabled
+# my $rg = $self->_update_args(%args); deleted
+# $self->_selectRecordGroup($rg); deleted
$self->begin_trans;
- IDZebra::repository_update($self->{zh});
- $self->_selectRecordGroup($self->{rg});
+ IDZebra::repository_update($self->{zh}, $args{path});
+# $self->_selectRecordGroup($self->{rg}); deleted
$self->end_trans;
}
sub delete {
my ($self, %args) = @_;
$self->checkzh;
- my $rg = $self->_update_args(%args);
- $self->_selectRecordGroup($rg);
+ # ADAM: Set group resource
+ if (defined($args{groupName})) {
+ IDZebra::set_resource($self->{zh}, "group", $args{groupName});
+ }
+ # ADAM: disabled
+# my $rg = $self->_update_args(%args); deleted
+# $self->_selectRecordGroup($rg); deleted
$self->begin_trans;
- IDZebra::repository_delete($self->{zh});
- $self->_selectRecordGroup($self->{rg});
+ IDZebra::repository_delete($self->{zh}, $args{path});
+ # ADAM: disabled
+# $self->_selectRecordGroup($self->{rg});
$self->end_trans;
}
sub show {
my ($self, %args) = @_;
$self->checkzh;
- my $rg = $self->_update_args(%args);
- $self->_selectRecordGroup($rg);
+ # ADAM: Set group resource
+ if (defined($args{groupName})) {
+ IDZebra::set_resource($self->{zh}, "group", $args{groupName});
+ }
+ # ADAM: disabled
+# my $rg = $self->_update_args(%args);
+# $self->_selectRecordGroup($rg);
+
$self->begin_trans;
IDZebra::repository_show($self->{zh});
$self->_selectRecordGroup($self->{rg});
$self->end_trans;
}
-sub _update_args {
+sub _update_args_deleted {
my ($self, %args) = @_;
my $rg = $self->_makeRecordGroup(%args);
$self->_selectRecordGroup($rg);
$self->checkzh;
my @args = $self->_record_update_args(%args);
my $stat = IDZebra::insert_record($self->{zh}, @args);
- my $sysno = $args[2]; $stat = -1 * $stat if ($stat > 0);
+ # ADAM: rg no longer part of vector
+ my $sysno = $args[1]; $stat = -1 * $stat if ($stat > 0);
return $stat ? $stat : $$sysno;
- if ($stat) { return ($stat); } else { return $sysno};
}
sub update_record {
$self->checkzh;
my @args = $self->_record_update_args(%args);
my $stat = IDZebra::update_record($self->{zh}, @args);
- my $sysno = $args[2]; $stat = -1 * $stat if ($stat > 0);
+ # ADAM: rg no longer part of vector
+ my $sysno = $args[1]; $stat = -1 * $stat if ($stat > 0);
return $stat ? $stat : $$sysno;
- if ($stat) { return ($stat); } else { return $$sysno};
}
sub delete_record {
$self->checkzh;
my @args = $self->_record_update_args(%args);
my $stat = IDZebra::delete_record($self->{zh}, @args);
- my $sysno = $args[2]; $stat = -1 * $stat if ($stat > 0);
- return $stat ? $stat : $$sysno;
+ # ADAM: rg no longer part of vector
+ my $sysno = $args[1]; $stat = -1 * $stat if ($stat > 0);
}
sub _record_update_args {
delete ($args{data});
delete ($args{force});
- my $rg = $self->_makeRecordGroup(%args);
+# ADAM: recordGroup removed ...
+# my $rg = $self->_makeRecordGroup(%args);
# If no record type is given, then try to find it out from the
- # file extension;
- unless ($rectype) {
- if (my ($ext) = $fname =~ /\.(\w+)$/) {
- my $rg2 = $self->_getRecordGroup($rg->{groupName},$ext);
- $rectype = $rg2->{recordType};
- }
- }
+ # file extension; deleted
+ #unless ($rectype) {
+# if (my ($ext) = $fname =~ /\.(\w+)$/) {
+# my $rg2 = $self->_getRecordGroup($rg->{groupName},$ext);
+# $rectype = $rg2->{recordType};
+# }
+# }
- $rg->{databaseName} = "Default" unless ($rg->{databaseName});
+# $rg->{databaseName} = "Default" unless ($rg->{databaseName});
unless ($rectype) {
$rectype="";
}
- return ($rg, $rectype, \$sysno, $match, $fname, $buff, $len, $force);
+ # ADAM: set group resource
+ if (defined($args{groupName})) {
+ IDZebra::set_resource($self->{zh}, "group", $args{groupName});
+ }
+
+ # ADAM: rg no longer part of vector..
+ return ($rectype, \$sysno, $match, $fname, $buff, $len, $force);
}
# -----------------------------------------------------------------------------
#!perl -Tw
# =============================================================================
-# $Id: 01_base.t,v 1.5 2003-03-05 14:15:07 pop Exp $
+# $Id: 01_base.t,v 1.6 2004-07-28 08:15:47 adam Exp $
#
# Perl API header
# =============================================================================
use strict;
use warnings;
-use Test::More tests=>10;
+use Test::More tests=>8;
# ----------------------------------------------------------------------------
# Session opening and closing
BEGIN {
use_ok('IDZebra');
- IDZebra::logFile("test.log");
+ unlink("test01.log");
+ IDZebra::logFile("test01.log");
use_ok('IDZebra::Session');
}
ok(defined($sess->{zh}), "Zebra handle opened");
# ----------------------------------------------------------------------------
-# Record group tests
-ok(($sess->group->{databaseName} eq "demo1"),"Record group is selected");
+# Record group tests deleted
+# ADAM: we cant do this anymore!
+#ok(($sess->group->{databaseName} eq "demo1"),"Record group is selected");
-$sess->group(groupName => 'demo2');
+#$sess->group(groupName => 'demo2');
-ok(($sess->group->{databaseName} eq "demo2"),"Record group is selected");
+#ok(($sess->group->{databaseName} eq "demo2"),"Record group is selected");
# ---------------------------------------------------------------------------
# Transactions
$sess->end_trans;
-
-
# ----------------------------------------------------------------------------
# Close session
#!perl
# =============================================================================
-# $Id: 02_directory_update.t,v 1.3 2003-03-05 13:55:22 pop Exp $
+# $Id: 02_directory_update.t,v 1.4 2004-07-28 08:15:47 adam Exp $
#
# Perl API header
# =============================================================================
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 8;
# ----------------------------------------------------------------------------
# Session opening and closing
BEGIN {
use_ok('IDZebra');
- IDZebra::logFile("test.log");
+ unlink("test02.log");
+ IDZebra::logFile("test02.log");
use_ok('IDZebra::Session');
use_ok('pod');
}
# ----------------------------------------------------------------------------
# repository upadte
+# ADAM: we must set database separately (can't be used from group)
+$sess->databases('demo2');
+
our $filecount = 8;
$sess->begin_trans;
$sess->update(path => 'lib');
ok(($stat->{inserted} == $filecount),
"Inserted $stat->{inserted}/$filecount records");
+# ADAM: we must set database separately (can't be used from group)
+$sess->databases('demo1');
+
$sess->begin_trans;
$sess->update(groupName => 'demo1',
path => 'lib');
ok(($stat->{inserted} == $filecount),
"Inserted $stat->{inserted}/$filecount records with shadow");
-ok(($sess->group->{databaseName} eq "demo2"),"Original group is selected");
+# ok(($sess->group->{databaseName} eq "demo2"),"Original group is selected"); deleted
# ----------------------------------------------------------------------------
# Close session
#!perl
# =============================================================================
-# $Id: 03_record_update.t,v 1.6 2003-07-07 10:59:33 pop Exp $
+# $Id: 03_record_update.t,v 1.7 2004-07-28 08:15:47 adam Exp $
#
# Perl API header
# =============================================================================
# Session opening and closing
BEGIN {
use_ok('IDZebra');
- IDZebra::logFile("test.log");
+ unlink("test03.log");
+ IDZebra::logFile("test03.log");
use_ok('IDZebra::Session');
use_ok('pod');
}
my ($sysno, $stat);
+# ADAM: we must set database separately (can't be set from group)
+$sess->databases('demo1');
$sess->begin_trans;
$sysno = $sess->update_record(data => $rec1,
recordType => 'grs.perl.pod',
#!perl
# =============================================================================
-# $Id: 04_cql.t,v 1.2 2004-05-25 14:11:26 adam Exp $
+# $Id: 04_cql.t,v 1.3 2004-07-28 08:15:47 adam Exp $
#
# Perl API header
# =============================================================================
# Session opening and closing
BEGIN {
use IDZebra;
- IDZebra::logFile("test.log");
+ unlink("test04.log");
+ IDZebra::logFile("test04.log");
use_ok('IDZebra::Session');
}
#!perl
# =============================================================================
-# $Id: 05_search.t,v 1.3 2003-07-26 16:27:46 pop Exp $
+# $Id: 05_search.t,v 1.4 2004-07-28 08:15:47 adam Exp $
#
# Perl API header
# =============================================================================
# Session opening and closing
BEGIN {
use IDZebra;
- IDZebra::logFile("test.log");
+ unlink("test05.log");
+ IDZebra::logFile("test05.log");
use_ok('IDZebra::Session');
use_ok('pod');
}
#!perl
# =============================================================================
-# $Id: 06_retrieval.t,v 1.4 2003-03-04 23:32:55 pop Exp $
+# $Id: 06_retrieval.t,v 1.5 2004-07-28 08:15:47 adam Exp $
#
# Perl API header
# =============================================================================
# Session opening and closing
BEGIN {
use IDZebra;
- IDZebra::logFile("test.log");
+ unlink("test06.log");
+ IDZebra::logFile("test06.log");
use_ok('IDZebra::Session');
use_ok('pod');
}
#!perl
# =============================================================================
-# $Id: 07_sort.t,v 1.1 2003-03-03 18:27:25 pop Exp $
+# $Id: 07_sort.t,v 1.2 2004-07-28 08:15:47 adam Exp $
#
# Perl API header
# =============================================================================
# Session opening and closing
BEGIN {
use IDZebra;
- IDZebra::logFile("test.log");
+ unlink("test07.log");
+ IDZebra::logFile("test07.log");
# IDZebra::logLevel(15);
use_ok('IDZebra::Session');
use_ok('pod');
-/* $Id: t1.c,v 1.6 2004-06-14 23:43:32 adam Exp $
+/* $Id: t1.c,v 1.7 2004-07-28 08:15:47 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
char cfg[256];
char *srcdir = getenv("srcdir");
sprintf(cfg, "%.200s%szebra.cfg", srcdir ? srcdir : "", srcdir ? "/" : "");
- return zebra_start(cfg, 0, 0);
+ return zebra_start(cfg);
}
int main(int argc, char **argv)
-/* $Id: t2.c,v 1.10 2004-06-14 23:43:32 adam Exp $
+/* $Id: t2.c,v 1.11 2004-07-28 08:15:47 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
char cfg[256];
char *srcdir = getenv("srcdir");
sprintf(cfg, "%.200s%szebra.cfg", srcdir ? srcdir : "", srcdir ? "/" : "");
- return zebra_start(cfg, 0, 0);
+ return zebra_start(cfg);
}
int main(int argc, char **argv)
-/* $Id: t3.c,v 1.7 2004-06-14 23:43:32 adam Exp $
+/* $Id: t3.c,v 1.8 2004-07-28 08:15:47 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
char cfg[256];
char *srcdir = getenv("srcdir");
sprintf(cfg, "%.200s%szebra.cfg", srcdir ? srcdir : "", srcdir ? "/" : "");
- return zebra_start(cfg, 0, 0);
+ return zebra_start(cfg);
}
int main(int argc, char **argv)
-/* $Id: t4.c,v 1.7 2004-06-14 23:43:32 adam Exp $
+/* $Id: t4.c,v 1.8 2004-07-28 08:15:47 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
char cfg[256];
char *srcdir = getenv("srcdir");
sprintf(cfg, "%.200s%szebra.cfg", srcdir ? srcdir : "", srcdir ? "/" : "");
- return zebra_start(cfg, 0, 0);
+ return zebra_start(cfg);
}
int main(int argc, char **argv)
-/* $Id: t5.c,v 1.3 2004-06-16 22:06:49 adam Exp $
+/* $Id: t5.c,v 1.4 2004-07-28 08:15:47 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
char cfg[256];
char *srcdir = getenv("srcdir");
sprintf(cfg, "%.200s%szebra.cfg", srcdir ? srcdir : "", srcdir ? "/" : "");
- return zebra_start(cfg, 0, 0);
+ return zebra_start(cfg);
}
static void expect(ZebraHandle zh, const char *pqf, int hits_expect,