本文整理汇总了C++中MEfill函数的典型用法代码示例。如果您正苦于以下问题:C++ MEfill函数的具体用法?C++ MEfill怎么用?C++ MEfill使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MEfill函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ParseHTMLVariables
/*
** Name: ParseHTMLVariables() - Entry point
**
** Description:
**
** Inputs:
** ACT_PSESSION active session
** char* var
**
** Outputs:
**
** Returns:
** GSTATUS : GSTAT_OK
**
** Exceptions:
** None
**
** Side Effects:
** None
**
** History:
** 11-Sep-1998 (fanra01)
** Separate declaration and initialisation for building on unix.
** 20-Aug-2003 (fanra01)
** Additional output information if parse error encountered.
*/
GSTATUS
ParseHTMLVariables(
ACT_PSESSION act_session,
char *var)
{
GSTATUS err = GSTAT_OK;
if (var != NULL)
{
PARSER_IN in;
VAR_PARSER_OUT out;
MEfill (sizeof(PARSER_IN), 0, (PTR)&in);
in.first_node = FIRST_VARIABLE_NODE;
in.buffer = var;
in.length = STlength(var);
MEfill (sizeof(VAR_PARSER_OUT), 0, (PTR)&out);
out.act_session = act_session;
out.HexProcessing = FALSE;
out.type = WSM_ACTIVE;
err = ParseOpen(Variable, &in, (PPARSER_OUT) &out);
if (err == GSTAT_OK)
err = Parse(Variable, &in, (PPARSER_OUT) &out);
if (err == GSTAT_OK)
err = ParseClose(Variable, &in, (PPARSER_OUT) &out);
if (err != GSTAT_OK)
{
DDFStatusInfo( err, "Variable name = %s\n", var );
}
}
return(err);
}
开发者ID:akdh,项目名称:Ingres,代码行数:59,代码来源:wsspars.c
示例2: psy_kgroup
/*{
** Name: psy_kgroup - Destroy group
**
** INTERNAL PSF call format: status = psy_kgroup(&psy_cb, sess_cb);
**
** Description:
** This procedure deletes group identifiers. No members can be
** in the group to be deleted. If members exist in a group,
** the group is not deleted.
** This procedure is called for SQL language only.
**
** Inputs:
** psy_cb
** .psy_tblq head of group queue
** sess_cb Pointer to session control block
** (Can be NULL)
**
** Outputs:
** psy_cb
** .psy_error Filled in if error happens
** Returns:
** E_DB_OK Function completed normally.
** E_DB_INFO Function completed with message(s).
** E_DB_WARN One or more groups were rejected.
** E_DB_ERROR Function failed; non-catastrophic error
** Exceptions:
** none
**
** Side Effects:
** Removed tuples from iiusergroup.
**
** History:
** 13-mar-89 (ralph)
** written
** 20-may-89 (ralph)
** Allow multiple groups to be specified.
** 12-mar-90 (andre)
** set rdr_2types_mask to 0.
** 22-may-90 (teg)
** init rdr_instr to RDF_NO_INSTR
*/
DB_STATUS
psy_kgroup(
PSY_CB *psy_cb,
PSS_SESBLK *sess_cb)
{
DB_STATUS status, stat;
RDF_CB rdf_cb;
register RDR_RB *rdf_rb = &rdf_cb.rdf_rb;
DB_USERGROUP ugtuple;
register DB_USERGROUP *ugtup = &ugtuple;
PSY_TBL *psy_tbl;
PSY_USR *psy_usr;
/* This code is called for SQL only */
/*
** Fill in the part of RDF request block that will be constant.
*/
pst_rdfcb_init(&rdf_cb, sess_cb);
rdf_rb->rdr_update_op = RDR_DELETE;
rdf_rb->rdr_status = DB_SQL;
rdf_rb->rdr_types_mask = RDR_GROUP;
rdf_rb->rdr_qrytuple = (PTR) ugtup;
rdf_rb->rdr_qtuple_count = 1;
MEfill(sizeof(DB_OWN_NAME), (u_char)' ', (PTR)&ugtup->dbug_member);
MEfill(sizeof(ugtup->dbug_reserve),
(u_char)' ',
(PTR)ugtup->dbug_reserve);
status = E_DB_OK;
for (psy_tbl = (PSY_TBL *) psy_cb->psy_tblq.q_next;
psy_tbl != (PSY_TBL *) &psy_cb->psy_tblq;
psy_tbl = (PSY_TBL *) psy_tbl->queue.q_next
)
{
/* STRUCT_ASSIGN_MACRO(psy_tbl->psy_tabnm,
ugtup->dbug_group); */
MEcopy((PTR)&psy_tbl->psy_tabnm,
sizeof(ugtup->dbug_group),
(PTR)&ugtup->dbug_group);
stat = rdf_call(RDF_UPDATE, (PTR) &rdf_cb);
status = (stat > status) ? stat : status;
if (DB_FAILURE_MACRO(stat))
break;
}
if (DB_FAILURE_MACRO(status))
(VOID) psf_rdf_error(RDF_UPDATE, &rdf_cb.rdf_error,
&psy_cb->psy_error);
return (status);
}
开发者ID:saqibjamil,项目名称:Ingres,代码行数:97,代码来源:psygroup.c
示例3: ope_neweqcls
/*{
** Name: ope_neweqcls - create a new equivalence class for joinop attribute
**
** Description:
** This routine will create a new equivalence class for the joinop
** attribute. It is assumed that the joinop attribute is not already
** assigned to an equivalence class.
**
** Inputs:
** subquery ptr to subquery be analyzed
** attr joinop attribute to be placed
** in equivalence class
**
** Outputs:
** Returns:
** equivalence class which was assigned
** Exceptions:
** none
**
** Side Effects:
** none
**
** History:
** 24-apr-86 (seputis)
** initial creation
** 24-oct-88 (seputis)
** init ope_nulljoin field
** 21-dec-88 (seputis)
** init ope_mask field, check for non-nullable attributes
** 13-may-91 (seputis)
** - fix for b37172 - added ope_sargp
** 31-jan-94 (rganski)
** Removed ope_sargp, due to change to oph_sarglist.
** 9-aug-05 (inkdo01)
** Add support of OJ & EQC bit maps.
** 24-aug-05 (inkdo01)
** Drop ope_ojs - problem was solved differently.
** 21-jul-06 (hayke02)
** Re-introcude and initialize ope_ojs. This change fixes bug 116406.
[@[email protected]]...
*/
OPE_IEQCLS
ope_neweqcls(
OPS_SUBQUERY *subquery,
OPZ_IATTS attr)
{
OPE_IEQCLS eqcls; /* index into equivalence class array */
OPE_ET *ebase; /* ptr to base of equivalence class array */
ebase = subquery->ops_eclass.ope_base;
eqcls = subquery->ops_eclass.ope_ev++; /* find first available unassigned
** equivalence class, allocate it */
if (eqcls >= OPE_MAXEQCLS)
opx_error(E_OP0301_EQCLS_OVERFLOW);
{ /* eqcls now contains the unassigned equivalence class index */
OPE_EQCLIST *eqcls_ptr;
eqcls_ptr = (OPE_EQCLIST *) opu_memory(subquery->ops_global,
(i4) sizeof(OPE_EQCLIST));
ebase->ope_eqclist[eqcls] = eqcls_ptr; /* assign memory for the
** equivalence class element */
MEfill(sizeof(OPZ_BMATTS), (u_char) 0,
(PTR) &eqcls_ptr->ope_attrmap); /* initialize equivalence class
** element attribute bit map to zero */
eqcls_ptr->ope_bfindex = OPB_NOBF; /* no constant predicates found yet*/
eqcls_ptr->ope_nbf = OPB_NOBF; /* no sargable predicates found yet */
eqcls_ptr->ope_nulljoin = TRUE; /* keep nulls in joins unless user
** explicitly joins two attributes */
eqcls_ptr->ope_mask = 0; /* mask of various booleans */
if (attr != OPZ_NOATTR)
{ /* update information in attribute to reference equivalence class*/
OPZ_ATTS *attr_ptr; /* ptr to attribute element to
** be placed in equivalence class
*/
BTset((i4) attr, (char *)&eqcls_ptr->ope_attrmap); /* set the appropriate
** bit to indicate attribute */
attr_ptr = subquery->ops_attrs.opz_base->opz_attnums[attr];
if (attr_ptr->opz_dataval.db_datatype > 0)
/* NULLs will not exist, if this eventually becomes a joining eqcls */
eqcls_ptr->ope_nulljoin = FALSE;
eqcls_ptr->ope_eqctype = (attr_ptr->opz_attnm.db_att_id ==DB_IMTID)
? OPE_TID : OPE_NONTID; /* set type of this eqclass to
** OPE_TID if the att is an implicit TID */
MEfill((u_i2) sizeof(OPL_BMOJ), (u_char) 0,
(PTR) &eqcls_ptr->ope_ojs); /* init OJ bit map */
attr_ptr->opz_equcls = eqcls; /* remember that this att has
** been assigned to an eqclass */
BTset((i4)eqcls, (char *)&attr_ptr->opz_eqcmap);
/* & set eqc in map (for multi-EQC atts) */
}
else
eqcls_ptr->ope_eqctype = OPE_NONTID;
}
return(eqcls);
}
开发者ID:saqibjamil,项目名称:Ingres,代码行数:97,代码来源:openeweq.c
示例4: psy_kuser
/*{
** Name: psy_kuser - Destroy user
**
** INTERNAL PSF call format: status = psy_kuser(&psy_cb, sess_cb);
**
** Description:
** This procedure deletes a user. If the
** user does not exist, the statement is aborted.
** If the user does exist, the associated
** iiuser tuple is deleted.
** This procedure is called for SQL language only.
**
** Inputs:
** psy_cb
** .psy_usrq user list
** sess_cb Pointer to session control block
** (Can be NULL)
**
** Outputs:
** psy_cb
** .psy_error Filled in if error happens
** Returns:
** E_DB_OK Function completed normally.
** E_DB_INFO Function completed with warning(s).
** E_DB_WARN One ore more roles were rejected.
** E_DB_ERROR Function failed; non-catastrophic error
** Exceptions:
** none
**
** Side Effects:
** Removed tuples from iiuser.
**
** History:
** 04-sep-89 (ralph)
** written
** 12-mar-90 (andre)
** set rdr_2types_mask to 0.
** 22-may-90 (teg)
** init rdr_instr to RDF_NO_INSTR
*/
DB_STATUS
psy_kuser(
PSY_CB *psy_cb,
PSS_SESBLK *sess_cb)
{
DB_STATUS status, stat;
RDF_CB rdf_cb;
register RDR_RB *rdf_rb = &rdf_cb.rdf_rb;
DU_USER ustuple;
register DU_USER *ustup = &ustuple;
PSY_USR *psy_usr;
/* This code is called for SQL only */
/*
** Fill in the part of RDF request block that will be constant.
*/
pst_rdfcb_init(&rdf_cb, sess_cb);
rdf_rb->rdr_update_op = RDR_DELETE;
rdf_rb->rdr_status = DB_SQL;
rdf_rb->rdr_types_mask = RDR_USER;
rdf_rb->rdr_qrytuple = (PTR) ustup;
rdf_rb->rdr_qtuple_count = 1;
ustup->du_gid = 0;
ustup->du_mid = 0;
ustup->du_status = 0;
ustup->du_flagsmask = 0;
MEfill(sizeof(ustup->du_group),
(u_char)' ',
(PTR)&ustup->du_group);
status = E_DB_OK;
for (psy_usr = (PSY_USR *) psy_cb->psy_usrq.q_next;
psy_usr != (PSY_USR *) &psy_cb->psy_usrq;
psy_usr = (PSY_USR *) psy_usr->queue.q_next
)
{
/* STRUCT_ASSIGN_MACRO(psy_usr->psy_usrnm,
ustup->du_name); */
MEcopy((PTR)&psy_usr->psy_usrnm,
sizeof(ustup->du_name),
(PTR)&ustup->du_name);
stat = rdf_call(RDF_UPDATE, (PTR)&rdf_cb);
status = (stat > status) ? stat : status;
if (DB_FAILURE_MACRO(stat))
break;
}
if (DB_FAILURE_MACRO(status))
(VOID) psf_rdf_error(RDF_UPDATE, &rdf_cb.rdf_error,
&psy_cb->psy_error);
return (status);
}
开发者ID:saqibjamil,项目名称:Ingres,代码行数:100,代码来源:psyuser.c
示例5: opv_varnode
/*{
** Name: opv_varnode - make a range variable node
**
** Description:
** This procedure allocates and initializes a query tree PST_VAR node.
**
** Inputs:
** global ptr to global state variable
** datavalue datatype info of node to create
** variable range variable number - index
** into the global range table
** attribute dmf attribute of range variable to be
** assigned to var node.
**
** Outputs:
** Returns:
** ptr to PST_QNODE initialized to be a var node
** Exceptions:
** none
**
** Side Effects:
** none
**
** History:
** 8-apr-86 (seputis)
** initial creation
** 9-jul-91 (seputis)
** remove obsolete trace point
[@[email protected]]...
*/
PST_QNODE *
opv_varnode(
OPS_STATE *global,
DB_DATA_VALUE *datatype,
OPV_IGVARS variable,
DB_ATT_ID *dmfattr)
{
register PST_QNODE *qnode; /* ptr used for symbol allocation */
qnode = (PST_QNODE *) opu_memory( global, (i4) sizeof(PST_QNODE));
/* allocate storage for query tree node
** to be used for creation of var node
*/
qnode->pst_left = NULL;
qnode->pst_right = NULL;
qnode->pst_sym.pst_type = PST_VAR; /* create VAR node type */
STRUCT_ASSIGN_MACRO(*datatype, qnode->pst_sym.pst_dataval);
qnode->pst_sym.pst_dataval.db_data = NULL;
qnode->pst_sym.pst_len = sizeof(PST_VAR_NODE);
qnode->pst_sym.pst_value.pst_s_var.pst_vno = variable;
STRUCT_ASSIGN_MACRO(*dmfattr, qnode->pst_sym.pst_value.pst_s_var.pst_atno);
MEfill(sizeof(qnode->pst_sym.pst_value.pst_s_var.pst_atname), ' ',
(PTR)&qnode->pst_sym.pst_value.pst_s_var.pst_atname); /* init attribute
** name */
return( qnode );
}
开发者ID:saqibjamil,项目名称:Ingres,代码行数:56,代码来源:opvvarnode.c
注:本文中的MEfill函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论