/*--------------------------------------------------------------------------- | 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); }
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); }
/*--------------------------------------------------------------------------- | 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); }