X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_just.c;h=98e4649d8d18832994bd8a03431f417d38290c89;hp=2a6dd38ec3909ebad233dcf421a75978dd571bea;hb=e5d1530ca229aef94a3c84ad33f8ae89f35c4045;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/form/fld_just.c b/form/fld_just.c index 2a6dd38e..98e4649d 100644 --- a/form/fld_just.c +++ b/form/fld_just.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright 2020 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 * @@ -27,12 +28,12 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_just.c,v 1.5 1999/05/16 17:18:06 juergen Exp $") +MODULE_ID("$Id: fld_just.c,v 1.15 2020/05/24 01:40:20 anonymous.maarten Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -44,20 +45,23 @@ MODULE_ID("$Id: fld_just.c,v 1.5 1999/05/16 17:18:06 juergen Exp $") | E_BAD_ARGUMENT - one of the arguments was incorrect | E_SYSTEM_ERROR - system error +--------------------------------------------------------------------------*/ -int set_field_just(FIELD * field, int just) +FORM_EXPORT(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) ) + T((T_CALLED("set_field_just(%p,%d)"), (void *)field, just)); + + if ((just == NO_JUSTIFICATION) || + (just == JUSTIFY_LEFT) || + (just == JUSTIFY_CENTER) || + (just == JUSTIFY_RIGHT)) { - Normalize_Field( field ); + Normalize_Field(field); if (field->just != just) { - field->just = just; - res = _nc_Synchronize_Attributes( field ); + field->just = (short) just; + res = _nc_Synchronize_Attributes(field); } else res = E_OK; @@ -73,9 +77,11 @@ int set_field_just(FIELD * field, int just) | | Return Values : The justification type. +--------------------------------------------------------------------------*/ -int field_just(const FIELD * field) +FORM_EXPORT(int) +field_just(const FIELD *field) { - return Normalize_Field( field )->just; + T((T_CALLED("field_just(%p)"), (const void *)field)); + returnCode(Normalize_Field(field)->just); } /* fld_just.c ends here */