|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T d
Length: 3725 (0xe8d)
Types: TextFile
Names: »dsarg_enc.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/dsap/x500as/dsarg_enc.c«
/* dsarg_enc.c - ds argument encoder */
#ifndef lint
static char *rcsid = "$Header: /f/osi/dsap/x500as/RCS/dsarg_enc.c,v 6.0 89/03/18 23:29:42 mrose Rel $";
#endif
/*
* $Header: /f/osi/dsap/x500as/RCS/dsarg_enc.c,v 6.0 89/03/18 23:29:42 mrose Rel $
*
*
* $Log: dsarg_enc.c,v $
* Revision 6.0 89/03/18 23:29:42 mrose
* Release 5.0
*
*/
/*
* NOTICE
*
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
* this agreement.
*
*/
/* LINTLIBRARY */
#include "psap.h"
#include "quipu/util.h"
#include "quipu/common.h"
#include "quipu/dsargument.h"
extern LLog * log_dsap;
int encode_OPArgument(dsp, pep, typep, arg)
int dsp;
PE *pep;
int *typep;
struct ds_op_arg *arg;
{
int success;
if(dsp)
{
success = encode_DSPArgument(pep, typep, arg);
}
else
{
success = encode_DAPArgument(pep, typep, &(arg->dca_dsarg));
}
return(success);
}
int encode_DAPArgument(pep,typep,arg)
PE * pep;
int * typep;
struct DSArgument *arg;
{
int success;
switch(*typep = arg->arg_type)
{
case OP_READ :
success = encode_DAS_ReadArgument(pep,0,0,NULLCP,&(arg->arg_rd));
break;
case OP_COMPARE :
success = encode_DAS_CompareArgument(pep,0,0,NULLCP,&(arg->arg_cm));
break;
case OP_ABANDON :
success = encode_DAS_AbandonArgument(pep,0,0,NULLCP,&(arg->arg_ab));
break;
case OP_LIST :
success = encode_DAS_ListArgument(pep,0,0,NULLCP,&(arg->arg_ls));
break;
case OP_SEARCH :
success = encode_DAS_SearchArgument(pep,0,0,NULLCP,&(arg->arg_sr));
break;
case OP_ADDENTRY :
success = encode_DAS_AddEntryArgument(pep,0,0,NULLCP,&(arg->arg_ad));
break;
case OP_REMOVEENTRY :
success = encode_DAS_RemoveEntryArgument(pep,0,0,NULLCP,&(arg->arg_rm));
break;
case OP_MODIFYENTRY :
success = encode_DAS_ModifyEntryArgument(pep,0,0,NULLCP,&(arg->arg_me));
break;
case OP_MODIFYRDN :
success = encode_DAS_ModifyRDNArgument(pep,0,0,NULLCP,&(arg->arg_mr));
break;
case OP_GETEDB :
success = encode_Quipu_GetEntryDataBlockArgument(pep,0,0,NULLCP,&(arg->arg_ge));
break;
default :
success = NOTOK;
(*typep) = 0;
LLOG(log_dsap, LLOG_EXCEPTIONS, ("encode_DAPArg OP %d unknown", arg->arg_type));
break;
}
return(success);
}
int encode_DSPArgument(pep,typep,arg)
PE *pep;
int *typep;
struct ds_op_arg *arg;
{
int success;
switch(*typep = arg->dca_dsarg.arg_type)
{
case OP_READ :
success = encode_DO_ChainedReadArgument(pep,0,0,NULLCP,arg);
break;
case OP_COMPARE :
success = encode_DO_ChainedCompareArgument(pep,0,0,NULLCP,arg);
break;
case OP_ABANDON :
success = encode_DAS_AbandonArgument(pep,0,0,NULLCP,&(arg->dca_dsarg.arg_ab));
break;
case OP_LIST :
success = encode_DO_ChainedListArgument(pep,0,0,NULLCP,arg);
break;
case OP_SEARCH :
success = encode_DO_ChainedSearchArgument(pep,0,0,NULLCP,arg);
break;
case OP_ADDENTRY :
success = encode_DO_ChainedAddEntryArgument(pep,0,0,NULLCP,arg);
break;
case OP_REMOVEENTRY :
success = encode_DO_ChainedRemoveEntryArgument(pep,0,0,NULLCP,arg);
break;
case OP_MODIFYENTRY :
success = encode_DO_ChainedModifyEntryArgument(pep,0,0,NULLCP,arg);
break;
case OP_MODIFYRDN :
success = encode_DO_ChainedModifyRDNArgument(pep,0,0,NULLCP,arg);
break;
default :
success = NOTOK;
(*typep) = 0;
LLOG(log_dsap, LLOG_EXCEPTIONS, ("encode_DAPArg OP %d unknown", arg->dca_dsarg.arg_type));
break;
}
return(success);
}