X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fclient.c;h=5dbe87649e63c6759866ce2e42994e13aead930f;hp=adf57cd79c5b470e0147749d334446c43dd29989;hb=10308339de640b9ff73ed096a6ed2f5faf5646de;hpb=fe03e3dc1bf9c45d942064b92e0910c17220bcb1 diff --git a/client/client.c b/client/client.c index adf57cd..5dbe876 100644 --- a/client/client.c +++ b/client/client.c @@ -4,7 +4,16 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: client.c,v $ - * Revision 1.4 1995-05-22 15:30:13 adam + * Revision 1.7 1995-06-02 09:50:09 quinn + * Smallish. + * + * Revision 1.6 1995/05/31 08:29:21 quinn + * Nothing significant. + * + * Revision 1.5 1995/05/29 08:10:47 quinn + * Moved oid.c to util. + * + * Revision 1.4 1995/05/22 15:30:13 adam * Client uses prefix query notation. * * Revision 1.3 1995/05/22 15:06:53 quinn @@ -36,7 +45,6 @@ #endif #include -#include #include @@ -97,9 +105,8 @@ static void send_initRequest() ODR_MASK_SET(req->options, Z_Options_search); ODR_MASK_SET(req->options, Z_Options_present); - ODR_MASK_SET(req->protocolVersion, 0); - ODR_MASK_SET(req->protocolVersion, 1); - ODR_MASK_SET(req->protocolVersion, 2); + ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_1); + ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_2); req->idAuthentication = auth; @@ -181,7 +188,7 @@ int cmd_open(char *arg) fprintf(stderr, "Bad type: %s\n", type); return 0; } - if (!(conn = cs_create(t, 1, CS_Z3950))) + if (!(conn = cs_create(t, 1, protocol))) { perror("cs_create"); return 0; @@ -195,7 +202,7 @@ int cmd_open(char *arg) conn = 0; return 0; } - printf("Ok!\n"); + printf("Ok.\n"); send_initRequest(); return 2; } @@ -518,7 +525,11 @@ int cmd_quit(char *arg) static void initialize(void) { +#ifdef RPN_QUERY +#ifndef PREFIX_QUERY FILE *inf; +#endif +#endif if (!(out = odr_createmem(ODR_ENCODE)) || !(in = odr_createmem(ODR_DECODE)) ||