gsqltrn_xdr.c.preserve
上传用户:dgyhgb
上传日期:2007-01-07
资源大小:676k
文件大小:8k
源码类别:
SQL Server
开发平台:
Unix_Linux
- /*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
- #include "gsqltrn.h"
- bool_t
- xdr_string_t(xdrs, objp)
- register XDR *xdrs;
- string_t *objp;
- {
- register long *buf;
- if (!xdr_string(xdrs, objp, ~0))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_init_params_t(xdrs, objp)
- register XDR *xdrs;
- init_params_t *objp;
- {
- register long *buf;
- if (!xdr_array(xdrs, (char **)&objp->init_params_t_val, (u_int *) &objp->init_params_t_len, ~0,
- sizeof (string_t), (xdrproc_t) xdr_string_t))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_stmt_info_t(xdrs, objp)
- register XDR *xdrs;
- stmt_info_t *objp;
- {
- register long *buf;
- if (!xdr_string_t(xdrs, &objp->stmt))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->stmt_name))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->bline))
- return (FALSE);
- if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (stmt_info_t), (xdrproc_t) xdr_stmt_info_t))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_prep_elem_t(xdrs, objp)
- register XDR *xdrs;
- prep_elem_t *objp;
- {
- register long *buf;
- if (!xdr_int(xdrs, &objp->type))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->length))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->scale))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->name))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->ind_name))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->nullable))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_descr_t(xdrs, objp)
- register XDR *xdrs;
- descr_t *objp;
- {
- register long *buf;
- if (!xdr_array(xdrs, (char **)&objp->descr_t_val, (u_int *) &objp->descr_t_len, ~0,
- sizeof (prep_elem_t), (xdrproc_t) xdr_prep_elem_t))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_compiled_object_t(xdrs, objp)
- register XDR *xdrs;
- compiled_object_t *objp;
- {
- register long *buf;
- if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (compiled_object_t), (xdrproc_t) xdr_compiled_object_t))
- return (FALSE);
- if (!xdr_descr_t(xdrs, &objp->descr_in))
- return (FALSE);
- if (!xdr_descr_t(xdrs, &objp->descr_out))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->object))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->cursor_name))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->table_name))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->table_owner))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_call_subst_t(xdrs, objp)
- register XDR *xdrs;
- call_subst_t *objp;
- {
- register long *buf;
- if (!xdr_string_t(xdrs, &objp->proc_name))
- return (FALSE);
- if (!xdr_descr_t(xdrs, &objp->interface))
- return (FALSE);
- if (!xdr_descr_t(xdrs, &objp->in_sql_parm))
- return (FALSE);
- if (!xdr_descr_t(xdrs, &objp->out_sql_parm))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->object))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->method))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->jmp_on_error))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->jmp_on_eofscan))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_call_t(xdrs, objp)
- register XDR *xdrs;
- call_t *objp;
- {
- register long *buf;
- if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (call_t), (xdrproc_t) xdr_call_t))
- return (FALSE);
- if (!xdr_pointer(xdrs, (char **)&objp->subst, sizeof (call_subst_t), (xdrproc_t) xdr_call_subst_t))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_file_buf_t(xdrs, objp)
- register XDR *xdrs;
- file_buf_t *objp;
- {
- register long *buf;
- if (!xdr_string_t(xdrs, &objp->ext))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->text))
- return (FALSE);
- if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (file_buf_t), (xdrproc_t) xdr_file_buf_t))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_comp_data_t(xdrs, objp)
- register XDR *xdrs;
- comp_data_t *objp;
- {
- register long *buf;
- if (!xdr_int(xdrs, &objp->comp_type))
- return (FALSE);
- switch (objp->comp_type) {
- case COMP_STATIC:
- if (!xdr_string_t(xdrs, &objp->comp_data_t_u.module))
- return (FALSE);
- break;
- case COMP_DYNAMIC_CURSOR:
- if (!xdr_int(xdrs, &objp->comp_data_t_u.seg_ptr))
- return (FALSE);
- break;
- case COMP_DYNAMIC_SIMPLE:
- if (!xdr_int(xdrs, &objp->comp_data_t_u.segm))
- return (FALSE);
- break;
- }
- return (TRUE);
- }
- bool_t
- xdr_compiled_t(xdrs, objp)
- register XDR *xdrs;
- compiled_t *objp;
- {
- register long *buf;
- if (!xdr_int(xdrs, &objp->errors))
- return (FALSE);
- if (!xdr_pointer(xdrs, (char **)&objp->bufs, sizeof (file_buf_t), (xdrproc_t) xdr_file_buf_t))
- return (FALSE);
- if (!xdr_pointer(xdrs, (char **)&objp->objects, sizeof (compiled_object_t), (xdrproc_t) xdr_compiled_object_t))
- return (FALSE);
- if (!xdr_pointer(xdrs, (char **)&objp->calls, sizeof (call_t), (xdrproc_t) xdr_call_t))
- return (FALSE);
- if (!xdr_comp_data_t(xdrs, &objp->stored))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_link_cursor_t(xdrs, objp)
- register XDR *xdrs;
- link_cursor_t *objp;
- {
- register long *buf;
- if (!xdr_string_t(xdrs, &objp->cursor_name))
- return (FALSE);
- if (!xdr_string_t(xdrs, &objp->stmt_name))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->segment))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_seg_del_t(xdrs, objp)
- register XDR *xdrs;
- seg_del_t *objp;
- {
- register long *buf;
- if (!xdr_int(xdrs, &objp->segment))
- return (FALSE);
- if (!xdr_array(xdrs, (char **)&objp->seg_vadr.seg_vadr_val, (u_int *) &objp->seg_vadr.seg_vadr_len, ~0,
- sizeof (int), (xdrproc_t) xdr_int))
- return (FALSE);
- return (TRUE);
- }
- #include "sql_type.h"
- bool_t
- xdr_data(xdrs, objp)
- register XDR *xdrs;
- data *objp;
- {
- register long *buf;
- if (!xdr_int(xdrs, &objp->type))
- return (FALSE);
- switch (objp->type) {
- case SQLType_Char:
- if (!xdr_bytes(xdrs, (char **)&objp->data_u.Str.Str_val, (u_int *) &objp->data_u.Str.Str_len, ~0))
- return (FALSE);
- break;
- case SQLType_Short:
- if (!xdr_short(xdrs, &objp->data_u.Shrt))
- return (FALSE);
- break;
- case SQLType_Int:
- if (!xdr_int(xdrs, &objp->data_u.Int))
- return (FALSE);
- break;
- case SQLType_Long:
- if (!xdr_int(xdrs, &objp->data_u.Lng))
- return (FALSE);
- break;
- case SQLType_Real:
- if (!xdr_float(xdrs, &objp->data_u.Flt))
- return (FALSE);
- break;
- case SQLType_Double:
- if (!xdr_double(xdrs, &objp->data_u.Dbl))
- return (FALSE);
- break;
- }
- return (TRUE);
- }
- bool_t
- xdr_parm_t(xdrs, objp)
- register XDR *xdrs;
- parm_t *objp;
- {
- register long *buf;
- if (!xdr_data(xdrs, &objp->value))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->indicator))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_parm_row_t(xdrs, objp)
- register XDR *xdrs;
- parm_row_t *objp;
- {
- register long *buf;
- if (!xdr_array(xdrs, (char **)&objp->parm_row_t_val, (u_int *) &objp->parm_row_t_len, ~0,
- sizeof (parm_t), (xdrproc_t) xdr_parm_t))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_return_data(xdrs, objp)
- register XDR *xdrs;
- return_data *objp;
- {
- register long *buf;
- if (!xdr_int(xdrs, &objp->rett))
- return (FALSE);
- switch (objp->rett) {
- case RET_COMP:
- if (!xdr_compiled_t(xdrs, &objp->return_data_u.comp_ret))
- return (FALSE);
- break;
- case RET_ROW:
- if (!xdr_parm_row_t(xdrs, &objp->return_data_u.row))
- return (FALSE);
- break;
- case RET_TBL:
- if (!xdr_array(xdrs, (char **)&objp->return_data_u.tbl.tbl_val, (u_int *) &objp->return_data_u.tbl.tbl_len, ~0,
- sizeof (parm_row_t), (xdrproc_t) xdr_parm_row_t))
- return (FALSE);
- break;
- case RET_SEG:
- if (!xdr_int(xdrs, &objp->return_data_u.segid))
- return (FALSE);
- break;
- }
- return (TRUE);
- }
- bool_t
- xdr_result_t(xdrs, objp)
- register XDR *xdrs;
- result_t *objp;
- {
- register long *buf;
- if (!xdr_int(xdrs, &objp->sqlcode))
- return (FALSE);
- if (!xdr_return_data(xdrs, &objp->info))
- return (FALSE);
- return (TRUE);
- }
- bool_t
- xdr_insn_t(xdrs, objp)
- register XDR *xdrs;
- insn_t *objp;
- {
- register long *buf;
- if (!xdr_int(xdrs, &objp->vadr_segm))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->sectnum))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->command))
- return (FALSE);
- if (!xdr_int(xdrs, &objp->options))
- return (FALSE);
- if (!xdr_parm_row_t(xdrs, &objp->parms))
- return (FALSE);
- if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof (insn_t), (xdrproc_t) xdr_insn_t))
- return (FALSE);
- return (TRUE);
- }