C++ fixes.
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 21 Feb 2001 13:46:53 +0000 (13:46 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 21 Feb 2001 13:46:53 +0000 (13:46 +0000)
18 files changed:
CHANGELOG
asn/prt-proto.h
ccl/cclfind.c
ccl/cclqfile.c
client/admin.c
client/client.c
comstack/tcpip.c
ill/ill-get.c
ill/ill.tcl
odr/odr.c
retrieval/d1_read.c
server/seshigh.c
util/yaz-comp
z39.50/z.tcl
ztest/ztest.c
zutil/pquery.c
zutil/yaz-ccl.c
zutil/zget.c

index 8794fbc..bdcb67d 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,10 @@
 Possible compatibility problems with earlier versions marked with '*'.
 
+Fixes in ASN.1 compiler for C++ compatibility.
+
+* Changed member names "and", "or" and "and_not" in struct Z_Operator
+to "op_and", "op_or" and "op_and_not" to avoid conflict with C++.
+
 Fixed problem with GNU readline detection on Redhat 7.0.
 
 Added step-size for Scan backend handler.
index f83d1f3..9e59e16 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995-2000, Index Data.
+ * Copyright (c) 1995-2001, Index Data.
  *
  * Permission to use, copy, modify, distribute, and sell this software and
  * its documentation, in whole or in part, for any purpose, is hereby granted,
@@ -23,7 +23,7 @@
  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  * OF THIS SOFTWARE.
  *
- * $Id: prt-proto.h,v 1.1 2000-10-03 12:55:50 adam Exp $
+ * $Id: prt-proto.h,v 1.2 2001-02-21 13:46:53 adam Exp $
  */
 
 #ifndef PRT_PROTO_H
@@ -322,9 +322,9 @@ typedef struct Z_Operator
 #define Z_Operator_prox 3
     union
     {
-       Odr_null *and;          /* these guys are nulls. */
-       Odr_null *or;
-       Odr_null *and_not;
+       Odr_null *op_and;          /* these guys are nulls. */
+       Odr_null *op_or;
+       Odr_null *op_and_not;
        Z_ProximityOperator *prox;
     } u;
 } Z_Operator;
index ff94590..ec5e650 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclfind.c,v $
- * Revision 1.20  2000-11-16 13:03:12  adam
+ * Revision 1.21  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.20  2000/11/16 13:03:12  adam
  * Function ccl_rpn_query sets attributeSet to Bib-1.
  *
  * Revision 1.19  2000/11/16 09:58:02  adam
