Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libform * Set character attributes when adding pad to fi...
details: https://anonhg.NetBSD.org/src/rev/292370b37ca5
branches: trunk
changeset: 533720:292370b37ca5
user: blymn <blymn%NetBSD.org@localhost>
date: Mon Jul 08 10:43:37 2002 +0000
description:
* Set character attributes when adding pad to field, null fields will
now be displayed correctly (fixes part 1 of pr 17480)
* Prevent field manipulations on null fields, the fields have nothing in
them so they should not be manipulated.
diffstat:
lib/libform/internals.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (37 lines):
diff -r 3366a1047ca4 -r 292370b37ca5 lib/libform/internals.c
--- a/lib/libform/internals.c Mon Jul 08 10:37:04 2002 +0000
+++ b/lib/libform/internals.c Mon Jul 08 10:43:37 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: internals.c,v 1.23 2002/05/20 15:00:11 blymn Exp $ */
+/* $NetBSD: internals.c,v 1.24 2002/07/08 10:43:37 blymn Exp $ */
/*-
* Copyright (c) 1998-1999 Brett Lymn
@@ -1246,11 +1246,18 @@
for (row = cur->row_count - cur->start_line; row < cur->rows; row++) {
wmove(form->scrwin, (int) (cur->form_row + row),
(int) cur->form_col);
+
+ if (form->cur_field == field)
+ wattrset(form->scrwin, cur->fore);
+ else
+ wattrset(form->scrwin, cur->back);
+
for (i = 0; i < cur->cols; i++) {
waddch(form->scrwin, cur->pad);
}
}
+ wattrset(form->scrwin, cur->back);
return;
}
@@ -1551,6 +1558,8 @@
int len;
cur = form->fields[form->cur_field];
+ if ((cur->buffers[0].string == NULL) || (cur->buffers[0].length == 0))
+ return E_REQUEST_DENIED;
#ifdef DEBUG
fprintf(dbg, "entry: request is REQ_%s\n", reqs[c - REQ_MIN_REQUEST]);
Home |
Main Index |
Thread Index |
Old Index