|
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: 3897 (0xf39) Types: TextFile Names: »dsarg_enc.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.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 7.0 89/11/23 21:50:32 mrose Rel $"; #endif /* * $Header: /f/osi/dsap/x500as/RCS/dsarg_enc.c,v 7.0 89/11/23 21:50:32 mrose Rel $ * * * $Log: dsarg_enc.c,v $ * Revision 7.0 89/11/23 21:50:32 mrose * Release 6.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(ctx, pep, typep, arg) int ctx; PE *pep; int *typep; struct ds_op_arg *arg; { int success; if(ctx == CN_CTX_X500_DAP) { success = encode_DAPArgument(pep, typep, &(arg->dca_dsarg)); } else { success = encode_DSPArgument(pep, typep, arg); } 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; #ifdef REMOVE_FOR_6_0 case OP_GETEDB : success = encode_Quipu_GetEntryDataBlockArgument(pep,0,0,NULLCP,&(arg->arg_ge)); break; #endif 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; case OP_GETEDB : success = encode_Quipu_GetEntryDataBlockArgument(pep,0,0,NULLCP,&(arg->dca_dsarg.arg_ge)); break; default : success = NOTOK; (*typep) = 0; LLOG(log_dsap, LLOG_EXCEPTIONS, ("encode_DAPArg OP %d unknown", arg->dca_dsarg.arg_type)); break; } return(success); }