@@ -300,7 +303,7 @@ static void add_attr (struct ccl_rpn_node *p, const char *set,
     ccl_assert (n);
     if (set)
     {
-        n->set = malloc (strlen(set)+1);
+        n->set = (char*) malloc (strlen(set)+1);
         strcpy (n->set, set);
     }
     else
index 96d57e9..fa93894 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclqfile.c,v $
- * Revision 1.7  2001-01-24 11:55:31  adam
+ * Revision 1.8  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.7  2001/01/24 11:55:31  adam
  * Fixed nasty bug introduced by previous commit (attribute sets not
  * properly allocated).
  *
@@ -175,7 +178,7 @@ void ccl_qual_fitem (CCL_bibset bibset, const char *cp, const char *qual_name)
             pair[pair_no*2+1] = value;
            if (setp)
            {
-               attsets[pair_no] = malloc (strlen(qual_spec)+1);
+               attsets[pair_no] = (char*) malloc (strlen(qual_spec)+1);
                strcpy (attsets[pair_no], qual_spec);
            }
            else
index cfb2c93..1e956da 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * $Log: admin.c,v $
- * Revision 1.8  2000-04-17 14:21:38  adam
+ * Revision 1.9  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.8  2000/04/17 14:21:38  adam
  * WIN32 update.
  *
  * Revision 1.7  2000/04/05 07:39:54  adam
@@ -251,7 +254,7 @@ int cmd_adm_import(char *arg)
            {
                Z_Segment *segment;
                Z_NamePlusRecord *rec;
-               Odr_oct *oct = odr_malloc (out, sizeof(*oct));
+               Odr_oct *oct = (Odr_oct *) odr_malloc (out, sizeof(*oct));
 
                if (!apdu)
                {
@@ -270,7 +273,7 @@ int cmd_adm_import(char *arg)
                rec->u.intermediateFragment->u.notExternallyTagged = oct;
                
                oct->len = oct->size = status.st_size;
-               oct->buf = odr_malloc (out, oct->size);
+               oct->buf = (unsigned char *) odr_malloc (out, oct->size);
                fread (oct->buf, 1, oct->size, inf);
                fclose (inf);
                
index 4449e5d..0b59724 100644 (file)
@@ -3,7 +3,10 @@
  * See the file LICENSE for details.
  *
  * $Log: client.c,v $
- * Revision 1.113  2001-02-21 09:41:15  adam
+ * Revision 1.114  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.113  2001/02/21 09:41:15  adam
  * Fixed problem with old codecs.
  *
  * Revision 1.112  2001/02/20 11:25:32  adam
@@ -1369,7 +1372,8 @@ static Z_External *create_external_itemRequest()
         
         r->u.single_ASN1_type = (Odr_oct *)
             odr_malloc (out, sizeof(*r->u.single_ASN1_type));
-        r->u.single_ASN1_type->buf = odr_malloc (out, item_request_size);
+        r->u.single_ASN1_type->buf = (unsigned char *)
+           odr_malloc (out, item_request_size);
         r->u.single_ASN1_type->len = item_request_size;
         r->u.single_ASN1_type->size = item_request_size;
         memcpy (r->u.single_ASN1_type->buf, item_request_buf,
@@ -1432,7 +1436,8 @@ static Z_External *create_external_ILL_APDU(int which)
         
         r->u.single_ASN1_type = (Odr_oct *)
             odr_malloc (out, sizeof(*r->u.single_ASN1_type));
-        r->u.single_ASN1_type->buf = odr_malloc (out, ill_request_size);
+        r->u.single_ASN1_type->buf = (unsigned char *)
+           odr_malloc (out, ill_request_size);
         r->u.single_ASN1_type->len = ill_request_size;
         r->u.single_ASN1_type->size = ill_request_size;
         memcpy (r->u.single_ASN1_type->buf, ill_request_buf, ill_request_size);
@@ -1911,7 +1916,7 @@ int send_scanrequest(const char *query, int pp, int num, const char *term)
             req->termListAndStartPoint->term->u.general)
         {
             req->termListAndStartPoint->term->u.general->buf =
-                odr_strdup(out, term);
+                (unsigned char *) odr_strdup(out, term);
             req->termListAndStartPoint->term->u.general->len =
                 req->termListAndStartPoint->term->u.general->size =
                 strlen(term);
index b467f20..1d02f4e 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: tcpip.c,v $
- * Revision 1.35  2000-11-27 15:17:40  adam
+ * Revision 1.36  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.35  2000/11/27 15:17:40  adam
  * Using SSLeay_add_all_algorithms instead of OpenSSL_add_all_algorithms.
  *
  * Revision 1.34  2000/11/23 10:58:32  adam
@@ -613,7 +616,11 @@ int tcpip_listen(COMSTACK h, char *raddr, int *addrlen,
                 void *cd)
 {
     struct sockaddr_in addr;
+#ifdef __cplusplus
+    socklen_t len = sizeof(addr);
+#else
     int len = sizeof(addr);
+#endif
 
     TRC(fprintf(stderr, "tcpip_listen pid=%d\n", getpid()));
     if (h->state != CS_IDLE)
index bf63003..8fe5257 100644 (file)
@@ -3,7 +3,10 @@
  * See the file LICENSE for details.
  *
  * $Log: ill-get.c,v $
- * Revision 1.7  2001-02-20 11:25:32  adam
+ * Revision 1.8  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.7  2001/02/20 11:25:32  adam
  * Added ill_get_APDU and ill_get_Cancel.
  *
  * Revision 1.6  2000/08/10 08:41:26  adam
@@ -36,7 +39,7 @@ bool_t *ill_get_bool (struct ill_get_ctl *gc, const char *name,
     ODR o = gc->odr;
     char element[128];
     const char *v;
-    bool_t *r = odr_malloc (o, sizeof(*r));
+    bool_t *r = (bool_t *) odr_malloc (o, sizeof(*r));
     
     strcpy(element, name);
     if (sub)
@@ -60,7 +63,7 @@ int *ill_get_int (struct ill_get_ctl *gc, const char *name,
     ODR o = gc->odr;
     char element[128];
     const char *v;
-    int *r = odr_malloc (o, sizeof(*r));
+    int *r = (int *) odr_malloc (o, sizeof(*r));
     
     strcpy(element, name);
     if (sub)
@@ -155,7 +158,8 @@ ILL_Person_Or_Institution_Symbol *ill_get_Person_Or_Insitution_Symbol (
 {
     char element[128];
     ODR o = gc->odr;
-    ILL_Person_Or_Institution_Symbol *p = odr_malloc (o, sizeof(*p));
+    ILL_Person_Or_Institution_Symbol *p =
+       (ILL_Person_Or_Institution_Symbol *) odr_malloc (o, sizeof(*p));
     
     strcpy(element, name);
     if (sub)
@@ -179,7 +183,8 @@ static ILL_Name_Of_Person_Or_Institution *ill_get_Name_Of_Person_Or_Institution(
 {
     char element[128];
     ODR o = gc->odr;
-    ILL_Name_Of_Person_Or_Institution *p = odr_malloc (o, sizeof(*p));
+    ILL_Name_Of_Person_Or_Institution *p =
+       (ILL_Name_Of_Person_Or_Institution *) odr_malloc (o, sizeof(*p));
     
     strcpy(element, name);
     if (sub)
@@ -671,7 +676,7 @@ ILL_APDU *ill_get_APDU (
     if (!strcmp (v, "request"))
     {
        r->which = ILL_APDU_ILL_Request;
-       r->u.ILL_Request = ill_get_ILLRequest(gc, name, sub);
+       r->u.illRequest = ill_get_ILLRequest(gc, name, sub);
     }
     else if (!strcmp (v, "cancel"))
     {
index 135ccf1..927e2d0 100644 (file)
@@ -1,5 +1,5 @@
 # Config File for ILL
-# $Id: ill.tcl,v 1.2 2000-01-15 09:38:51 adam Exp $
+# $Id: ill.tcl,v 1.3 2001-02-21 13:46:53 adam Exp $
 # ----------------------------------------------------------
 # Prefix Specifications
 #  
@@ -44,7 +44,9 @@ set map($m,ILL-APDU-Type) APDU_Type
 set map($m,ILL-Service-Type) Service_Type
 set map($m,Service_Date_Time_0) Service_Date_this
 set map($m,Service_Date_Time_1) Service_Date_original
-set map($m,Overdue_0) Overdue_Extension
+set map($m,Overdue_0) Overdue_ExtensionS
+set membermap($m,APDU,ILL-Request) {APDU_ILL_Request illRequest}
+set membermap($m,APDU,ILL-Answer) {APDU_ILL_Answer illAnswer}
 
 # ----------------------------------------------------------
 set m Z39.50-extendedService-ItemOrder-ItemRequest-1
index 86b8652..e172eda 100644 (file)
--- a/odr/odr.c
+++ b/odr/odr.c
@@ -1,9 +1,12 @@
 /*
- * Copyright (c) 1995-2000, Index Data
+ * Copyright (c) 1995-2001, Index Data
  * See the file LICENSE for details.
  *
  * $Log: odr.c,v $
- * Revision 1.33  2000-02-29 13:44:55  adam
+ * Revision 1.34  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.33  2000/02/29 13:44:55  adam
  * Check for config.h (currently not generated).
  *
  * Revision 1.32  2000/01/31 13:15:21  adam
 #include <yaz/xmalloc.h>
 #include <yaz/odr.h>
 
-Odr_null *ODR_NULLVAL = "NULL";  /* the presence of a null value */
+Odr_null *ODR_NULLVAL = (Odr_null *) "NULL";  /* the presence of a null value */
 
 Odr_null *odr_nullval (void)
 {
index 8ff1563..b8ce25c 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_read.c,v $
- * Revision 1.35  2000-12-05 14:44:25  adam
+ * Revision 1.36  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.35  2000/12/05 14:44:25  adam
  * Readers skips <! ...> sections.
  *
  * Revision 1.34  2000/12/05 10:06:23  adam
@@ -348,7 +351,7 @@ data1_xattr *data1_read_xattr (data1_handle dh, NMEM m,
            c = (*get_byte)(fh);
        if (!c  || c == '>' || c == '/')
            break;
-       *pp = p = nmem_malloc (m, sizeof(*p));
+       *pp = p = (data1_xattr *) nmem_malloc (m, sizeof(*p));
        p->next = 0;
        pp = &p->next;
        p->value = 0;
@@ -361,7 +364,7 @@ data1_xattr *data1_read_xattr (data1_handle dh, NMEM m,
        }
        wrbuf_putc (wrbuf, '\0');
        len = wrbuf_len(wrbuf);
-       p->name = nmem_malloc (m, len);
+       p->name = (char*) nmem_malloc (m, len);
        strcpy (p->name, wrbuf_buf(wrbuf));
        if (c == '=')
        {
@@ -376,7 +379,7 @@ data1_xattr *data1_read_xattr (data1_handle dh, NMEM m,
            }
            wrbuf_putc (wrbuf, '\0');
            len = wrbuf_len(wrbuf);
-           p->value = nmem_malloc (m, len);
+           p->value = (char*) nmem_malloc (m, len);
            strcpy (p->value, wrbuf_buf(wrbuf));
            if (c == '"')
                c = (*get_byte)(fh);    
index a150917..3a4b6b0 100644 (file)
@@ -3,7 +3,10 @@
  * See the file LICENSE for details.
  *
  * $Log: seshigh.c,v $
- * Revision 1.113  2001-01-30 21:34:17  adam
+ * Revision 1.114  2001-02-21 13:46:53  adam
+ * C++ fixes.
+ *
+ * Revision 1.113  2001/01/30 21:34:17  adam
  * Added step-size for Scan backend interface.
  *
  * Revision 1.112  2001/01/29 09:38:22  adam
@@ -930,7 +933,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
     char options[100];
 
     xfree (assoc->init);
-    assoc->init = xmalloc (sizeof(*assoc->init));
+    assoc->init = (bend_initrequest *) xmalloc (sizeof(*assoc->init));
 
     yaz_log(LOG_LOG, "Got initRequest");
     if (req->implementationId)
@@ -1094,14 +1097,14 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
  * These functions should be merged.
  */
 
-static void set_addinfo (Z_DefaultDiagFormat *dr, char *addinfo)
+static void set_addinfo (Z_DefaultDiagFormat *dr, char *addinfo, ODR odr)
 {
 #if ASN_COMPILED
     dr->which = Z_DefaultDiagFormat_v2Addinfo;
-    dr->u.v2Addinfo = addinfo ? addinfo : "";
+    dr->u.v2Addinfo = odr_strdup (odr, addinfo ? addinfo : "");
 #else
     dr->which = Z_DiagForm_v2AddInfo;
-    dr->addinfo = addinfo ? addinfo : "";
+    dr->addinfo = odr_strdup (odr, addinfo ? addinfo : "");
 #endif
 }
 
@@ -1139,7 +1142,7 @@ static Z_Records *diagrec(association *assoc, int error, char *addinfo)
     dr->diagnosticSetId =
        odr_oiddup (assoc->encode, oid_ent_to_oid(&bib1, oid));
     dr->condition = err;
-    set_addinfo (dr, addinfo);
+    set_addinfo (dr, addinfo, assoc->encode);
     return rec;
 }
 
@@ -1172,7 +1175,7 @@ static Z_NamePlusRecord *surrogatediagrec(association *assoc, char *dbname,
     dr->diagnosticSetId = odr_oiddup (assoc->encode,
                                       oid_ent_to_oid(&bib1, oid));
     dr->condition = err;
-    set_addinfo (dr, addinfo);
+    set_addinfo (dr, addinfo, assoc->encode);
 
     return rec;
 }
@@ -1208,10 +1211,10 @@ static Z_DiagRecs *diagrecs(association *assoc, int error, char *addinfo)
 
 #ifdef ASN_COMPILED
     rec->which = Z_DefaultDiagFormat_v2Addinfo;
-    rec->u.v2Addinfo = addinfo ? addinfo : "";
+    rec->u.v2Addinfo = odr_strdup (assoc->encode, addinfo ? addinfo : "");
 #else
     rec->which = Z_DiagForm_v2AddInfo;
-    rec->addinfo = addinfo ? addinfo : "";
+    rec->addinfo = odr_strdup (assoc->encode, addinfo ? addinfo : "");
 #endif
     return recs;
 }
@@ -1843,8 +1846,9 @@ static Z_APDU *process_deleteRequest(association *assoc, request *reqb,
     if (bdrr->num_setnames > 0)
     {
        int i;
-       bdrr->statuses = odr_malloc(assoc->encode, sizeof(*bdrr->statuses) *
-                                   bdrr->num_setnames);
+       bdrr->statuses = (int*) 
+           odr_malloc(assoc->encode, sizeof(*bdrr->statuses) *
+                      bdrr->num_setnames);
        for (i = 0; i < bdrr->num_setnames; i++)
            bdrr->statuses[i] = 0;
     }
@@ -1860,16 +1864,18 @@ static Z_APDU *process_deleteRequest(association *assoc, request *reqb,
     if (bdrr->num_setnames > 0)
     {
        int i;
-       res->deleteListStatuses = odr_malloc(assoc->encode,
-                                            sizeof(*res->deleteListStatuses));
+       res->deleteListStatuses = (Z_ListStatuses *)
+           odr_malloc(assoc->encode, sizeof(*res->deleteListStatuses));
        res->deleteListStatuses->num = bdrr->num_setnames;
        res->deleteListStatuses->elements =
-           odr_malloc (assoc->encode,
+           (Z_ListStatus **)
+           odr_malloc (assoc->encode, 
                        sizeof(*res->deleteListStatuses->elements) *
                        bdrr->num_setnames);
        for (i = 0; i<bdrr->num_setnames; i++)
        {
            res->deleteListStatuses->elements[i] =
+               (Z_ListStatus *)
                odr_malloc (assoc->encode,
                            sizeof(**res->deleteListStatuses->elements));
            res->deleteListStatuses->elements[i]->status = bdrr->statuses+i;
index 5e1199f..644b187 100755 (executable)
@@ -7,7 +7,10 @@ exec tclsh "$0" "$@"
 # See the file LICENSE for details.
 #
 # $Log: yaz-comp,v $
-# Revision 1.1  2000-03-02 08:48:20  adam
+# Revision 1.2  2001-02-21 13:46:54  adam
+# C++ fixes.
+#
+# Revision 1.1  2000/03/02 08:48:20  adam
 # Renamed ASN.1 compiler to yaz-comp (used to be yc.tcl).
 #
 # Revision 1.6  2000/02/10 13:44:02  adam
@@ -256,7 +259,9 @@ proc asnName {name} {
        if {$inf(verbose)} {
            puts " mapping member $name,$val to $nval"
        }
-       lex
+       if {![string match {[A-Z]*} $val]} {
+           lex
+       }
     } else {
        set nval $val
        if {![string match {[A-Z]*} $val]} {
@@ -563,7 +568,7 @@ proc asnSequence {name tag implicit tagtype} {
         lappend l "\tif (!odr_constructed_begin (o, p, $tagtype, $tag, name))"
         lappend l "\t\treturn opt && odr_ok(o);"
         lappend l "\tif (o->direction == ODR_DECODE)"
-        lappend l "\t\t*p = odr_malloc (o, sizeof(**p));"
+        lappend l "\t\t*p = ($inf(vprefix)$name *) odr_malloc (o, sizeof(**p));"
 
         lappend l "\tif (!odr_sequence_begin (o, p, sizeof(**p), 0))"
         lappend l "\t\{"
index 48b4038..cdb08ca 100644 (file)
@@ -1,5 +1,5 @@
 # YC Sample Config File for Z39.50
-# $Id: z.tcl,v 1.3 2000-03-14 09:22:15 ian Exp $
+# $Id: z.tcl,v 1.4 2001-02-21 13:46:54 adam Exp $
 # ----------------------------------------------------------
 # Prefix Specifications
 #  
@@ -57,6 +57,9 @@ int z_ANY_type_0 (ODR o, void **p, int opt)
 
 # Type Name overrides
 set map($m,PDU) APDU
+set membermap($m,Operator,and) {Operator_and op_and}
+set membermap($m,Operator,or) {Operator_or op_or}
+set membermap($m,Operator,and-not) {Operator_and_not op_and_not}
 set map($m,AttributeElement_complex) ComplexAttribute
 set map($m,DeleteSetStatus) DeleteStatus
 set membermap($m,ProximityOperator,private) {ProximityOperator_private zprivate}
index c3df75a..f6c6372 100644 (file)
@@ -6,7 +6,10 @@
  *    Chas Woodfield, Fretwell Downing Datasystems.
  *
  * $Log: ztest.c,v $
- * Revision 1.37  2001-02-20 11:25:32  adam
+ * Revision 1.38  2001-02-21 13:46:54  adam
+ * C++ fixes.
+ *
+ * Revision 1.37  2001/02/20 11:25:32  adam
  * Added ill_get_APDU and ill_get_Cancel.
  *
  * Revision 1.36  2001/01/30 21:34:18  adam
@@ -220,7 +223,7 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
                        if (r->which == ODR_EXTERNAL_single)
                        {
                            odr_setbuf(rr->decode,
-                                      r->u.single_ASN1_type->buf,
+                                      (char *) r->u.single_ASN1_type->buf,
                                       r->u.single_ASN1_type->len, 0);
                            
                            if (!ill_ItemRequest (rr->decode, &item_req, 0, 0))
@@ -249,7 +252,7 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
                        {
                            yaz_log (LOG_LOG, "Decode ILL APDU begin");
                            odr_setbuf(rr->decode,
-                                      r->u.single_ASN1_type->buf,
+                                      (char*) r->u.single_ASN1_type->buf,
                                       r->u.single_ASN1_type->len, 0);
                            
                            if (!ill_APDU (rr->decode, &ill_apdu, 0, 0))
@@ -260,7 +263,7 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
                                        odr_offset(rr->decode));
                                 yaz_log(LOG_LOG, "PDU dump:");
                                 odr_dumpBER(yaz_log_file(),
-                                     r->u.single_ASN1_type->buf,
+                                     (char *) r->u.single_ASN1_type->buf,
                                      r->u.single_ASN1_type->len);
                             }
                            else
index cb53cc3..c7e2e84 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: pquery.c,v $
- * Revision 1.4  1999-12-21 16:25:20  adam
+ * Revision 1.5  2001-02-21 13:46:54  adam
+ * C++ fixes.
+ *
+ * Revision 1.4  1999/12/21 16:25:20  adam
  * Fixed handling of default/inherited attributes.
  *
  * Revision 1.3  1999/12/20 15:20:13  adam
@@ -375,15 +378,15 @@ static Z_Complex *rpn_complex (struct lex_info *li, ODR o, oid_proto proto,
     {
     case 'a':
         zo->which = Z_Operator_and;
-        zo->u.and = odr_nullval();
+        zo->u.op_and = odr_nullval();
         break;
     case 'o':
         zo->which = Z_Operator_or;
-        zo->u.and = odr_nullval();
+        zo->u.op_or = odr_nullval();
         break;
     case 'n':
         zo->which = Z_Operator_and_not;
-        zo->u.and = odr_nullval();
+        zo->u.op_and_not = odr_nullval();
         break;
     case 'p':
         zo->which = Z_Operator_prox;
index 17194ba..d672503 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: yaz-ccl.c,v $
- * Revision 1.10  2001-02-20 11:23:50  adam
+ * Revision 1.11  2001-02-21 13:46:54  adam
+ * C++ fixes.
+ *
+ * Revision 1.10  2001/02/20 11:23:50  adam
  * Updated ccl_pquery to consider local attribute set too.
  *
  * Revision 1.9  2000/11/27 14:16:55  adam
@@ -108,7 +111,7 @@ static Z_AttributesPlusTerm *ccl_rpn_term (ODR o, struct ccl_rpn_node *p)
 
                    ident.oclass = CLASS_ATTSET;
                    ident.proto = PROTO_Z3950;
-                   ident.value = value;
+                   ident.value = (oid_value) value;
                    elements[i]->attributeSet =
                        odr_oiddup (o, oid_ent_to_oid (&ident, oid));
                }
@@ -172,15 +175,15 @@ static Z_Complex *ccl_rpn_complex (ODR o, struct ccl_rpn_node *p)
     {
     case CCL_RPN_AND:
         zo->which = Z_Operator_and;
-        zo->u.and = odr_nullval();
+        zo->u.op_and = odr_nullval();
         break;
     case CCL_RPN_OR:
         zo->which = Z_Operator_or;
-        zo->u.and = odr_nullval();
+        zo->u.op_or = odr_nullval();
         break;
     case CCL_RPN_NOT:
         zo->which = Z_Operator_and_not;
-        zo->u.and = odr_nullval();
+        zo->u.op_and_not = odr_nullval();
         break;
     case CCL_RPN_PROX:
        zo->which = Z_Operator_prox;
@@ -202,7 +205,7 @@ static Z_Complex *ccl_rpn_complex (ODR o, struct ccl_rpn_node *p)
        *zo->u.prox->relationType = Z_ProximityOperator_Prox_lessThan;
        zo->u.prox->which = Z_ProximityOperator_known;
        zo->u.prox->u.known = 
-           odr_malloc (o, sizeof(*zo->u.prox->u.known));
+           (Z_ProxUnit *) odr_malloc (o, sizeof(*zo->u.prox->u.known));
        *zo->u.prox->u.known = Z_ProxUnit_word;
 #else
        *zo->u.prox->relationType = Z_Prox_lessThan;
index 04f4f18..520782f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: zget.c,v $
- * Revision 1.3  2000-03-20 19:06:25  adam
+ * Revision 1.4  2001-02-21 13:46:54  adam
+ * C++ fixes.
+ *
+ * Revision 1.3  2000/03/20 19:06:25  adam
  * Added Segment request for fronend server. Work on admin for client.
  *
  * Revision 1.2  1999/11/30 13:47:12  adam
@@ -340,7 +343,7 @@ Z_Segment *zget_Segment(ODR o)
     r->numberOfRecordsReturned = (int *)odr_malloc(o, sizeof(int));
     *r->numberOfRecordsReturned = 0;
     r->num_segmentRecords = 0;
-    r->segmentRecords = odr_nullval();
+    r->segmentRecords = (Z_NamePlusRecord **) odr_nullval();
     r->otherInfo = 0;
     return r;
 }