Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libform Add missing function and make some error returns...
details: https://anonhg.NetBSD.org/src/rev/f066b484f8ef
branches: trunk
changeset: 512241:f066b484f8ef
user: blymn <blymn%NetBSD.org@localhost>
date: Sun Jul 08 12:15:06 2001 +0000
description:
Add missing function and make some error returns into proper eti.h
errors.
diffstat:
lib/libform/field.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diffs (51 lines):
diff -r a675b3bf7908 -r f066b484f8ef lib/libform/field.c
--- a/lib/libform/field.c Sun Jul 08 12:12:38 2001 +0000
+++ b/lib/libform/field.c Sun Jul 08 12:15:06 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: field.c,v 1.13 2001/06/28 11:38:19 blymn Exp $ */
+/* $NetBSD: field.c,v 1.14 2001/07/08 12:15:06 blymn Exp $ */
/*-
* Copyright (c) 1998-1999 Brett Lymn
* (blymn%baea.com.au@localhost, brett_lymn%yahoo.com.au@localhost)
@@ -448,6 +448,18 @@
}
/*
+ * Get the background character attribute for the given field.
+ */
+chtype
+field_back(FIELD *field)
+{
+ if (field == NULL)
+ return _formi_default_field.back;
+ else
+ return field->back;
+}
+
+/*
* Set the pad character for the given field.
*/
int
@@ -561,10 +573,10 @@
field_index(FIELD *field)
{
if (field == NULL)
- return -1;
+ return E_BAD_ARGUMENT;
if (field->parent == NULL)
- return -1;
+ return E_NOT_CONNECTED;
return field->index;
}
@@ -663,7 +675,8 @@
if (field == NULL)
return NULL;
-
+
+ /* XXXX this right???? */
if ((new = _formi_create_field(field, (int) field->rows,
(int ) field->cols,
frow, fcol, (int) field->nrows,
Home |
Main Index |
Thread Index |
Old Index