-static const char rcsId[] =
- "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/allParam/rpc/rpcParam.c,v 1.4 2004-04-07 13:26:10 muench Exp $";
+static const char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/allParam/rpc/rpcParam.c,v 1.5 2004-04-19 11:59:52 muench Exp $";
#define _POSIX_C_SOURCE 199509L
#if HAVE_CONFIG_H
unsigned long remParam;
} RpcParam;
-int conSetupParam(Param *my, const char *setup)
+int conSetupParam(Param * my, const char *setup)
{
int retVal = 0;
RpcParam *rpcParam;
}
-int conParam(Param *my)
+int conParam(Param * my)
{
return conSetupParam(my, NULL);
}
-void desParam(Param *my)
+void desParam(Param * my)
{
RpcParam *rpcParam = my->specParam;
free(my->setup);
}
-int Param_getInt(const Param *my, const char *name, const char *idx,
- int *row, unsigned long int *val)
+int Param_getInt(const Param * my, const char *name, const char *idx, int *row, unsigned long int *val)
{
RpcParam *rpcParam = my->specParam;
return res.ret;
}
-int Param_getString(const Param *my, const char *name, const char *idx,
- int *row, char *val)
+int Param_getString(const Param * my, const char *name, const char *idx, int *row, char *val)
{
RpcParam *rpcParam = my->specParam;
return res.ret;
}
-int Param_getFilename(const Param *my, const char *name, const char *idx,
- int *row, char *val)
+int Param_getFilename(const Param * my, const char *name, const char *idx, int *row, char *val)
{
RpcParam *rpcParam = my->specParam;
return res.ret;
}
-int Param_getIntArray(const Param *my, const char *name, const char *idx,
- int maxrows, int *rows, unsigned long int *val)
+int Param_getIntArray(const Param * my, const char *name, const char *idx, int maxrows, int *rows, unsigned long int *val)
{
RpcParam *rpcParam = my->specParam;
return res.ret;
}
-int Param_getStringArray(const Param *my, const char *name, const char *idx,
- int maxrows, int *rows, char **val)
+int Param_getStringArray(const Param * my, const char *name, const char *idx, int maxrows, int *rows, char **val)
{
RpcParam *rpcParam = my->specParam;
return res.ret;
}
-int Param_getFilenameArray(const Param *my, const char *name,
- const char *idx, int maxrows, int *rows,
- char **val)
+int Param_getFilenameArray(const Param * my, const char *name, const char *idx, int maxrows, int *rows, char **val)
{
RpcParam *rpcParam = my->specParam;
return res.ret;
}
-int Param_getBlob(const Param *my, const char *name, const char *idx,
- size_t * size, FILE ** val)
+int Param_getBlob(const Param * my, const char *name, const char *idx, size_t * size, FILE ** val)
{
int retVal = 0;
#if 0
return retVal;
}
-int Param_storeInt(const Param *my, const char *name, const char *idx,
- unsigned long int value)
+int Param_storeInt(const Param * my, const char *name, const char *idx, unsigned long int value)
{
RpcParam *rpcParam = my->specParam;
return res;
}
-int Param_storeString(const Param *my, const char *name, const char *idx,
- const char *value)
+int Param_storeString(const Param * my, const char *name, const char *idx, const char *value)
{
RpcParam *rpcParam = my->specParam;
return res;
}
-void Param_clearCache(const Param *my)
+void Param_clearCache(const Param * my)
{
}
-const char *Param_getErrStr(const Param *my)
+const char *Param_getErrStr(const Param * my)
{
return my->strerror;
}
-static void Param_strerror(Param *my, const char *strerror)
+static void Param_strerror(Param * my, const char *strerror)
{
my->strerror = realloc(my->strerror, strlen(strerror) + 1);
if (my->strerror != NULL) {
#include "rpcParam.h"
-unsigned long *con_1_svc(char **arg, struct svc_req *svcReq) {
+unsigned long *con_1_svc(char **arg, struct svc_req *svcReq)
+{
static unsigned long res;
Param *p;
char *setup;
return &res;
}
-void *des_1_svc(unsigned long *arg, struct svc_req *svcReq) {
+void *des_1_svc(unsigned long *arg, struct svc_req *svcReq)
+{
Param *p = *arg;
desParam(p);
return arg;
}
-GetIntRes *getint_1_svc(GetScalarArgs *args, struct svc_req *svcReq) {
+GetIntRes *getint_1_svc(GetScalarArgs * args, struct svc_req * svcReq)
+{
static GetIntRes res;
- Param *p = (Param *)args->param;
+ Param *p = (Param *) args->param;
res.ret = Param_getInt(p, args->name, args->idx, &res.rows, &res.value);
return &res;
}
-GetStringRes *getstring_1_svc(GetScalarArgs *args, struct svc_req *svcReq) {
+GetStringRes *getstring_1_svc(GetScalarArgs * args, struct svc_req * svcReq)
+{
static GetStringRes res;
- Param *p = (Param *)args->param;
+ Param *p = (Param *) args->param;
xdr_free(xdr_GetStringRes, &res);
return &res;
}
-GetStringRes *getfilename_1_svc(GetScalarArgs *args, struct svc_req *svcReq) {
+GetStringRes *getfilename_1_svc(GetScalarArgs * args, struct svc_req * svcReq)
+{
static GetStringRes res;
- Param *p = (Param *)args->param;
+ Param *p = (Param *) args->param;
xdr_free(xdr_GetStringRes, &res);
return &res;
}
-GetIntArrayRes *getintarray_1_svc(GetArrayArgs *args, struct svc_req *svcReq) {
+GetIntArrayRes *getintarray_1_svc(GetArrayArgs * args, struct svc_req * svcReq)
+{
static GetIntArrayRes res;
- Param *p = (Param *)args->param;
+ Param *p = (Param *) args->param;
xdr_free(xdr_GetIntArrayRes, &res);
return &res;
}
-GetStringArrayRes *getstringarray_1_svc(GetArrayArgs *args, struct svc_req *svcReq) {
+GetStringArrayRes *getstringarray_1_svc(GetArrayArgs * args, struct svc_req * svcReq)
+{
static GetStringArrayRes res;
- Param *p = (Param *)args->param;
+ Param *p = (Param *) args->param;
int i;
return &res;
}
-GetStringArrayRes *getfilenamearray_1_svc(GetArrayArgs *args, struct svc_req *svcReq) {
+GetStringArrayRes *getfilenamearray_1_svc(GetArrayArgs * args, struct svc_req * svcReq)
+{
static GetStringArrayRes res;
- Param *p = (Param *)args->param;
+ Param *p = (Param *) args->param;
int i;
return &res;
}
-int *storeint_1_svc(StoreIntArgs *args, struct svc_req *svcReq) {
+int *storeint_1_svc(StoreIntArgs * args, struct svc_req *svcReq)
+{
static int res;
- Param *p = (Param *)args->param;
+ Param *p = (Param *) args->param;
res = Param_storeInt(p, args->name, args->idx, args->value);
return &res;
}
-int *storestring_1_svc(StoreStringArgs *args, struct svc_req *svcReq) {
+int *storestring_1_svc(StoreStringArgs * args, struct svc_req *svcReq)
+{
static int res;
- Param *p = (Param *)args->param;
+ Param *p = (Param *) args->param;
res = Param_storeString(p, args->name, args->idx, args->value);