--- XXXXX
+Added support for C++, headers uses extern "C" for public definitions.
+With input from RVDM.
+
In handling of SEQUENCE OF: Counter set to zero when SEQUENCE OF is absent.
- Thanks to Ronald van der Meer (RVDM).
+Thanks to Ronald van der Meer (RVDM).
Added initializers (zget_ routines) for a number of PDUs. Thanks to RVDM.
- Ronald van der Meer.
Added support for private extensions to the OID database
- (oid_setprivateoids()). Thanks to RVDM.
+(oid_setprivateoids()). Thanks to RVDM.
Added optional, physical ANY (key replication)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: prt-ext.c,v $
- * Revision 1.12 1997-04-30 08:52:02 quinn
+ * Revision 1.13 1997-05-14 06:53:22 adam
+ * C++ support.
+ *
+ * Revision 1.12 1997/04/30 08:52:02 quinn
* Null
*
* Revision 1.11 1996/10/10 12:35:13 quinn
(oid = oid_getentbyoid((*p)->direct_reference)) &&
(type = z_ext_getentbyref(oid->value)))
{
- int class, tag, cons;
+ int zclass, tag, cons;
/*
* We know it. If it's represented as an ASN.1 type, bias the CHOICE.
*/
- if (!odr_peektag(o, &class, &tag, &cons))
+ if (!odr_peektag(o, &zclass, &tag, &cons))
return opt && odr_ok(o);
- if (class == ODR_CONTEXT && tag == 0 && cons == 1)
+ if (zclass == ODR_CONTEXT && tag == 0 && cons == 1)
odr_choice_bias(o, type->what);
}
return
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: prt-grs.c,v $
- * Revision 1.5 1995-10-18 16:12:20 quinn
+ * Revision 1.6 1997-05-14 06:53:23 adam
+ * C++ support.
+ *
+ * Revision 1.5 1995/10/18 16:12:20 quinn
* Added a couple of special cases to handle the WAIS server.
*
* Revision 1.4 1995/09/29 17:11:55 quinn
return opt && odr_ok(o);
return
odr_implicit(o, odr_oid, &(*p)->variantSetId, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_integer, &(*p)->class, ODR_CONTEXT, 1, 0) &&
+ odr_implicit(o, odr_integer, &(*p)->zclass, ODR_CONTEXT, 1, 0) &&
odr_implicit(o, odr_integer, &(*p)->type, ODR_CONTEXT, 2, 0) &&
odr_constructed_begin(o, &(*p)->value, ODR_CONTEXT, 3) &&
odr_choice(o, arm, &(*p)->value, &(*p)->which) &&
* Europagate, 1995
*
* $Log: cclfind.c,v $
- * Revision 1.6 1997-04-30 08:52:06 quinn
+ * Revision 1.7 1997-05-14 06:53:26 adam
+ * C++ support.
+ *
+ * Revision 1.6 1997/04/30 08:52:06 quinn
* Null
*
* Revision 1.5 1996/10/11 15:00:24 adam
* kind: Type of node.
* return: pointer to allocated node.
*/
-static struct ccl_rpn_node *mk_node (enum rpn_node_kind kind)
+static struct ccl_rpn_node *mk_node (int kind)
{
struct ccl_rpn_node *p;
p = malloc (sizeof(*p));
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: client.c,v $
- * Revision 1.44 1997-05-05 11:20:35 adam
+ * Revision 1.45 1997-05-14 06:53:29 adam
+ * C++ support.
+ *
+ * Revision 1.44 1997/05/05 11:20:35 adam
* Client uses "options" utility and marc dump filename may be specified
* as an option (-m <file>).
*
for (i = 0; i < v->num_triples; i++)
{
- printf("%*sclass=%d,type=%d", level * 4, "", *v->triples[i]->class,
+ printf("%*sclass=%d,type=%d", level * 4, "", *v->triples[i]->zclass,
*v->triples[i]->type);
if (v->triples[i]->which == Z_Triple_internationalString)
printf(",value=%s\n", v->triples[i]->value.internationalString);
Z_APDU *apdu = zget_APDU(out, Z_APDU_triggerResourceControlRequest);
Z_TriggerResourceControlRequest *req =
apdu->u.triggerResourceControlRequest;
- bool_t false = 0;
+ bool_t rfalse = 0;
if (!session)
{
return 0;
}
*req->requestedAction = Z_TriggerResourceCtrl_cancel;
- req->resultSetWanted = &false;
+ req->resultSetWanted = &rfalse;
send_apdu(apdu);
printf("Sent cancel request\n");
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: tcpip.c,v $
- * Revision 1.14 1997-05-01 15:06:32 adam
+ * Revision 1.15 1997-05-14 06:53:33 adam
+ * C++ support.
+ *
+ * Revision 1.14 1997/05/01 15:06:32 adam
* Moved WINSOCK init. code to tcpip_init routine.
*
* Revision 1.13 1996/11/01 08:45:18 adam
new_socket = 0;
if (!(p = xmalloc(sizeof(struct comstack))))
return 0;
- if (!(state = p->private = xmalloc(sizeof(tcpip_state))))
+ if (!(state = p->cprivate = xmalloc(sizeof(tcpip_state))))
return 0;
#ifdef WINDOWS
int tcpip_more(COMSTACK h)
{
- tcpip_state *sp = h->private;
+ tcpip_state *sp = h->cprivate;
return sp->altlen && (*sp->complete)((unsigned char *) sp->altbuf,
sp->altlen);
COMSTACK tcpip_accept(COMSTACK h)
{
- COMSTACK new;
- tcpip_state *state, *st = h->private;
+ COMSTACK cnew;
+ tcpip_state *state, *st = h->cprivate;
#ifdef WINDOWS
unsigned long tru = 1;
#endif
h->cerrno = CSOUTSTATE;
return 0;
}
- if (!(new = xmalloc(sizeof(*new))))
+ if (!(cnew = xmalloc(sizeof(*cnew))))
{
h->cerrno = CSYSERR;
return 0;
}
- memcpy(new, h, sizeof(*h));
- new->iofile = h->newfd;
- if (!(state = new->private = xmalloc(sizeof(tcpip_state))))
+ memcpy(cnew, h, sizeof(*h));
+ cnew->iofile = h->newfd;
+ if (!(state = cnew->cprivate = xmalloc(sizeof(tcpip_state))))
{
h->cerrno = CSYSERR;
return 0;
}
#ifdef WINDOWS
- if (!new->blocking && ioctlsocket(new->iofile, FIONBIO, &tru) < 0)
+ if (!cnew->blocking && ioctlsocket(new->iofile, FIONBIO, &tru) < 0)
#else
- if (!new->blocking && fcntl(new->iofile, F_SETFL, O_NONBLOCK) < 0)
+ if (!cnew->blocking && fcntl(cnew->iofile, F_SETFL, O_NONBLOCK) < 0)
#endif
return 0;
state->altbuf = 0;
state->altsize = state->altlen = 0;
state->towrite = state->written = -1;
state->complete = st->complete;
- new->state = CS_DATAXFER;
+ cnew->state = CS_DATAXFER;
h->state = CS_IDLE;
- return new;
+ return cnew;
}
#define CS_TCPIP_BUFCHUNK 4096
*/
int tcpip_get(COMSTACK h, char **buf, int *bufsize)
{
- tcpip_state *sp = h->private;
+ tcpip_state *sp = h->cprivate;
char *tmpc;
int tmpi, berlen, rest, req, tomove;
int hasread = 0, res;
int tcpip_put(COMSTACK h, char *buf, int size)
{
int res;
- struct tcpip_state *state = h->private;
+ struct tcpip_state *state = h->cprivate;
TRC(fprintf(stderr, "tcpip_put: size=%d\n", size));
if (state->towrite < 0)
int tcpip_close(COMSTACK h)
{
- tcpip_state *sp = h->private;
+ tcpip_state *sp = h->cprivate;
TRC(fprintf(stderr, "tcpip_close\n"));
#ifdef WINDOWS
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: xmosi.c,v $
- * Revision 1.14 1996-07-26 12:34:07 quinn
+ * Revision 1.15 1997-05-14 06:53:34 adam
+ * C++ support.
+ *
+ * Revision 1.14 1996/07/26 12:34:07 quinn
* Porting.
*
* Revision 1.13 1996/07/06 19:58:30 quinn
if (!(r = xmalloc(sizeof(*r))))
return 0;
- if (!(state = r->private = xmalloc(sizeof(*state))))
+ if (!(state = r->cprivate = xmalloc(sizeof(*state))))
return 0;
state->call = 0;
int mosi_listen(COMSTACK h, char *addp, int *addrlen)
{
int res;
- mosi_state *st = h->private;
+ mosi_state *st = h->cprivate;
if (!(st->call = (struct t_call*) t_alloc(h->iofile, T_CALL_STR,
T_ALL)))
{
COMSTACK new;
void *local;
- struct mosi_state *st = h->private, *ns;
+ struct mosi_state *st = h->cprivate, *ns;
int flags = O_RDWR;
if (h->state != CS_INCON)
if (!(new = xmalloc(sizeof(*new))))
return 0;
*new = *h;
- if (!(new->private = ns = xmalloc(sizeof(*ns))))
+ if (!(new->cprivate = ns = xmalloc(sizeof(*ns))))
return 0;
*ns = *st;
if (!h->blocking)
int mosi_get(COMSTACK h, char **buf, int *bufsize)
{
int flags = 0, res;
- mosi_state *ct = h->private;
+ mosi_state *ct = h->cprivate;
int got;
do
int mosi_put(COMSTACK h, char *buf, int size)
{
- mosi_state *ct = h->private;
+ mosi_state *ct = h->cprivate;
int res = u_snd(h->iofile, buf + ct->haswrit, size - ct->haswrit, 0);
if (res == size - ct->haswrit)
int mosi_close(COMSTACK h)
{
- xfree(h->private);
+ xfree(h->cprivate);
if (h->iofile >= 0)
u_close(h->iofile);
xfree(h);
#include <proto.h>
#include <statserv.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct bend_initrequest
{
char *configname;
void bend_close(void *handle);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* CCL - header file
*
* $Log: ccl.h,v $
- * Revision 1.5 1997-04-30 08:52:08 quinn
+ * Revision 1.6 1997-05-14 06:53:37 adam
+ * C++ support.
+ *
+ * Revision 1.5 1997/04/30 08:52:08 quinn
* Null
*
* Revision 1.4 1996/10/11 15:02:26 adam
#ifndef CCL_H
#define CCL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* CCL error numbers */
#define CCL_ERR_OK 0
#define CCL_ERR_TERM_EXPECTED 1
int value;
};
+#define CCL_RPN_AND 1
+#define CCL_RPN_OR 2
+#define CCL_RPN_NOT 3
+#define CCL_RPN_TERM 4
+#define CCL_RPN_SET 5
+#define CCL_RPN_PROX 6
+
/* RPN tree structure */
struct ccl_rpn_node {
- enum rpn_node_kind {
- CCL_RPN_AND, CCL_RPN_OR, CCL_RPN_NOT,
- CCL_RPN_TERM,
- CCL_RPN_SET,
- CCL_RPN_PROX
- } kind;
+ int kind;
union {
struct ccl_rpn_node *p[2];
struct {
/* Search for qualifier 'name' in set 'b'. */
struct ccl_rpn_attr *ccl_qual_search (CCL_bibset b, const char *name, int len);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: comstack.h,v $
- * Revision 1.15 1996-07-06 19:58:32 quinn
+ * Revision 1.16 1997-05-14 06:53:37 adam
+ * C++ support.
+ *
+ * Revision 1.15 1996/07/06 19:58:32 quinn
* System headerfiles gathered in yconfig
*
* Revision 1.14 1996/02/10 12:23:41 quinn
#include <oid.h>
#include <xmalloc.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define COMSTACK_DEFAULT_TIMEOUT -1 /* not used yet */
struct comstack;
char *stackerr;/* current lower-layer error string, or null if none */
int iofile; /* UNIX file descriptor for iochannel */
int timeout; /* how long to wait for trailing blocks (ignored for now) */
- void *private; /* state info for lower stack */
+ void *cprivate;/* state info for lower stack */
int more; /* connection has extra data in buffer */
int state; /* current state */
#define CS_UNBND 0
#define CS_SR PROTO_SR
#define CS_Z3950 PROTO_Z3950
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <oid.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* This structure describes a attset, perhaps made up by inclusion
* (supersetting) of other attribute sets. When indexing and searching,
data1_att *data1_getattbyname(data1_attset *s, char *name);
data1_attset *data1_read_attset(char *file);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
#ifndef D1_MAP_H
#define D1_MAP_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct data1_maptag
{
int new_field;
int type;
- enum
- {
- D1_MAPTAG_numeric,
- D1_MAPTAG_string
- } which;
+#define D1_MAPTAG_numeric 1
+#define D1_MAPTAG_string 2
+ int which;
union
{
int numeric;
struct data1_maptab *next;
} data1_maptab;
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: data1.h,v $
- * Revision 1.20 1996-10-29 13:34:39 adam
+ * Revision 1.21 1997-05-14 06:53:38 adam
+ * C++ support.
+ *
+ * Revision 1.20 1996/10/29 13:34:39 adam
* New functions to get/set data1_tabpath.
*
* Revision 1.19 1996/10/11 11:57:16 quinn
#include <d1_attset.h>
#include <d1_map.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define data1_matchstr(s1, s2) yaz_matchstr(s1, s2)
extern char *data1_tabpath; /* global path for tables */
typedef struct data1_vartype
{
char *name;
- struct data1_varclass *class;
+ struct data1_varclass *zclass;
int type;
data1_datatype datatype;
struct data1_vartype *next;
{
char *name;
struct data1_varset *set;
- int class;
+ int zclass;
data1_vartype *types;
struct data1_varclass *next;
} data1_varclass;
typedef struct data1_tag
{
data1_name *names;
- enum
- {
- DATA1T_numeric,
- DATA1T_string
- } which;
+#define DATA1T_numeric 1
+#define DATA1T_string 2
+ int which;
union
{
int numeric;
typedef struct data1_node
{
- enum
- {
- DATA1N_root, /* the root of a record (containing global data) */
- DATA1N_tag, /* a tag */
- DATA1N_data, /* some data under a leaf tag or variant */
- DATA1N_variant, /* variant specification (a triple, actually) */
- DATA1N_indicator /* ISO2709 indicator */
- } which;
+ /* the root of a record (containing global data) */
+#define DATA1N_root 1
+ /* a tag */
+#define DATA1N_tag 2
+ /* some data under a leaf tag or variant */
+#define DATA1N_data 3
+ /* variant specification (a triple, actually) */
+#define DATA1N_variant 4
+ /* ISO2709 indicator */
+#define DATA1N_indicator 5
+ int which;
union
{
struct
{
- enum
- {
- DATA1I_inctxt, /* text inclusion */
- DATA1I_incbin, /* binary data inclusion */
- DATA1I_text, /* text data */
- DATA1I_num, /* numerical data */
- DATA1I_oid /* object identifier */
- } what;
+ /* text inclusion */
+#define DATA1I_inctxt 1
+ /* binary data inclusion */
+#define DATA1I_incbin 2
+ /* text data */
+#define DATA1I_text 3
+ /* numerical data */
+#define DATA1I_num 4
+ /* object identifier */
+#define DATA1I_oid 5
+ int what;
int formatted_text; /* newlines are significant */
int len;
char *data; /* filename or data */
char *tagname, NMEM m);
data1_datatype data1_maptype(char *t);
data1_varset *data1_read_varset(char *file);
-data1_vartype *data1_getvartypebyct(data1_varset *set, char *class, char *type);
+data1_vartype *data1_getvartypebyct(data1_varset *set, char *zclass, char *type);
Z_Espec1 *data1_read_espec1(char *file, ODR o);
int data1_doespec1(data1_node *n, Z_Espec1 *e);
data1_esetname *data1_getesetbyname(data1_absyn *a, char *name);
void data1_set_tabpath(const char *path);
const char *data1_get_tabpath(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: diagbib1.h,v $
- * Revision 1.4 1995-09-29 17:12:02 quinn
+ * Revision 1.5 1997-05-14 06:53:39 adam
+ * C++ support.
+ *
+ * Revision 1.4 1995/09/29 17:12:02 quinn
* Smallish
*
* Revision 1.3 1995/09/27 15:02:47 quinn
*
*/
+#ifndef DIAGBIB1_H
+#define DIAGBIB1_H
+
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
const char *diagbib1_str (int code);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
* OF THIS SOFTWARE.
*
* $Log: dmalloc.h,v $
- * Revision 1.5 1995-10-16 13:51:43 quinn
+ * Revision 1.6 1997-05-14 06:53:39 adam
+ * C++ support.
+ *
+ * Revision 1.5 1995/10/16 13:51:43 quinn
* Changes to provide Especs to the backend.
*
* Revision 1.4 1995/09/29 17:12:02 quinn
#ifndef DMALLOC_H
#define DMALLOC_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef DEBUG_MALLOC
#ifdef malloc
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: log.h,v $
- * Revision 1.9 1997-05-01 15:06:42 adam
+ * Revision 1.10 1997-05-14 06:53:40 adam
+ * C++ support.
+ *
+ * Revision 1.9 1997/05/01 15:06:42 adam
* Added log_mask_str_x routine.
*
* Revision 1.8 1996/05/01 12:45:00 quinn
#include <yconfig.h>
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define LOG_FATAL 0x0001
#define LOG_DEBUG 0x0002
#define LOG_WARN 0x0004
void log_event_end (void (*func)(int level, const char *msg, void *info),
void *info);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: marcdisp.h,v $
- * Revision 1.4 1995-09-29 17:12:03 quinn
+ * Revision 1.5 1997-05-14 06:53:40 adam
+ * C++ support.
+ *
+ * Revision 1.4 1995/09/29 17:12:03 quinn
* Smallish
*
* Revision 1.3 1995/09/27 15:02:47 quinn
*
*/
+#ifndef MARCDISP_H
+#define MARCDISP_H
+
#include <yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int marc_display (const char *buf, FILE *outf);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
#ifndef NMEM_H
#define NMEM_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct nmem_control *NMEM;
void nmem_reset(NMEM n);
NMEM nmem_create(void);
void nmem_destroy(NMEM n);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: odr.h,v $
- * Revision 1.20 1997-04-30 08:52:08 quinn
+ * Revision 1.21 1997-05-14 06:53:41 adam
+ * C++ support.
+ *
+ * Revision 1.20 1997/04/30 08:52:08 quinn
* Null
*
* Revision 1.19 1996/10/08 12:58:08 adam
#include <nmem.h>
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef bool_t
#define bool_t int
#endif
typedef struct odr_arm
{
int tagmode;
- int class;
+ int zclass;
int tag;
int which;
Odr_fun fun;
#define ODR_MAXNAME 256
+#ifdef __cplusplus
+}
+#endif
+
#include <prt.h>
#include <xmalloc.h>
* OF THIS SOFTWARE.
*
* $Log: odr_use.h,v $
- * Revision 1.6 1995-09-29 17:12:04 quinn
+ * Revision 1.7 1997-05-14 06:53:42 adam
+ * C++ support.
+ *
+ * Revision 1.6 1995/09/29 17:12:04 quinn
* Smallish
*
* Revision 1.5 1995/09/27 15:02:48 quinn
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct Odr_external
{
Odr_oid *direct_reference; /* OPTIONAL */
int odr_graphicstring(ODR o, char **p, int opt);
int odr_generalizedtime(ODR o, char **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: oid.h,v $
- * Revision 1.17 1997-05-02 08:39:27 quinn
+ * Revision 1.18 1997-05-14 06:53:42 adam
+ * C++ support.
+ *
+ * Revision 1.17 1997/05/02 08:39:27 quinn
* Support for private OID table added. Thanks to Ronald van der Meer
*
* Revision 1.16 1997/04/30 08:52:08 quinn
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define OID_SIZE 100
typedef enum oid_proto
oid_value oid_getvalbyname(const char *name);
void oid_setprivateoids(oident *list);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: options.h,v $
- * Revision 1.4 1995-09-29 17:12:05 quinn
+ * Revision 1.5 1997-05-14 06:53:43 adam
+ * C++ support.
+ *
+ * Revision 1.4 1995/09/29 17:12:05 quinn
* Smallish
*
* Revision 1.3 1995/09/27 15:02:48 quinn
#ifndef OPTIONS_H
#define OPTIONS_H
#include <yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int options (const char *desc, char **argv, int argc, char **arg);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: pquery.h,v $
- * Revision 1.6 1996-08-12 14:09:24 adam
+ * Revision 1.7 1997-05-14 06:53:43 adam
+ * C++ support.
+ *
+ * Revision 1.6 1996/08/12 14:09:24 adam
* Default prefix query attribute set defined by using p_query_attset.
*
* Revision 1.5 1996/03/15 11:01:46 adam
#include <yconfig.h>
#include <proto.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
Z_RPNQuery *p_query_rpn (ODR o, oid_proto proto, const char *qbuf);
Z_AttributesPlusTerm *p_query_scan (ODR o, oid_proto proto,
Odr_oid **attributeSetP, const char *qbuf);
int p_query_attset (const char *arg);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: proto.h,v $
- * Revision 1.38 1997-04-30 08:52:09 quinn
+ * Revision 1.39 1997-05-14 06:53:44 adam
+ * C++ support.
+ *
+ * Revision 1.38 1997/04/30 08:52:09 quinn
* Null
*
* Revision 1.37 1996/10/09 15:54:58 quinn
#include <odr_use.h>
#include <yaz-version.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Because we didn't have time to put all of the extra v3 elements in here
* before the first applications were written, we have to place them
Z_APDU *zget_APDU(ODR o, int which);
int z_Query(ODR o, Z_Query **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#include <prt-rsc.h>
#include <prt-acc.h>
#include <prt-exp.h>
* OF THIS SOFTWARE.
*
* $Log: prt-acc.h,v $
- * Revision 1.6 1996-01-02 08:57:35 quinn
+ * Revision 1.7 1997-05-14 06:53:46 adam
+ * C++ support.
+ *
+ * Revision 1.6 1996/01/02 08:57:35 quinn
* Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
*
* Revision 1.5 1995/09/29 17:12:09 quinn
#ifndef PRT_ACC_H
#define PRT_ACC_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct Z_Encryption1
{
Odr_oct *cryptType; /* OPTIONAL */
int z_PromptObject1(ODR o, Z_PromptObject1 **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: prt-add.h,v $
- * Revision 1.2 1997-04-30 08:52:09 quinn
+ * Revision 1.3 1997-05-14 06:53:46 adam
+ * C++ support.
+ *
+ * Revision 1.2 1997/04/30 08:52:09 quinn
* Null
*
* Revision 1.1 1996/10/10 11:51:58 quinn
#ifndef PRT_ADD_H
#define PRT_ADD_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct Z_QueryExpressionTerm
{
Z_Term *queryTerm;
int z_SearchInfoReport (ODR o, Z_SearchInfoReport **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#ifndef PRT_ARC_H
#define PRT_ARC_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* ------------------- Summary Record --------------------- */
typedef struct Z_FormatSpec
int z_BriefBib(ODR o, Z_BriefBib **p, int opt);
int z_OPACRecord(ODR o, Z_OPACRecord **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct Z_TooMany
{
int *tooManyWhat;
int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct Z_OccurValues
{
int *start;
int z_Espec1(ODR o, Z_Espec1 **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct Z_TaskPackage
{
Odr_oid *packageType;
int z_IUUpdate(ODR o, Z_IUUpdate **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define multipleDbSearch multipleDBsearch
typedef struct Z_CommonInfo
union
{
int *known;
- Z_ProxSupportPrivate *private;
+ Z_ProxSupportPrivate *zprivate;
} u;
} Z_ProxSupportUnit;
#define Z_QueryTypeDetails_rankedList 5
union
{
- Z_PrivateCapabilities *private;
+ Z_PrivateCapabilities *zprivate;
Z_RpnCapabilities *rpn;
Z_Iso8777Capabilities *iso8777;
Z_HumanString *z3958;
int z_ExplainRecord(ODR o, Z_ExplainRecord **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Used to keep track of known External definitions (a loose approach
* to DEFINED_BY).
int z_External(ODR o, Z_External **p, int opt);
Z_ext_typeent *z_ext_getentbyref(oid_value val);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct Z_GenericRecord;
typedef struct Z_GenericRecord Z_GenericRecord;
typedef struct Z_Triple
{
Odr_oid *variantSetId; /* OPTIONAL */
- int *class;
+ int *zclass;
int *type;
int which;
#define Z_Triple_integer 0
int z_GenericRecord(ODR o, Z_GenericRecord **p, int opt);
int z_Variant(ODR o, Z_Variant **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: prt-rsc.h,v $
- * Revision 1.5 1995-09-29 17:12:11 quinn
+ * Revision 1.6 1997-05-14 06:53:50 adam
+ * C++ support.
+ *
+ * Revision 1.5 1995/09/29 17:12:11 quinn
* Smallish
*
* Revision 1.4 1995/09/27 15:02:52 quinn
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* -------------------- Resource-1 -------------------- */
#define Z_EstimateType_currentSearchRecords 1
int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int ber_boolean(ODR o, int *val);
-int ber_tag(ODR o, void *p, int class, int tag, int *constructed, int opt);
-int ber_enctag(ODR o, int class, int tag, int constructed);
-int ber_dectag(unsigned char *buf, int *class, int *tag, int *constructed);
+int ber_tag(ODR o, void *p, int zclass, int tag, int *constructed, int opt);
+int ber_enctag(ODR o, int zclass, int tag, int constructed);
+int ber_dectag(unsigned char *buf, int *zclass, int *tag, int *constructed);
int odr_bool(ODR o, int **p, int opt);
int odr_integer(ODR o, int **p, int opt);
-int odr_implicit_settag(ODR o, int class, int tag);
+int odr_implicit_settag(ODR o, int zclass, int tag);
#if 0
int odr_implicit(ODR o, int (*type)(ODR o, void *p, int opt), void *p,
- int class, int tag, int opt);
+ int zclass, int tag, int opt);
#endif
int ber_enclen(ODR o, int len, int lenlen, int exact);
int ber_declen(unsigned char *buf, int *len);
int ber_null(ODR o);
int odr_null(ODR o, Odr_null **p, int opt);
int ber_integer(ODR o, int *val);
-int odr_constructed_begin(ODR o, void *p, int class, int tag);
+int odr_constructed_begin(ODR o, void *p, int zclass, int tag);
int odr_constructed_end(ODR o);
int odr_sequence_begin(ODR o, void *p, int size);
int odr_sequence_end(ODR o);
char *odr_errmsg(int n);
Odr_oid *odr_getoidbystr(ODR o, char *str);
int odr_initmember(ODR o, void *p, int size);
-int odr_peektag(ODR o, int *class, int *tag, int *cons);
+int odr_peektag(ODR o, int *zclass, int *tag, int *cons);
void odr_setlenlen(ODR o, int len);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <stdio.h>
-int readconf(char *name, void *private,
- int (*fun)(char *name, void *private, int argc, char *argv[]));
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int readconf(char *name, void *rprivate,
+int (*fun)(char *name, void *rprivate, int argc, char *argv[]));
int readconf_line(FILE *f, char *line, int len, char *argv[], int num);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: statserv.h,v $
- * Revision 1.7 1995-09-29 17:12:12 quinn
+ * Revision 1.8 1997-05-14 06:53:51 adam
+ * C++ support.
+ *
+ * Revision 1.7 1995/09/29 17:12:12 quinn
* Smallish
*
* Revision 1.6 1995/09/27 15:02:53 quinn
#include <yconfig.h>
#include <oid.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct statserv_options_block
{
int dynamic; /* fork on incoming requests */
statserv_options_block *statserv_getcontrol(void);
void statserv_setcontrol(statserv_options_block *block);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: tcpip.h,v $
- * Revision 1.7 1996-07-06 19:58:32 quinn
+ * Revision 1.8 1997-05-14 06:53:52 adam
+ * C++ support.
+ *
+ * Revision 1.7 1996/07/06 19:58:32 quinn
* System headerfiles gathered in yconfig
*
* Revision 1.6 1996/02/10 12:23:42 quinn
#define YNETINCLUDE
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct sockaddr_in *tcpip_strtoaddr(const char *str);
COMSTACK tcpip_type(int s, int blocking, int protocol);
+#ifdef __cplusplus
+}
+#endif
+
#endif
*
*/
+#ifndef TPATH_H
+#define TPATH_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
FILE *yaz_path_fopen(const char *path, const char *name, const char *mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
#include <yconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct wrbuf
{
char *buf;
(((b)->pos >= (b)->size ? wrbuf_grow(b, 1) : 0), \
(b)->buf[(b)->pos++] = (c), 0)
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: xmalloc.h,v $
- * Revision 1.1 1995-11-01 11:55:41 quinn
+ * Revision 1.2 1997-05-14 06:53:53 adam
+ * C++ support.
+ *
+ * Revision 1.1 1995/11/01 11:55:41 quinn
* Added xmalloc.c
*
* Revision 1.8 1995/10/16 14:03:07 quinn
#include <sys/types.h>
#include <stdlib.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void *xrealloc_f (void *o, size_t size, char *file, int line);
void *xmalloc_f (size_t size, char *file, int line);
void *xcalloc_f (size_t nmemb, size_t size, char *file, int line);
#define xfree(x) xfree_f(x, __FILE__, __LINE__)
#define xstrdup(s) xstrdup_f(s, __FILE__, __LINE__)
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: xmosi.h,v $
- * Revision 1.5 1996-02-10 12:23:43 quinn
+ * Revision 1.6 1997-05-14 06:53:53 adam
+ * C++ support.
+ *
+ * Revision 1.5 1996/02/10 12:23:43 quinn
* Enable inetd operations fro TCP/IP stack
*
* Revision 1.4 1995/09/29 17:12:13 quinn
#include <xtiUser.h>
#include <mosi.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct netbuf *mosi_strtoaddr(const char *str);
COMSTACK mosi_type(int s, int blocking, int protocol);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* OF THIS SOFTWARE.
*
* $Log: yaz-ccl.h,v $
- * Revision 1.5 1995-09-29 17:12:14 quinn
+ * Revision 1.6 1997-05-14 06:53:54 adam
+ * C++ support.
+ *
+ * Revision 1.5 1995/09/29 17:12:14 quinn
* Smallish
*
* Revision 1.4 1995/09/27 15:02:54 quinn
#include <proto.h>
#include <ccl.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
Z_RPNQuery *ccl_rpn_query (struct ccl_rpn_node *p);
Z_AttributesPlusTerm *ccl_scan_query (struct ccl_rpn_node *p);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-util.h,v $
- * Revision 1.2 1996-02-20 17:58:09 adam
+ * Revision 1.3 1997-05-14 06:53:54 adam
+ * C++ support.
+ *
+ * Revision 1.2 1996/02/20 17:58:09 adam
* Added const to yaz_matchstr.
*
* Revision 1.1 1996/02/20 16:32:49 quinn
#ifndef YAZ_UTIL_H
#define YAZ_UTIL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int yaz_matchstr(const char *s1, const char *s2);
+#ifdef __cplusplus
+}
+#endif
+
#endif
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ber_any.c,v $
- * Revision 1.12 1995-09-29 17:12:15 quinn
+ * Revision 1.13 1997-05-14 06:53:56 adam
+ * C++ support.
+ *
+ * Revision 1.12 1995/09/29 17:12:15 quinn
* Smallish
*
* Revision 1.11 1995/09/27 15:02:54 quinn
*/
int completeBER(unsigned char *buf, int len)
{
- int res, ll, class, tag, cons;
+ int res, ll, zclass, tag, cons;
unsigned char *b = buf;
if (!len)
return 0;
if (!buf[0] && !buf[1])
return 0;
- if ((res = ber_dectag(b, &class, &tag, &cons)) <= 0)
+ if ((res = ber_dectag(b, &zclass, &tag, &cons)) <= 0)
return 0;
if (res > len)
return 0;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ber_tag.c,v $
- * Revision 1.13 1995-09-29 17:12:21 quinn
+ * Revision 1.14 1997-05-14 06:53:56 adam
+ * C++ support.
+ *
+ * Revision 1.13 1995/09/29 17:12:21 quinn
* Smallish
*
* Revision 1.12 1995/09/27 15:02:57 quinn
* if p: write tag. return 1 (success) or -1 (error).
* if !p: return 0.
* On decoding:
- * if tag && class match up, advance pointer and return 1. set cons.
+ * if tag && zclass match up, advance pointer and return 1. set cons.
* else leave pointer unchanged. Return 0.
*
* Should perhaps be odr_tag?
*/
-int ber_tag(ODR o, void *p, int class, int tag, int *constructed, int opt)
+int ber_tag(ODR o, void *p, int zclass, int tag, int *constructed, int opt)
{
static int lclass = -1, ltag, br, lcons; /* save t&c rather than
decoding twice */
o->error = OREQUIRED;
return 0;
}
- if ((rd = ber_enctag(o, class, tag, *constructed)) < 0)
+ if ((rd = ber_enctag(o, zclass, tag, *constructed)) < 0)
return -1;
#ifdef ODR_DEBUG
- fprintf(stderr, "\n[class=%d,tag=%d,cons=%d,stackp=%d]", class, tag,
+ fprintf(stderr, "\n[class=%d,tag=%d,cons=%d,stackp=%d]", zclass, tag,
*constructed, o->stackp);
#endif
return 1;
lcons, o->stackp);
#endif
}
- if (class == lclass && tag == ltag)
+ if (zclass == lclass && tag == ltag)
{
o->bp += br;
o->left -= br;
}
/* ber_enctag
- * BER-encode a class/tag/constructed package (identifier octets). Return
+ * BER-encode a zclass/tag/constructed package (identifier octets). Return
* number of bytes encoded, or -1 if out of bounds.
*/
-int ber_enctag(ODR o, int class, int tag, int constructed)
+int ber_enctag(ODR o, int zclass, int tag, int constructed)
{
int cons = (constructed ? 1 : 0), n = 0;
unsigned char octs[sizeof(int)], b;
- b = (class << 6) & 0XC0;
+ b = (zclass << 6) & 0XC0;
b |= (cons << 5) & 0X20;
if (tag <= 30)
{
/* ber_dectag
* Decode BER identifier octets. Return number of bytes read or -1 for error.
*/
-int ber_dectag(unsigned char *buf, int *class, int *tag, int *constructed)
+int ber_dectag(unsigned char *buf, int *zclass, int *tag, int *constructed)
{
unsigned char *b = buf;
- *class = *b >> 6;
+ *zclass = *b >> 6;
*constructed = (*b >> 5) & 0X01;
if ((*tag = *b & 0x1F) <= 30)
return 1;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: dumpber.c,v $
- * Revision 1.7 1996-03-08 14:38:41 quinn
+ * Revision 1.8 1997-05-14 06:53:57 adam
+ * C++ support.
+ *
+ * Revision 1.7 1996/03/08 14:38:41 quinn
* Fixed output.
*
* Revision 1.6 1996/01/19 15:41:34 quinn
static int do_dumpBER(FILE *f, char *buf, int len, int level, int offset)
{
- int res, ll, class, tag, cons;
+ int res, ll, zclass, tag, cons;
char *b = buf;
if (!len)
return 0;
if (!buf[0] && !buf[1])
return 0;
- if ((res = ber_dectag((unsigned char*)b, &class, &tag, &cons)) <= 0)
+ if ((res = ber_dectag((unsigned char*)b, &zclass, &tag, &cons)) <= 0)
return 0;
if (res > len)
{
return 0;
}
fprintf(f, "%5d: %*s", offset, level * 4, "");
- if (class == ODR_UNIVERSAL)
+ if (zclass == ODR_UNIVERSAL)
{
static char *nl[] =
{
else
fprintf(f, "[UNIV %d]", tag);
}
- else if (class == ODR_CONTEXT)
+ else if (zclass == ODR_CONTEXT)
fprintf(f, "[%d]", tag);
else
- fprintf(f, "[%d:%d]", class, tag);
+ fprintf(f, "[%d:%d]", zclass, tag);
b += res;
len -= res;
if ((res = ber_declen((unsigned char*)b, &ll)) <= 0)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_choice.c,v $
- * Revision 1.13 1997-04-30 08:52:10 quinn
+ * Revision 1.14 1997-05-14 06:53:57 adam
+ * C++ support.
+ *
+ * Revision 1.13 1997/04/30 08:52:10 quinn
* Null
*
* Revision 1.12 1996/10/08 12:58:17 adam
}
else if (o->direction != ODR_DECODE)
{
- cl = arm[i].class;
+ cl = arm[i].zclass;
tg = arm[i].tag;
}
- if (tg == arm[i].tag && cl == arm[i].class)
+ if (tg == arm[i].tag && cl == arm[i].zclass)
{
if (arm[i].tagmode == ODR_IMPLICIT)
{
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_cons.c,v $
- * Revision 1.17 1996-10-23 12:31:24 adam
+ * Revision 1.18 1997-05-14 06:53:58 adam
+ * C++ support.
+ *
+ * Revision 1.17 1996/10/23 12:31:24 adam
* Added 'static' modifier to dummy variable in odr_constructed_begin.
*
* Revision 1.16 1996/07/26 13:38:20 quinn
o->lenlen = len;
}
-int odr_constructed_begin(ODR o, void *p, int class, int tag)
+int odr_constructed_begin(ODR o, void *p, int zclass, int tag)
{
int res;
int cons = 1;
o->lenlen = 1; /* reset lenlen */
if (o->t_class < 0)
{
- o->t_class = class;
+ o->t_class = zclass;
o->t_tag = tag;
}
if ((res = ber_tag(o, p, o->t_class, o->t_tag, &cons, 1)) < 0)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_seq.c,v $
- * Revision 1.17 1997-05-05 11:21:09 adam
+ * Revision 1.18 1997-05-14 06:53:58 adam
+ * C++ support.
+ *
+ * Revision 1.17 1997/05/05 11:21:09 adam
* In handling of SEQUENCE OF: Counter set to zero when SEQUENCE
* OF isn't there at all.
*
char **tmp = 0;
int size = 0, i;
- if (!odr_sequence_begin(o, p, 0)) {
- if (o->direction == ODR_DECODE) {
- *num = 0;
- }
+ if (!odr_sequence_begin(o, p, 0))
return 0;
- }
switch (o->direction)
{
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_tag.c,v $
- * Revision 1.7 1996-02-20 12:52:54 quinn
+ * Revision 1.8 1997-05-14 06:53:59 adam
+ * C++ support.
+ *
+ * Revision 1.7 1996/02/20 12:52:54 quinn
* Added odr_peektag
*
* Revision 1.6 1995/12/14 16:28:26 quinn
#include <odr.h>
-int odr_peektag(ODR o, int *class, int *tag, int *cons)
+int odr_peektag(ODR o, int *zclass, int *tag, int *cons)
{
if (o->direction != ODR_DECODE)
{
}
if (o->stackp > -1 && !odr_constructed_more(o))
return 0;
- if (ber_dectag(o->bp, class, tag, cons) <= 0)
+ if (ber_dectag(o->bp, zclass, tag, cons) <= 0)
{
o->error = OREQUIRED;
return 0;
return 1;
}
-int odr_implicit_settag(ODR o, int class, int tag)
+int odr_implicit_settag(ODR o, int zclass, int tag)
{
if (o->error)
return 0;
if (o->t_class < 0)
{
- o->t_class = class;
+ o->t_class = zclass;
o->t_tag = tag;
}
return 1;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_absyn.c,v $
- * Revision 1.9 1997-02-19 14:46:15 adam
+ * Revision 1.10 1997-05-14 06:54:01 adam
+ * C++ support.
+ *
+ * Revision 1.9 1997/02/19 14:46:15 adam
* The "all" specifier only affects elements that are indexed (and not
* all elements).
*
*args = '\0';
if (!strcmp(cmd, "elm"))
{
- data1_element *new;
+ data1_element *new_element;
int i;
char path[512], name[512], termlists[512], *p;
int type, value;
return 0;
}
level = i;
- if (!(new = cur[level] = *ppl[level] = xmalloc(sizeof(*new))))
+ if (!(new_element = cur[level] = *ppl[level] = xmalloc(sizeof(*new_element))))
abort;
- new->next = new->children = 0;
- new->tag = 0;
- new->termlists = 0;
- new->parent = level ? cur[level - 1] : 0;
- tp = &new->termlists;
- ppl[level] = &new->next;
- ppl[level+1] = &new->children;
+ new_element->next = new_element->children = 0;
+ new_element->tag = 0;
+ new_element->termlists = 0;
+ new_element->parent = level ? cur[level - 1] : 0;
+ tp = &new_element->termlists;
+ ppl[level] = &new_element->next;
+ ppl[level+1] = &new_element->children;
/* well-defined tag */
if (sscanf(p, "(%d,%d)", &type, &value) == 2)
fclose(f);
return 0;
}
- if (!(new->tag = data1_gettagbynum(res->tagset, type, value)))
+ if (!(new_element->tag = data1_gettagbynum(res->tagset, type, value)))
{
logf(LOG_WARN, "Couldn't find tag %s in tagset in %s",
p, file);
/* private tag */
else if (*p)
{
- data1_tag *nt = new->tag = xmalloc(sizeof(*new->tag));
+ data1_tag *nt = new_element->tag = xmalloc(sizeof(*new_element->tag));
nt->which = DATA1T_string;
nt->value.string = xstrdup(p);
- nt->names = xmalloc(sizeof(*new->tag->names));
+ nt->names = xmalloc(sizeof(*new_element->tag->names));
nt->names->name = nt->value.string;
nt->names->next = 0;
nt->kind = DATA1K_string;
/* parse termList definitions */
p = termlists;
if (*p == '-')
- new->termlists = 0;
+ new_element->termlists = 0;
else
{
if (!res->attset)
*tp = all; /* append any ALL entries to the list */
}
- new->name = xstrdup(name);
+ new_element->name = xstrdup(name);
}
else if (!strcmp(cmd, "all"))
{
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_doespec.c,v $
- * Revision 1.7 1997-04-30 08:52:11 quinn
+ * Revision 1.8 1997-05-14 06:54:02 adam
+ * C++ support.
+ *
+ * Revision 1.7 1997/04/30 08:52:11 quinn
* Null
*
* Revision 1.6 1996/10/11 11:57:22 quinn
* triple with an unknown set.
*/
static Z_Triple *find_triple(Z_Variant *var, oid_value universalset,
- oid_value set, int class, int type)
+ oid_value set, int zclass, int type)
{
int i;
oident *defaultsetent = oid_getentbyoid(var->globalVariantSetId);
oid_value curset = cursetent ? cursetent->value : defaultset;
if (set == curset &&
- *var->triples[i]->class == class &&
+ *var->triples[i]->zclass == zclass &&
*var->triples[i]->type == type)
return var->triples[i];
}
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_espec.c,v $
- * Revision 1.6 1996-07-06 19:58:34 quinn
+ * Revision 1.7 1997-05-14 06:54:02 adam
+ * C++ support.
+ *
+ * Revision 1.6 1996/07/06 19:58:34 quinn
* System headerfiles gathered in yconfig
*
* Revision 1.5 1996/01/02 08:57:44 quinn
r->num_triples = argc;
for (i = 0; i < argc; i++)
{
- int class, type;
+ int zclass, type;
char value[512];
Z_Triple *t;
- if (sscanf(argv[i], "(%d,%d,%[^)])", &class, &type, value) < 3)
+ if (sscanf(argv[i], "(%d,%d,%[^)])", &zclass, &type, value) < 3)
{
logf(LOG_WARN, "Syntax error in variant component '%s'",
argv[i]);
}
t = r->triples[i] = odr_malloc(o, sizeof(Z_Triple));
t->variantSetId = 0;
- t->class = odr_malloc(o, sizeof(int));
- *t->class = class;
+ t->zclass = odr_malloc(o, sizeof(int));
+ *t->zclass = zclass;
t->type = odr_malloc(o, sizeof(int));
*t->type = type;
/*
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_grs.c,v $
- * Revision 1.8 1996-12-05 13:17:49 quinn
+ * Revision 1.9 1997-05-14 06:54:03 adam
+ * C++ support.
+ *
+ * Revision 1.8 1996/12/05 13:17:49 quinn
* Fixed GRS-1 null-ref
*
* Revision 1.7 1996/10/11 11:57:23 quinn
assert(p->which == DATA1N_variant);
t = v->triples[num] = odr_malloc(o, sizeof(*t));
t->variantSetId = 0;
- t->class = odr_malloc(o, sizeof(int));
- *t->class = p->u.variant.type->class->class;
+ t->zclass = odr_malloc(o, sizeof(int));
+ *t->zclass = p->u.variant.type->zclass->zclass;
t->type = odr_malloc(o, sizeof(int));
*t->type = p->u.variant.type->type;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_read.c,v $
- * Revision 1.13 1996-10-29 13:35:38 adam
+ * Revision 1.14 1997-05-14 06:54:04 adam
+ * C++ support.
+ *
+ * Revision 1.13 1996/10/29 13:35:38 adam
* Implemented data1_set_tabpath and data1_get_tabpath.
*
* Revision 1.12 1996/10/11 10:35:38 adam
}
else if (!strncmp(tag, "var", 3))
{
- char class[DATA1_MAX_SYMBOL], type[DATA1_MAX_SYMBOL];
+ char tclass[DATA1_MAX_SYMBOL], type[DATA1_MAX_SYMBOL];
data1_vartype *tp;
int val_offset;
data1_node *p;
- if (sscanf(args, "%s %s %n", class, type, &val_offset) != 2)
+ if (sscanf(args, "%s %s %n", tclass, type, &val_offset) != 2)
{
logf(LOG_WARN, "Malformed variant triple at '%s'", tag);
return 0;
}
if (!(tp = data1_getvartypebyct(parent->root->u.root.absyn->varset,
- class, type)))
+ tclass, type)))
return 0;
/*
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_varset.c,v $
- * Revision 1.3 1995-11-01 16:34:58 quinn
+ * Revision 1.4 1997-05-14 06:54:04 adam
+ * C++ support.
+ *
+ * Revision 1.3 1995/11/01 16:34:58 quinn
* Making data1 look for tables in data1_tabpath
*
* Revision 1.2 1995/11/01 13:54:50 quinn
#include <tpath.h>
#include <data1.h>
-data1_vartype *data1_getvartypebyct(data1_varset *set, char *class, char *type)
+data1_vartype *data1_getvartypebyct(data1_varset *set, char *zclass, char *type)
{
data1_varclass *c;
data1_vartype *t;
for (c = set->classes; c; c = c->next)
- if (!data1_matchstr(c->name, class))
+ if (!data1_matchstr(c->name, zclass))
{
for (t = c->types; t; t = t->next)
if (!data1_matchstr(t->name, type))
return t;
- logf(LOG_WARN, "Unknown variant type %s in class %s", type, class);
+ logf(LOG_WARN, "Unknown variant type %s in class %s", type, zclass);
return 0;
}
- logf(LOG_WARN, "Unknown variant class %s", class);
+ logf(LOG_WARN, "Unknown variant class %s", zclass);
return 0;
}
data1_varset *data1_read_varset(char *file)
{
data1_varset *res = xmalloc(sizeof(*res));
- data1_varclass **classp = &res->classes, *class = 0;
+ data1_varclass **classp = &res->classes, *zclass = 0;
data1_vartype **typep = 0;
FILE *f;
int argc;
fclose(f);
return 0;
}
- *classp = r = class = xmalloc(sizeof(*r));
+ *classp = r = zclass = xmalloc(sizeof(*r));
r->set = res;
- r->class = atoi(argv[1]);
+ r->zclass = atoi(argv[1]);
r->name = xmalloc(strlen(argv[2])+1);
strcpy(r->name, argv[2]);
r->types = 0;
*typep = r = xmalloc(sizeof(*r));
r->name = xmalloc(strlen(argv[2])+1);
strcpy(r->name, argv[2]);
- r->class = class;
+ r->zclass = zclass;
r->type = atoi(argv[1]);
if (!(r->datatype = data1_maptype(argv[3])))
{
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: readconf.c,v $
- * Revision 1.3 1996-05-29 15:48:48 quinn
+ * Revision 1.4 1997-05-14 06:54:07 adam
+ * C++ support.
+ *
+ * Revision 1.3 1996/05/29 15:48:48 quinn
* Added \n to the isspace rule.
*
* Revision 1.2 1996/05/29 10:05:01 quinn
/*
* Read lines of a configuration file.
*/
-int readconf(char *name, void *private,
- int (*fun)(char *name, void *private, int argc, char *argv[]))
+int readconf(char *name, void *rprivate,
+ int (*fun)(char *name, void *rprivate, int argc, char *argv[]))
{
FILE *f;
char line[512], *m_argv[50];
return 0;
}
- if ((res = (*fun)(name, private, m_argc, m_argv)))
+ if ((res = (*fun)(name, rprivate, m_argc, m_argv)))
{
fclose(f);
return res;