X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_just.c;h=e021fb1cfb926a57847ba05004247ddb6d385695;hp=c621c1634457073d8c57d14cdd49fe638ca0344e;hb=f5da57ad7eb397b1001e2fca9cb0e278a6564716;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/form/fld_just.c b/form/fld_just.c index c621c163..e021fb1c 100644 --- a/form/fld_just.c +++ b/form/fld_just.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 +27,12 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_just.c,v 1.3 1998/02/11 12:13:44 tom Exp $") +MODULE_ID("$Id: fld_just.c,v 1.11 2004/12/11 22:55:48 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -44,20 +44,23 @@ MODULE_ID("$Id: fld_just.c,v 1.3 1998/02/11 12:13:44 tom Exp $") | E_BAD_ARGUMENT - one of the arguments was incorrect | E_SYSTEM_ERROR - system error +--------------------------------------------------------------------------*/ -int set_field_just(FIELD * field, int just) +NCURSES_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)"), 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 ); + res = _nc_Synchronize_Attributes(field); } else res = E_OK; @@ -73,9 +76,11 @@ int set_field_just(FIELD * field, int just) | | Return Values : The justification type. +--------------------------------------------------------------------------*/ -int field_just(const FIELD * field) +NCURSES_EXPORT(int) +field_just(const FIELD *field) { - return Normalize_Field( field )->just; + T((T_CALLED("field_just(%p)"), field)); + returnCode(Normalize_Field(field)->just); } /* fld_just.c ends here */