OSF DCE Application Development Guide--Core Components
Topics in RPC Application Development
/*
* User write routine for incremental encode
*/
void es_write(state, buf, size)
idl_void_p_t state;
idl_byte *buf;
idl_ulong_int size;
{
es_state_t *p_es_state = (es_state_t *)state;
write(p_es_state->file_handle, buf, size);
free(p_es_state->malloced_addr);
}
/*
* User read routine for incremental decode
*/
void es_read(state, buf, size)
idl_void_p_t state;
idl_byte **buf;
idl_ulong_int *size;
{
es_state_t *p_es_state = (es_state_t *)state;
read(p_es_state->file_handle, out_data_addr, out_data_size);
*buf = out_data_addr;
*size = out_data_size;
}
static ndr_long_int arr[N];
static ndr_long_int out_arr[N];
static s_t sarr[N];
static s_t ref_sarr[N];
static s_t out_sarr[N];
static t_t tarr[N];
static t_t ref_tarr[N];
static t_t out_tarr[N];
static ndr_long_int (*oarr)[M];
#define FIXED_BUFF_STORE (8*N+64)
static idl_byte fixed_buff_area[FIXED_BUFF_STORE];
/*
* Test Program
*/
main()
{
idl_es_handle_t es_h;
idl_byte *fixed_buff_start;
idl_ulong_int fixed_buff_size, encoding_size;
idl_byte *dyn_buff_start;
error_status_t status;
int i,j;
for(i=0;i<N; i++)
124245 Tandem Computers Incorporated 16− 51