X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_just.c;h=dea20b79b41c3349171793c781110c96843c9d74;hp=31bf0fd00e8dbafe5eea69820db57f36fbcfa2e7;hb=896224bea6196d73d03e39b1a266887d6f2cb6ff;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/form/fld_just.c b/form/fld_just.c index 31bf0fd0..dea20b79 100644 --- a/form/fld_just.c +++ b/form/fld_just.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_just.c,v 1.7 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_just.c,v 1.13 2012/03/11 00:37:16 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -46,20 +45,22 @@ MODULE_ID("$Id: fld_just.c,v 1.7 2002/07/06 15:33:27 juergen Exp $") | E_SYSTEM_ERROR - system error +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -set_field_just (FIELD * field, int just) +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; @@ -76,9 +77,10 @@ set_field_just (FIELD * field, int just) | Return Values : The justification type. +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -field_just (const FIELD * field) +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 */