本文整理汇总了C++中Normalize_Field函数的典型用法代码示例。如果您正苦于以下问题:C++ Normalize_Field函数的具体用法?C++ Normalize_Field怎么用?C++ Normalize_Field使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Normalize_Field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: set_field_userptr
set_field_userptr(FIELD *field, void *usrptr)
{
T((T_CALLED("set_field_userptr(%p,%p)"), (void *)field, (void *)usrptr));
Normalize_Field(field)->usrptr = usrptr;
RETURN(E_OK);
}
示例2: set_field_type
set_field_type(FIELD *field, FIELDTYPE *type,...)
{
va_list ap;
int res = E_SYSTEM_ERROR;
int err = 0;
T((T_CALLED("set_field_type(%p,%p)"), field, type));
va_start(ap, type);
Normalize_Field(field);
_nc_Free_Type(field);
field->type = type;
field->arg = (void *)_nc_Make_Argument(field->type, &ap, &err);
if (err)
{
_nc_Free_Argument(field->type, (TypeArgument *)(field->arg));
field->type = (FIELDTYPE *)0;
field->arg = (void *)0;
}
else
{
res = E_OK;
if (field->type)
field->type->ref++;
}
va_end(ap);
RETURN(res);
}
示例3: set_field_opts
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int set_field_opts(FIELD *field, Field_Options opts)
|
| Description : Turns on the named options for this field and turns
| off all the remaining options.
|
| Return Values : E_OK - success
| E_CURRENT - the field is the current field
| E_BAD_ARGUMENT - invalid options
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
int set_field_opts(FIELD * field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
res = _nc_Synchronize_Options( Normalize_Field(field), opts );
RETURN(res);
}
示例4: set_field_status
set_field_status (FIELD * field, bool status)
{
Normalize_Field( field );
if (status)
field->status |= _CHANGED;
else
field->status &= ~_CHANGED;
return(E_OK);
}
示例5: field_opts_on
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int field_opts_on(FIELD *field, Field_Options opts)
|
| Description : Turns on the named options for this field and all the
| remaining options are unchanged.
|
| Return Values : E_OK - success
| E_CURRENT - the field is the current field
| E_BAD_ARGUMENT - invalid options
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
int field_opts_on(FIELD * field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
{
Normalize_Field( field );
res = _nc_Synchronize_Options( field, field->opts | opts );
}
RETURN(res);
}
示例6: set_field_status
set_field_status(FIELD *field, bool status)
{
T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status));
Normalize_Field(field);
if (status)
field->status |= _CHANGED;
else
field->status &= ~_CHANGED;
RETURN(E_OK);
}
示例7: set_new_page
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int set_new_page(FIELD *field, bool new_page_flag)
|
| Description : Marks the field as the beginning of a new page of
| the form.
|
| Return Values : E_OK - success
| E_CONNECTED - field is connected
+--------------------------------------------------------------------------*/
int set_new_page(FIELD * field, bool new_page_flag)
{
Normalize_Field(field);
if (field->form)
RETURN(E_CONNECTED);
if (new_page_flag)
field->status |= _NEWPAGE;
else
field->status &= ~_NEWPAGE;
RETURN(E_OK);
}
示例8: set_field_status
set_field_status(FIELD *field, bool status)
{
T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status));
Normalize_Field(field);
if (status)
SetStatus(field, _CHANGED);
else
ClrStatus(field, _CHANGED);
RETURN(E_OK);
}
示例9: field_opts_off
field_opts_off(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
T((T_CALLED("field_opts_off(%p,%d)"), field, opts));
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
{
Normalize_Field(field);
res = _nc_Synchronize_Options(field, field->opts & ~opts);
}
RETURN(res);
}
示例10: set_field_pad
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int set_field_pad(FIELD *field, int ch)
|
| Description : Set the pad character used to fill the field. This must
| be a printable character.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid field pointer or pad character
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
int set_field_pad(FIELD * field, int ch)
{
int res = E_BAD_ARGUMENT;
Normalize_Field( field );
if (isprint((unsigned char)ch))
{
if (field->pad != ch)
{
field->pad = ch;
res = _nc_Synchronize_Attributes( field );
}
else
res = E_OK;
}
RETURN(res);
}
示例11: set_field_pad
set_field_pad(FIELD *field, int ch)
{
int res = E_BAD_ARGUMENT;
T((T_CALLED("set_field_pad(%p,%d)"), (void *)field, ch));
Normalize_Field(field);
if (isprint(UChar(ch)))
{
if (field->pad != ch)
{
field->pad = ch;
res = _nc_Synchronize_Attributes(field);
}
else
res = E_OK;
}
RETURN(res);
}
示例12: set_field_just
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int set_field_just(FIELD *field, int just)
|
| Description : Set the fields type of justification.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - one of the arguments was incorrect
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
int set_field_just(FIELD * field, int just)
{
int res = E_BAD_ARGUMENT;
if ((just==NO_JUSTIFICATION) ||
(just==JUSTIFY_LEFT) ||
(just==JUSTIFY_CENTER) ||
(just==JUSTIFY_RIGHT) )
{
Normalize_Field( field );
if (field->just != just)
{
field->just = just;
res = _nc_Synchronize_Attributes( field );
}
else
res = E_OK;
}
RETURN(res);
}
示例13: Normalize_Field
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : void *field_userptr(const FIELD *field)
|
| Description : Return the pointer that is reserved in any field to
| store application relevant informations.
|
| Return Values : Value of pointer. If no such pointer has been set,
| NULL is returned
+--------------------------------------------------------------------------*/
void *field_userptr(const FIELD *field)
{
return Normalize_Field( field )->usrptr;
}
示例14: field_userptr
field_userptr(const FIELD *field)
{
T((T_CALLED("field_userptr(%p)"), (const void *)field));
returnVoidPtr(Normalize_Field(field)->usrptr);
}
示例15: field_opts
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : Field_Options field_opts(const FIELD *field)
|
| Description : Retrieve the fields options.
|
| Return Values : The options.
+--------------------------------------------------------------------------*/
Field_Options field_opts(const FIELD * field)
{
return ALL_FIELD_OPTS & Normalize_Field( field )->opts;
}