Smallish
[yaz-moved-to-github.git] / asn / zget.c
index d4991e9..aeed16d 100644 (file)
@@ -4,7 +4,19 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: zget.c,v $
- * Revision 1.5  1995-06-07 14:42:30  quinn
+ * Revision 1.9  1995-09-29 17:11:55  quinn
+ * Smallish
+ *
+ * Revision 1.8  1995/09/27  15:02:43  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.7  1995/06/15  07:44:52  quinn
+ * Moving to v3.
+ *
+ * Revision 1.6  1995/06/14  15:26:37  quinn
+ * *** empty log message ***
+ *
+ * Revision 1.5  1995/06/07  14:42:30  quinn
  * Fixed CLOSE
  *
  * Revision 1.4  1995/06/07  14:36:25  quinn
@@ -23,7 +35,6 @@
  */
 
 #include <proto.h>
-#include "../version.h"
 
 Z_InitRequest *zget_InitRequest(ODR o)
 {
@@ -43,6 +54,9 @@ Z_InitRequest *zget_InitRequest(ODR o)
     r->implementationName = "Index Data/YAZ";
     r->implementationVersion = YAZ_VERSION;
     r->userInformationField = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -65,6 +79,9 @@ Z_InitResponse *zget_InitResponse(ODR o)
     r->implementationName = "Index Data/YAZ";
     r->implementationVersion = YAZ_VERSION;
     r->userInformationField = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -88,6 +105,10 @@ Z_SearchRequest *zget_SearchRequest(ODR o)
     r->mediumSetElementSetNames = 0;
     r->preferredRecordSyntax = 0;
     r->query = 0;
+#ifdef Z_95
+    r->additionalSearchInfo = 0;
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -107,6 +128,10 @@ Z_SearchResponse *zget_SearchResponse(ODR o)
     r->resultSetStatus = 0;
     r->presentStatus = 0;
     r->records = 0;
+#ifdef Z_95
+    r->additionalSearchInfo = 0;
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -120,8 +145,20 @@ Z_PresentRequest *zget_PresentRequest(ODR o)
     *r->resultSetStartPoint = 1;
     r->numberOfRecordsRequested = odr_malloc(o, sizeof(int));
     *r->numberOfRecordsRequested = 10;
+#ifdef Z_95
+    r->num_ranges = 0;
+    r->additionalRanges = 0;
+    r->recordComposition = 0;
+#else
     r->elementSetNames = 0;
+#endif
     r->preferredRecordSyntax = 0;
+#ifdef Z_95
+    r->maxSegmentCount = 0;
+    r->maxRecordSize = 0;
+    r->maxSegmentSize = 0;
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -137,6 +174,9 @@ Z_PresentResponse *zget_PresentResponse(ODR o)
     r->presentStatus = odr_malloc(o, sizeof(int));
     *r->presentStatus = Z_PRES_SUCCESS;
     r->records = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -149,6 +189,9 @@ Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o)
     *r->deleteFunction = Z_DeleteRequest_list;
     r->num_ids = 0;
     r->resultSetList = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -165,6 +208,9 @@ Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o)
     r->num_bulkStatuses = 0;
     r->bulkStatuses = 0;
     r->deleteMessage = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -181,6 +227,9 @@ Z_ScanRequest *zget_ScanRequest(ODR o)
     r->numberOfTermsRequested = odr_malloc(o, sizeof(int));
     *r->numberOfTermsRequested = 20;
     r->preferredPositionInResponse = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -197,6 +246,9 @@ Z_ScanResponse *zget_ScanResponse(ODR o)
     r->positionOfTerm =0;
     r->entries = 0;
     r->attributeSet = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -209,6 +261,9 @@ Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o)
     *r->requestedAction = Z_TriggerResourceCtrl_resourceReport;
     r->prefResourceReportFormat = 0;
     r->resultSetWanted = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -223,6 +278,9 @@ Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o)
     r->responseRequired = odr_malloc(o, sizeof(bool_t));
     *r->responseRequired = 0;
     r->triggeredRequestFlag = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -234,6 +292,9 @@ Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o)
     r->continueFlag = odr_malloc(o, sizeof(bool_t));
     *r->continueFlag = 1;
     r->resultSetWanted = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -244,6 +305,9 @@ Z_AccessControlRequest *zget_AccessControlRequest(ODR o)
     r->referenceId = 0;
     r->which = Z_AccessRequest_simpleForm;
     r->u.simpleForm = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -255,6 +319,22 @@ Z_AccessControlResponse *zget_AccessControlResponse(ODR o)
     r->which = Z_AccessResponse_simpleForm;
     r->u.simpleForm = 0;
     r->diagnostic = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
+    return r;
+}
+
+Z_Segment *zget_Segment(ODR o)
+{
+    Z_Segment *r = odr_malloc(o, sizeof(*r));
+
+    r->referenceId = 0;
+    r->numberOfRecordsReturned = odr_malloc(o, sizeof(int));
+    *r->numberOfRecordsReturned = 0;
+    r->num_segmentRecords = 0;
+    r->segmentRecords = 0;
+    r->otherInfo = 0;
     return r;
 }
 
@@ -268,6 +348,9 @@ Z_Close *zget_Close(ODR o)
     r->diagnosticInformation = 0;
     r->resourceReportFormat = 0;
     r->resourceReport = 0;
+#ifdef Z_95
+    r->otherInfo = 0;
+#endif
     return r;
 }
 
@@ -307,6 +390,9 @@ Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which)
        case Z_APDU_resourceControlResponse:
            r->u.resourceControlResponse = zget_ResourceControlResponse(o);
            break;
+       case Z_APDU_segmentRequest:
+           r->u.segmentRequest = zget_Segment(o);
+           break;
        case Z_APDU_close:
            r->u.close = zget_Close(o);
            break;