X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=form%2Ffld_just.c;h=62253bcf77b6e06ce97afd411b99e0dcd6a9487f;hb=8f487e9f47505e8cf31ea1b5e3075b2a43ce9302;hp=e021fb1cfb926a57847ba05004247ddb6d385695;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;p=ncurses.git diff --git a/form/fld_just.c b/form/fld_just.c index e021fb1c..62253bcf 100644 --- a/form/fld_just.c +++ b/form/fld_just.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * + * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,24 +33,24 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_just.c,v 1.11 2004/12/11 22:55:48 tom Exp $") +MODULE_ID("$Id: fld_just.c,v 1.17 2021/06/17 21:20:30 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int set_field_just(FIELD *field, int just) -| -| Description : Set the fields type of justification. +| +| Description : Set the field's type of justification. | | Return Values : E_OK - success | E_BAD_ARGUMENT - one of the arguments was incorrect | E_SYSTEM_ERROR - system error +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) +FORM_EXPORT(int) set_field_just(FIELD *field, int just) { int res = E_BAD_ARGUMENT; - T((T_CALLED("set_field_just(%p,%d)"), field, just)); + T((T_CALLED("set_field_just(%p,%d)"), (void *)field, just)); if ((just == NO_JUSTIFICATION) || (just == JUSTIFY_LEFT) || @@ -59,7 +60,7 @@ set_field_just(FIELD *field, int just) Normalize_Field(field); if (field->just != just) { - field->just = just; + field->just = (short)just; res = _nc_Synchronize_Attributes(field); } else @@ -69,17 +70,17 @@ set_field_just(FIELD *field, int just) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int field_just( const FIELD *field ) -| -| Description : Retrieve the fields type of justification +| +| Description : Retrieve the field's type of justification | | Return Values : The justification type. +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) +FORM_EXPORT(int) field_just(const FIELD *field) { - T((T_CALLED("field_just(%p)"), field)); + T((T_CALLED("field_just(%p)"), (const void *)field)); returnCode(Normalize_Field(field)->just); }