projects
/
yazpp-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
42f5f78
)
Update to use Odr_int
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 1 Dec 2009 20:42:00 +0000
(21:42 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 1 Dec 2009 20:42:00 +0000
(21:42 +0100)
include/yazpp/ir-assoc.h
patch
|
blob
|
history
include/yazpp/z-server.h
patch
|
blob
|
history
src/yaz-ir-assoc.cpp
patch
|
blob
|
history
src/yaz-my-client.cpp
patch
|
blob
|
history
src/yaz-z-server-sr.cpp
patch
|
blob
|
history
src/yaz-z-server.cpp
patch
|
blob
|
history
diff --git
a/include/yazpp/ir-assoc.h
b/include/yazpp/ir-assoc.h
index
4da019b
..
84a3e36
100644
(file)
--- a/
include/yazpp/ir-assoc.h
+++ b/
include/yazpp/ir-assoc.h
@@
-77,7
+77,7
@@
class YAZ_EXPORT IR_Assoc: public Z_Assoc {
/// Send Services
int send_initRequest(char* pRefId=NULL);
int send_searchRequest(Yaz_Z_Query *query, char* pResultSetId = NULL, char* pRefId = NULL);
/// Send Services
int send_initRequest(char* pRefId=NULL);
int send_searchRequest(Yaz_Z_Query *query, char* pResultSetId = NULL, char* pRefId = NULL);
- int send_presentRequest(int start, int number, char* pResultSetId = NULL, char* pRefId = NULL);
+ int send_presentRequest(Odr_int start, Odr_int number, char* pResultSetId = NULL, char* pRefId = NULL);
int send_deleteResultSetRequest(char* pResultSetId = 0, char* pRefId = 0);
/// Recv Services
int send_deleteResultSetRequest(char* pResultSetId = 0, char* pRefId = 0);
/// Recv Services
diff --git
a/include/yazpp/z-server.h
b/include/yazpp/z-server.h
index
33d935f
..
755052d
100644
(file)
--- a/
include/yazpp/z-server.h
+++ b/
include/yazpp/z-server.h
@@
-117,7
+117,7
@@
class YAZ_EXPORT Yaz_Facility_Retrieval : public IServer_Facility,
const char *resultSetName,
int start, int num,
Z_RecordComposition *comp,
const char *resultSetName,
int start, int num,
Z_RecordComposition *comp,
- int *next, int *pres,
+ Odr_int *next, Odr_int *pres,
Odr_oid *oid);
void fetch_via_piggyback (Z_Server *s,
Odr_oid *oid);
void fetch_via_piggyback (Z_Server *s,
diff --git
a/src/yaz-ir-assoc.cpp
b/src/yaz-ir-assoc.cpp
index
d5854d1
..
ad35d00
100644
(file)
--- a/
src/yaz-ir-assoc.cpp
+++ b/
src/yaz-ir-assoc.cpp
@@
-221,10
+221,10
@@
int IR_Assoc::send_searchRequest(Yaz_Z_Query *query,
return send_Z_PDU(apdu, 0);
}
return send_Z_PDU(apdu, 0);
}
-int IR_Assoc::send_presentRequest(int start,
- int number,
- char* pResultSetId,
- char* pRefId)
+int IR_Assoc::send_presentRequest(Odr_int start,
+ Odr_int number,
+ char* pResultSetId,
+ char* pRefId)
{
Z_APDU *apdu = create_Z_PDU(Z_APDU_presentRequest);
Z_PresentRequest *req = apdu->u.presentRequest;
{
Z_APDU *apdu = create_Z_PDU(Z_APDU_presentRequest);
Z_PresentRequest *req = apdu->u.presentRequest;
diff --git
a/src/yaz-my-client.cpp
b/src/yaz-my-client.cpp
index
90504e2
..
33186ac
100644
(file)
--- a/
src/yaz-my-client.cpp
+++ b/
src/yaz-my-client.cpp
@@
-153,7
+153,7
@@
void MyClient::recv_diagrecs(Z_DiagRec **pp, int num)
}
else
r = p->u.defaultFormat;
}
else
r = p->u.defaultFormat;
- printf(" [%d] %s", *r->condition, diagbib1_str(*r->condition));
+ printf(" [" ODR_INT_PRINTF "] %s", *r->condition, diagbib1_str(*r->condition));
switch (r->which)
{
case Z_DefaultDiagFormat_v2Addinfo:
switch (r->which)
{
case Z_DefaultDiagFormat_v2Addinfo:
@@
-277,7
+277,7
@@
void MyClient::recv_searchResponse(Z_SearchResponse *searchResponse)
else
{
printf ("Ok\n");
else
{
printf ("Ok\n");
- printf ("Hits: %d\n", *searchResponse->resultCount);
+ printf ("Hits: " ODR_INT_PRINTF "\n", *searchResponse->resultCount);
}
recv_records (searchResponse->records);
}
}
recv_records (searchResponse->records);
}
diff --git
a/src/yaz-z-server-sr.cpp
b/src/yaz-z-server-sr.cpp
index
ed8c6c2
..
f77e749
100644
(file)
--- a/
src/yaz-z-server-sr.cpp
+++ b/
src/yaz-z-server-sr.cpp
@@
-12,7
+12,7
@@
Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s,
const char *resultSetName,
int start, int xnum,
Z_RecordComposition *comp,
const char *resultSetName,
int start, int xnum,
Z_RecordComposition *comp,
- int *next, int *pres,
+ Odr_int *next, Odr_int *pres,
Odr_oid *format)
{
int recno, total_length = 0, toget = xnum, dumped_records = 0;
Odr_oid *format)
{
int recno, total_length = 0, toget = xnum, dumped_records = 0;
@@
-114,7
+114,7
@@
void Yaz_Facility_Retrieval::fetch_via_piggyback (Z_Server *s,
Z_RecordComposition comp, *compp = 0;
int hits = *res->resultCount;
Z_RecordComposition comp, *compp = 0;
int hits = *res->resultCount;
- int *nulint = (int *)odr_malloc (odr_encode(), sizeof(*nulint));
+ Odr_int *nulint = (Odr_int *)odr_malloc (odr_encode(), sizeof(*nulint));
*nulint = 0;
comp.which = Z_RecordComp_simple;
*nulint = 0;
comp.which = Z_RecordComp_simple;
@@
-136,7
+136,8
@@
void Yaz_Facility_Retrieval::fetch_via_piggyback (Z_Server *s,
if (toget && !res->records)
{
if (toget && !res->records)
{
- res->presentStatus = (int *) odr_malloc (odr_encode(), sizeof(int));
+ res->presentStatus = (Odr_int *)
+ odr_malloc (odr_encode(), sizeof(Odr_int));
*res->presentStatus = Z_PRES_SUCCESS;
res->records =
pack_records(s, req->resultSetName, 1, toget, compp,
*res->presentStatus = Z_PRES_SUCCESS;
res->records =
pack_records(s, req->resultSetName, 1, toget, compp,
diff --git
a/src/yaz-z-server.cpp
b/src/yaz-z-server.cpp
index
ffa9d26
..
6f077c4
100644
(file)
--- a/
src/yaz-z-server.cpp
+++ b/
src/yaz-z-server.cpp
@@
-128,7
+128,7
@@
void Z_ServerUtility::create_surrogateDiagnostics(
ODR odr, Z_NamePlusRecord *rec, const char *dbname,
int error, char *const addinfo)
{
ODR odr, Z_NamePlusRecord *rec, const char *dbname,
int error, char *const addinfo)
{
- int *err = (int *)odr_malloc (odr, sizeof(*err));
+ Odr_int *err = (Odr_int *)odr_malloc (odr, sizeof(*err));
Z_DiagRec *drec = (Z_DiagRec *)odr_malloc (odr, sizeof(*drec));
Z_DefaultDiagFormat *dr = (Z_DefaultDiagFormat *)
odr_malloc (odr, sizeof(*dr));
Z_DiagRec *drec = (Z_DiagRec *)odr_malloc (odr, sizeof(*drec));
Z_DefaultDiagFormat *dr = (Z_DefaultDiagFormat *)
odr_malloc (odr, sizeof(*dr));
@@
-152,7
+152,7
@@
Z_Records *Z_ServerUtility::create_nonSurrogateDiagnostics (
{
Z_Records *rec = (Z_Records *)
odr_malloc (odr, sizeof(*rec));
{
Z_Records *rec = (Z_Records *)
odr_malloc (odr, sizeof(*rec));
- int *err = (int *)
+ Odr_int *err = (Odr_int *)
odr_malloc (odr, sizeof(*err));
Z_DiagRec *drec = (Z_DiagRec *)
odr_malloc (odr, sizeof(*drec));
odr_malloc (odr, sizeof(*err));
Z_DiagRec *drec = (Z_DiagRec *)
odr_malloc (odr, sizeof(*drec));