summaryrefslogtreecommitdiff
path: root/lib/libform/fld_max.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-01-12 23:22:15 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-01-12 23:22:15 +0000
commit6ee254699bf787d78835419be2b3241fb037d444 (patch)
tree07fe67dab517e4990f344fe2c00e65cef4d25b81 /lib/libform/fld_max.c
parent0b62f5dc36fc7203a74cdc812c4234ae188fdfd2 (diff)
Update to ncurses 5.7, with local changes reapplied.
This is around eight years worth of changes (previously we were around ncurses 5.2), too many to list - many bug fixes and also a few new functions. A major bump for libcurses, libpanel, libform and libmenu. ok deraadt
Diffstat (limited to 'lib/libform/fld_max.c')
-rw-r--r--lib/libform/fld_max.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libform/fld_max.c b/lib/libform/fld_max.c
index 64ca77bfde4..0d6c66f9cce 100644
--- a/lib/libform/fld_max.c
+++ b/lib/libform/fld_max.c
@@ -1,7 +1,5 @@
-/* $OpenBSD: fld_max.c,v 1.4 2001/01/22 18:02:13 millert Exp $ */
-
/****************************************************************************
- * Copyright (c) 1998,2000 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 *
@@ -29,12 +27,12 @@
****************************************************************************/
/****************************************************************************
- * Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 *
+ * Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
#include "form.priv.h"
-MODULE_ID("$From: fld_max.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
+MODULE_ID("$Id: fld_max.c,v 1.5 2010/01/12 23:22:07 nicm Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -47,17 +45,19 @@ MODULE_ID("$From: fld_max.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
| E_BAD_ARGUMENT - invalid argument
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
-set_max_field (FIELD *field, int maxgrow)
+set_max_field(FIELD *field, int maxgrow)
{
- if (!field || (maxgrow<0))
+ T((T_CALLED("set_max_field(%p,%d)"), field, maxgrow));
+
+ if (!field || (maxgrow < 0))
RETURN(E_BAD_ARGUMENT);
else
{
bool single_line_field = Single_Line_Field(field);
- if (maxgrow>0)
+ if (maxgrow > 0)
{
- if (( single_line_field && (maxgrow < field->dcols)) ||
+ if ((single_line_field && (maxgrow < field->dcols)) ||
(!single_line_field && (maxgrow < field->drows)))
RETURN(E_BAD_ARGUMENT);
}
@@ -65,13 +65,13 @@ set_max_field (FIELD *field, int maxgrow)
field->status &= ~_MAY_GROW;
if (!(field->opts & O_STATIC))
{
- if ((maxgrow==0) ||
- ( single_line_field && (field->dcols < maxgrow)) ||
+ if ((maxgrow == 0) ||
+ (single_line_field && (field->dcols < maxgrow)) ||
(!single_line_field && (field->drows < maxgrow)))
field->status |= _MAY_GROW;
}
}
RETURN(E_OK);
}
-
+
/* fld_max.c ends here */