]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - form/fld_just.c
ncurses 5.7 - patch 20100828
[ncurses.git] / form / fld_just.c
index 064a9fbc9dafb2d6d08391245d7a537bbb92f853..58a1750cc092b254ab56dd173c5e6e00b89e0192 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2004,2010 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,7 +32,7 @@
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: fld_just.c,v 1.8 2003/10/25 15:17:08 tom Exp $")
+MODULE_ID("$Id: fld_just.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
@@ -45,20 +45,22 @@ MODULE_ID("$Id: fld_just.c,v 1.8 2003/10/25 15:17:08 tom 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 );
+         res = _nc_Synchronize_Attributes(field);
        }
       else
        res = E_OK;
@@ -75,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 */