[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

1450.0. "OUT_P parameter value for mcc_call" by SWORD1::ES (Eugene Shvartsman) Wed Sep 04 1991 21:21

When we are going to call mcc_call, we have to prepare out_p parameter, which
is a pointer to a MCC_T_Descriptor structure which describes the ILV.

The question is: is it enough just to allocate this descriptor together with
the proper buffer, or is it necessary to put an empty ILV into this buffer?

I.e. in the following function do we need step 2 and 3 or not?

Thank you,
Gene


extern MCC_T_CVR create_out_p(head_p, desc_pp, len)
	struct MCC_DESFRAME_R_LINKLIST **head_pp;
	MCC_T_Descriptor **desc_pp;
	ushort len;
{
    MCC_T_CVR status;
    int step;
    struct MCC_R_ILV_CONTEXT ctx;
    ulint datatype;

#define MAXSTEP 3

  step = 1;
  do switch (step++) {
    case 1:
	datatype = MCC_K_DT_ILV;
	status = mcc_desframe_create_descriptor(head_pp, desc_pp, &len,
					&datatype,
					NULL,		/* value */
					NULL,		/* id */
					NULL);		/* vmsdatatype */
	break;

    case 2:
	status = mcc_ilv_put_param_begin(&ctx, *desc_pp);
	break;

    case 3:
	status = mcc_ilv_put_param_end(&ctx, *desc_pp);
  } while ((step <= 3) && GOOD(status));

  return(status);
}
T.RTitleUserPersonal
Name
DateLines
1450.1that's extra workTOOK::KOHLSRuth KohlsThu Sep 05 1991 11:2825




>I.e. in the following function do we need step 2 and 3 or not?

>    case 2:
>	status = mcc_ilv_put_param_begin(&ctx, *desc_pp);
>	break;
>
>    case 3:
>	status = mcc_ilv_put_param_end(&ctx, *desc_pp);

No, these are unnecessary.  mcc_ilv_put_param_begin initializes the
ilv context so that a new encoding will start at the beginning of the
buffer, and anything already in the buffer will be overwritten.  So
the MM you call will have to re-initialize OUTP whatever you do.

mcc_ilv_put_param_end finishes the buffer and puts the final length
of the encoding into the the buffer's descriptor field: mcc_w_curlen.
Any "extra" space in the buffer beyond that end point will be ignored by the 
ILV get routines, and no further "putting" will be permitted.

Ruth