]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
revert a bit
authormlichvar <mlichvar>
Fri, 25 Aug 2006 12:15:24 +0000 (12:15 +0000)
committermlichvar <mlichvar>
Fri, 25 Aug 2006 12:15:24 +0000 (12:15 +0000)
30 files changed:
ChangeLog [deleted file]
Doxyfile [deleted file]
button.c
buttonbar.c
checkbox.c
checkboxtree.c
dialogboxes.c
dialogboxes.h
eawidth.c
entry.c
form.c
grid.c
label.c
listbox.c
newt.c
newt.h
newt_pr.h
scale.c
scrollbar.c
showchars.c
showkey.c
snackmodule.c
test.c
testgrid.c
tests/window.c [deleted file]
testtree.c
textbox.c
whiptail.c
whiptcl.c
windows.c

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644 (file)
index c33703d..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,4367 +0,0 @@
-2004-04-14 19:08  havill
-
-       Changed:
-               whiptail.c (1.13), "Exp", lines: +34 -2
-
-       added TEXTBOX to whiptail
-       
-2004-04-08 20:18  havill
-
-       Changed:
-               newt.spec (1.146), "Exp", lines: +6 -2
-
-       listbox braille fix
-       
-2004-04-08 18:48  havill
-
-       Changed:
-               newt.c (1.65), "Exp", lines: +7 -1
-
-       exit if newt is spinning while killed patch
-       
-2004-04-07 20:22  havill
-
-       Changed:
-               whiptail.c (1.12), "Exp", lines: +15 -7
-
-       added --outputfd to whiptail (#117469)
-       
-2004-04-07 20:09  havill
-
-       Changed:
-               newt.c (1.64), "Exp", lines: +52 -0
-               peanuts.py (1.7), "Exp", lines: +2 -0
-               snack.py (1.63), "Exp", lines: +590 -352
-
-       added docs (with corrections) from #117466
-       
-2004-04-07 19:53  havill
-
-       Changed:
-               dialogboxes.c (1.13), "Exp", lines: +5 -0
-               dialogboxes.h (1.5), "Exp", lines: +1 -0
-               whiptail.c (1.11), "Exp", lines: +3 -0
-
-       added --notags to whiptail (#117468)
-       
-2004-04-07 19:44  havill
-
-       Changed:
-               Makefile.in (1.24), "Exp", lines: +17 -15
-               button.c (1.20), "Exp", lines: +11 -0
-               checkbox.c (1.27), "Exp", lines: +10 -0
-               checkboxtree.c (1.22), "Exp", lines: +7 -5
-               configure.in (1.52), "Exp", lines: +2 -0
-               dialogboxes.c (1.12), "Exp", lines: +16 -5
-               newt.c (1.63), "Exp", lines: +11 -10
-               newt.h (1.78), "Exp", lines: +6 -5
-               whiptail.c (1.10), "Exp", lines: +3 -2
-               whiptcl.c (1.3), "Exp", lines: +5 -4
-
-       merged in and munged patches from #117464
-       
-2003-12-06 00:43  katzj
-
-       Changed:
-               newt.spec (1.145), "Exp", lines: +5 -3
-
-       rebuild against new slang
-       
-2003-11-17 21:48  nalin
-
-       Changed:
-               config.h.in (1.6), "Exp", lines: +4 -48
-
-       - revert changes made by autoreconf
-       
-2003-11-17 21:46  nalin
-
-       Changed:
-               checkbox.c (1.26), "Exp", lines: +1 -1
-               config.h.in (1.5), "Exp", lines: +48 -4
-               newt.spec (1.144), "Exp", lines: +3 -0
-
-       - fix newtCheckboxGetValue not working correctly if newtCheckbox was created
-         with a non-NULL result parameter (so cb->value is never changed, but we were
-         returning its value here anyway)
-       
-2003-11-06 06:56  katzj
-
-       Changed:
-               Makefile.in (1.23), "Exp", lines: +1 -1
-
-       better python version check
-       
-2003-11-06 06:45  katzj
-
-       Changed:
-               newt.spec (1.143), "Exp", lines: +1 -1
-
-       python 2.3 and I mean it\!
-       
-2003-11-06 06:41  katzj
-
-       Changed:
-               newt.spec (1.142), "Exp", lines: +4 -1
-
-       rebuild for python 2.3
-       
-2003-08-19 20:32  johnsonm
-
-       Changed:
-               newt.spec (1.141), "Exp", lines: +4 -1
-
-       rebuild for cambridge
-       
-2003-08-19 20:24  johnsonm
-
-       Changed:
-               configure.in (1.51), "Exp", lines: +0 -2
-
-       whose idea was it to override the version anyway?
-       
-2003-08-19 20:12  johnsonm
-
-       Changed:
-               newt.spec (1.140), "Exp", lines: +1 -1
-
-       follow policy
-       
-2003-08-19 20:12  johnsonm
-
-       Changed:
-               listbox.c (1.55), "Exp", lines: +2 -1
-               newt.spec (1.139), "Exp", lines: +4 -1
-
-       incorporated listbox cursor location patch (#69903)
-       
-2003-02-05 07:11  msw
-
-       Changed:
-               configure.in (1.50), "Exp", lines: +1 -1
-               entry.c (1.31), "Exp", lines: +1 -1
-               label.c (1.11), "Exp", lines: +1 -1
-               newt.c (1.62), "Exp", lines: +16 -8
-               newt.spec (1.138), "Exp", lines: +8 -2
-               snack.py (1.62), "Exp", lines: +17 -8
-               snackmodule.c (1.47), "Exp", lines: +13 -0
-
-       - fixed help line drawing in UTF-8 (#81718)
-       - calculate the width of text in entries using wstrlen
-       - always set component width to the new label width in newtLabelSetText
-       - fixed snack.CListbox to work properly with UTF-8 (#81718)
-       
-2003-02-04 11:09  laroche
-
-       Changed:
-               newt.spec (1.137), "Exp", lines: +6 -1
-
-       - add symlink to shared lib
-       
-2003-01-06 17:16  havill
-
-       Changed:
-               configure.in (1.49), "Exp", lines: +2 -2
-               newt.spec (1.136), "Exp", lines: +3 -3
-
-       bumped SONAME back to sane value
-       
-2003-01-04 19:15  havill
-
-       Changed:
-               Makefile.in (1.22), "Exp", lines: +7 -1
-               form.c (1.44), "Exp", lines: +1 -1
-               newt.c (1.61), "Exp", lines: +57 -32
-               newt.spec (1.135), "Exp", lines: +7 -4
-               showchars.c (1.3), "Exp", lines: +0 -2
-               showkey.c (1.4), "Exp", lines: +1 -1
-               test.c (1.33), "Exp", lines: +2 -2
-               tutorial.sgml (1.6), "Exp", lines: +2 -2
-
-       - cleaned up const qualifiers in interfaces
-       - added Ctrl-L screen refresh
-       - fixed segfault in test.c when listbox items are selected
-       - accessibility: made newt useable with monochrome terms (#60931)
-       - leave the symbols in the libs (#60400)
-       - fixed grammar in tutorial (#63496)
-       - removed obsolete URL reference in tutorial.sgml
-       - error checking (curcomp exists) for formEvent, newtFormGetCurrent,
-         removed fifty button limit (#59027)
-       - allowed the test progs showchars and showkey to be build via the makefile
-       
-2003-01-03 21:42  havill
-
-       Changed:
-               newt.c (1.60), "Exp", lines: +6 -6
-
-       o changed version to update copyrign years and make it scannable with
-         ident command
-       
-2003-01-03 20:54  havill
-
-       Changed:
-               checkboxtree.c (1.21), "Exp", lines: +1 -1
-               configure.in (1.48), "Exp", lines: +2 -2
-               dialogboxes.c (1.11), "Exp", lines: +4 -4
-               dialogboxes.h (1.4), "Exp", lines: +3 -3
-               entry.c (1.30), "Exp", lines: +2 -2
-               form.c (1.43), "Exp", lines: +2 -1
-               newt.h (1.77), "Exp", lines: +2 -2
-               newt.spec (1.134), "Exp", lines: +9 -2
-               snackmodule.c (1.46), "Exp", lines: +2 -1
-               test.c (1.32), "Exp", lines: +2 -2
-               testgrid.c (1.12), "Exp", lines: +1 -1
-               testtree.c (1.6), "Exp", lines: +1 -1
-               textbox.c (1.32), "Exp", lines: +1 -1
-               whiptail.c (1.9), "Exp", lines: +2 -2
-               windows.c (1.19), "Exp", lines: +23 -22
-
-       - cleaned up const qualifiers in interfaces
-       - leave the symbols in the libs (#60400)
-       - fixed grammar in tutorial (#63496)
-       - removed fifty button limit (#59027)
-       - error checking (curcomp exists) for formEvent, newtFormGetCurrent (#59027)
-       
-2003-01-03 19:33  havill
-
-       Changed:
-               Makefile.in (1.21), "Exp", lines: +4 -4
-
-       don't strip the libs
-       
-2003-01-03 19:15  havill
-
-       Changed:
-               tutorial.sgml (1.5), "Exp", lines: +14 -14
-
-       fixed grammar in tutorial.sgml
-       
-2002-12-18 04:18  msw
-
-       Changed:
-               newt.spec (1.133), "Exp", lines: +1 -1
-
-       bump version
-       
-2002-12-18 04:17  msw
-
-       Changed:
-               configure.in (1.47), "Exp", lines: +1 -1
-               newt.spec (1.132), "Exp", lines: +7 -0
-
-       * Tue Dec 17 2002 Matt Wilson <msw@redhat.com> 0.51.2-1
-       - fixed wstrlen() it was calculating wcwidth(first wide char in
-         string) * strlen(str) instead of the actual width of the whole
-         string
-       - fixed newtRedrawHelpLine() to copy all the bytes from a multibyte
-         string
-       
-2002-12-18 04:13  msw
-
-       Changed:
-               newt.c (1.59), "Exp", lines: +1 -0
-
-       fix lots of newt utf-8 display errors
-       
-2002-12-18 03:48  msw
-
-       Changed:
-               newt.c (1.58), "Exp", lines: +1 -1
-
-       when updating the help text, be sure to get all of the bytes from multibyte strings
-       
-2002-12-13 17:45  sopwith
-
-       Changed:
-               Makefile.in (1.20), "Exp", lines: +2 -1
-
-       0.51.1
-       
-2002-12-13 17:40  sopwith
-
-       Changed:
-               configure.in (1.46), "Exp", lines: +1 -1
-               newt.spec (1.131), "Exp", lines: +17 -14
-
-
-
-       0.51.1
-       
-2002-08-15 20:18  notting
-
-       Changed:
-               Makefile.in (1.19), "Exp", lines: +2 -2
-
-       add _GNU_SOURCE (for some of the wc stuff)
-       
-2002-08-15 20:16  notting
-
-       Changed:
-               configure.in (1.45), "Exp", lines: +2 -2
-               newt.spec (1.130), "Exp", lines: +6 -1
-
-       bump version
-       
-2002-08-15 20:13  notting
-
-       Changed:
-               button.c (1.19), "Exp", lines: +3 -2
-               checkbox.c (1.25), "Exp", lines: +1 -1
-               checkboxtree.c (1.20), "Exp", lines: +8 -6
-               configure.in (1.44), "Exp", lines: +1 -1
-               dialogboxes.c (1.10), "Exp", lines: +7 -6
-               entry.c (1.29), "Exp", lines: +2 -2
-               grid.c (1.15), "Exp", lines: +5 -4
-               label.c (1.10), "Exp", lines: +2 -2
-               listbox.c (1.54), "Exp", lines: +7 -7
-               newt.c (1.57), "Exp", lines: +25 -1
-               newt_pr.h (1.22), "Exp", lines: +2 -0
-               textbox.c (1.31), "Exp", lines: +62 -45
-
-       UTF-8 changes
-       - changes for computing widths of various elements
-       - rewrite of wrap code
-         - no longer uses specific kanji handling; uses glibc mb/wc routines
-       
-2002-07-17 02:55  notting
-
-       Changed:
-               newt.spec (1.129), "Exp", lines: +1 -1
-
-       fix URL (#68980)
-       
-2002-07-01 18:34  msf
-
-       Changed:
-               newt.spec (1.128), "Exp", lines: +4 -1
-               snack.py (1.61), "Exp", lines: +1 -1
-
-       Changed a test to check for 'None' the correct way
-       
-2002-06-27 02:33  notting
-
-       Changed:
-               configure.in (1.43), "Exp", lines: +1 -1
-
-       bump rev
-       
-2002-06-27 02:30  notting
-
-       Changed:
-               newt.spec (1.127), "Exp", lines: +4 -1
-
-       bump rev
-       
-2002-06-27 02:17  notting
-
-       Changed:
-               scrollbar.c (1.11), "Exp", lines: +5 -5
-
-       thou shalt not hardcode linedrawing characters
-       
-2002-06-25 04:40  notting
-
-       Changed:
-               configure.in (1.42), "Exp", lines: +1 -1
-               newt.c (1.56), "Exp", lines: +2 -2
-               newt.spec (1.126), "Exp", lines: +4 -1
-
-       bump to 0.37; make it agree with utf-8 slang (still needs wrapping work)
-       
-2002-06-11 13:30  jorton
-
-       Changed:
-               configure.in (1.41), "Exp", lines: +1 -1
-               newt.spec (1.125), "Exp", lines: +6 -1
-
-       Bump version to 0.30.36.
-       
-2002-06-11 13:28  jorton
-
-       Changed:
-               newt.c (1.55), "Exp", lines: +1 -0
-               newt.h (1.76), "Exp", lines: +1 -0
-
-       Add NEWT_KEY_ESCAPE, to add support for the ESC key.
-       
-2002-06-11 13:19  jorton
-
-       Changed:
-               newt.c (1.54), "Exp", lines: +6 -0
-
-       Conditionally include alloca.h.
-       
-2002-06-11 13:15  jorton
-
-       Changed:
-               config.h.in (1.4), "Exp", lines: +3 -0
-               configure.in (1.40), "Exp", lines: +1 -1
-               form.c (1.42), "Exp", lines: +4 -1
-
-       Portability fixes: conditionally include sys/select.h, include sys/types.h
-       first.
-       
-2002-06-11 13:11  jorton
-
-       Changed:
-               entry.c (1.28), "Exp", lines: +6 -0
-               grid.c (1.14), "Exp", lines: +4 -0
-               snackmodule.c (1.45), "Exp", lines: +7 -0
-
-       Portability fix: conditionally include alloca.h if using alloca().
-       
-2002-06-11 12:54  jorton
-
-       Changed:
-               config.h.in (1.3), "Exp", lines: +5 -0
-               configure.in (1.39), "Exp", lines: +3 -1
-
-       * give description for AC_DEFINE(USE_GPM)
-       * check for presence of alloca.h
-       
-2002-06-11 12:52  jorton
-
-       Changed:
-               newt.c (1.53), "Exp", lines: +2 -2
-               scale.c (1.9), "Exp", lines: +24 -11
-
-       Add a numeric percentage count to the scale widget.
-
-       Patch by: Mark Cox <mjc@redhat.com>
-
-       * scale.c: Add 'percentage' field to struct scale.
-       (newtScale): Initialize percentage field.
-       (newtScaleSet): Update percentage field.
-       (scaleDraw): Draw in the percentage count.
-
-       * newt.c: Use "white" as the default foreground colour for the
-       scale widget.
-       
-2002-06-11 12:43  jorton
-
-       Changed:
-               test.c (1.31), "Exp", lines: +1 -1
-
-       Fix main loop to not exit when the "Update" button is selected.
-       
-2002-06-11 12:35  jorton
-
-       Changed:
-               listbox.c (1.53), "Exp", lines: +6 -0
-               newt.h (1.75), "Exp", lines: +2 -0
-
-       Add newtListboxItemCount() to return number of items in a listbox.
-       
-2002-03-18 17:31  notting
-
-       Changed:
-               Makefile.in (1.18), "Exp", lines: +16 -11
-               newt.spec (1.124), "Exp", lines: +5 -3
-
-       build for whatever versions of python are installed; also, move to
-       site-packages
-       
-2001-12-28 19:29  sopwith
-
-       Changed:
-               Makefile.in (1.17), "Exp", lines: +6 -3
-
-
-
-       As part of #47655 fixes, don't build whiptcl.so by default.
-       
-2001-12-28 18:59  sopwith
-
-       Changed:
-               windows.c (1.18), "Exp", lines: +2 -2
-
-
-
-       The patch from bug #43370
-       
-2001-10-30 01:18  ewt
-
-       Changed:
-               textbox.c (1.30), "Exp", lines: +2 -4
-
-       may be alright... strncat in dietlibc borked (sorry for the slander msw)
-       
-2001-10-29 23:09  ewt
-
-       Changed:
-               textbox.c (1.29), "Exp", lines: +4 -2
-
-       msw! didn't allocate enough memory
-       
-2001-10-29 23:09  ewt
-
-       Changed:
-               entry.c (1.27), "Exp", lines: +1 -1
-
-       how did this build?
-       
-2001-10-08 15:14  notting
-
-       Changed:
-               entry.c (1.26), "Exp", lines: +1 -1
-
-       fix alloca/strlen bug
-       
-2001-10-04 17:35  sopwith
-
-       Changed:
-               snackmodule.c (1.44), "Exp", lines: +3 -3
-
-
-
-       Fix bug #54353 (remove extraneous/erroneous semicolons).
-       
-2001-09-21 00:38  sopwith
-
-       Changed:
-               configure.in (1.38), "Exp", lines: +2 -2
-               listbox.c (1.52), "Exp", lines: +6 -2
-               newt.h (1.74), "Exp", lines: +1 -0
-               snack.py (1.60), "Exp", lines: +2 -2
-               snackmodule.c (1.43), "Exp", lines: +6 -4
-               test.c (1.30), "Exp", lines: +1 -1
-
-
-
-       Add showCursor flag for listboxes.
-       
-2001-09-14 22:08  teg
-
-       Changed:
-               Makefile.in (1.16), "Exp", lines: +3 -3
-               configure.in (1.37), "Exp", lines: +1 -1
-               newt.spec (1.123), "Exp", lines: +8 -27
-
-       0.50.34, remove traces of python2 package and build the main package for python 2.2
-       
-2001-08-29 23:21  teg
-
-       Changed:
-               newt.spec (1.122), "Exp", lines: +7 -3
-               configure.in (1.36), "Exp", lines: +1 -1
-
-       0.50.33
-       
-2001-08-22 20:19  crutcher
-
-       Changed:
-               configure.in (1.35), "Exp", lines: +1 -1
-
-       fixed configure version
-       
-2001-08-22 20:17  crutcher
-
-       Changed:
-               newt.spec (1.121), "Exp", lines: +4 -1
-               snack.py (1.59), "Exp", lines: +1 -1
-
-       reordered the width attrib of the snack CheckboxTree.__init__ call to avoid breaking old code.
-       
-2001-08-08 21:13  crutcher
-
-       Changed:
-               configure.in (1.34), "Exp", lines: +1 -1
-               newt.spec (1.120), "Exp", lines: +7 -3
-               snack.py (1.58), "Exp", lines: +1 -1
-
-       anchorRight internal Listboxes in CListboxes
-       
-2001-07-05 22:42  crutcher
-
-       Changed:
-               checkboxtree.c (1.19), "Exp", lines: +1 -0
-               configure.in (1.33), "Exp", lines: +1 -1
-               newt.spec (1.119), "Exp", lines: +4 -1
-
-       padded hidden checkbokes
-       
-2001-07-05 19:53  crutcher
-
-       Changed:
-               checkboxtree.c (1.18), "Exp", lines: +32 -7
-               configure.in (1.32), "Exp", lines: +1 -1
-               newt.h (1.73), "Exp", lines: +1 -0
-               newt.spec (1.118), "Exp", lines: +4 -1
-               snack.py (1.57), "Exp", lines: +3 -1
-               snackmodule.c (1.42), "Exp", lines: +14 -0
-
-       added width to CheckboxTree
-       
-2001-07-05 16:30  crutcher
-
-       Changed:
-               checkboxtree.c (1.17), "Exp", lines: +19 -8
-               newt.h (1.72), "Exp", lines: +4 -1
-               newt.spec (1.117), "Exp", lines: +4 -1
-               snack.py (1.56), "Exp", lines: +2 -2
-               snackmodule.c (1.41), "Exp", lines: +15 -7
-
-       added 'hide_checkbox' and 'unselectable' options to CheckboxTree
-       
-2001-06-25 15:50  katzj
-
-       Changed:
-               snack.py (1.55), "Exp", lines: +2 -2
-
-       fix widget __init__
-       
-2001-06-25 15:37  katzj
-
-       Changed:
-               configure.in (1.31), "Exp", lines: +1 -1
-               newt.spec (1.116), "Exp", lines: +5 -1
-               snack.py (1.54), "Exp", lines: +2 -2
-
-
-
-       0.50.27
-
-       fix bug in replace method of clistbox
-       CListBox -> CListbox for API consistency
-       
-2001-06-25 13:06  ewt
-
-       Changed:
-               snack.py (1.53), "Exp", lines: +3 -0
-
-       pychecker nit
-       
-2001-06-19 22:29  notting
-
-       Changed:
-               newt.spec (1.115), "Exp", lines: +1 -1
-
-       fix weird buildroot
-       
-2001-06-08 21:48  katzj
-
-       Changed:
-               configure.in (1.30), "Exp", lines: +1 -1
-
-
-
-       bump version
-       
-2001-06-08 21:48  katzj
-
-       Changed:
-               newt.spec (1.114), "Exp", lines: +4 -1
-               snack.py (1.52), "Exp", lines: +2 -2
-
-
-
-       - few bugfixes to the CListBox
-       
-2001-06-08 14:18  katzj
-
-       Changed:
-               configure.in (1.29), "Exp", lines: +1 -1
-
-
-
-       bump version to 0.50.25
-       
-2001-06-08 14:15  katzj
-
-       Changed:
-               newt.spec (1.113), "Exp", lines: +5 -1
-               snack.py (1.51), "Exp", lines: +16 -6
-               snackmodule.c (1.40), "Exp", lines: +12 -0
-
-
-
-       - added python binding for newtListboxClear() for Listbox and CListBox
-       - let ButtonBars optionally be made of CompactButtons
-       
-2001-06-06 22:19  crutcher
-
-       Changed:
-               newt.spec (1.112), "Exp", lines: +4 -1
-               snack.py (1.50), "Exp", lines: +94 -0
-
-       added CListBox convenience class to python
-       
-2001-05-15 18:49  msf
-
-       Changed:
-               configure.in (1.28), "Exp", lines: +1 -1
-               newt.spec (1.110), "Exp", lines: +2 -2
-               newt.spec (1.111), "Exp", lines: +3 -0
-
-       bump version to 0.50.23
-       
-2001-05-15 18:44  msf
-
-       Changed:
-               snack.py (1.49), "Exp", lines: +5 -0
-               snackmodule.c (1.39), "Exp", lines: +14 -0
-
-       added compact buttons to python binding
-       
-2001-04-24 21:31  ewt
-
-       Changed:
-               listbox.c (1.51), "Exp", lines: +1 -1
-
-       bug fix for multiple selections (Rodrigo Luiz Beber <beber@conectiva.com.br>)
-       
-2001-04-03 21:53  sopwith
-
-       Changed:
-               form.c (1.41), "Exp", lines: +10 -3
-
-       If someone calls newtFormWatchFd multiple times with the same fd, overwrite the existing fdInfo record instead of appending a new one.
-       
-2001-04-03 21:40  sopwith
-
-       Changed:
-               form.c (1.40), "Exp", lines: +3 -10
-
-       revert until sure of suitability
-       
-2001-04-03 21:13  sopwith
-
-       Changed:
-               form.c (1.39), "Exp", lines: +10 -3
-
-
-
-       If someone calls newtFormWatchFd multiple times with the same fd, overwrite the existing fdInfo record instead of appending a new one.
-       
-2001-04-03 20:50  msw
-
-       Changed:
-               newt.spec (1.109), "Exp", lines: +6 -1
-
-       - change from using SLsmg_touch_screen to SLsmg_touch_lines to prevent
-         excessive flashing due to screen clears when using touch_screen (more
-         Japanese handling)
-       
-2001-04-03 19:33  msw
-
-       Changed:
-               newt.c (1.52), "Exp", lines: +1 -1
-
-       don't flicker, SLsmg_touch_screen does a clear
-       
-2001-04-03 00:23  msw
-
-       Changed:
-               textbox.c (1.28), "Exp", lines: +3 -2
-
-       fix flashing
-       
-2001-04-03 00:00  msw
-
-       Changed:
-               newt.spec (1.108), "Exp", lines: +1 -1
-
-       bug number
-       
-2001-04-02 23:57  msw
-
-       Changed:
-               checkboxtree.c (1.16), "Exp", lines: +3 -0
-               configure.in (1.27), "Exp", lines: +1 -1
-               form.c (1.38), "Exp", lines: +1 -0
-               listbox.c (1.50), "Exp", lines: +2 -0
-               newt.c (1.51), "Exp", lines: +16 -1
-               newt.spec (1.107), "Exp", lines: +12 -1
-               newt_pr.h (1.21), "Exp", lines: +1 -0
-               textbox.c (1.27), "Exp", lines: +3 -1
-
-       - redraw the screen in certain situations when LANG=ja_JP.eucJP to
-         prevent corrupting kanji characters
-       
-2001-04-02 15:59  sopwith
-
-       Changed:
-               form.c (1.37), "Exp", lines: +18 -2
-               newt.h (1.71), "Exp", lines: +2 -0
-               snack.py (1.48), "Exp", lines: +9 -6
-               snackmodule.c (1.38), "Exp", lines: +35 -11
-
-
-
-       . Allow python scripts to watch file handles
-       . Fix 64-bit warnings in snackmodule
-       . Misc snack.py cleanups
-       . Add NEWT_FD_EXCEPT to allow watching for fd exceptions
-       . In newtExitStruct, return the first file descriptor that an event occurred on for NEWT_EXIT_FDREADY
-       
-2001-03-30 21:45  msw
-
-       Changed:
-               configure.in (1.26), "Exp", lines: +1 -1
-               newt.c (1.50), "Exp", lines: +21 -5
-               newt.spec (1.106), "Exp", lines: +9 -2
-
-       - don't blow the stack if we push a help line that is longer than the
-         curret number of columns
-       - clip window to screen bounds so that if we get a window that is
-         larger than the screen we can still redraw the windows behind it
-         when we pop
-       
-2001-02-26 23:45  msw
-
-       Changed:
-               newt.spec (1.105), "Exp", lines: +1 -1
-
-       buildrequires python-devel
-       
-2001-02-11 15:35  than
-
-       Changed:
-               newt.spec (1.104), "Exp", lines: +6 -2
-
-       disable building newt-python2 sub package again
-       
-2001-02-01 20:49  ewt
-
-       Changed:
-               newt.spec (1.103), "Exp", lines: +2 -1
-
-       don't requier python2
-       
-2001-02-01 20:49  ewt
-
-       Changed:
-               configure.in (1.25), "Exp", lines: +4 -1
-
-       grab the version from newt.spec
-       
-2001-02-01 20:46  ewt
-
-       Changed:
-               CHANGES (1.15), "Exp", lines: +5 -1
-               checkboxtree.c (1.15), "Exp", lines: +40 -2
-               newt.h (1.70), "Exp", lines: +1 -0
-               newt.spec (1.102), "Exp", lines: +5 -1
-               snack.py (1.47), "Exp", lines: +3 -0
-               snackmodule.c (1.37), "Exp", lines: +14 -0
-               testtree.c (1.5), "Exp", lines: +6 -3
-
-       added newtCheckboxTreeSetCurrent() and snack binding
-       
-2001-01-23 06:31  msw
-
-       Changed:
-               newt.spec (1.100), "Exp", lines: +3 -1
-               newt.spec (1.101), "Exp", lines: +3 -0
-
-       rev
-       
-2001-01-23 06:27  msw
-
-       Deleted:
-               eawidth.h (1.2)
-               test-j.c (1.2)
-               testgrid-j.c (1.2)
-               testtree-j.c (1.2)
-       Changed:
-               CHANGES (1.14), "Exp", lines: +0 -6
-               Makefile.in (1.15), "Exp", lines: +3 -13
-               button.c (1.18), "Exp", lines: +2 -5
-               checkbox.c (1.24), "Exp", lines: +1 -3
-               checkboxtree.c (1.14), "Exp", lines: +6 -10
-               configure.in (1.24), "Exp", lines: +1 -1
-               dialogboxes.c (1.9), "Exp", lines: +6 -9
-               eawidth.c (1.2), "Exp", lines: +5 -1
-               entry.c (1.25), "Exp", lines: +2 -5
-               form.c (1.36), "Exp", lines: +0 -81
-               grid.c (1.13), "Exp", lines: +4 -6
-               label.c (1.9), "Exp", lines: +2 -4
-               listbox.c (1.49), "Exp", lines: +9 -15
-               newt.c (1.49), "Exp", lines: +2 -4
-               newt.spec (1.99), "Exp", lines: +7 -10
-               newt_pr.h (1.20), "Exp", lines: +0 -1
-               scale.c (1.8), "Exp", lines: +0 -1
-               scrollbar.c (1.10), "Exp", lines: +0 -1
-               textbox.c (1.26), "Exp", lines: +62 -77
-               windows.c (1.17), "Exp", lines: +0 -8
-
-       revert for now
-       
-2001-01-22 20:30  msw
-
-       Changed:
-               configure.in (1.23), "Exp", lines: +1 -1
-               newt.spec (1.97), "Exp", lines: +1 -1
-               CHANGES (1.13), "Exp", lines: +3 -1
-               newt.spec (1.98), "Exp", lines: +1 -1
-
-       rev
-       
-2001-01-22 20:29  msw
-
-       Changed:
-               CHANGES (1.12), "Exp", lines: +2 -1
-               newt.c (1.48), "Exp", lines: +0 -2
-               textbox.c (1.25), "Exp", lines: +0 -1
-
-       clean up asian patches
-       
-2001-01-22 20:17  tagoh
-
-       Added:
-               eawidth.c (1.1)
-               eawidth.h (1.1)
-               test-j.c (1.1)
-               testgrid-j.c (1.1)
-               testtree-j.c (1.1)
-       Changed:
-               Makefile.in (1.14), "Exp", lines: +13 -3
-               button.c (1.17), "Exp", lines: +5 -2
-               checkbox.c (1.23), "Exp", lines: +3 -1
-               checkboxtree.c (1.13), "Exp", lines: +10 -6
-               dialogboxes.c (1.8), "Exp", lines: +9 -6
-               entry.c (1.24), "Exp", lines: +5 -2
-               form.c (1.35), "Exp", lines: +81 -0
-               grid.c (1.12), "Exp", lines: +6 -4
-               label.c (1.8), "Exp", lines: +4 -2
-               listbox.c (1.48), "Exp", lines: +15 -9
-               newt.c (1.47), "Exp", lines: +4 -0
-               newt_pr.h (1.19), "Exp", lines: +1 -0
-               scale.c (1.7), "Exp", lines: +1 -0
-               scrollbar.c (1.9), "Exp", lines: +1 -0
-               textbox.c (1.24), "Exp", lines: +78 -62
-               windows.c (1.16), "Exp", lines: +8 -0
-
-       * Added i18n code.
-       
-2001-01-22 17:36  than
-
-       Changed:
-               CHANGES (1.11), "Exp", lines: +3 -0
-               newt.spec (1.96), "Exp", lines: +10 -7
-
-       * don't build new-python2
-       
-2000-12-15 21:51  teg
-
-       Changed:
-               newt.spec (1.95), "Exp", lines: +1 -1
-
-       bump version
-       
-2000-12-15 21:47  teg
-
-       Changed:
-               configure.in (1.22), "Exp", lines: +1 -1
-               newt.spec (1.94), "Exp", lines: +28 -5
-
-       Add python2 subpackage. Fixes for python2
-       
-2000-12-15 21:33  teg
-
-       Changed:
-               snack.py (1.46), "Exp", lines: +2 -2
-
-       Do append((a,b)) instead of append(a,b) - the tuple is no longer implicitly created in python 2.
-       
-2000-09-12 14:13  laroche
-
-       Changed:
-               newt.spec (1.93), "Exp", lines: +4 -1
-
-       nix
-       
-2000-09-08 23:03  teg
-
-       Changed:
-               newt.spec (1.92), "Exp", lines: +4 -1
-
-       Include popcorn and peanuts
-       
-2000-09-08 19:30  teg
-
-       Changed:
-               newt.spec (1.91), "Exp", lines: +20 -15
-
-       0.50.18
-       
-2000-09-08 19:25  teg
-
-       Changed:
-               newt.spec (1.90), "Exp", lines: +2 -1
-
-       0.50.18
-       
-2000-09-08 19:18  teg
-
-       Changed:
-               configure.in (1.21), "Exp", lines: +1 -1
-
-       0.50.18
-       
-2000-09-08 19:14  teg
-
-       Changed:
-               newt.spec (1.89), "Exp", lines: +8 -2
-
-       Byte-compile snack.py
-       
-2000-09-08 02:16  ewt
-
-       Changed:
-               newt.c (1.46), "Exp", lines: +2 -0
-               windows.c (1.15), "Exp", lines: +0 -1
-
-       removed newtResize, which doesn't work anyway
-       
-2000-08-22 17:25  ewt
-
-       Changed:
-               newt.spec (1.88), "Exp", lines: +5 -2
-               configure.in (1.20), "Exp", lines: +1 -1
-
-       0.50.17
-       
-2000-08-22 17:24  ewt
-
-       Changed:
-               newt.c (1.45), "Exp", lines: +7 -2
-
-       fixed cursor handling on suspend
-       
-2000-08-19 15:30  pbrown
-
-       Changed:
-               newt.spec (1.87), "Exp", lines: +6 -2
-
-       fix.
-       
-2000-08-16 17:20  ewt
-
-       Changed:
-               configure.in (1.19), "Exp", lines: +1 -1
-
-       fixed version
-       
-2000-08-16 17:19  ewt
-
-       Changed:
-               newt.spec (1.86), "Exp", lines: +6 -2
-
-       verison 0.50.16
-       
-2000-08-03 23:17  msw
-
-       Changed:
-               newt.spec (1.85), "Exp", lines: +4 -1
-               configure.in (1.18), "Exp", lines: +1 -1
-
-       rev
-       
-2000-08-03 23:16  msw
-
-       Changed:
-               snack.py (1.45), "Exp", lines: +3 -0
-               snackmodule.c (1.36), "Exp", lines: +12 -0
-
-       add setvalue method for checkboxes
-       
-2000-07-05 20:45  msf
-
-       Changed:
-               configure.in (1.17), "Exp", lines: +1 -1
-               entry.c (1.23), "Exp", lines: +11 -0
-               newt.h (1.69), "Exp", lines: +1 -1
-               snack.py (1.44), "Exp", lines: +2 -2
-               snackmodule.c (1.35), "Exp", lines: +4 -3
-               test.c (1.29), "Exp", lines: +2 -1
-               newt.spec (1.83), "Exp", lines: +1 -1
-               newt.spec (1.84), "Exp", lines: +3 -0
-
-       bump version - added NEWT_FLAG_PASSWORD flag to put asterix in entry when typing
-       
-2000-06-16 04:05  msw
-
-       Changed:
-               configure.in (1.16), "Exp", lines: +1 -1
-
-       updated
-       
-2000-06-16 04:04  msw
-
-       Changed:
-               newt.spec (1.82), "Exp", lines: +4 -1
-
-       updated spec
-       
-2000-05-26 20:51  msf
-
-       Changed:
-               newt.spec (1.81), "Exp", lines: +1 -1
-
-       new version
-       
-2000-05-26 19:25  ewt
-
-       Changed:
-               configure.in (1.15), "Exp", lines: +1 -1
-
-       0.50.12
-       
-2000-05-26 19:04  nalin
-
-       Changed:
-               tutorial.sgml (1.4), "Exp", lines: +51 -51
-
-       fix spelling problems in the tutorial
-       
-2000-05-16 16:54  ewt
-
-       Changed:
-               entry.c (1.22), "Exp", lines: +2 -2
-               newt.c (1.44), "Exp", lines: +10 -2
-               newt.h (1.68), "Exp", lines: +2 -0
-               popcorn.py (1.14), "Exp", lines: +0 -2
-
-       added cursor on/off stuff
-       
-2000-05-16 16:53  ewt
-
-       Changed:
-               CHANGES (1.10), "Exp", lines: +2 -1
-
-       [no log message]
-       
-2000-05-04 22:27  msf
-
-       Changed:
-               snack.py (1.43), "Exp", lines: +1 -1
-
-       Add space bar as a hotkey
-       
-2000-05-02 15:19  ewt
-
-       Changed:
-               newt.spec (1.80), "Exp", lines: +3 -1
-
-       turned off gpm
-       
-2000-05-02 13:27  ewt
-
-       Changed:
-               popcorn.py (1.13), "Exp", lines: +4 -2
-               snack.py (1.42), "Exp", lines: +16 -9
-
-       added help support and testing
-       
-2000-04-28 15:35  ewt
-
-       Changed:
-               CHANGES (1.9), "Exp", lines: +6 -0
-               configure.in (1.14), "Exp", lines: +1 -1
-               form.c (1.34), "Exp", lines: +16 -1
-               newt.h (1.67), "Exp", lines: +2 -1
-               newt.spec (1.79), "Exp", lines: +1 -1
-               popcorn.py (1.12), "Exp", lines: +6 -3
-               snack.py (1.41), "Exp", lines: +11 -2
-               snackmodule.c (1.34), "Exp", lines: +39 -3
-               test.c (1.28), "Exp", lines: +6 -1
-
-       1) added help support
-       2) version 0.50.10
-       
-2000-04-28 14:27  jakub
-
-       Changed:
-               newt.spec (1.78), "Exp", lines: +5 -2
-
-       Release 0.50.9
-       
-2000-03-20 09:36  jakub
-
-       Changed:
-               CHANGES (1.8), "Exp", lines: +9 -0
-               checkboxtree.c (1.12), "Exp", lines: +158 -25
-               configure.in (1.13), "Exp", lines: +1 -1
-               newt.h (1.66), "Exp", lines: +12 -2
-               snack.py (1.40), "Exp", lines: +8 -0
-               snackmodule.c (1.33), "Exp", lines: +62 -0
-
-
-       added newtCheckboxTreeSetEntry(), newtCheckboxTreeGetEntryValue()
-         and newtCheckboxTreeSetEntryValue()
-       checkboxtree callbacks
-       if collapsing branches at the end of the list and list length
-         is larger then height, move first visible entry accordingly
-       allow selection of all checkboxes on current branch
-       snack bindings for the above
-       
-2000-03-13 06:50  msw
-
-       Changed:
-               newt.spec (1.77), "Exp", lines: +4 -1
-
-       spec up
-       
-2000-03-13 06:50  msw
-
-       Changed:
-               textbox.c (1.23), "Exp", lines: +29 -29
-
-       we can't use mblen at the moment.  reverting to old euc check
-       
-2000-03-09 14:51  ewt
-
-       Changed:
-               Makefile.in (1.13), "Exp", lines: +2 -2
-
-       build whiptcl and snack -fPIC
-       
-2000-03-09 14:51  ewt
-
-       Changed:
-               dialogboxes.c (1.7), "Exp", lines: +2 -2
-
-       added static modifier
-       
-2000-02-26 03:09  notting
-
-       Changed:
-               configure.in (1.12), "Exp", lines: +1 -1
-
-       bump version to match specfile
-       
-2000-02-26 02:42  notting
-
-       Changed:
-               newt.spec (1.76), "Exp", lines: +5 -2
-               textbox.c (1.22), "Exp", lines: +1 -1
-
-       mblen is returning 0 on sparc. Dunno why, but this at least lets the installer run...
-       
-2000-02-24 03:01  pbrown
-
-       Changed:
-               newt.c (1.43), "Exp", lines: +4 -4
-               newt.spec (1.75), "Exp", lines: +5 -2
-
-       fixed critical bug in f1-f4 handling in xterms.
-       
-2000-02-16 11:34  laroche
-
-       Changed:
-               dialogboxes.c (1.6), "Exp", lines: +19 -15
-               dialogboxes.h (1.3), "Exp", lines: +5 -5
-               whiptail.c (1.8), "Exp", lines: +4 -4
-               whiptcl.c (1.2), "Exp", lines: +3 -3
-
-       Nix
-       
-2000-02-09 07:00  msw
-
-       Changed:
-               newt.spec (1.74), "Exp", lines: +4 -1
-               snack.py (1.39), "Exp", lines: +2 -1
-
-       fix snack
-       
-2000-02-05 20:24  notting
-
-       Changed:
-               whiptail.c (1.7), "Exp", lines: +1 -1
-
-       typo
-       
-2000-02-03 18:58  ewt
-
-       Changed:
-               configure.in (1.11), "Exp", lines: +1 -1
-               newt.spec (1.72), "Exp", lines: +1 -1
-               newt.spec (1.73), "Exp", lines: +3 -0
-
-       version 0.50.7
-       
-2000-02-03 18:57  ewt
-
-       Changed:
-               Makefile.in (1.12), "Exp", lines: +3 -3
-
-       strip shared libs
-       
-2000-02-01 02:23  msw
-
-       Changed:
-               configure.in (1.10), "Exp", lines: +1 -1
-
-       where'd that come from?
-       
-2000-02-01 02:21  msw
-
-       Changed:
-               configure.in (1.9), "Exp", lines: +2 -2
-
-       version number
-       
-2000-02-01 02:19  msw
-
-       Changed:
-               newt.spec (1.71), "Exp", lines: +5 -1
-               textbox.c (1.21), "Exp", lines: +29 -29
-
-       patch for mb char wrap
-       
-2000-01-24 15:44  ewt
-
-       Changed:
-               newt.spec (1.70), "Exp", lines: +1 -1
-
-       version 0.50.5
-       
-2000-01-21 18:54  ewt
-
-       Changed:
-               CHANGES (1.7), "Exp", lines: +8 -0
-               Makefile.in (1.11), "Exp", lines: +6 -1
-               checkboxtree.c (1.11), "Exp", lines: +11 -4
-               configure.in (1.8), "Exp", lines: +1 -1
-               newt.h (1.65), "Exp", lines: +3 -2
-               newt.spec (1.69), "Exp", lines: +3 -0
-               popcorn.py (1.11), "Exp", lines: +3 -1
-               snack.py (1.38), "Exp", lines: +16 -9
-               snackmodule.c (1.32), "Exp", lines: +20 -2
-
-       - added newtCheckboxTreeGetCurrent() and snack bindings
-       - updated snack stuff to allow manual placement of grid wrapped windows
-       
-2000-01-20 18:48  pbrown
-
-       Changed:
-               checkbox.c (1.22), "Exp", lines: +2 -2
-
-       whoops.
-       
-2000-01-20 18:41  pbrown
-
-       Changed:
-               configure.in (1.7), "Exp", lines: +1 -1
-
-       bump version.
-       
-2000-01-20 18:40  pbrown
-
-       Changed:
-               checkbox.c (1.21), "Exp", lines: +2 -0
-               newt.spec (1.68), "Exp", lines: +4 -1
-
-       fix segfault in newtRadioGetCurrent.
-       
-2000-01-17 21:42  ewt
-
-       Changed:
-               newt.spec (1.67), "Exp", lines: +2 -2
-
-       0.50.3
-       
-2000-01-17 21:42  ewt
-
-       Changed:
-               newt.spec (1.66), "Exp", lines: +3 -0
-
-       [no log message]
-       
-2000-01-17 21:36  ewt
-
-       Changed:
-               configure.in (1.6), "Exp", lines: +1 -1
-
-       version 0.50.3
-       
-2000-01-13 23:42  ewt
-
-       Changed:
-               CHANGES (1.6), "Exp", lines: +6 -0
-
-       [no log message]
-       
-2000-01-13 23:41  ewt
-
-       Changed:
-               checkboxtree.c (1.10), "Exp", lines: +4 -2
-
-       put the cursor in the proper place after drawing
-       
-2000-01-12 14:58  ewt
-
-       Changed:
-               configure.in (1.5), "Exp", lines: +1 -1
-
-       version 0.50.2
-       
-2000-01-12 14:57  ewt
-
-       Changed:
-               listbox.c (1.47), "Exp", lines: +5 -4
-
-       fixed:
-
-       1. if an empty listbox has the focus and the user presses a key which isn't
-          defined as a hotkey by its form, the program crashes.
-
-       2. if the program uses newtListboxSetCurrent() to select an item which is
-          not displayed because it is beyond the bottom of the widget, the refresh
-          code doesn't make it visible.
-       
-1999-12-22 19:50  ewt
-
-       Changed:
-               .cvsignore (1.3), "Exp", lines: +4 -0
-
-       [no log message]
-       
-1999-12-22 19:49  ewt
-
-       Changed:
-               tutorial.sgml (1.3), "Exp", lines: +738 -493
-
-       converted to docbook by Mirko Zeibig <mirko@picard.inka.de>
-       
-1999-12-21 00:38  msw
-
-       Changed:
-               newt.spec (1.65), "Exp", lines: +4 -1
-
-       updated spec
-       
-1999-12-20 23:54  nalin
-
-       Changed:
-               listbox.c (1.46), "Exp", lines: +1 -1
-
-       Fixed bug 6390.
-       
-1999-12-11 21:04  ewt
-
-       Changed:
-               CHANGES (1.5), "Exp", lines: +2 -0
-               checkboxtree.c (1.9), "Exp", lines: +15 -0
-               form.c (1.33), "Exp", lines: +15 -11
-               newt.h (1.64), "Exp", lines: +1 -1
-               snack.py (1.37), "Exp", lines: +8 -0
-               snackmodule.c (1.31), "Exp", lines: +17 -0
-               test.c (1.27), "Exp", lines: +1 -1
-               testtree.c (1.4), "Exp", lines: +10 -1
-
-       1) fixed some timer issues
-       2) checkboxtree's could improperly leave info from closed trees
-                 at the end of the display
-       
-1999-12-11 18:59  ewt
-
-       Changed:
-               CHANGES (1.4), "Exp", lines: +3 -0
-               form.c (1.32), "Exp", lines: +51 -1
-               newt.h (1.63), "Exp", lines: +3 -1
-               newt.spec (1.64), "Exp", lines: +1 -1
-               test.c (1.26), "Exp", lines: +17 -5
-
-       version 0.50.1
-       
-1999-12-11 18:58  ewt
-
-       Changed:
-               Makefile.in (1.10), "Exp", lines: +1 -1
-               configure.in (1.4), "Exp", lines: +3 -1
-
-       1) setup soname and version indepenently
-       2) version 0.50.1
-       
-1999-10-20 20:33  msw
-
-       Changed:
-               newt.spec (1.63), "Exp", lines: +4 -1
-               textbox.c (1.20), "Exp", lines: +30 -6
-               windows.c (1.14), "Exp", lines: +1 -0
-
-       kanji wrap patch
-       
-1999-09-02 00:57  ewt
-
-       Changed:
-               newt.spec (1.62), "Exp", lines: +4 -1
-               snack.py (1.36), "Exp", lines: +9 -2
-               snackmodule.c (1.30), "Exp", lines: +19 -0
-
-       added suspend and resume to snack
-       
-1999-08-31 05:10  msw
-
-       Changed:
-               newt.spec (1.61), "Exp", lines: +5 -2
-
-       oops
-       
-1999-08-28 18:22  ewt
-
-       Changed:
-               snack.py (1.35), "Exp", lines: +2 -2
-
-       defaults weren't set properly for ListboxChoiceWindow()
-       
-1999-08-27 21:17  msw
-
-       Changed:
-               newt.spec (1.60), "Exp", lines: +5 -5
-
-       docs changes
-       
-1999-08-27 21:14  msw
-
-       Changed:
-               newt.spec (1.59), "Exp", lines: +5 -1
-
-       new release
-       
-1999-08-26 23:18  ewt
-
-       Changed:
-               snack.py (1.34), "Exp", lines: +10 -2
-               snackmodule.c (1.29), "Exp", lines: +1 -1
-
-       1) added hotkey's to grid forms
-       2) set listbox position by key, not index
-       
-1999-08-25 23:41  msw
-
-       Changed:
-               newt.spec (1.58), "Exp", lines: +2 -1
-               snackmodule.c (1.28), "Exp", lines: +3 -0
-
-       fix suspend refcounts
-       
-1999-08-25 22:26  msw
-
-       Changed:
-               CHANGES (1.3), "Exp", lines: +4 -0
-               newt.spec (1.57), "Exp", lines: +4 -1
-               snack.py (1.33), "Exp", lines: +8 -4
-               snackmodule.c (1.27), "Exp", lines: +64 -20
-
-       fixed callback refcounts
-       
-1999-08-23 22:53  msw
-
-       Changed:
-               newt.spec (1.56), "Exp", lines: +4 -1
-               snack.py (1.32), "Exp", lines: +2 -2
-
-       update
-       
-1999-08-22 19:00  ewt
-
-       Changed:
-               newt.spec (1.55), "Exp", lines: +1 -1
-
-       version 0.50-6
-       
-1999-08-22 19:00  ewt
-
-       Changed:
-               newt.c (1.42), "Exp", lines: +5 -0
-
-       added gnome-terminal keystrokes for F1-F4
-       
-1999-08-12 18:34  notting
-
-       Changed:
-               newt.spec (1.54), "Exp", lines: +4 -1
-
-       [no log message]
-       
-1999-08-12 18:15  notting
-
-       Changed:
-               checkboxtree.c (1.8), "Exp", lines: +40 -10
-               newt.h (1.62), "Exp", lines: +2 -0
-               testtree.c (1.3), "Exp", lines: +13 -2
-
-       multi-state checkboxtrees. Whee...
-       
-1999-08-10 16:20  ewt
-
-       Changed:
-               newt.spec (1.53), "Exp", lines: +1 -1
-
-       release 5
-       
-1999-08-10 16:17  ewt
-
-       Changed:
-               textbox.c (1.19), "Exp", lines: +8 -2
-
-       fixed tab expansion
-       
-1999-08-10 03:08  msw
-
-       Changed:
-               newt.spec (1.52), "Exp", lines: +4 -1
-               snack.py (1.31), "Exp", lines: +6 -3
-
-       more changes for buttonchice, new release
-       
-1999-08-09 18:08  msw
-
-       Changed:
-               snack.py (1.30), "Exp", lines: +3 -0
-               snackmodule.c (1.26), "Exp", lines: +14 -1
-
-       implemented setflags for checkboxes
-       
-1999-08-05 20:50  notting
-
-       Changed:
-               checkboxtree.c (1.7), "Exp", lines: +2 -1
-
-       fix so checkboxtrees can have 0 or 1 entries.
-       
-1999-08-05 04:10  msw
-
-       Changed:
-               newt.spec (1.51), "Exp", lines: +5 -1
-
-       updated spec
-       
-1999-08-05 04:09  msw
-
-       Changed:
-               popcorn.py (1.10), "Exp", lines: +3 -2
-               snack.py (1.29), "Exp", lines: +5 -4
-               snackmodule.c (1.25), "Exp", lines: +15 -0
-
-       listbox set current method, listboxchoicewindow default setting
-       
-1999-08-02 15:37  msw
-
-       Changed:
-               Makefile.in (1.9), "Exp", lines: +1 -0
-
-       fixed makefile
-       
-1999-08-02 15:33  msw
-
-       Changed:
-               newt.spec (1.50), "Exp", lines: +5 -1
-
-       updated spec
-       
-1999-08-02 04:25  msw
-
-       Changed:
-               entry.c (1.21), "Exp", lines: +2 -1
-               snack.py (1.28), "Exp", lines: +16 -3
-               snackmodule.c (1.24), "Exp", lines: +61 -16
-
-       o  entry flag setting
-       o  form setcurrent
-       o  per widget callbacks
-       o  data argument for widget callbacks
-       
-1999-07-29 17:03  msw
-
-       Changed:
-               checkboxtree.c (1.6), "Exp", lines: +1 -1
-               snack.py (1.27), "Exp", lines: +0 -2
-               snackmodule.c (1.23), "Exp", lines: +3 -2
-
-       corrected logic for tree countingalways return a python list for the selection, even if it is an empty listwhat are these 'i' variables?  nuke them
-       
-1999-07-29 04:00  msw
-
-       Changed:
-               snackmodule.c (1.22), "Exp", lines: +4 -3
-
-       fixed callback setting
-       
-1999-07-13 17:43  msw
-
-       Changed:
-               snackmodule.c (1.21), "Exp", lines: +0 -1
-
-       debugging info gone
-       
-1999-07-13 17:31  ewt
-
-       Changed:
-               checkboxtree.c (1.5), "Exp", lines: +9 -4
-               popcorn.py (1.9), "Exp", lines: +15 -0
-               snackmodule.c (1.20), "Exp", lines: +16 -72
-
-       fixes for width and returns
-       
-1999-07-13 15:40  msw
-
-       Changed:
-               peanuts.py (1.6), "Exp", lines: +12 -4
-
-       new tests
-       
-1999-07-12 18:47  ewt
-
-       Changed:
-               checkboxtree.c (1.4), "Exp", lines: +0 -4
-               snackmodule.c (1.19), "Exp", lines: +0 -1
-
-       removed some leftover printf() calls
-       
-1999-07-12 18:41  ewt
-
-       Changed:
-               popcorn.py (1.8), "Exp", lines: +15 -0
-               snack.py (1.26), "Exp", lines: +10 -2
-               snackmodule.c (1.18), "Exp", lines: +20 -7
-
-       added support for full checkbox trees
-       
-1999-07-12 18:41  ewt
-
-       Changed:
-               checkboxtree.c (1.3), "Exp", lines: +6 -1
-
-       bug fixes
-       
-1999-07-12 14:38  ewt
-
-       Changed:
-               Makefile.in (1.8), "Exp", lines: +4 -1
-               checkboxtree.c (1.2), "Exp", lines: +301 -114
-               newt.h (1.61), "Exp", lines: +13 -3
-               testtree.c (1.2), "Exp", lines: +67 -17
-
-       reworked checkboxtree implementation to function as a tree
-       
-1999-07-09 15:54  ewt
-
-       Changed:
-               Makefile.in (1.7), "Exp", lines: +1 -1
-
-       install-sh whenever you install
-       
-1999-07-09 15:53  ewt
-
-       Changed:
-               Makefile.in (1.6), "Exp", lines: +2 -1
-
-       msw told me to
-       
-1999-07-09 00:44  msw
-
-       Changed:
-               snack.py (1.25), "Exp", lines: +21 -0
-
-       checkboxtree
-       
-1999-07-09 00:42  msw
-
-       Added:
-               checkboxtree.c (1.1)
-               testtree.c (1.1)
-       Changed:
-               newt.h (1.60), "Exp", lines: +5 -1
-               peanuts.py (1.5), "Exp", lines: +10 -3
-               snackmodule.c (1.17), "Exp", lines: +119 -0
-
-       added the start of a checkbox tree widget
-       
-1999-06-28 03:40  msw
-
-       Changed:
-               snack.py (1.24), "Exp", lines: +5 -2
-               snackmodule.c (1.16), "Exp", lines: +17 -2
-
-       added method to change textbox text, added wrap flag
-       
-1999-05-06 17:09  msw
-
-       Changed:
-               configure.in (1.3), "Exp", lines: +1 -1
-
-       major to .50
-       
-1999-05-06 17:08  ewt
-
-       Changed:
-               newt.c (1.41), "Exp", lines: +4 -2
-               newt.h (1.59), "Exp", lines: +2 -2
-               snack.py (1.23), "Exp", lines: +11 -1
-               snackmodule.c (1.15), "Exp", lines: +57 -0
-               test.c (1.25), "Exp", lines: +2 -2
-
-       1) added scale support
-       2) added (but didn't complete) suspend callback support
-       
-1999-05-06 17:07  ewt
-
-       Changed:
-               newt.spec (1.49), "Exp", lines: +2 -2
-
-       version 0.50
-       
-1999-04-30 21:24  ewt
-
-       Changed:
-               snack.py (1.22), "Exp", lines: +3 -0
-               snackmodule.c (1.14), "Exp", lines: +13 -0
-
-       added code to update label text
-       
-1999-04-29 20:06  ewt
-
-       Changed:
-               snack.py (1.21), "Exp", lines: +13 -6
-               snackmodule.c (1.13), "Exp", lines: +9 -0
-
-       added draw methods
-       
-1999-04-29 19:05  ewt
-
-       Changed:
-               popcorn.py (1.7), "Exp", lines: +12 -1
-               snack.py (1.20), "Exp", lines: +95 -4
-
-       added piles of convienence functions
-       
-1999-04-10 03:22  msw
-
-       Changed:
-               newt.spec (1.48), "Exp", lines: +5 -1
-               windows.c (1.13), "Exp", lines: +1 -1
-
-       fixed reflow bug
-       
-1999-04-10 01:16  ewt
-
-       Changed:
-               newt.c (1.40), "Exp", lines: +1 -0
-               newt.h (1.58), "Exp", lines: +1 -0
-               newt.spec (1.47), "Exp", lines: +5 -1
-
-       fixed insert bug - msw
-       
-1999-03-15 16:09  msw
-
-       Changed:
-               entry.c (1.20), "Exp", lines: +1 -1
-               listbox.c (1.45), "Exp", lines: +1 -2
-               newt.spec (1.46), "Exp", lines: +4 -1
-
-       changes
-       
-1999-03-05 23:28  ewt
-
-       Changed:
-               newt.h (1.57), "Exp", lines: +1 -0
-
-       added newtFormDestroy() for consistency
-       
-1999-03-05 23:28  ewt
-
-       Changed:
-               listbox.c (1.44), "Exp", lines: +2 -0
-
-       free scrollbars
-       
-1999-03-05 23:27  ewt
-
-       Changed:
-               form.c (1.31), "Exp", lines: +2 -0
-
-       free hotkeys
-       
-1999-03-05 23:27  ewt
-
-       Changed:
-               testgrid.c (1.11), "Exp", lines: +3 -1
-
-       free stuff
-       
-1999-02-27 05:13  msw
-
-       Changed:
-               newt.spec (1.45), "Exp", lines: +4 -1
-
-       rev
-       
-1999-02-27 05:13  msw
-
-       Changed:
-               listbox.c (1.43), "Exp", lines: +4 -1
-
-       fix for keyboard nav
-       
-1999-02-25 17:35  msw
-
-       Changed:
-               listbox.c (1.42), "Exp", lines: +33 -3
-               newt.spec (1.44), "Exp", lines: +5 -1
-
-       - updated descriptions
-       - added support for navigating listboxes with alphabetical keypresses
-       
-1999-02-25 05:23  msw
-
-       Changed:
-               newt.spec (1.43), "Exp", lines: +16 -12
-
-       group/descr
-       
-1999-02-23 10:20  msw
-
-       Changed:
-               newt.spec (1.42), "Exp", lines: +1 -1
-
-       groups
-       
-1999-02-08 16:42  msw
-
-       Changed:
-               newt.spec (1.41), "Exp", lines: +4 -1
-
-       spec file rev
-       
-1999-02-08 16:41  msw
-
-       Changed:
-               grid.c (1.11), "Exp", lines: +6 -2
-
-       Make grid wrapped windows at least the size of their title bars.
-       
-1999-02-05 19:32  msw
-
-       Changed:
-               newt.spec (1.40), "Exp", lines: +5 -1
-
-       new spec
-       
-1999-02-05 19:30  msw
-
-       Changed:
-               checkbox.c (1.20), "Exp", lines: +24 -0
-               newt.h (1.56), "Exp", lines: +4 -0
-
-       Added a hack to disable checkboxes.  This will go away with a generic
-       comp flag setting function later.
-       
-1999-01-19 17:41  msw
-
-       Changed:
-               Makefile.in (1.5), "Exp", lines: +4 -2
-               button.c (1.16), "Exp", lines: +15 -9
-               config.h.in (1.2), "Exp", lines: +1 -2
-               configure.in (1.2), "Exp", lines: +4 -8
-               form.c (1.30), "Exp", lines: +352 -9
-               newt.spec (1.39), "Exp", lines: +5 -2
-
-       Internalize gpm functions, check mouse event coords on button widgets.
-       
-1999-01-07 05:33  msw
-
-       Changed:
-               newt.spec (1.38), "Exp", lines: +1 -1
-
-       make rev 1
-       
-1999-01-07 05:29  msw
-
-       Changed:
-               Makefile.in (1.4), "Exp", lines: +1 -1
-               newt.spec (1.37), "Exp", lines: +6 -1
-
-       Last make archive fix, updated spec file
-       
-1999-01-07 05:24  msw
-
-       Changed:
-               Makefile.in (1.3), "Exp", lines: +1 -2
-
-       A few more archive target fixes
-       
-1999-01-07 05:22  msw
-
-       Changed:
-               Makefile.in (1.2), "Exp", lines: +1 -1
-
-       Fixed archive target
-       
-1999-01-07 05:19  msw
-
-       Changed:
-               .cvsignore (1.2), "Exp", lines: +3 -1
-               CHANGES (1.2), "Exp", lines: +3 -0
-               button.c (1.15), "Exp", lines: +14 -3
-               checkbox.c (1.19), "Exp", lines: +27 -5
-               entry.c (1.19), "Exp", lines: +31 -16
-               form.c (1.29), "Exp", lines: +130 -46
-               listbox.c (1.41), "Exp", lines: +73 -21
-               newt.c (1.39), "Exp", lines: +33 -23
-               newt.spec (1.36), "Exp", lines: +1 -0
-               newt_pr.h (1.18), "Exp", lines: +10 -5
-               scrollbar.c (1.8), "Exp", lines: +26 -5
-               test.c (1.24), "Exp", lines: +3 -3
-               textbox.c (1.18), "Exp", lines: +17 -1
-
-       Mouse support
-       
-1999-01-07 05:18  msw
-
-       Deleted:
-               Makefile (1.60)
-
-       We're using autoconf now - no Makefile
-       
-1999-01-07 05:05  msw
-
-       Added:
-               .cvsignore (1.1)
-               Makefile.in (1.1)
-               config.h.in (1.1)
-               configure.in (1.1)
-               install-sh (1.1)
-
-       Autoconf newt
-       
-1998-12-29 23:12  msw
-
-       Changed:
-               tutorial.sgml (1.2), "Exp", lines: +7 -1
-
-       Fixed some missing <p> tags, added some <tscreen><verb>...</verb></tscreen>
-       tags on the last page
-       
-1998-10-22 02:53  notting
-
-       Changed:
-               Makefile (1.59), "Exp", lines: +3 -3
-
-       make *sure* we link against newt in current directory
-       
-1998-10-22 01:09  notting
-
-       Changed:
-               newt.spec (1.35), "Exp", lines: +4 -1
-
-       build for rawhide
-       
-1998-08-19 17:05  notting
-
-       Changed:
-               newt.spec (1.34), "Exp", lines: +3 -2
-
-       moved CHANGES,COPYING to newt
-       
-1998-08-19 17:00  notting
-
-       Changed:
-               newt.spec (1.33), "Exp", lines: +7 -0
-
-       added changelog entry, docs to devel package
-       
-1998-08-19 16:17  notting
-
-       Changed:
-               newt.spec (1.32), "Exp", lines: +1 -1
-
-       bump rpm release #
-       
-1998-08-19 16:15  notting
-
-       Changed:
-               textbox.c (1.17), "Exp", lines: +8 -2
-
-       bugfixes for text wrapping
-       
-1998-08-17 15:38  ewt
-
-       Changed:
-               windows.c (1.12), "Exp", lines: +1 -1
-
-       check for vsnprintf() returning -1
-       
-1998-08-13 14:03  ewt
-
-       Added:
-               tutorial.sgml (1.1)
-
-       tutorial.sgml
-       
-1998-08-06 14:24  ewt
-
-       Changed:
-               textbox.c (1.16), "Exp", lines: +3 -1
-
-       handle pgdn in short textboxes properly
-       
-1998-08-06 14:24  ewt
-
-       Added:
-               CHANGES (1.1)
-
-       [no log message]
-       
-1998-08-02 18:47  ewt
-
-       Changed:
-               Makefile (1.58), "Exp", lines: +2 -2
-               newt.spec (1.31), "Exp", lines: +1 -1
-
-       version 0.30
-       
-1998-08-02 18:45  ewt
-
-       Changed:
-               checkbox.c (1.18), "Exp", lines: +24 -15
-               newt.h (1.55), "Exp", lines: +1 -0
-
-       added newtCheckboxSetValue()
-       
-1998-08-01 16:07  ewt
-
-       Changed:
-               snackmodule.c (1.12), "Exp", lines: +2 -2
-
-       changed for positive scrolling logic
-       
-1998-08-01 16:06  ewt
-
-       Changed:
-               test.c (1.23), "Exp", lines: +12 -10
-
-       updated for 0.30
-       
-1998-08-01 16:06  ewt
-
-       Changed:
-               dialogboxes.c (1.5), "Exp", lines: +4 -4
-
-       scroll logic needed updating
-       
-1998-08-01 16:05  ewt
-
-       Changed:
-               listbox.c (1.40), "Exp", lines: +13 -11
-
-       make listboxes work properly with borders
-       
-1998-08-01 15:53  ewt
-
-       Changed:
-               newt.h (1.54), "Exp", lines: +12 -10
-
-       changes to clean up the interface, including:
-
-               1) newtListboxSelectItem() uses a key, not an index
-               2) newtListboxAddEntry() was removed (it was redundant anyway)
-                  (a #define was added for backwards compatibility)
-               3) DOBORDER flag was renambed to just BORDER
-               4) NEWT_FLAG_NOSCROLL was removed as only listboxes used it, and
-                  negative logic sucks [this one will be a pita]
-       
-1998-08-01 15:50  ewt
-
-       Changed:
-               textbox.c (1.15), "Exp", lines: +1 -1
-
-       use NEWT_FLAG_WRAP instead of NEWT_TEXTBOX_WRAP
-       
-1998-08-01 15:49  ewt
-
-       Changed:
-               listbox.c (1.39), "Exp", lines: +31 -30
-
-       1) use BORDER flag, not DOBORDER
-       2) scroll if told to (instead of not scrolling if told not to)
-       3) newtListboxSetEntry() uses a key, not an index
-       
-1998-08-01 15:45  ewt
-
-       Changed:
-               label.c (1.7), "Exp", lines: +1 -1
-
-       pay attention to isMapped
-       
-1998-08-01 15:44  ewt
-
-       Changed:
-               checkbox.c (1.17), "Exp", lines: +6 -52
-
-       got rid of (unused) ListItem type
-       
-1998-08-01 15:43  ewt
-
-       Changed:
-               newt.c (1.38), "Exp", lines: +2 -2
-
-       row/col handling was broken when drawing root text
-       
-1998-08-01 15:43  ewt
-
-       Changed:
-               windows.c (1.11), "Exp", lines: +1 -1
-
-       listboxes need to be told to scroll instead of not to not scroll
-       
-1998-05-05 15:19  ewt
-
-       Changed:
-               newt.spec (1.30), "Exp", lines: +1 -1
-
-       release 1
-       
-1998-05-05 15:17  ewt
-
-       Changed:
-               newt.spec (1.29), "Exp", lines: +1 -1
-               Makefile (1.57), "Exp", lines: +1 -1
-
-       version 0.25
-       
-1998-05-05 15:17  ewt
-
-       Changed:
-               button.c (1.14), "Exp", lines: +1 -11
-
-       remove bgColor stuff -- it just made things break
-       
-1998-05-01 19:35  gafton
-
-       Changed:
-               newt.spec (1.28), "Exp", lines: +5 -11
-
-       moved devel package in Development/Libraries
-       
-1998-04-30 21:27  ewt
-
-       Changed:
-               Makefile (1.56), "Exp", lines: +1 -1
-               newt.spec (1.27), "Exp", lines: +2 -2
-
-       more python 1.5 changes
-       
-1998-04-30 21:24  ewt
-
-       Changed:
-               Makefile (1.55), "Exp", lines: +2 -2
-
-       changed paths to python 1.5 paths
-       
-1998-04-30 21:23  ewt
-
-       Changed:
-               newt.spec (1.26), "Exp", lines: +1 -1
-
-       update spec file to vesrion 0.24
-       
-1998-04-30 21:22  ewt
-
-       Changed:
-               Makefile (1.54), "Exp", lines: +1 -1
-
-       look for python 1.5
-       
-1998-04-30 21:22  ewt
-
-       Changed:
-               Makefile (1.53), "Exp", lines: +1 -1
-               newt.spec (1.25), "Exp", lines: +4 -1
-
-       1) removed whiptcl.so from spec file
-       2) version 0.24
-       
-1998-04-28 06:47  ewt
-
-       Changed:
-               grid.c (1.10), "Exp", lines: +2 -2
-               testgrid.c (1.10), "Exp", lines: +2 -4
-
-       max width and max height of row/col wasn't calculated properly
-       
-1998-04-28 06:47  ewt
-
-       Changed:
-               newt.c (1.37), "Exp", lines: +6 -2
-
-       mapped ctrl-v and alt-v
-       
-1998-04-28 06:33  ewt
-
-       Changed:
-               checkbox.c (1.16), "Exp", lines: +6 -0
-
-       added a getvalue call
-       
-1998-04-28 06:29  ewt
-
-       Changed:
-               entry.c (1.18), "Exp", lines: +23 -4
-
-       added filters
-       
-1998-04-28 06:28  ewt
-
-       Changed:
-               newt.h (1.53), "Exp", lines: +10 -2
-               form.c (1.28), "Exp", lines: +64 -23
-
-       added watchfd stuff
-       
-1998-04-28 06:27  ewt
-
-       Changed:
-               textbox.c (1.14), "Exp", lines: +81 -55
-
-       1) reworked to use wrapping code from later reflow implementation
-       2) tabs are handled properly by wrapping
-       
-1998-04-05 16:56  ewt
-
-       Changed:
-               Makefile (1.52), "Exp", lines: +1 -1
-               showkey.c (1.3), "Exp", lines: +1 -1
-               newt.spec (1.24), "Exp", lines: +1 -1
-
-       version 0.23
-       
-1998-04-05 16:55  ewt
-
-       Changed:
-               windows.c (1.10), "Exp", lines: +7 -2
-
-       1) anchor text on left in basic window
-       2) add a scrollbar to newtWinMessage() when the text is too long
-       
-1998-04-05 16:55  ewt
-
-       Changed:
-               newt.c (1.36), "Exp", lines: +6 -0
-
-       made alt-V do pgdn
-       
-1998-03-22 19:50  ewt
-
-       Changed:
-               Makefile (1.51), "Exp", lines: +1 -1
-
-       changed soname back to 0.20
-       
-1998-03-22 19:48  ewt
-
-       Changed:
-               Makefile (1.50), "Exp", lines: +2 -2
-               newt.spec (1.23), "Exp", lines: +1 -1
-
-       version 0.22
-       
-1998-03-06 14:33  ewt
-
-       Changed:
-               button.c (1.13), "Exp", lines: +6 -2
-               checkbox.c (1.15), "Exp", lines: +2 -1
-               entry.c (1.17), "Exp", lines: +4 -2
-               form.c (1.27), "Exp", lines: +50 -17
-               grid.c (1.9), "Exp", lines: +68 -12
-               label.c (1.6), "Exp", lines: +2 -1
-               listbox.c (1.38), "Exp", lines: +17 -7
-               newt.c (1.35), "Exp", lines: +9 -0
-               newt.h (1.52), "Exp", lines: +6 -0
-               newt_pr.h (1.17), "Exp", lines: +4 -1
-               scale.c (1.6), "Exp", lines: +2 -1
-               scrollbar.c (1.7), "Exp", lines: +2 -1
-               textbox.c (1.13), "Exp", lines: +34 -11
-               windows.c (1.9), "Exp", lines: +5 -8
-
-       1) got scrollbars working w/ gridded text widgets
-       2) added mapped method to components (mandatory)
-       3) made placed component method mandatory
-       4) added newtGrid[VH]CloseStacked()
-       5) added newtGridBasicWindow()
-       6) made newtGrid[VH]Stacked() not set GROWX flag for any fields
-       
-1998-03-02 17:49  ewt
-
-       Changed:
-               scrollbar.c (1.6), "Exp", lines: +5 -0
-
-       pay attention to isMapped
-       
-1998-02-18 19:29  ewt
-
-       Changed:
-               textbox.c (1.12), "Exp", lines: +16 -0
-
-       added newtTextboxReflowed()
-       
-1998-02-18 19:29  ewt
-
-       Changed:
-               entry.c (1.16), "Exp", lines: +4 -0
-
-       handle NULL initial value
-       
-1998-02-18 19:29  ewt
-
-       Changed:
-               newt.h (1.51), "Exp", lines: +13 -0
-               testgrid.c (1.9), "Exp", lines: +15 -0
-               windows.c (1.8), "Exp", lines: +77 -7
-
-       added newtWinEntries
-       
-1998-02-16 23:03  ewt
-
-       Changed:
-               buttonbar.c (1.4), "Exp", lines: +29 -22
-
-       added newtButtonBarv()
-       
-1998-02-16 23:02  ewt
-
-       Changed:
-               form.c (1.26), "Exp", lines: +15 -5
-
-       1) forms shouldn't draw until they are mapped
-       2) don't let newtFromSetSize() go twice
-       
-1998-02-16 23:01  ewt
-
-       Changed:
-               grid.c (1.8), "Exp", lines: +68 -1
-
-       1) added newtGrid[VH]Stacked()
-       2) added newtGridWrappedWindowAt()
-       
-1998-02-16 22:51  ewt
-
-       Changed:
-               newt.spec (1.22), "Exp", lines: +10 -0
-
-       [no log message]
-       
-1998-02-16 22:51  ewt
-
-       Changed:
-               snackmodule.c (1.11), "Exp", lines: +1 -6
-
-       handle new return code from newtWinChoice()
-       
-1998-02-16 22:41  ewt
-
-       Changed:
-               button.c (1.12), "Exp", lines: +3 -0
-
-       made buttons pay attention to isMapped
-       
-1998-02-16 22:40  ewt
-
-       Changed:
-               testgrid.c (1.8), "Exp", lines: +10 -1
-
-       test newtWinMenu()
-       
-1998-02-16 22:40  ewt
-
-       Changed:
-               windows.c (1.7), "Exp", lines: +83 -7
-
-       1) added newtWinMenu
-       2) made use of newtGridVStacked()
-       
-1998-02-16 22:38  ewt
-
-       Changed:
-               newt.h (1.50), "Exp", lines: +15 -3
-
-       1) made newtWinChoice() return codes consistent with newtWinTernary()
-       2) added newtWinMenu()
-       3) added newtGridWrappedWindowAt()
-       4) added newtFormSetSize()
-       5) added newtButtonBarv()
-       6) added newtGridVStacked()
-       7) added newtGridHStacked()
-       
-1998-01-16 21:44  ewt
-
-       Changed:
-               grid.c (1.7), "Exp", lines: +15 -0
-               newt.h (1.49), "Exp", lines: +2 -0
-               newt.spec (1.21), "Exp", lines: +9 -0
-
-       added newtAddComponentsToForm()
-       
-1998-01-16 21:40  ewt
-
-       Changed:
-               form.c (1.25), "Exp", lines: +50 -39
-               testgrid.c (1.7), "Exp", lines: +2 -1
-
-       delay form sizing until FormRun() is called -- it's fast, and it makes
-       things coexist *much* better with grids
-       
-1998-01-03 23:05  ewt
-
-       Changed:
-               newt.c (1.34), "Exp", lines: +3 -3
-               newt.h (1.48), "Exp", lines: +1 -1
-
-       makes some table const's
-       
-1998-01-03 23:00  ewt
-
-       Changed:
-               Makefile (1.49), "Exp", lines: +2 -2
-               button.c (1.11), "Exp", lines: +1 -1
-               checkbox.c (1.14), "Exp", lines: +1 -1
-               dialogboxes.c (1.4), "Exp", lines: +19 -6
-               dialogboxes.h (1.2), "Exp", lines: +1 -0
-               entry.c (1.15), "Exp", lines: +1 -1
-               form.c (1.24), "Exp", lines: +1 -1
-               label.c (1.5), "Exp", lines: +1 -1
-               listbox.c (1.37), "Exp", lines: +1 -1
-               newt.c (1.33), "Exp", lines: +1 -1
-               scale.c (1.5), "Exp", lines: +1 -1
-               scrollbar.c (1.5), "Exp", lines: +1 -1
-               showchars.c (1.2), "Exp", lines: +1 -1
-               showkey.c (1.2), "Exp", lines: +1 -1
-               textbox.c (1.11), "Exp", lines: +1 -1
-               whiptail.c (1.6), "Exp", lines: +13 -2
-
-       1) patch from Bruce Perens which makes newt easier to build on debian
-       2) whiptail patch from Bruce which adds --infobox
-       
-1997-11-06 19:23  ewt
-
-       Changed:
-               newt.spec (1.20), "Exp", lines: +2 -2
-
-       version 0.21
-       
-1997-11-06 19:22  ewt
-
-       Changed:
-               Makefile (1.48), "Exp", lines: +1 -1
-
-       verison 0.21
-       
-1997-11-06 19:22  ewt
-
-       Changed:
-               button.c (1.10), "Exp", lines: +3 -1
-
-       set proper background color for buttons
-       
-1997-11-04 19:00  ewt
-
-       Changed:
-               Makefile (1.47), "Exp", lines: +5 -3
-               newt.spec (1.19), "Exp", lines: +1 -0
-
-       include snack.py
-       
-1997-11-04 16:50  ewt
-
-       Changed:
-               Makefile (1.46), "Exp", lines: +1 -1
-
-       [no log message]
-       
-1997-11-04 16:14  ewt
-
-       Changed:
-               Makefile (1.45), "Exp", lines: +1 -1
-               newt.spec (1.18), "Exp", lines: +2 -2
-
-       moved snack provides
-       
-1997-11-03 15:50  ewt
-
-       Changed:
-               newt.spec (1.15), "Exp", lines: +1 -1
-               newt.spec (1.16), "Exp", lines: +1 -1
-               newt.spec (1.17), "Exp", lines: +1 -1
-
-       [no log message]
-       
-1997-11-03 15:47  ewt
-
-       Changed:
-               newt.spec (1.14), "Exp", lines: +1 -0
-
-       newt should provide snack
-       
-1997-11-03 15:47  ewt
-
-       Changed:
-               Makefile (1.44), "Exp", lines: +5 -1
-               newt.spec (1.13), "Exp", lines: +2 -1
-
-       added _snackmodule to make install and specfile
-       
-1997-11-03 15:42  ewt
-
-       Changed:
-               popcorn.py (1.6), "Exp", lines: +5 -0
-               snack.py (1.19), "Exp", lines: +3 -1
-               snackmodule.c (1.10), "Exp", lines: +18 -0
-
-       began adding callbacks (unsuccessfully)
-       
-1997-11-03 15:42  ewt
-
-       Changed:
-               listbox.c (1.36), "Exp", lines: +17 -2
-               newt.h (1.47), "Exp", lines: +1 -0
-
-       added newtListboxSetCurrentByKey()
-       
-1997-10-30 21:48  johnsonm
-
-       Changed:
-               snack.py (1.18), "Exp", lines: +4 -0
-
-       Added setCurrent method to Listbox, currently a stub.
-       
-1997-10-29 22:46  johnsonm
-
-       Changed:
-               snack.py (1.17), "Exp", lines: +11 -2
-
-       returnExit
-       run_popup()
-       
-1997-10-28 16:45  ewt
-
-       Changed:
-               snackmodule.c (1.9), "Exp", lines: +1 -1
-
-       oops
-       
-1997-10-28 16:43  johnsonm
-
-       Changed:
-               snack.py (1.16), "Exp", lines: +1 -1
-
-       returnExit
-       
-1997-10-28 16:35  ewt
-
-       Changed:
-               snack.py (1.15), "Exp", lines: +3 -2
-               snackmodule.c (1.8), "Exp", lines: +3 -2
-
-       added returnexit for entry widget
-       
-1997-10-28 16:17  ewt
-
-       Changed:
-               form.c (1.23), "Exp", lines: +5 -0
-               newt.c (1.32), "Exp", lines: +43 -7
-               newt.h (1.46), "Exp", lines: +4 -0
-
-       started adding resizing stuff, but I need to know more slang first
-       
-1997-10-28 16:13  johnsonm
-
-       Changed:
-               peanuts.py (1.4), "Exp", lines: +4 -3
-
-       Listbox.insert changed.
-       
-1997-10-28 04:41  johnsonm
-
-       Changed:
-               snack.py (1.14), "Exp", lines: +1 -1
-
-       Listbox.replace needs text argument.
-       
-1997-10-28 04:38  johnsonm
-
-       Changed:
-               snack.py (1.13), "Exp", lines: +7 -0
-
-       Added replacement to Listbox.
-       
-1997-10-28 03:54  johnsonm
-
-       Changed:
-               snack.py (1.12), "Exp", lines: +1 -1
-
-       Set height and width separately.
-       
-1997-10-28 01:52  ewt
-
-       Changed:
-               snack.py (1.11), "Exp", lines: +1 -0
-               snackmodule.c (1.7), "Exp", lines: +13 -0
-
-       added screen size stuff
-       
-1997-10-28 01:51  johnsonm
-
-       Changed:
-               snack.py (1.10), "Exp", lines: +17 -4
-
-       Automatic hotkey handling for buttonbars.
-       
-1997-10-28 01:46  ewt
-
-       Changed:
-               snackmodule.c (1.6), "Exp", lines: +1 -1
-
-       fixed root text for snack
-       
-1997-10-28 01:25  ewt
-
-       Changed:
-               snack.py (1.9), "Exp", lines: +13 -0
-               snackmodule.c (1.5), "Exp", lines: +40 -0
-
-       added help line and root text
-       
-1997-10-27 23:54  ewt
-
-       Changed:
-               Makefile (1.43), "Exp", lines: +2 -2
-               listbox.c (1.35), "Exp", lines: +48 -47
-               newt.h (1.45), "Exp", lines: +3 -2
-               popcorn.py (1.5), "Exp", lines: +6 -4
-               snack.py (1.8), "Exp", lines: +21 -3
-               snackmodule.c (1.4), "Exp", lines: +29 -1
-               test.c (1.22), "Exp", lines: +13 -10
-
-       1) added insert, remove to snack listbox
-       2) fixed listboxes to be more consistent in not using indices
-       
-1997-10-27 22:38  johnsonm
-
-       Changed:
-               peanuts.py (1.3), "Exp", lines: +1 -1
-               snack.py (1.7), "Exp", lines: +13 -6
-
-       GridForm's run_once separated from run, so that run can be called multiple
-       times.
-       
-1997-10-27 22:07  johnsonm
-
-       Changed:
-               peanuts.py (1.2), "Exp", lines: +5 -6
-               snack.py (1.6), "Exp", lines: +13 -11
-
-       peanuts now working perfectly.
-       Don't add forms to grids...
-       Other bug fixes.
-       
-1997-10-27 20:43  johnsonm
-
-       Added:
-               peanuts.py (1.1)
-       Changed:
-               snack.py (1.5), "Exp", lines: +68 -25
-
-       mega-widgets starting to work a little.
-       peanuts program uses mega-widgets.
-       
-1997-10-27 19:42  ewt
-
-       Changed:
-               popcorn.py (1.4), "Exp", lines: +5 -2
-               snack.py (1.4), "Exp", lines: +22 -5
-               snackmodule.c (1.3), "Exp", lines: +36 -2
-
-       1) forms return things now
-       2) added hotkeys
-       
-1997-10-27 18:59  johnsonm
-
-       Changed:
-               popcorn.py (1.3), "Exp", lines: +9 -9
-               snack.py (1.3), "Exp", lines: +65 -1
-
-       New order for command line arguments in Grid.setField
-       New mega-widgets under development.
-       
-1997-10-20 23:49  sopwith
-
-       Changed:
-               listbox.c (1.34), "Exp", lines: +3 -2
-
-       End key works properly now; tests run show that this is true :)
-       
-1997-10-20 23:21  sopwith
-
-       Changed:
-               listbox.c (1.33), "Exp", lines: +4 -1
-
-       Fixed <END> key.
-       
-1997-10-17 20:45  ewt
-
-       Changed:
-               listbox.c (1.32), "Exp", lines: +1 -1
-               popcorn.py (1.2), "Exp", lines: +22 -8
-               snack.py (1.2), "Exp", lines: +48 -2
-               snackmodule.c (1.2), "Exp", lines: +121 -5
-
-       added listbox, textbox, and reflowed text
-       
-1997-10-16 22:41  ewt
-
-       Changed:
-               button.c (1.9), "Exp", lines: +2 -2
-
-       sped up button pushes
-       
-1997-10-16 22:40  ewt
-
-       Added:
-               popcorn.py (1.1)
-               snack.py (1.1)
-               snackmodule.c (1.1)
-       Changed:
-               Makefile (1.42), "Exp", lines: +9 -3
-               button.c (1.8), "Exp", lines: +4 -1
-
-       began work on snacks
-       fixed buttons to initialize properly w/ a window isn't already present
-       
-1997-10-13 20:21  ewt
-
-       Changed:
-               Makefile (1.41), "Exp", lines: +1 -1
-
-       fixed rule
-       
-1997-10-13 20:20  ewt
-
-       Changed:
-               Makefile (1.40), "Exp", lines: +1 -1
-               newt.c (1.31), "Exp", lines: +6 -1
-               newt.h (1.44), "Exp", lines: +1 -0
-               newt.spec (1.12), "Exp", lines: +1 -1
-
-       updated to version 0.13
-       
-1997-10-08 18:45  ewt
-
-       Changed:
-               newt.spec (1.11), "Exp", lines: +5 -5
-
-       removed extranoue () around env vars
-       
-1997-10-08 18:44  ewt
-
-       Changed:
-               newt.spec (1.10), "Exp", lines: +1 -1
-
-       fixed typo
-       
-1997-10-08 18:38  ewt
-
-       Changed:
-               newt.spec (1.9), "Exp", lines: +4 -0
-
-       [no log message]
-       
-1997-10-08 15:42  msf
-
-       Changed:
-               Makefile (1.39), "Exp", lines: +1 -1
-
-       Fixed spelling of whiptail (was whiltail).
-       
-1997-10-08 15:39  ewt
-
-       Changed:
-               newt.h (1.43), "Exp", lines: +5 -0
-               windows.c (1.6), "Exp", lines: +43 -12
-
-       added newtWinTernary()
-       
-1997-10-08 15:39  ewt
-
-       Changed:
-               Makefile (1.38), "Exp", lines: +16 -21
-               newt.spec (1.8), "Exp", lines: +17 -5
-
-       uses a buildroot in package build; version 0.12 (soname 0.11)
-       
-1997-09-30 16:30  ewt
-
-       Changed:
-               listbox.c (1.31), "Exp", lines: +4 -3
-               newt.spec (1.7), "Exp", lines: +1 -1
-
-       1) updated version to 0.11
-       2) fixed growing listboxes
-       
-1997-09-29 20:19  ewt
-
-       Changed:
-               grid.c (1.6), "Exp", lines: +5 -3
-
-       fixes for grid w/ empty fields
-       
-1997-09-29 19:53  ewt
-
-       Changed:
-               form.c (1.22), "Exp", lines: +1 -0
-               listbox.c (1.30), "Exp", lines: +60 -57
-               newt_pr.h (1.16), "Exp", lines: +1 -0
-               test.c (1.21), "Exp", lines: +1 -1
-
-       1) added ismapped field
-       2) reworked listbox to deal with borders properly
-       
-1997-09-26 18:16  sopwith
-
-       Changed:
-               Makefile (1.37), "Exp", lines: +2 -2
-
-       Undid my stupid Makefile changes
-       
-1997-09-25 14:27  csmith
-
-       Changed:
-               newt.spec (1.6), "Exp", lines: +1 -1
-
-       changed the version number to reflect whats in the Makefile. (0.11)
-       
-1997-09-24 16:02  ewt
-
-       Changed:
-               windows.c (1.5), "Exp", lines: +2 -6
-
-       changed simple windows to use button bars
-       
-1997-09-24 02:38  sopwith
-
-       Changed:
-               Makefile (1.36), "Exp", lines: +2 -2
-
-       more popt fixes...?
-       
-1997-09-24 02:29  ewt
-
-       Changed:
-               listbox.c (1.29), "Exp", lines: +1 -1
-
-       initialize things better
-       
-1997-09-24 02:29  ewt
-
-       Changed:
-               buttonbar.c (1.3), "Exp", lines: +2 -1
-
-       rearranged headers a tad
-       
-1997-09-24 02:28  ewt
-
-       Changed:
-               whiptail.c (1.5), "Exp", lines: +1 -1
-
-       look for popt.h in system include path
-       
-1997-09-24 02:28  ewt
-
-       Changed:
-               Makefile (1.35), "Exp", lines: +4 -4
-
-       user separate popt library
-       
-1997-09-24 02:19  sopwith
-
-       Changed:
-               buttonbar.c (1.2), "Exp", lines: +1 -1
-
-       Fixed #include to "newt.h" instead of <newt.h>
-       
-1997-09-23 18:40  ewt
-
-       Changed:
-               Makefile (1.34), "Exp", lines: +2 -2
-
-       version 0.11
-       
-1997-09-17 17:00  msf
-
-       Changed:
-               listbox.c (1.28), "Exp", lines: +11 -7
-
-       don't update display until listbox has been drawn at least once
-       
-1997-09-17 16:04  msf
-
-       Changed:
-               listbox.c (1.27), "Exp", lines: +40 -17
-
-       scrolled listboxes didn't respond to placement properly
-       
-1997-09-17 02:12  ewt
-
-       Added:
-               buttonbar.c (1.1)
-       Changed:
-               Makefile (1.33), "Exp", lines: +1 -1
-               newt.h (1.42), "Exp", lines: +3 -0
-
-       added buttonbars
-       
-1997-09-17 02:12  ewt
-
-       Changed:
-               textbox.c (1.10), "Exp", lines: +1 -1
-
-       halved the penalty for short lines
-       
-1997-09-17 02:12  ewt
-
-       Changed:
-               windows.c (1.4), "Exp", lines: +1 -1
-
-       reduced tolerance for tall (but skinny) windows
-       
-1997-09-15 15:13  sopwith
-
-       Changed:
-               windows.c (1.3), "Exp", lines: +1 -1
-
-       Fixed #include so it builds on systems with other newt header files
-       
-1997-09-12 16:19  ewt
-
-       Changed:
-               testgrid.c (1.6), "Exp", lines: +1 -0
-               windows.c (1.2), "Exp", lines: +4 -1
-
-       fixed major bug in newtWinChoice()
-       
-1997-09-12 16:19  ewt
-
-       Changed:
-               textbox.c (1.9), "Exp", lines: +3 -0
-
-       1) charge a penalty for lines which aren't half full
-       
-1997-09-12 16:07  ewt
-
-       Changed:
-               Makefile (1.32), "Exp", lines: +1 -1
-
-       don't link with efence
-       
-1997-09-12 15:50  ewt
-
-       Added:
-               windows.c (1.1)
-       Changed:
-               Makefile (1.31), "Exp", lines: +4 -3
-
-       added windows.c
-       
-1997-09-12 15:50  ewt
-
-       Changed:
-               newt.h (1.41), "Exp", lines: +15 -0
-
-       added first newtWin*() functions, added newtReflowText()
-       
-1997-09-12 15:50  ewt
-
-       Changed:
-               testgrid.c (1.5), "Exp", lines: +17 -5
-
-       [no log message]
-       
-1997-09-12 15:49  ewt
-
-       Changed:
-               textbox.c (1.8), "Exp", lines: +83 -0
-
-       added newtReflowText()
-       
-1997-09-12 15:49  ewt
-
-       Changed:
-               grid.c (1.5), "Exp", lines: +6 -4
-
-       should handle empty fields now
-       
-1997-09-12 02:19  ewt
-
-       Changed:
-               grid.c (1.4), "Exp", lines: +8 -0
-               newt.c (1.30), "Exp", lines: +15 -0
-               newt.h (1.40), "Exp", lines: +2 -0
-               testgrid.c (1.4), "Exp", lines: +3 -5
-
-       added newtCenteredWindow() and newtGridWrappedWindow()
-       
-1997-09-12 02:10  ewt
-
-       Changed:
-               grid.c (1.3), "Exp", lines: +49 -13
-               newt.h (1.39), "Exp", lines: +1 -0
-               testgrid.c (1.3), "Exp", lines: +29 -2
-               textbox.c (1.7), "Exp", lines: +2 -0
-
-       basic grid implementation fully functional
-       
-1997-09-12 01:30  ewt
-
-       Changed:
-               testgrid.c (1.2), "Exp", lines: +5 -5
-
-       modified for padding/anchor parameters
-       
-1997-09-11 18:53  ewt
-
-       Changed:
-               newt.h (1.38), "Exp", lines: +12 -1
-
-       1) added padding and anchors for grids
-       2) added newtComponentTakesFocus()
-       
-1997-09-11 18:52  ewt
-
-       Changed:
-               grid.c (1.2), "Exp", lines: +49 -17
-
-       Added padding and anchors
-       
-1997-09-11 18:52  ewt
-
-       Changed:
-               form.c (1.21), "Exp", lines: +4 -0
-
-       added newtComponentTakesFocus()
-       
-1997-09-11 18:17  ewt
-
-       Added:
-               testgrid.c (1.1)
-
-       [no log message]
-       
-1997-09-11 03:22  ewt
-
-       Added:
-               grid.c (1.1)
-       Changed:
-               Makefile (1.30), "Exp", lines: +5 -2
-               button.c (1.7), "Exp", lines: +9 -0
-               checkbox.c (1.13), "Exp", lines: +1 -0
-               entry.c (1.14), "Exp", lines: +1 -0
-               label.c (1.4), "Exp", lines: +1 -0
-               newt.h (1.37), "Exp", lines: +10 -0
-               newt_pr.h (1.15), "Exp", lines: +1 -0
-               scale.c (1.4), "Exp", lines: +1 -0
-               scrollbar.c (1.4), "Exp", lines: +1 -0
-               textbox.c (1.6), "Exp", lines: +1 -0
-
-       1) added "place" operation
-       2) first pass at grid auto-placement implementation
-       
-1997-09-08 20:00  sopwith
-
-       Changed:
-               button.c (1.6), "Exp", lines: +3 -3
-               checkbox.c (1.12), "Exp", lines: +9 -9
-               dialogboxes.c (1.3), "Exp", lines: +1 -1
-               entry.c (1.13), "Exp", lines: +2 -2
-               form.c (1.20), "Exp", lines: +2 -2
-               label.c (1.3), "Exp", lines: +2 -2
-               listbox.c (1.26), "Exp", lines: +11 -9
-               newt.c (1.29), "Exp", lines: +7 -7
-               newt.h (1.36), "Exp", lines: +20 -20
-
-       Various 'const' casting mods from Bruce Guenter <bruceg@qcc.sk.ca>
-       
-1997-08-27 16:22  ewt
-
-       Changed:
-               Makefile (1.29), "Exp", lines: +2 -2
-
-       Version 0.10
-       
-1997-08-21 20:43  ewt
-
-       Changed:
-               listbox.c (1.25), "Exp", lines: +0 -2
-               newt.c (1.28), "Exp", lines: +3 -19
-               newt_pr.h (1.14), "Exp", lines: +0 -1
-
-       removed extraneous screen drawing
-       
-1997-08-19 02:53  sopwith
-
-       Changed:
-               checkbox.c (1.11), "Exp", lines: +1 -1
-               dialogboxes.c (1.2), "Exp", lines: +3 -3
-               entry.c (1.12), "Exp", lines: +2 -2
-               listbox.c (1.24), "Exp", lines: +1 -1
-               test.c (1.20), "Exp", lines: +3 -1
-
-       "comparison between signed and unsigned" warnings fixed
-       
-1997-08-19 02:44  sopwith
-
-       Changed:
-               newt.h (1.35), "Exp", lines: +1 -0
-
-       Fixed getselection on listbox
-       
-1997-08-18 21:12  ewt
-
-       Added:
-               dialogboxes.c (1.1)
-               dialogboxes.h (1.1)
-               whiptcl.c (1.1)
-       Changed:
-               Makefile (1.28), "Exp", lines: +10 -5
-               newt.c (1.27), "Exp", lines: +1 -1
-               newt.h (1.34), "Exp", lines: +1 -1
-               scale.c (1.3), "Exp", lines: +1 -1
-               whiptail.c (1.4), "Exp", lines: +34 -399
-
-       split whiptail dialog stuff out; added whiptcl
-       
-1997-08-18 20:16  sopwith
-
-       Changed:
-               listbox.c (1.23), "Exp", lines: +4 -4
-               newt.h (1.33), "Exp", lines: +1 -1
-               test.c (1.19), "Exp", lines: +3 -3
-
-       More misc listbox changes.
-       
-1997-08-15 04:36  sopwith
-
-       Changed:
-               listbox.c (1.22), "Exp", lines: +35 -26
-               newt.c (1.26), "Exp", lines: +8 -0
-               newt.h (1.32), "Exp", lines: +6 -1
-
-       Listbox changes, newtBell()
-       
-1997-08-15 02:27  sopwith
-
-       Changed:
-               form.c (1.19), "Exp", lines: +0 -2
-               test.c (1.18), "Exp", lines: +1 -0
-
-       Hmm, maybe this will work...?
-       
-1997-07-30 15:27  sopwith
-
-       Changed:
-               Makefile (1.27), "Exp", lines: +5 -5
-               listbox.c (1.21), "Exp", lines: +2 -6
-
-       Fixed Makefile so that shared library gets remade only if files change
-       (before, was getting remade all the time because of the shared/ directory)
-
-       Undid listbox's newtListboxAddEntry buboo that I added,
-       newtListboxInsert() doesn't work right if only one item in list.
-       
-1997-07-30 05:17  sopwith
-
-       Changed:
-               listbox.c (1.20), "Exp", lines: +21 -0
-               newt.h (1.31), "Exp", lines: +1 -0
-
-       Added newtListboxClear - it seems to be done frequently via
-       newtListboxDeleteEntry from apps.
-       
-1997-07-22 19:14  sopwith
-
-       Changed:
-               listbox.c (1.19), "Exp", lines: +57 -9
-               newt.c (1.25), "Exp", lines: +8 -1
-               newt.h (1.30), "Exp", lines: +7 -1
-               test.c (1.17), "Exp", lines: +20 -11
-
-       Listbox has multiple selection support now (demo included in test.c).
-       
-1997-07-22 18:22  sopwith
-
-       Changed:
-               listbox.c (1.18), "Exp", lines: +25 -2
-               newt.c (1.24), "Exp", lines: +2 -0
-               newt.h (1.29), "Exp", lines: +1 -0
-
-       Few more changes.
-       
-1997-07-22 17:21  sopwith
-
-       Changed:
-               form.c (1.18), "Exp", lines: +2 -0
-               listbox.c (1.17), "Exp", lines: +0 -3
-               newt.c (1.23), "Exp", lines: +23 -5
-               newt_pr.h (1.13), "Exp", lines: +1 -0
-
-       Redraw fixes.
-       Tiny listbox nav update.
-       
-1997-07-22 16:55  sopwith
-
-       Changed:
-               listbox.c (1.16), "Exp", lines: +37 -5
-
-       Saner(?) listbox navigation.
-       
-1997-07-22 15:59  sopwith
-
-       Changed:
-               listbox.c (1.15), "Exp", lines: +6 -0
-
-       Listbox now runs the user's callback whenever the current item in the
-       listbox changes.
-       
-1997-07-08 17:55  ewt
-
-       Changed:
-               newt.spec (1.5), "Exp", lines: +2 -4
-
-       use %post -p syntax
-       
-1997-06-02 16:27  ewt
-
-       Changed:
-               Makefile (1.26), "Exp", lines: +1 -1
-               listbox.c (1.14), "Exp", lines: +27 -10
-               newt.h (1.28), "Exp", lines: +1 -0
-               newt.spec (1.4), "Exp", lines: +7 -2
-
-       Added patches from Clarence for constant sized listboxes, changed vesrion
-       numbers to 0.9
-       
-1997-06-02 16:23  ewt
-
-       Changed:
-               Makefile (1.25), "Exp", lines: +1 -1
-
-       Changed version to 0.9
-       
-1997-06-02 16:21  ewt
-
-       Changed:
-               Makefile (1.24), "Exp", lines: +2 -1
-               entry.c (1.11), "Exp", lines: +8 -8
-               form.c (1.17), "Exp", lines: +1 -1
-               listbox.c (1.13), "Exp", lines: +8 -7
-               newt.h (1.27), "Exp", lines: +6 -5
-               newt.spec (1.3), "Exp", lines: +4 -0
-               test.c (1.16), "Exp", lines: +5 -5
-               textbox.c (1.5), "Exp", lines: +2 -2
-               whiptail.c (1.3), "Exp", lines: +4 -4
-
-       Various cleanups from Elliot
-       
-1997-04-14 15:53  ewt
-
-       Changed:
-               Makefile (1.23), "Exp", lines: +1 -1
-
-       clean should remove testobjs
-       
-1997-04-14 15:43  ewt
-
-       Changed:
-               listbox.c (1.12), "Exp", lines: +11 -2
-               newt.h (1.26), "Exp", lines: +1 -0
-
-       added NEWT_FLAG_DOBORDER from msf
-       
-1997-04-14 15:38  ewt
-
-       Changed:
-               whiptail.c (1.2), "Exp", lines: +14 -6
-
-       added FLAG_DEFAULT_NO
-       
-1997-03-18 15:31  ewt
-
-       Changed:
-               newt.spec (1.2), "Exp", lines: +13 -3
-
-       1) get right version of the shared lib
-       2) added whiptail
-       
-1997-03-18 15:31  ewt
-
-       Changed:
-               Makefile (1.22), "Exp", lines: +1 -1
-
-       clean target should remove whiptail objects
-       
-1997-03-18 15:09  ewt
-
-       Added:
-               whiptail.c (1.1)
-
-       Initial revision
-       
-1997-03-18 15:08  ewt
-
-       Changed:
-               textbox.c (1.4), "Exp", lines: +10 -0
-
-       added newtTextboxSetHeight() and newtTextboxGetNumLines()
-       
-1997-03-18 15:08  ewt
-
-       Changed:
-               newt.c (1.22), "Exp", lines: +4 -0
-
-       added colors for compact buttons
-       
-1997-03-18 15:08  ewt
-
-       Changed:
-               newt.h (1.25), "Exp", lines: +11 -6
-
-       added newtCompactButton(), newtTextboxSetHeight(), newtTextboxGetNumLines()
-             NEWT_FLAG_NOSCROLL
-       
-1997-03-18 15:07  ewt
-
-       Changed:
-               listbox.c (1.11), "Exp", lines: +5 -2
-
-       added NEWT_FLAG_NOSCROLL support
-       
-1997-03-18 15:07  ewt
-
-       Changed:
-               button.c (1.5), "Exp", lines: +54 -23
-
-       added compact buttons
-       
-1997-03-18 15:07  ewt
-
-       Changed:
-               Makefile (1.21), "Exp", lines: +14 -8
-
-       added rules for whiptail
-       
-1997-03-17 17:07  ewt
-
-       Changed:
-               checkbox.c (1.10), "Exp", lines: +11 -3
-
-       added NEWT_FLAG_RETURNEXIT support
-       
-1997-03-17 17:07  ewt
-
-       Changed:
-               listbox.c (1.10), "Exp", lines: +15 -7
-
-       deals with 0 height (automatically resizing) listboxes better
-       
-1997-03-17 17:06  ewt
-
-       Changed:
-               newt.h (1.24), "Exp", lines: +16 -9
-
-       namespace cleanups
-       
-1997-03-17 16:55  ewt
-
-       Changed:
-               newt.c (1.21), "Exp", lines: +8 -0
-
-       flush input when drawing a new window
-       
-1997-03-17 16:55  ewt
-
-       Changed:
-               Makefile (1.20), "Exp", lines: +1 -1
-
-       remove showchars in archive target
-       
-1997-02-25 23:16  ewt
-
-       Added:
-               newt.spec (1.1)
-
-       Initial revision
-       
-1997-02-25 23:11  ewt
-
-       Changed:
-               button.c (1.4), "Exp", lines: +2 -2
-               checkbox.c (1.9), "Exp", lines: +2 -2
-               entry.c (1.10), "Exp", lines: +4 -4
-               newt.c (1.20), "Exp", lines: +1 -1
-               newt.h (1.23), "Exp", lines: +9 -1
-               newt_pr.h (1.12), "Exp", lines: +5 -5
-               textbox.c (1.3), "Exp", lines: +2 -2
-
-       C++ cleanups from sopwith
-       
-1997-02-25 23:11  ewt
-
-       Changed:
-               listbox.c (1.9), "Exp", lines: +21 -10
-
-       misc fixes from sopwith
-       
-1997-02-17 17:02  ewt
-
-       Changed:
-               newt.h (1.22), "Exp", lines: +6 -2
-
-       changes for sopwith's revised listbox
-       
-1997-02-17 17:01  ewt
-
-       Changed:
-               listbox.c (1.8), "Exp", lines: +24 -12
-
-       more sopwith fixes
-       
-1997-02-17 16:59  ewt
-
-       Changed:
-               listbox.c (1.7), "Exp", lines: +14 -13
-
-       cleanups from sopwith
-       
-1997-02-17 16:58  ewt
-
-       Changed:
-               Makefile (1.19), "Exp", lines: +5 -5
-
-       changes to install rules from sopwith
-       
-1997-01-29 21:02  ewt
-
-       Changed:
-               listbox.c (1.6), "Exp", lines: +319 -62
-
-       incorporated rewrite from Elliot Lee
-       
-1997-01-29 21:02  ewt
-
-       Changed:
-               newt.h (1.21), "Exp", lines: +2 -1
-
-       1) added newtListboxDeleteEntry()
-       2) changed newtListboxAddEntry() to return int
-       
-1997-01-29 21:02  ewt
-
-       Changed:
-               Makefile (1.18), "Exp", lines: +1 -1
-
-       changed to version 0.8
-       
-1997-01-02 02:47  ewt
-
-       Changed:
-               newt.c (1.19), "Exp", lines: +1 -1
-
-       fixed silly license typo
-       
-1996-12-13 17:07  ewt
-
-       Changed:
-               newt.c (1.18), "Exp", lines: +11 -1
-               newt.h (1.20), "Exp", lines: +3 -1
-               test.c (1.15), "Exp", lines: +9 -0
-
-       added suspend callback
-       
-1996-12-06 20:21  ewt
-
-       Changed:
-               newt.c (1.17), "Exp", lines: +9 -8
-
-       changes for new version of slang (speeds up window drawing)
-       
-1996-12-04 19:17  ewt
-
-       Changed:
-               test.c (1.14), "Exp", lines: +22 -0
-
-       added test of NEWT_ENTRY_DISABLED
-       
-1996-12-04 19:17  ewt
-
-       Changed:
-               newt.c (1.16), "Exp", lines: +36 -9
-               newt_pr.h (1.11), "Exp", lines: +3 -0
-
-       added newtSetFlags(), newtGetrc()
-       
-1996-12-04 19:16  ewt
-
-       Changed:
-               entry.c (1.9), "Exp", lines: +26 -3
-               newt.h (1.19), "Exp", lines: +6 -0
-
-       added newtEntrySetFlags(), NEWT_ENTRY_DISABLED
-       
-1996-12-04 19:16  ewt
-
-       Changed:
-               Makefile (1.17), "Exp", lines: +1 -1
-
-       changed to version 0.7
-       
-1996-09-21 17:30  ewt
-
-       Changed:
-               Makefile (1.16), "Exp", lines: +1 -1
-
-       clean up old shared libs
-       
-1996-09-05 19:13  ewt
-
-       Changed:
-               Makefile (1.15), "Exp", lines: +1 -1
-
-       changed version to 0.6
-       
-1996-09-04 17:46  ewt
-
-       Changed:
-               scale.c (1.2), "Exp", lines: +7 -2
-
-       don't update scale unless aboslutely necessary
-       
-1996-09-04 17:46  ewt
-
-       Changed:
-               newt.c (1.15), "Exp", lines: +1 -1
-
-       changed bg color for scrollbar
-       
-1996-09-04 16:27  ewt
-
-       Added:
-               scale.c (1.1)
-
-       Initial revision
-       
-1996-09-03 01:38  ewt
-
-       Changed:
-               newt.h (1.18), "Exp", lines: +9 -0
-
-       added:
-               void newtSuspend(void);
-               void newtResume(void);
-               newtComponent newtScale(_
-               void newtScaleSet()
-       
-1996-09-03 01:38  ewt
-
-       Changed:
-               Makefile (1.14), "Exp", lines: +7 -3
-
-       1) changed to version 0.5
-       2) added scale.o
-       
-1996-09-03 01:37  ewt
-
-       Changed:
-               newt.c (1.14), "Exp", lines: +18 -0
-               test.c (1.13), "Exp", lines: +31 -21
-
-       added a scale
-       
-1996-08-21 15:19  ewt
-
-       Changed:
-               newt.h (1.17), "Exp", lines: +1 -0
-
-       added newtRedrawHelpLine()
-       
-1996-08-21 15:19  ewt
-
-       Changed:
-               newt.c (1.13), "Exp", lines: +25 -6
-
-       supports negative rows/columns for background text
-       
-1996-08-21 15:18  ewt
-
-       Changed:
-               test.c (1.12), "Exp", lines: +1 -1
-
-       [no log message]
-       
-1996-08-12 20:08  ewt
-
-       Changed:
-               Makefile (1.13), "Exp", lines: +1 -1
-
-       changed to version 0.4
-       
-1996-08-12 20:05  ewt
-
-       Changed:
-               newt_pr.h (1.10), "Exp", lines: +16 -0
-
-       added COLORSET macros which are the same as NEWT_COLORSET ones for
-       backwards compatibility
-       
-1996-08-12 20:05  ewt
-
-       Changed:
-               newt.h (1.16), "Exp", lines: +22 -15
-
-       1) added root text drawing
-       2) added help line stack
-       3) changed colorset define's to be NEWT_
-       
-1996-08-12 20:04  ewt
-
-       Changed:
-               newt.c (1.12), "Exp", lines: +84 -24
-
-       1) added root text drawing
-       2) added help line stack
-       2) changed colorset define's to be NEWT_
-       
-1996-08-12 20:04  ewt
-
-       Changed:
-               test.c (1.11), "Exp", lines: +4 -1
-
-       1) added root text
-       2) added help line
-       3) changed colorset define
-       
-1996-08-07 20:16  ewt
-
-       Changed:
-               form.c (1.16), "Exp", lines: +4 -0
-               newt.h (1.15), "Exp", lines: +1 -0
-
-       added newtFormSetWidth()
-       
-1996-08-07 19:52  ewt
-
-       Changed:
-               form.c (1.15), "Exp", lines: +8 -1
-
-       added newtFormSetBackground()
-       
-1996-08-07 19:51  ewt
-
-       Changed:
-               newt_pr.h (1.9), "Exp", lines: +0 -16
-
-       moved COLORSET_* defines to newt.h from newt_pr.h
-       
-1996-08-07 19:51  ewt
-
-       Changed:
-               newt.h (1.14), "Exp", lines: +17 -0
-
-       moved COLORSET_* defines to newt.h from newt_pr.h
-       added newtFormSetBackground()
-       
-1996-08-07 19:51  ewt
-
-       Changed:
-               test.c (1.10), "Exp", lines: +6 -3
-
-       [no log message]
-       
-1996-08-07 18:54  ewt
-
-       Changed:
-               newt.c (1.11), "Exp", lines: +1 -1
-
-       changed colors to get rid of blinking
-       
-1996-08-07 18:48  ewt
-
-       Changed:
-               newt.c (1.10), "Exp", lines: +15 -0
-
-       added maps for Linux F1-F5
-       added logic for getting proper window size
-       
-1996-08-06 20:25  ewt
-
-       Changed:
-               newt.h (1.13), "Exp", lines: +23 -2
-
-       added newtFormRun(), function keys, component callbacks
-       
-1996-08-06 20:24  ewt
-
-       Changed:
-               newt_pr.h (1.8), "Exp", lines: +3 -0
-               newt.c (1.9), "Exp", lines: +10 -4
-
-       added component callbacks
-       
-1996-08-06 20:24  ewt
-
-       Changed:
-               label.c (1.2), "Exp", lines: +20 -0
-
-       added newtLabelSetText()
-       
-1996-08-06 20:24  ewt
-
-       Changed:
-               entry.c (1.8), "Exp", lines: +2 -11
-
-       removed newtEntryAddCallback(), changed callback logic to use component
-       callbacks
-       
-1996-08-06 20:23  ewt
-
-       Changed:
-               form.c (1.14), "Exp", lines: +62 -12
-
-       added newtComponentAddCallback(), newtFormRun()
-       
-1996-08-06 20:23  ewt
-
-       Changed:
-               checkbox.c (1.8), "Exp", lines: +5 -0
-
-       added support for callback
-       
-1996-08-06 20:23  ewt
-
-       Changed:
-               Makefile (1.12), "Exp", lines: +4 -3
-
-       changed VERSION to 0.3, fixed soname stuff
-       
-1996-08-02 18:47  ewt
-
-       Changed:
-               form.c (1.13), "Exp", lines: +17 -7
-
-       added support for F12 exiting
-       
-1996-08-02 18:45  ewt
-
-       Changed:
-               listbox.c (1.5), "Exp", lines: +1 -1
-
-       mods to use new newtForm() call
-       
-1996-08-02 18:44  ewt
-
-       Changed:
-               newt.c (1.8), "Exp", lines: +9 -0
-
-       1) added NEWT_KEY_F1, NEWT_KEY_F12
-       2) doesn't coredump when escape sequences come in quickly
-       
-1996-08-02 18:44  ewt
-
-       Changed:
-               newt.h (1.12), "Exp", lines: +6 -1
-
-       added NEWT_FORM_NOF12, NEWT_KEY_F1, NEWT_KEY_F12, new newtForm() prototype
-       
-1996-08-02 18:44  ewt
-
-       Changed:
-               test.c (1.9), "Exp", lines: +2 -2
-
-       changed for new newtForm() call
-       
-1996-08-02 18:44  ewt
-
-       Changed:
-               checkbox.c (1.7), "Exp", lines: +1 -1
-
-       return doesn't toggle button state
-       
-1996-08-02 18:43  ewt
-
-       Changed:
-               button.c (1.3), "Exp", lines: +1 -0
-               textbox.c (1.2), "Exp", lines: +1 -0
-
-       added include of string.h
-       
-1996-07-31 16:53  ewt
-
-       Changed:
-               Makefile (1.11), "Exp", lines: +3 -2
-
-       1) added shared libs and objects to clean rule
-       2) changed version to 0.2
-       
-1996-07-31 16:49  ewt
-
-       Changed:
-               entry.c (1.7), "Exp", lines: +11 -3
-
-       1) when you enter a hidden field, don't put the cursor at the end
-       2) clear the text buffer in newtEntrySetText()
-       
-1996-07-23 03:59  ewt
-
-       Added:
-               COPYING (1.1)
-
-       Initial revision
-       
-1996-07-23 03:53  ewt
-
-       Changed:
-               newt.c (1.7), "Exp", lines: +12 -9
-
-       1) took color changes from Kit
-       2) added NEWT_KEY_PGDN, NEWT_KEY_PGUP
-       
-1996-07-23 03:53  ewt
-
-       Changed:
-               newt.h (1.11), "Exp", lines: +2 -0
-
-       added NEWT_KEY_PGUP, NEWT_KEY_PGDN
-       
-1996-07-23 03:52  ewt
-
-       Changed:
-               form.c (1.12), "Exp", lines: +40 -15
-
-       1) fixed newtFormSetCurrent() to set things at the end of the form
-          properly
-       2) added support for pgup and pgdn in forms
-       
-1996-07-13 20:09  ewt
-
-       Changed:
-               form.c (1.11), "Exp", lines: +10 -0
-               newt_pr.h (1.7), "Exp", lines: +2 -1
-
-       added ER_NEXTCOMP
-       
-1996-07-13 20:09  ewt
-
-       Changed:
-               entry.c (1.6), "Exp", lines: +2 -0
-
-       made <Enter> go to the next component
-       
-1996-06-20 02:49  ewt
-
-       Changed:
-               form.c (1.10), "Exp", lines: +19 -0
-               listbox.c (1.4), "Exp", lines: +6 -0
-               newt.h (1.10), "Exp", lines: +2 -0
-
-       added newtFormSetCurrent(), newtListboxSetCurrent()
-       
-1996-06-20 01:03  ewt
-
-       Changed:
-               Makefile (1.10), "Exp", lines: +1 -1
-
-       [no log message]
-       
-1996-06-20 01:02  ewt
-
-       Changed:
-               Makefile (1.9), "Exp", lines: +1 -1
-
-       fixed archive rule to not included shared directory
-       
-1996-06-20 00:57  ewt
-
-       Changed:
-               Makefile (1.8), "Exp", lines: +1 -1
-
-       fixed shlib link rule
-       
-1996-06-20 00:56  ewt
-
-       Changed:
-               Makefile (1.7), "Exp", lines: +28 -1
-
-       added rules for building shared libs
-       
-1996-06-20 00:45  ewt
-
-       Changed:
-               form.c (1.9), "Exp", lines: +4 -5
-               newt.h (1.9), "Exp", lines: +1 -0
-
-       made newtDrawFrom externally visible
-       
-1996-06-17 15:16  ewt
-
-       Changed:
-               entry.c (1.5), "Exp", lines: +7 -0
-
-       added NEWT_ENTRY_RETURNEXIT
-       
-1996-06-17 15:16  ewt
-
-       Changed:
-               form.c (1.8), "Exp", lines: +12 -4
-
-       added newtFormGetCurrent()
-       
-1996-06-17 15:15  ewt
-
-       Changed:
-               newt.h (1.8), "Exp", lines: +10 -2
-
-       1) added NEWT_ENTRY_RETURNEXIT, NEWT_LISTBOX_RETURNEXIT
-       2) Added listbox data
-       
-1996-06-17 15:15  ewt
-
-       Changed:
-               listbox.c (1.3), "Exp", lines: +39 -5
-
-       Keeps data with listbox items, allows changing of text in listbox item
-       Supports <Return> accelerator
-       
-1996-06-17 15:14  ewt
-
-       Changed:
-               checkbox.c (1.6), "Exp", lines: +19 -1
-
-       Keeps data with listbox items, allows changing of text in listbox item
-       
-1996-06-17 15:14  ewt
-
-       Changed:
-               test.c (1.8), "Exp", lines: +10 -10
-
-       fixed for new newtListboxAddEntry() call
-       
-1996-06-13 21:15  ewt
-
-       Changed:
-               checkbox.c (1.5), "Exp", lines: +14 -0
-
-       added newtRadioGetCurrent()
-       
-1996-06-13 21:15  ewt
-
-       Changed:
-               entry.c (1.4), "Exp", lines: +31 -0
-
-       added newtEntrySet(), newtEntryAddCallback()
-       
-1996-06-13 21:15  ewt
-
-       Changed:
-               newt.h (1.7), "Exp", lines: +8 -3
-
-       added newtEntrySet(), newtEntryAddCallback(), newtRadioGetCurrent()
-       
-1996-05-03 20:34  ewt
-
-       Changed:
-               form.c (1.7), "Exp", lines: +2 -0
-
-       clears form space before drawing it
-       
-1996-05-03 20:34  ewt
-
-       Changed:
-               test.c (1.7), "Exp", lines: +9 -9
-
-       [no log message]
-       
-1996-04-30 18:43  ewt
-
-       Changed:
-               scrollbar.c (1.3), "Exp", lines: +1 -1
-
-       don't let sets with a total of 0 break things
-       
-1996-04-17 00:42  ewt
-
-       Added:
-               textbox.c (1.1)
-
-       Initial revision
-       
-1996-04-17 00:41  ewt
-
-       Changed:
-               Makefile (1.6), "Exp", lines: +2 -2
-
-       removed libefence, added textbox.o
-       
-1996-04-17 00:39  ewt
-
-       Changed:
-               newt_pr.h (1.6), "Exp", lines: +2 -0
-
-       added textbox colors
-       
-1996-04-17 00:38  ewt
-
-       Changed:
-               newt.c (1.6), "Exp", lines: +5 -0
-               newt.h (1.6), "Exp", lines: +8 -0
-
-       added textbox widget
-       
-1996-04-17 00:38  ewt
-
-       Changed:
-               test.c (1.6), "Exp", lines: +5 -2
-
-       added test textbox
-       
-1996-04-16 22:30  ewt
-
-       Changed:
-               scrollbar.c (1.2), "Exp", lines: +5 -4
-
-       changed scrollbar to look mediocre on both xterm and console, rather
-       then bad on the xterm but good on the console
-       
-1996-04-16 22:15  ewt
-
-       Changed:
-               form.c (1.6), "Exp", lines: +71 -47
-
-       added EARLY, NORMAL, LATE event mechanism
-       removed PREVCOMP and NEXTCOMP hack
-       
-1996-04-16 22:14  ewt
-
-       Changed:
-               newt_pr.h (1.5), "Exp", lines: +6 -2
-
-       got rid of PREVCOMP and NEXTCOMP result types, added EARLY, NORMAL, LATE
-       event distinctions
-       
-1996-04-16 22:14  ewt
-
-       Changed:
-               checkbox.c (1.4), "Exp", lines: +35 -32
-               entry.c (1.3), "Exp", lines: +22 -18
-               button.c (1.2), "Exp", lines: +27 -24
-
-       ignores all EARLY and LATE events
-       
-1996-03-31 02:47  ewt
-
-       Changed:
-               Makefile (1.5), "Exp", lines: +44 -6
-
-       added version number, libnewt.a generation, archive and install rules
-       
-1996-03-31 02:47  ewt
-
-       Changed:
-               newt.c (1.5), "Exp", lines: +11 -2
-
-       added version number, copyright message
-       
-1996-03-31 02:17  ewt
-
-       Changed:
-               newt.h (1.5), "Exp", lines: +4 -1
-
-       added newtVerticalScrollbar(), newtScrollbarSet(), and changed form
-       creation call to let it have a vertical scrollbar
-       
-1996-03-31 02:16  ewt
-
-       Changed:
-               test.c (1.5), "Exp", lines: +13 -7
-
-       fixed form creation to support syntax change for vertical scrollbars
-       
-1996-03-31 02:15  ewt
-
-       Changed:
-               listbox.c (1.2), "Exp", lines: +16 -6
-
-       added vertical scrollbar
-       
-1996-03-31 02:15  ewt
-
-       Added:
-               scrollbar.c (1.1)
-
-       Initial revision
-       
-1996-03-31 02:15  ewt
-
-       Changed:
-               form.c (1.5), "Exp", lines: +34 -10
-
-       added support for vertical scrollbars
-       
-1996-03-31 02:14  ewt
-
-       Changed:
-               Makefile (1.4), "Exp", lines: +2 -1
-
-       added scrollbar.o
-       
-1996-03-31 00:51  ewt
-
-       Added:
-               listbox.c (1.1)
-
-       Initial revision
-       
-1996-03-31 00:40  ewt
-
-       Changed:
-               newt.c (1.4), "Exp", lines: +1 -1
-
-       increased timeout for reading extended keystrokes to make it work
-       better over slow links
-       
-1996-03-27 17:58  ewt
-
-       Changed:
-               newt_pr.h (1.4), "Exp", lines: +2 -0
-
-       added COLORSET_LISTBOX COLORSET_ACTLISTBOX
-       
-1996-03-27 17:50  ewt
-
-       Changed:
-               form.c (1.4), "Exp", lines: +25 -16
-
-       added component wrapping
-       you can't set a forms width, just its height
-       added support for an untab key
-       
-1996-03-27 17:47  ewt
-
-       Changed:
-               newt.c (1.3), "Exp", lines: +7 -0
-
-       added COLORSET_LISTBOX colors
-       
-1996-03-27 17:46  ewt
-
-       Changed:
-               newt.h (1.4), "Exp", lines: +11 -2
-
-       added listbox chenges
-       
-1996-03-27 17:46  ewt
-
-       Changed:
-               checkbox.c (1.3), "Exp", lines: +74 -28
-
-       Added listitem type for listboxes
-       
-1996-03-27 17:46  ewt
-
-       Changed:
-               test.c (1.4), "Exp", lines: +12 -3
-
-       added listbox test
-       
-1996-03-27 17:46  ewt
-
-       Changed:
-               Makefile (1.3), "Exp", lines: +1 -1
-
-       added listbox.o
-       
-1996-03-26 04:15  ewt
-
-       Added:
-               label.c (1.1)
-
-       Initial revision
-       
-1996-03-26 04:14  ewt
-
-       Changed:
-               form.c (1.3), "Exp", lines: +112 -35
-
-       added vertical scrolling ability when all components are of height
-       one (though more general vertical scrolling should be trivial to
-       implement)
-       
-1996-03-26 04:13  ewt
-
-       Changed:
-               newt.h (1.3), "Exp", lines: +3 -0
-
-       added label colors, newtFormSetSize(), and newtLabel()
-       
-1996-03-26 04:13  ewt
-
-       Changed:
-               test.c (1.3), "Exp", lines: +19 -9
-
-       [no log message]
-       
-1996-03-26 04:13  ewt
-
-       Changed:
-               newt_pr.h (1.3), "Exp", lines: +4 -0
-               newt.c (1.2), "Exp", lines: +10 -0
-
-       added COLORSET_LABEL, newtDefaultEventHandler()
-       
-1996-03-26 04:13  ewt
-
-       Changed:
-               checkbox.c (1.2), "Exp", lines: +2 -0
-               entry.c (1.2), "Exp", lines: +2 -0
-
-       doesn't draw itself it top == -1
-       
-1996-03-26 04:12  ewt
-
-       Changed:
-               Makefile (1.2), "Exp", lines: +1 -1
-
-       added label.c
-       
-1996-03-25 02:59  ewt
-
-       Changed:
-               newt_pr.h (1.2), "Exp", lines: +2 -1
-
-       added ER_NEXTCOMP, ER_PREVCOMP
-       
-1996-03-25 02:59  ewt
-
-       Changed:
-               form.c (1.2), "Exp", lines: +156 -75
-               newt.h (1.2), "Exp", lines: +8 -9
-               test.c (1.2), "Exp", lines: +8 -5
-
-       changed form to be a full fledged component
-       
-1996-03-25 01:59  ewt
-
-       Added:
-               Makefile (1.1)
-               button.c (1.1)
-               checkbox.c (1.1)
-               entry.c (1.1)
-               form.c (1.1)
-               newt.c (1.1)
-               newt.h (1.1)
-               newt_pr.h (1.1)
-               showchars.c (1.1)
-               showkey.c (1.1)
-               test.c (1.1)
-
-       Initial revision
-       
diff --git a/Doxyfile b/Doxyfile
deleted file mode 100644 (file)
index d1c8b5d..0000000
--- a/Doxyfile
+++ /dev/null
@@ -1,1161 +0,0 @@
-# Doxyfile 1.3.9.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = newt
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = 0.52
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = apidox/
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of source 
-# files, where putting all generated files in the same directory would otherwise 
-# cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, 
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, 
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, 
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, 
-# Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# This tag can be used to specify the encoding used in the generated output. 
-# The encoding is not always determined by the language that is chosen, 
-# but also whether or not the output is meant for Windows or non-Windows users. 
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
-# forces the Windows encoding (this is the default for the Windows binary), 
-# whereas setting the tag to NO uses a Unix-style encoding (the default for 
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING   = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is used 
-# as the annotated text. Otherwise, the brief description is used as-is. If left 
-# blank, the following values are used ("$name" is automatically replaced with the 
-# name of the entity): "The $name class" "The $name widget" "The $name file" 
-# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
-# members of a class in the documentation of that class as if those members were 
-# ordinary class members. Constructors, destructors and assignment operators of 
-# the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = 
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
-# only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
-# only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation.
-
-SHOW_DIRECTORIES       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text.
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = 
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
-# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
-
-FILE_PATTERNS          = 
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = 
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
-# that are symbolic links (a Unix filesystem feature) are excluded from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories.
-
-EXCLUDE_PATTERNS       = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = 
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = 
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = 
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = 
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = 
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = YES
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = 
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse the 
-# parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or 
-# super classes. Setting the tag to NO turns the diagrams off. Note that this 
-# option is superseded by the HAVE_DOT option below. This is only a fallback. It is 
-# recommended to install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = NO
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = YES
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found on the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_WIDTH    = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT   = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes that 
-# lay further from the root node will be omitted. Note that setting this option to 
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also 
-# note that a graph may be further truncated if the graph's image dimensions are 
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). 
-# If 0 is used for the depth value (the default), the graph is not depth-constrained.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
index 1ce8fea6989818705a9c8576ecac143eb113288b..467efdb3534e76565dd399f72f72ba94e0163fec 100644 (file)
--- a/button.c
+++ b/button.c
@@ -16,7 +16,7 @@ static void buttonDrawText(newtComponent co, int active, int pushed);
 static void buttonDraw(newtComponent c);
 static void buttonDestroy(newtComponent co);
 static struct eventResult buttonEvent(newtComponent c,
-                                      struct event ev);
+                                     struct event ev);
 static void buttonPlace(newtComponent co, int newLeft, int newTop);
 
 static struct componentOps buttonOps = {
@@ -38,11 +38,11 @@ static newtComponent createButton(int left, int row, const char * text, int comp
 
     co = malloc(sizeof(*co));
     if (co == NULL) 
-        return NULL;
+       return NULL;
     bu = malloc(sizeof(struct button));
     if (bu == NULL)  {
-        free (co);
-        return NULL;
+       free (co);
+       return NULL;
     }
     co->data = bu;
 
@@ -51,11 +51,11 @@ static newtComponent createButton(int left, int row, const char * text, int comp
     co->ops = &buttonOps;
 
     if (bu->compact) {
-        co->height = 1;
-        co->width = width + 3;
+       co->height = 1;
+       co->width = width + 3;
     } else {
-        co->height = 4;
-        co->width = width + 5;
+       co->height = 4;
+       co->width = width + 5;
     }
 
     co->top = row;
@@ -104,27 +104,27 @@ static void buttonDrawIt(newtComponent co, int active, int pushed) {
     SLsmg_set_color(NEWT_COLORSET_BUTTON);
 
     if (bu->compact) {
-        if (active)
-            SLsmg_set_color(NEWT_COLORSET_COMPACTBUTTON);
-        else
-            SLsmg_set_color(NEWT_COLORSET_BUTTON);
-        newtGotorc(co->top+ pushed, co->left + 1 + pushed);
-        SLsmg_write_char('<');
-        SLsmg_write_string(bu->text);
-        SLsmg_write_char('>');
+       if (active)
+           SLsmg_set_color(NEWT_COLORSET_COMPACTBUTTON);
+       else
+           SLsmg_set_color(NEWT_COLORSET_BUTTON);
+       newtGotorc(co->top+ pushed, co->left + 1 + pushed);
+       SLsmg_write_char('<');
+       SLsmg_write_string(bu->text);
+       SLsmg_write_char('>');
     } else {
-        if (pushed) {
-            SLsmg_set_color(NEWT_COLORSET_BUTTON);
-            newtDrawBox(co->left + 1, co->top + 1, co->width - 1, 3, 0);
-
-            SLsmg_set_color(NEWT_COLORSET_WINDOW);
-            newtClearBox(co->left, co->top, co->width, 1);
-            newtClearBox(co->left, co->top, 1, co->height);
-        } else {
-            newtDrawBox(co->left, co->top, co->width - 1, 3, 1);
-        }
-
-        buttonDrawText(co, active, pushed);
+       if (pushed) {
+           SLsmg_set_color(NEWT_COLORSET_BUTTON);
+           newtDrawBox(co->left + 1, co->top + 1, co->width - 1, 3, 0);
+
+           SLsmg_set_color(NEWT_COLORSET_WINDOW);
+           newtClearBox(co->left, co->top, co->width, 1);
+           newtClearBox(co->left, co->top, 1, co->height);
+       } else {
+           newtDrawBox(co->left, co->top, co->width - 1, 3, 1);
+       }
+
+       buttonDrawText(co, active, pushed);
     }
 }
 
@@ -134,9 +134,9 @@ static void buttonDrawText(newtComponent co, int active, int pushed) {
     if (pushed) pushed = 1;
 
     if (active)
-        SLsmg_set_color(NEWT_COLORSET_ACTBUTTON);
+       SLsmg_set_color(NEWT_COLORSET_ACTBUTTON);
     else
-        SLsmg_set_color(NEWT_COLORSET_BUTTON);
+       SLsmg_set_color(NEWT_COLORSET_BUTTON);
 
     newtGotorc(co->top + 1 + pushed, co->left + 1 + pushed);
     SLsmg_write_char(' ');
@@ -145,58 +145,58 @@ static void buttonDrawText(newtComponent co, int active, int pushed) {
 }
 
 static struct eventResult buttonEvent(newtComponent co,
-                                      struct event ev) {
+                                     struct event ev) {
     struct eventResult er;
     struct button * bu = co->data;
 
     if (ev.when == EV_NORMAL) {
-        switch (ev.event) {
-          case EV_FOCUS:
-            buttonDrawIt(co, 1, 0);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case EV_UNFOCUS:
-            buttonDrawIt(co, 0, 0);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case EV_KEYPRESS:
-            if (ev.u.key == ' ' || ev.u.key == '\r') {
-                if (!bu->compact) {
-                    /* look pushed */
-                    buttonDrawIt(co, 1, 1);
-                    newtRefresh();
-                    newtDelay(150000);
-                    buttonDrawIt(co, 1, 0);
-                    newtRefresh();
-                    newtDelay(150000);
-                }
-
-                er.result = ER_EXITFORM;
-            } else
-                er.result = ER_IGNORED;
-            break;
-          case EV_MOUSE:
-              if (ev.u.mouse.type == MOUSE_BUTTON_DOWN &&
-                  co->top <= ev.u.mouse.y &&
-                  co->top + co->height - !bu->compact > ev.u.mouse.y &&
-                  co->left <= ev.u.mouse.x &&
-                  co->left + co->width - !bu->compact > ev.u.mouse.x) {
-                  if (!bu->compact) {
-                      buttonDrawIt(co, 1, 1);
-                      newtRefresh();
-                      newtDelay(150000);
-                      buttonDrawIt(co, 1, 0);
-                      newtRefresh();
-                      newtDelay(150000);
-                  }
-                  er.result = ER_EXITFORM;
-              }
-            break;
-        }
+       switch (ev.event) {
+         case EV_FOCUS:
+           buttonDrawIt(co, 1, 0);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case EV_UNFOCUS:
+           buttonDrawIt(co, 0, 0);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case EV_KEYPRESS:
+           if (ev.u.key == ' ' || ev.u.key == '\r') {
+               if (!bu->compact) {
+                   /* look pushed */
+                   buttonDrawIt(co, 1, 1);
+                   newtRefresh();
+                   newtDelay(150000);
+                   buttonDrawIt(co, 1, 0);
+                   newtRefresh();
+                   newtDelay(150000);
+               }
+
+               er.result = ER_EXITFORM;
+           } else
+               er.result = ER_IGNORED;
+           break;
+         case EV_MOUSE:
+             if (ev.u.mouse.type == MOUSE_BUTTON_DOWN &&
+                 co->top <= ev.u.mouse.y &&
+                 co->top + co->height - !bu->compact > ev.u.mouse.y &&
+                 co->left <= ev.u.mouse.x &&
+                 co->left + co->width - !bu->compact > ev.u.mouse.x) {
+                 if (!bu->compact) {
+                     buttonDrawIt(co, 1, 1);
+                     newtRefresh();
+                     newtDelay(150000);
+                     buttonDrawIt(co, 1, 0);
+                     newtRefresh();
+                     newtDelay(150000);
+                 }
+                 er.result = ER_EXITFORM;
+             }
+           break;
+       }
     } else
-        er.result = ER_IGNORED;
+       er.result = ER_IGNORED;
 
     return er;
 }
index 9d3a9e207d855f0b2f03afdd34ffd4019d1857ea..45473c9d2724eb96c58945e31c17d69ffcb661cb 100644 (file)
@@ -6,27 +6,27 @@
 newtGrid newtButtonBarv(char * button1, newtComponent * b1comp, va_list args) {
     newtGrid grid;
     struct buttonInfo {
-        char * name;
-        newtComponent * compPtr;
+       char * name;
+       newtComponent * compPtr;
     } buttons[50];
     int num;
     int i;
 
     buttons[0].name = button1, buttons[0].compPtr = b1comp, num = 1;
     while (1) {
-        buttons[num].name = va_arg(args, char *);
-        if (!buttons[num].name) break;
-        buttons[num].compPtr = va_arg(args, newtComponent *);
-        num++;
+       buttons[num].name = va_arg(args, char *);
+       if (!buttons[num].name) break;
+       buttons[num].compPtr = va_arg(args, newtComponent *);
+       num++;
     }
 
     grid = newtCreateGrid(num, 1);
 
     for (i = 0; i < num; i++) {
-        *buttons[i].compPtr = newtButton(-1, -1, buttons[i].name);
-        newtGridSetField(grid, i, 0, NEWT_GRID_COMPONENT, 
-                         *buttons[i].compPtr,
-                         num ? 1 : 0, 0, 0, 0, 0, 0);
+       *buttons[i].compPtr = newtButton(-1, -1, buttons[i].name);
+       newtGridSetField(grid, i, 0, NEWT_GRID_COMPONENT, 
+                        *buttons[i].compPtr,
+                        num ? 1 : 0, 0, 0, 0, 0, 0);
     }
 
     return grid;
index 64f8193dc68ba43594adbf4fe586094c4226ea9e..c753374bb701a02fd4d5360913aff0a74b031f34 100644 (file)
@@ -35,16 +35,16 @@ static struct componentOps cbOps = {
 } ;
 
 newtComponent newtRadiobutton(int left, int top, const char * text, int isDefault,
-                              newtComponent prevButton) {
+                             newtComponent prevButton) {
     newtComponent co;
     newtComponent curr;
     struct checkbox * rb;
     char initialValue;
 
     if (isDefault)
-        initialValue = '*';
+       initialValue = '*';
     else
-        initialValue = ' ';
+       initialValue = ' ';
 
     co = newtCheckbox(left, top, text, initialValue, " *", NULL);
     rb = co->data;
@@ -53,8 +53,8 @@ newtComponent newtRadiobutton(int left, int top, const char * text, int isDefaul
     rb->prevButton = prevButton;
 
     for (curr = co; curr; curr = rb->prevButton) {
-        rb = curr->data;
-        rb->lastButton = co;
+       rb = curr->data;
+       rb->lastButton = co;
     }
 
     return co;
@@ -67,10 +67,10 @@ newtComponent newtRadioGetCurrent(newtComponent setMember) {
     rb = setMember->data;
 
     while (rb && rb->value != '*') {
-        setMember = rb->prevButton;
-        if (!setMember)
-          return NULL;
-        rb = setMember->data;
+       setMember = rb->prevButton;
+       if (!setMember)
+         return NULL;
+       rb = setMember->data;
     }
 
     return setMember;
@@ -94,7 +94,7 @@ void newtCheckboxSetValue(newtComponent co, char value) {
  * FIXME: Check all calls.
  */
 newtComponent newtCheckbox(int left, int top, const char * text, char defValue,
-                           const char * seq, char * result) {
+                          const char * seq, char * result) {
     newtComponent co;
     struct checkbox * cb;
 
@@ -102,18 +102,18 @@ newtComponent newtCheckbox(int left, int top, const char * text, char defValue,
 
     co = malloc(sizeof(*co));
     if (co == NULL)
-        return NULL;
+       return NULL;
     cb = malloc(sizeof(struct checkbox));
     if (cb == NULL) {
-        free(co);
-        return NULL;
+       free(co);
+       return NULL;
     }
     co->data = cb;
     cb->flags = 0;
     if (result)
-        cb->result = result;
+       cb->result = result;
     else
-        cb->result = &cb->value;
+       cb->result = &cb->value;
 
     cb->text = strdup(text);
     cb->seq = strdup(seq);
@@ -142,9 +142,9 @@ void newtCheckboxSetFlags(newtComponent co, int flags, enum newtFlagsSense sense
     cb->flags = newtSetFlags(cb->flags, flags, sense);
 
     if (!(cb->flags & NEWT_FLAG_DISABLED))
-        co->takesFocus = 1;
+       co->takesFocus = 1;
     else
-        co->takesFocus = 0;
+       co->takesFocus = 0;
 
     newtGetrc(&row, &col);
     cbDraw(co);
@@ -157,11 +157,11 @@ static void cbDraw(newtComponent c) {
     if (c->top == -1 || !c->isMapped) return;
 
     if (cb->flags & NEWT_FLAG_DISABLED) {
-        cb->inactive = NEWT_COLORSET_DISENTRY;
-        cb->active = NEWT_COLORSET_DISENTRY;
+       cb->inactive = NEWT_COLORSET_DISENTRY;
+       cb->active = NEWT_COLORSET_DISENTRY;
     } else {
-        cb->inactive = COLORSET_CHECKBOX;
-        cb->active = COLORSET_ACTCHECKBOX;
+       cb->inactive = COLORSET_CHECKBOX;
+       cb->active = COLORSET_ACTCHECKBOX;
     }
 
     SLsmg_set_color(cb->inactive);
@@ -170,21 +170,21 @@ static void cbDraw(newtComponent c) {
 
     switch (cb->type) {
       case RADIO:
-        SLsmg_write_string("( ) ");
-        break;
+       SLsmg_write_string("( ) ");
+       break;
 
       case CHECK:
-        SLsmg_write_string("[ ] ");
-        break;
+       SLsmg_write_string("[ ] ");
+       break;
 
       default:
-        break;
+       break;
     }
 
     SLsmg_write_string(cb->text);
 
     if (cb->hasFocus)
-        SLsmg_set_color(cb->active);
+       SLsmg_set_color(cb->active);
 
     newtGotorc(c->top, c->left + 1);
     SLsmg_write_char(*cb->result);
@@ -205,73 +205,73 @@ struct eventResult cbEvent(newtComponent co, struct event ev) {
     const char * cur;
 
     if (ev.when == EV_NORMAL) {
-        switch (ev.event) {
-          case EV_FOCUS:
-            cb->hasFocus = 1;
-            cbDraw(co);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case EV_UNFOCUS:
-            cb->hasFocus = 0;
-            cbDraw(co);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case EV_KEYPRESS:
-            if (ev.u.key == ' ') {
-                if (cb->type == RADIO) {
-                    makeActive(co);
-                } else if (cb->type == CHECK) {
-                    cur = strchr(cb->seq, *cb->result);
-                    if (!cur)
-                        *cb->result = *cb->seq;
-                    else {
-                        cur++;
-                        if (! *cur)
-                            *cb->result = *cb->seq;
-                        else
-                            *cb->result = *cur;
-                    }
-                    cbDraw(co);
-                    er.result = ER_SWALLOWED;
-
-                    if (co->callback)
-                        co->callback(co, co->callbackData);
-                } else {
-                    er.result = ER_IGNORED;
-                }
-            } else if(ev.u.key == NEWT_KEY_ENTER) {
-                er.result = ER_IGNORED;
-            } else {
-                er.result = ER_IGNORED;
-            }
-            break;
-          case EV_MOUSE:
-            if (ev.u.mouse.type == MOUSE_BUTTON_DOWN) {
-                if (cb->type == RADIO) {
-                    makeActive(co);
-                } else if (cb->type == CHECK) {
-                    cur = strchr(cb->seq, *cb->result);
-                    if (!cur)
-                        *cb->result = *cb->seq;
-                    else {
-                        cur++;
-                        if (! *cur)
-                            *cb->result = *cb->seq;
-                        else
-                            *cb->result = *cur;
-                    }
-                    cbDraw(co);
-                    er.result = ER_SWALLOWED;
-
-                    if (co->callback)
-                        co->callback(co, co->callbackData);
-                }
-            }
-        }
+       switch (ev.event) {
+         case EV_FOCUS:
+           cb->hasFocus = 1;
+           cbDraw(co);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case EV_UNFOCUS:
+           cb->hasFocus = 0;
+           cbDraw(co);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case EV_KEYPRESS:
+           if (ev.u.key == ' ') {
+               if (cb->type == RADIO) {
+                   makeActive(co);
+               } else if (cb->type == CHECK) {
+                   cur = strchr(cb->seq, *cb->result);
+                   if (!cur)
+                       *cb->result = *cb->seq;
+                   else {
+                       cur++;
+                       if (! *cur)
+                           *cb->result = *cb->seq;
+                       else
+                           *cb->result = *cur;
+                   }
+                   cbDraw(co);
+                   er.result = ER_SWALLOWED;
+
+                   if (co->callback)
+                       co->callback(co, co->callbackData);
+               } else {
+                   er.result = ER_IGNORED;
+               }
+           } else if(ev.u.key == NEWT_KEY_ENTER) {
+               er.result = ER_IGNORED;
+           } else {
+               er.result = ER_IGNORED;
+           }
+           break;
+         case EV_MOUSE:
+           if (ev.u.mouse.type == MOUSE_BUTTON_DOWN) {
+               if (cb->type == RADIO) {
+                   makeActive(co);
+               } else if (cb->type == CHECK) {
+                   cur = strchr(cb->seq, *cb->result);
+                   if (!cur)
+                       *cb->result = *cb->seq;
+                   else {
+                       cur++;
+                       if (! *cur)
+                           *cb->result = *cb->seq;
+                       else
+                           *cb->result = *cur;
+                   }
+                   cbDraw(co);
+                   er.result = ER_SWALLOWED;
+
+                   if (co->callback)
+                       co->callback(co, co->callbackData);
+               }
+           }
+       }
     } else
-        er.result = ER_IGNORED;
+       er.result = ER_IGNORED;
 
     return er;
 }
@@ -285,16 +285,16 @@ static void makeActive(newtComponent co) {
     curr = cb->lastButton;
     rb = curr->data;
     while (curr && rb->value == rb->seq[0]) {
-        curr = rb->prevButton;
-        if (curr) rb = curr->data;
+       curr = rb->prevButton;
+       if (curr) rb = curr->data;
     }
     if (curr) {
-        rb->value = rb->seq[0];
-        cbDraw(curr);
+       rb->value = rb->seq[0];
+       cbDraw(curr);
     }
     cb->value = cb->seq[1];
     cbDraw(co);
 
     if (co->callback)
-        co->callback(co, co->callbackData);
+       co->callback(co, co->callbackData);
 }
index f4e70c0edc8010198387162567e622898c4ec210..815cc52e66c75f094d155ad76b76631824a47463 100644 (file)
@@ -40,7 +40,7 @@ static void doBuildFlatList(struct CheckboxTree * ct, struct items * item);
 enum countWhat { COUNT_EXPOSED=0, COUNT_SELECTED=1 };
 static int countItems(struct items * item, enum countWhat justExposed);
 static inline void updateWidth(newtComponent co, struct CheckboxTree * ct,
-                                int maxField);
+                               int maxField);
 
 static struct componentOps ctOps = {
     ctDraw,
@@ -51,12 +51,12 @@ static struct componentOps ctOps = {
 } ;
 
 static inline void updateWidth(newtComponent co, struct CheckboxTree * ct,
-                                int maxField) {
+                               int maxField) {
     ct->curWidth = maxField;
     co->width = ct->curWidth + ct->sbAdjust;
 
     if (ct->sb)
-        ct->sb->left = co->left + co->width - 1;
+       ct->sb->left = co->left + co->width - 1;
 }
 
 static int countItems(struct items * item, enum countWhat what) {
@@ -64,10 +64,10 @@ static int countItems(struct items * item, enum countWhat what) {
 
     while (item) {
         if ((!item->branch && item->selected == what) || (what == COUNT_EXPOSED))
-            count++;
-        if (item->branch || (what == COUNT_EXPOSED && item->selected))
-            count += countItems(item->branch, what);
-        item = item->next;
+           count++;
+       if (item->branch || (what == COUNT_EXPOSED && item->selected))
+           count += countItems(item->branch, what);
+       item = item->next;
     }
 
     return count;
@@ -75,9 +75,9 @@ static int countItems(struct items * item, enum countWhat what) {
 
 static void doBuildFlatList(struct CheckboxTree * ct, struct items * item) {
     while (item) {
-        ct->flatList[ct->flatCount++] = item;
-        if (item->branch && item->selected) doBuildFlatList(ct, item->branch);
-        item = item->next;
+       ct->flatList[ct->flatCount++] = item;
+       if (item->branch && item->selected) doBuildFlatList(ct, item->branch);
+       item = item->next;
     }
 }
 
@@ -96,8 +96,8 @@ static void buildFlatList(newtComponent co) {
 }
 
 int newtCheckboxTreeAddItem(newtComponent co, 
-                            const char * text, const void * data,
-                            int flags, int index, ...) {
+                           const char * text, const void * data,
+                           int flags, int index, ...) {
     va_list argList;
     int numIndexes;
     int * indexes;
@@ -107,8 +107,8 @@ int newtCheckboxTreeAddItem(newtComponent co,
     numIndexes = 0;
     i = index;
     while (i != NEWT_ARG_LAST) {
-        numIndexes++;
-        i = va_arg(argList, int);
+       numIndexes++;
+       i = va_arg(argList, int);
     }
 
     va_end(argList);
@@ -119,8 +119,8 @@ int newtCheckboxTreeAddItem(newtComponent co,
     i = index;
     va_start(argList, index);
     while (i != NEWT_ARG_LAST) {
-        indexes[numIndexes++] = i;
-        i = va_arg(argList, int);
+       indexes[numIndexes++] = i;
+       i = va_arg(argList, int);
     }
     va_end(argList);
 
@@ -130,23 +130,23 @@ int newtCheckboxTreeAddItem(newtComponent co,
 }
 
 static int doFindItemPath(struct items * items, void * data, int * path, 
-                          int * len) {
+                         int * len) {
     int where = 0;
 
     while (items) {
-        if (items->data == data) {
-            if (path) path[items->depth] = where;
-            if (len) *len = items->depth + 1;
-            return 1;
-        }
-
-        if (items->branch && doFindItemPath(items->branch, data, path, len)) {
-            if (path) path[items->depth] = where;
-            return 1;
-        }
-
-        items = items->next;
-        where++;
+       if (items->data == data) {
+           if (path) path[items->depth] = where;
+           if (len) *len = items->depth + 1;
+           return 1;
+       }
+
+       if (items->branch && doFindItemPath(items->branch, data, path, len)) {
+           if (path) path[items->depth] = where;
+           return 1;
+       }
+
+       items = items->next;
+       where++;
     }
 
     return 0;
@@ -167,8 +167,8 @@ int * newtCheckboxTreeFindItem(newtComponent co, void * data) {
 }
 
 int newtCheckboxTreeAddArray(newtComponent co, 
-                            const char * text, const void * data,
-                            int flags, int * indexes) {
+                           const char * text, const void * data,
+                           int flags, int * indexes) {
     struct items * curList, * newNode, * item = NULL;
     struct items ** listPtr = NULL;
     int i, index, numIndexes, width;
@@ -178,67 +178,67 @@ int newtCheckboxTreeAddArray(newtComponent co,
     while (indexes[numIndexes] != NEWT_ARG_LAST) numIndexes++;
 
     if (!ct->itemlist) {
-        if (numIndexes > 1) return -1;
+       if (numIndexes > 1) return -1;
 
-        ct->itemlist = malloc(sizeof(*ct->itemlist)); // FIXME: Error check?
-        item = ct->itemlist;
-        item->prev = NULL;
-        item->next = NULL;
+       ct->itemlist = malloc(sizeof(*ct->itemlist)); // FIXME: Error check?
+       item = ct->itemlist;
+       item->prev = NULL;
+       item->next = NULL;
     } else {
-        curList = ct->itemlist;
-        listPtr = &ct->itemlist;
-
-        i = 0;
-        index = indexes[i];
-        while (i < numIndexes) {
-            item = curList;
-
-            if (index == NEWT_ARG_APPEND) {
-                item = NULL;
-            } else {
-                while (index && item) 
-                    item = item->next, index--;
-            }
-
-            i++;
-            if (i < numIndexes) {
-                curList = item->branch;
-                listPtr = &item->branch;
-                if (!curList && (i + 1 != numIndexes)) return -1;
-
-                index = indexes[i];
-            }
-        }
-
-        if (!curList) {                         /* create a new branch */
-            item = malloc(sizeof(*curList->prev));
-            item->next = item->prev = NULL;
-            *listPtr = item;
-        } else if (!item) {                     /* append to end */
-            item = curList;
-            while (item->next) item = item->next;
-            item->next = malloc(sizeof(*curList->prev)); // FIXME Error check
-            item->next->prev = item;
-            item = item->next;
-            item->next = NULL;
-        } else { 
-            newNode = malloc(sizeof(*newNode)); // FIXME Error check ? 
-            newNode->prev = item->prev;
-            newNode->next = item;
-
-            if (item->prev) item->prev->next = newNode;
-            item->prev = newNode;
-            item = newNode;
-            if (!item->prev) *listPtr = item;
-        }
+       curList = ct->itemlist;
+       listPtr = &ct->itemlist;
+
+       i = 0;
+       index = indexes[i];
+       while (i < numIndexes) {
+           item = curList;
+
+           if (index == NEWT_ARG_APPEND) {
+               item = NULL;
+           } else {
+               while (index && item) 
+                   item = item->next, index--;
+           }
+
+           i++;
+           if (i < numIndexes) {
+               curList = item->branch;
+               listPtr = &item->branch;
+               if (!curList && (i + 1 != numIndexes)) return -1;
+
+               index = indexes[i];
+           }
+       }
+
+       if (!curList) {                         /* create a new branch */
+           item = malloc(sizeof(*curList->prev));
+           item->next = item->prev = NULL;
+           *listPtr = item;
+       } else if (!item) {                     /* append to end */
+           item = curList;
+           while (item->next) item = item->next;
+           item->next = malloc(sizeof(*curList->prev)); // FIXME Error check
+           item->next->prev = item;
+           item = item->next;
+           item->next = NULL;
+       } else { 
+           newNode = malloc(sizeof(*newNode)); // FIXME Error check ? 
+           newNode->prev = item->prev;
+           newNode->next = item;
+
+           if (item->prev) item->prev->next = newNode;
+           item->prev = newNode;
+           item = newNode;
+           if (!item->prev) *listPtr = item;
+       }
     }
-        
+       
     item->text = strdup(text);
     item->data = data;
     if (flags & NEWT_FLAG_SELECTED) {
-        item->selected = 1;
+       item->selected = 1;
     } else {
-        item->selected = 0;
+       item->selected = 0;
     }
     item->flags = flags;
     item->branch = NULL;
@@ -248,7 +248,7 @@ int newtCheckboxTreeAddArray(newtComponent co,
     width = wstrlen(text, -1);
 
     if ((ct->userHasSetWidth == 0) && ((width + i + ct->sbAdjust) > co->width)) {
-        updateWidth(co, ct, width + i);
+       updateWidth(co, ct, width + i);
     }
 
     return 0;
@@ -258,13 +258,13 @@ static struct items * findItem(struct items * items, const void * data) {
     struct items * i;
 
     while (items) {
-        if (items->data == data) return items;
-        if (items->branch) {
-            i = findItem(items->branch, data);
-            if (i) return i;
-        }
+       if (items->data == data) return items;
+       if (items->branch) {
+           i = findItem(items->branch, data);
+           if (i) return i;
+       }
 
-        items = items->next;
+       items = items->next;
     }
 
     return NULL;
@@ -272,11 +272,11 @@ static struct items * findItem(struct items * items, const void * data) {
 
 static void listSelected(struct items * items, int * num, const void ** list, int seqindex) {
     while (items) {
-            if ((seqindex ? items->selected==seqindex : items->selected) && !items->branch)
-            list[(*num)++] = (void *) items->data;
-        if (items->branch)
-            listSelected(items->branch, num, list, seqindex);
-        items = items->next;
+           if ((seqindex ? items->selected==seqindex : items->selected) && !items->branch)
+           list[(*num)++] = (void *) items->data;
+       if (items->branch)
+           listSelected(items->branch, num, list, seqindex);
+       items = items->next;
     }
 }
 
@@ -304,11 +304,11 @@ const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, int *numitems,
     if(!co || !numitems) return NULL;
 
     ct = co->data;
-        
+       
     if (seqnum) {
-            while( ct->seq[seqindex] && ( ct->seq[seqindex] != seqnum )) seqindex++;
+           while( ct->seq[seqindex] && ( ct->seq[seqindex] != seqnum )) seqindex++;
     } else {
-            seqindex = 0;
+           seqindex = 0;
     }
 
     *numitems = countItems(ct->itemlist, (seqindex ? seqindex : COUNT_SELECTED));
@@ -322,7 +322,7 @@ const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, int *numitems,
 }
 
 newtComponent newtCheckboxTree(int left, int top, int height, int flags) {
-        return newtCheckboxTreeMulti(left, top, height, NULL, flags);
+       return newtCheckboxTreeMulti(left, top, height, NULL, flags);
 }
 
 newtComponent newtCheckboxTreeMulti(int left, int top, int height, char *seq, int flags) {
@@ -348,16 +348,16 @@ newtComponent newtCheckboxTreeMulti(int left, int top, int height, char *seq, in
     ct->flags = flags;
 
     if (seq)
-        ct->seq = strdup(seq);
+       ct->seq = strdup(seq);
     else
-        ct->seq = strdup(" *");
+       ct->seq = strdup(" *");
     if (flags & NEWT_FLAG_SCROLL) {
-        ct->sb = newtVerticalScrollbar(left, top, height,
-                                       COLORSET_LISTBOX, COLORSET_ACTLISTBOX);
-        ct->sbAdjust = 2;
+       ct->sb = newtVerticalScrollbar(left, top, height,
+                                      COLORSET_LISTBOX, COLORSET_ACTLISTBOX);
+       ct->sbAdjust = 2;
     } else {
-        ct->sb = NULL;
-        ct->sbAdjust = 0;
+       ct->sb = NULL;
+       ct->sbAdjust = 0;
     }
     
     return co;
@@ -368,7 +368,7 @@ static void ctMapped(newtComponent co, int isMapped) {
 
     co->isMapped = isMapped;
     if (ct->sb)
-        ct->sb->ops->mapped(ct->sb, isMapped);
+       ct->sb->ops->mapped(ct->sb, isMapped);
 }
 
 static void ctPlace(newtComponent co, int newLeft, int newTop) {
@@ -378,7 +378,7 @@ static void ctPlace(newtComponent co, int newLeft, int newTop) {
     co->left = newLeft;
 
     if (ct->sb)
-        ct->sb->ops->place(ct->sb, co->left + co->width - 1, co->top);
+       ct->sb->ops->place(ct->sb, co->left + co->width - 1, co->top);
 }
 
 int ctSetItem(newtComponent co, struct items *item, enum newtFlagsSense sense)
@@ -388,41 +388,41 @@ int ctSetItem(newtComponent co, struct items *item, enum newtFlagsSense sense)
     struct items * firstItem;
     
     if (!item)
-        return 1;
+       return 1;
     
     switch(sense) {
-        case NEWT_FLAGS_RESET:
-            item->selected = 0;
-            break;
-        case NEWT_FLAGS_SET:
-            item->selected = 1;
-            break;
-        case NEWT_FLAGS_TOGGLE:
-            if (item->branch)
-              item->selected = !item->selected;
-            else if (!(ct->flags & NEWT_CHECKBOXTREE_UNSELECTABLE)) {
-                    item->selected++;
-                    if (item->selected==strlen(ct->seq))
-                      item->selected = 0;
-            }
-            break;
+       case NEWT_FLAGS_RESET:
+           item->selected = 0;
+           break;
+       case NEWT_FLAGS_SET:
+           item->selected = 1;
+           break;
+       case NEWT_FLAGS_TOGGLE:
+           if (item->branch)
+             item->selected = !item->selected;
+           else if (!(ct->flags & NEWT_CHECKBOXTREE_UNSELECTABLE)) {
+                   item->selected++;
+                   if (item->selected==strlen(ct->seq))
+                     item->selected = 0;
+           }
+           break;
     }
 
     if (item->branch) {
-        currItem = *ct->currItem;
-        firstItem = *ct->firstItem;
+       currItem = *ct->currItem;
+       firstItem = *ct->firstItem;
 
-        buildFlatList(co);
+       buildFlatList(co);
 
-        ct->currItem = ct->flatList;
-        while (*ct->currItem != currItem) ct->currItem++;
+       ct->currItem = ct->flatList;
+       while (*ct->currItem != currItem) ct->currItem++;
 
-        ct->firstItem = ct->flatList;
-        if (ct->flatCount > co->height) {
-                struct items ** last = ct->flatList + ct->flatCount - co->height;
-                while (*ct->firstItem != firstItem && ct->firstItem != last)
-                    ct->firstItem++;
-        }
+       ct->firstItem = ct->flatList;
+       if (ct->flatCount > co->height) {
+               struct items ** last = ct->flatList + ct->flatCount - co->height;
+               while (*ct->firstItem != firstItem && ct->firstItem != last)
+                   ct->firstItem++;
+       }
     }
 
     return 0;
@@ -431,10 +431,10 @@ int ctSetItem(newtComponent co, struct items *item, enum newtFlagsSense sense)
 static void ctSetItems(struct items *item, int selected)
 {
     for (; item; item = item->next) {
-        if (!item->branch)
-            item->selected = selected;
-        else
-            ctSetItems(item->branch, selected);
+       if (!item->branch)
+           item->selected = selected;
+       else
+           ctSetItems(item->branch, selected);
     }
 }
 
@@ -448,8 +448,8 @@ static void ctDraw(newtComponent co) {
     if (!co->isMapped) return ;
 
     if (!ct->firstItem) {
-        buildFlatList(co);
-        ct->firstItem = ct->currItem = ct->flatList;
+       buildFlatList(co);
+       ct->firstItem = ct->currItem = ct->flatList;
     }
 
     item = ct->firstItem;
@@ -459,60 +459,60 @@ static void ctDraw(newtComponent co) {
     newtTrashScreen();
     
     while (*item && i < co->height) {
-        newtGotorc(co->top + i, co->left);
-        if (*item == *ct->currItem) {
-            SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
-            currRow = co->top + i;
-        } else
-            SLsmg_set_color(NEWT_COLORSET_LISTBOX);
-
-        for (j = 0; j < (*item)->depth; j++)
-            SLsmg_write_string("   ");
-
-        if ((*item)->branch) {
-            if ((*item)->selected) 
-                SLsmg_write_string("<-> ");
-            else
-                SLsmg_write_string("<+> ");
-        } else {
-            if (ct->flags & NEWT_CHECKBOXTREE_HIDE_BOX) {
-                if ((*item)->selected)
-                    SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
-                SLsmg_write_string("    ");
-            } else {
-                char tmp[5];
-                snprintf(tmp,5,"[%c] ",ct->seq[(*item)->selected]);
-                SLsmg_write_string(tmp);
-            }
-        }
-
-        SLsmg_write_nstring((*item)->text, co->width - 4 - 
-                                           (3 * (*item)->depth));
-
-        SLsmg_set_color(NEWT_COLORSET_LISTBOX);
-
-        item++;
-        i++;
+       newtGotorc(co->top + i, co->left);
+       if (*item == *ct->currItem) {
+           SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
+           currRow = co->top + i;
+       } else
+           SLsmg_set_color(NEWT_COLORSET_LISTBOX);
+
+       for (j = 0; j < (*item)->depth; j++)
+           SLsmg_write_string("   ");
+
+       if ((*item)->branch) {
+           if ((*item)->selected) 
+               SLsmg_write_string("<-> ");
+           else
+               SLsmg_write_string("<+> ");
+       } else {
+           if (ct->flags & NEWT_CHECKBOXTREE_HIDE_BOX) {
+               if ((*item)->selected)
+                   SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
+               SLsmg_write_string("    ");
+           } else {
+               char tmp[5];
+               snprintf(tmp,5,"[%c] ",ct->seq[(*item)->selected]);
+               SLsmg_write_string(tmp);
+           }
+       }
+
+       SLsmg_write_nstring((*item)->text, co->width - 4 - 
+                                          (3 * (*item)->depth));
+
+       SLsmg_set_color(NEWT_COLORSET_LISTBOX);
+
+       item++;
+       i++;
     }
 
     /* There could be empty lines left (i.e. if the user closes an expanded
        list which is the last thing in the tree, and whose elements are
        displayed at the bottom of the screen */
     if (i < co->height) {
-        spaces = alloca(co->width);
-        memset(spaces, ' ', co->width);
-        SLsmg_set_color(NEWT_COLORSET_LISTBOX);
+       spaces = alloca(co->width);
+       memset(spaces, ' ', co->width);
+       SLsmg_set_color(NEWT_COLORSET_LISTBOX);
     }
     while (i < co->height) {
-        newtGotorc(co->top + i, co->left);
-        SLsmg_write_nstring(spaces, co->width);
-        i++;
+       newtGotorc(co->top + i, co->left);
+       SLsmg_write_nstring(spaces, co->width);
+       i++;
     }
     
     if(ct->sb) {
-        newtScrollbarSet(ct->sb, ct->currItem - ct->flatList, 
-                         ct->flatCount - 1);
-        ct->sb->ops->draw(ct->sb);
+       newtScrollbarSet(ct->sb, ct->currItem - ct->flatList, 
+                        ct->flatCount - 1);
+       ct->sb->ops->draw(ct->sb);
     }
 
     newtGotorc(currRow, co->left + 1);
@@ -525,10 +525,10 @@ static void ctDestroy(newtComponent co) {
     nextitem = item = ct->itemlist;
 
     while (item != NULL) {
-        nextitem = item->next;
-        free(item->text);
-        free(item);
-        item = nextitem;
+       nextitem = item->next;
+       free(item->text);
+       free(item);
+       item = nextitem;
     }
 
     free(ct->seq);
@@ -545,143 +545,143 @@ struct eventResult ctEvent(newtComponent co, struct event ev) {
     er.result = ER_IGNORED;
 
     if(ev.when == EV_EARLY || ev.when == EV_LATE) {
-        return er;
+       return er;
     }
 
     switch(ev.event) {
     case EV_KEYPRESS:
-        key = ev.u.key;
-        if (key == (char) key && key != ' ') {
-            for (selnum = 0; ct->seq[selnum]; selnum++)
-            if (key == ct->seq[selnum])
-                break;
-            if (!ct->seq[selnum])
-                switch (key) {
-                case '-': selnum = 0; break;
-                case '+':
-                case '*': selnum = 1; break;
-                }
-            if (ct->seq[selnum])
-                key = '*';
-        }
-        switch(key) {
-        case ' ':
-        case NEWT_KEY_ENTER:
-            ctSetItem(co, *ct->currItem, NEWT_FLAGS_TOGGLE);
-            er.result = ER_SWALLOWED;
-            if (!(*ct->currItem)->branch || (*ct->currItem)->selected)
-                key = NEWT_KEY_DOWN;
-            else
-                key = '*';
-            break;
-        case '*':
-            if ((*ct->currItem)->branch) {
-                ctSetItems((*ct->currItem)->branch, selnum);
-                if (!(*ct->currItem)->selected)
-                    key = NEWT_KEY_DOWN;
-            } else {
-                (*ct->currItem)->selected = selnum;
-                key = NEWT_KEY_DOWN;
-            }
-            er.result = ER_SWALLOWED;
-            break;
-        }
-        switch (key) {
-        case '*':
-            ctDraw(co);
-            if(co->callback) co->callback(co, co->callbackData);
-            return er;
-        case NEWT_KEY_HOME:
-            ct->currItem = ct->flatList;
-            ct->firstItem = ct->flatList;
-            ctDraw(co);
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            return er;
-        case NEWT_KEY_END:
-            ct->currItem = ct->flatList + ct->flatCount - 1;
-            if (ct->flatCount <= co->height)
-                ct->firstItem = ct->flatList;
-            else
-                ct->firstItem = ct->flatList + ct->flatCount - co->height;
-            ctDraw(co);
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            return er;
-        case NEWT_KEY_DOWN:
-            if (ev.u.key != NEWT_KEY_DOWN) {
-                if(co->callback) co->callback(co, co->callbackData);
-                if (strlen(ct->seq) != 2) {
-                    ctDraw(co);
-                    return er;
-                }
-            }
-            if ((ct->currItem - ct->flatList + 1) < ct->flatCount) {
-                ct->currItem++;
-
-                if (ct->currItem - ct->firstItem >= co->height) 
-                    ct->firstItem++;
-
-                ctDraw(co);
-            } else if (ev.u.key != NEWT_KEY_DOWN)
-                ctDraw(co);
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            return er;
-        case NEWT_KEY_UP:
-            if (ct->currItem != ct->flatList) {
-                ct->currItem--;
-
-                if (ct->currItem < ct->firstItem)
-                    ct->firstItem = ct->currItem;
-                    
-                ctDraw(co);
-            }
-            er.result = ER_SWALLOWED;
-            if(co->callback) co->callback(co, co->callbackData);
-            return er;
-        case NEWT_KEY_PGUP:
-            if (ct->firstItem - co->height < ct->flatList) {
-                ct->firstItem = ct->currItem = ct->flatList;
-            } else {
-                ct->currItem -= co->height;
-                ct->firstItem -= co->height;
-            }
-
-            ctDraw(co);
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            return er;
-        case NEWT_KEY_PGDN:
-            listEnd = ct->flatList + ct->flatCount - 1;
-            lastItem = ct->firstItem + co->height - 1;
-
-            if (lastItem + co->height > listEnd) {
-                ct->firstItem = listEnd - co->height + 1;
-                ct->currItem = listEnd;
-            } else {
-                ct->currItem += co->height;
-                ct->firstItem += co->height;
-            }
-
-            ctDraw(co);
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            return er;
-        }
-        break;
+       key = ev.u.key;
+       if (key == (char) key && key != ' ') {
+           for (selnum = 0; ct->seq[selnum]; selnum++)
+           if (key == ct->seq[selnum])
+               break;
+           if (!ct->seq[selnum])
+               switch (key) {
+               case '-': selnum = 0; break;
+               case '+':
+               case '*': selnum = 1; break;
+               }
+           if (ct->seq[selnum])
+               key = '*';
+       }
+       switch(key) {
+       case ' ':
+       case NEWT_KEY_ENTER:
+           ctSetItem(co, *ct->currItem, NEWT_FLAGS_TOGGLE);
+           er.result = ER_SWALLOWED;
+           if (!(*ct->currItem)->branch || (*ct->currItem)->selected)
+               key = NEWT_KEY_DOWN;
+           else
+               key = '*';
+           break;
+       case '*':
+           if ((*ct->currItem)->branch) {
+               ctSetItems((*ct->currItem)->branch, selnum);
+               if (!(*ct->currItem)->selected)
+                   key = NEWT_KEY_DOWN;
+           } else {
+               (*ct->currItem)->selected = selnum;
+               key = NEWT_KEY_DOWN;
+           }
+           er.result = ER_SWALLOWED;
+           break;
+       }
+       switch (key) {
+       case '*':
+           ctDraw(co);
+           if(co->callback) co->callback(co, co->callbackData);
+           return er;
+       case NEWT_KEY_HOME:
+           ct->currItem = ct->flatList;
+           ct->firstItem = ct->flatList;
+           ctDraw(co);
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           return er;
+       case NEWT_KEY_END:
+           ct->currItem = ct->flatList + ct->flatCount - 1;
+           if (ct->flatCount <= co->height)
+               ct->firstItem = ct->flatList;
+           else
+               ct->firstItem = ct->flatList + ct->flatCount - co->height;
+           ctDraw(co);
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           return er;
+       case NEWT_KEY_DOWN:
+           if (ev.u.key != NEWT_KEY_DOWN) {
+               if(co->callback) co->callback(co, co->callbackData);
+               if (strlen(ct->seq) != 2) {
+                   ctDraw(co);
+                   return er;
+               }
+           }
+           if ((ct->currItem - ct->flatList + 1) < ct->flatCount) {
+               ct->currItem++;
+
+               if (ct->currItem - ct->firstItem >= co->height) 
+                   ct->firstItem++;
+
+               ctDraw(co);
+           } else if (ev.u.key != NEWT_KEY_DOWN)
+               ctDraw(co);
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           return er;
+       case NEWT_KEY_UP:
+           if (ct->currItem != ct->flatList) {
+               ct->currItem--;
+
+               if (ct->currItem < ct->firstItem)
+                   ct->firstItem = ct->currItem;
+                   
+               ctDraw(co);
+           }
+           er.result = ER_SWALLOWED;
+           if(co->callback) co->callback(co, co->callbackData);
+           return er;
+       case NEWT_KEY_PGUP:
+           if (ct->firstItem - co->height < ct->flatList) {
+               ct->firstItem = ct->currItem = ct->flatList;
+           } else {
+               ct->currItem -= co->height;
+               ct->firstItem -= co->height;
+           }
+
+           ctDraw(co);
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           return er;
+       case NEWT_KEY_PGDN:
+           listEnd = ct->flatList + ct->flatCount - 1;
+           lastItem = ct->firstItem + co->height - 1;
+
+           if (lastItem + co->height > listEnd) {
+               ct->firstItem = listEnd - co->height + 1;
+               ct->currItem = listEnd;
+           } else {
+               ct->currItem += co->height;
+               ct->firstItem += co->height;
+           }
+
+           ctDraw(co);
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           return er;
+       }
+       break;
 
     case EV_FOCUS:
-        ctDraw(co);
-        er.result = ER_SWALLOWED;
-        break;
-        
+       ctDraw(co);
+       er.result = ER_SWALLOWED;
+       break;
+       
     case EV_UNFOCUS:
-        ctDraw(co);
-        er.result = ER_SWALLOWED;
-        break;
+       ctDraw(co);
+       er.result = ER_SWALLOWED;
+       break;
     default:
-        break;
+       break;
     }
 
     return er;
@@ -712,7 +712,7 @@ void newtCheckboxTreeSetEntry(newtComponent co, const void * data, const char *
 
     width = wstrlen(text, -1);
     if ((ct->userHasSetWidth == 0) && ((width + i + ct->sbAdjust) > co->width)) {
-        updateWidth(co, ct, width + i);
+       updateWidth(co, ct, width + i);
     }
 
     ctDraw(co);
@@ -728,9 +728,9 @@ char newtCheckboxTreeGetEntryValue(newtComponent co, const void * data)
     item = findItem(ct->itemlist, data);
     if (!item) return -1;
     if (item->branch)
-        return item->selected ? NEWT_CHECKBOXTREE_EXPANDED : NEWT_CHECKBOXTREE_COLLAPSED;
+       return item->selected ? NEWT_CHECKBOXTREE_EXPANDED : NEWT_CHECKBOXTREE_COLLAPSED;
     else
-        return ct->seq[item->selected];
+       return ct->seq[item->selected];
 }
 
 void newtCheckboxTreeSetEntryValue(newtComponent co, const void * data, char value)
@@ -745,8 +745,8 @@ void newtCheckboxTreeSetEntryValue(newtComponent co, const void * data, char val
     if (!item || item->branch) return;
 
     for(i = 0; ct->seq[i]; i++)
-        if (value == ct->seq[i])
-            break;
+       if (value == ct->seq[i])
+           break;
 
     if (!ct->seq[i]) return;
     item->selected = i;
@@ -766,15 +766,15 @@ void newtCheckboxTreeSetCurrent(newtComponent co, void * data) {
 
     /* traverse the path and turn on all of the branches to this point */
     for (i = 0, treeTop = ct->itemlist; path[i + 1] != NEWT_ARG_LAST; i++) {
-        for (j = 0, item = treeTop; j < path[i]; j++)
-            item = item->next;
+       for (j = 0, item = treeTop; j < path[i]; j++)
+           item = item->next;
 
-        item->selected = 1;
-        treeTop = item->branch;
+       item->selected = 1;
+       treeTop = item->branch;
     }
 
     buildFlatList(co);
-        
+       
     item = findItem(ct->itemlist, data);
 
     i = 0;
@@ -784,10 +784,10 @@ void newtCheckboxTreeSetCurrent(newtComponent co, void * data) {
     j = i - (co->height / 2);
 
     if ((j + co->height) > ct->flatCount) 
-        j = ct->flatCount - co->height;
+       j = ct->flatCount - co->height;
     
     if (j < 0)
-        j = 0;
+       j = 0;
 
     ct->firstItem = ct->flatList + j;
     ct->currItem = ct->flatList + i;
index c9d3643e41620c78da0fc408a73dd0f7835bf086..d2b220968fb81c2768f30b606c5ea26d9d2558b5 100644 (file)
 /* globals -- ick */
 static int buttonHeight = 1;
 static newtComponent (*makeButton)(int left, int right, const char * text) = 
-                newtCompactButton;
+               newtCompactButton;
 
 static void addButtons(int height, int width, newtComponent form, 
-                       newtComponent * okay, newtComponent * cancel, 
-                       int flags) {
+                      newtComponent * okay, newtComponent * cancel, 
+                      int flags) {
     if (flags & FLAG_NOCANCEL) {
-        *okay = makeButton((width - 8) / 2, height - buttonHeight - 1, "Ok");
-        *cancel = NULL;
-        newtFormAddComponent(form, *okay);
+       *okay = makeButton((width - 8) / 2, height - buttonHeight - 1, "Ok");
+       *cancel = NULL;
+       newtFormAddComponent(form, *okay);
     } else {
-        *okay = makeButton((width - 18) / 3, height - buttonHeight - 1, "Ok");
-        *cancel = makeButton(((width - 18) / 3) * 2 + 9, 
-                                height - buttonHeight - 1, "Cancel");
-        newtFormAddComponents(form, *okay, *cancel, NULL);
+       *okay = makeButton((width - 18) / 3, height - buttonHeight - 1, "Ok");
+       *cancel = makeButton(((width - 18) / 3) * 2 + 9, 
+                               height - buttonHeight - 1, "Cancel");
+       newtFormAddComponents(form, *okay, *cancel, NULL);
     }
 }
 
 static newtComponent textbox(int maxHeight, int width, const char * text,
-                        int flags, int * height) {
+                       int flags, int * height) {
     newtComponent tb;
     int sFlag = (flags & FLAG_SCROLL_TEXT) ? NEWT_FLAG_SCROLL : 0;
     int i;
@@ -45,11 +45,11 @@ static newtComponent textbox(int maxHeight, int width, const char * text,
     dst = buf = alloca(strlen(text) + 1);
     src = text; 
     while (*src) {
-        if (*src == '\\' && *(src + 1) == 'n') {
-            src += 2;
-            *dst++ = '\n';
-        } else
-            *dst++ = *src++;
+       if (*src == '\\' && *(src + 1) == 'n') {
+           src += 2;
+           *dst++ = '\n';
+       } else
+           *dst++ = *src++;
     }
     *dst++ = '\0';
 
@@ -58,8 +58,8 @@ static newtComponent textbox(int maxHeight, int width, const char * text,
 
     i = newtTextboxGetNumLines(tb);
     if (i < maxHeight) {
-        newtTextboxSetHeight(tb, i);
-        maxHeight = i;
+       newtTextboxSetHeight(tb, i);
+       maxHeight = i;
     }
 
     *height = maxHeight;
@@ -68,7 +68,7 @@ static newtComponent textbox(int maxHeight, int width, const char * text,
 }
 
 int gauge(const char * text, int height, int width, poptContext optCon, int fd, 
-                int flags) {
+               int flags) {
     newtComponent form, scale, tb;
     int top;
     const char * arg;
@@ -98,41 +98,41 @@ int gauge(const char * text, int height, int width, poptContext optCon, int fd,
     newtRefresh();
 
     while (fgets(buf, sizeof(buf) - 1, f)) {
-        buf[strlen(buf) - 1] = '\0';
-
-        if (!strcmp(buf, "XXX")) {
-            fgets(buf3, sizeof(buf3) - 1, f);
-            buf3[strlen(buf3) - 1] = '\0';
-            arg = buf3;
-
-            i = 0;
-            while (fgets(buf + i, sizeof(buf) - 1 - i, f)) {
-                buf[strlen(buf) - 1] = '\0';
-                if (!strcmp(buf + i, "XXX")) {
-                    *(buf + i) = '\0';
-                    break;
-                }
-                i = strlen(buf);
-            }
-
-            newtTextboxSetText(tb, buf);
-        } else {
-            arg = buf;
-        }
-
-        val = strtoul(buf, &end, 10);
-        if (!*end) {
-            newtScaleSet(scale, val);
-            newtDrawForm(form);
-            newtRefresh();
-        }
+       buf[strlen(buf) - 1] = '\0';
+
+       if (!strcmp(buf, "XXX")) {
+           fgets(buf3, sizeof(buf3) - 1, f);
+           buf3[strlen(buf3) - 1] = '\0';
+           arg = buf3;
+
+           i = 0;
+           while (fgets(buf + i, sizeof(buf) - 1 - i, f)) {
+               buf[strlen(buf) - 1] = '\0';
+               if (!strcmp(buf + i, "XXX")) {
+                   *(buf + i) = '\0';
+                   break;
+               }
+               i = strlen(buf);
+           }
+
+           newtTextboxSetText(tb, buf);
+       } else {
+           arg = buf;
+       }
+
+       val = strtoul(buf, &end, 10);
+       if (!*end) {
+           newtScaleSet(scale, val);
+           newtDrawForm(form);
+           newtRefresh();
+       }
     }
 
     return DLG_OKAY;
 }
 
 int inputBox(const char * text, int height, int width, poptContext optCon, 
-                int flags, const char ** result) {
+               int flags, const char ** result) {
     newtComponent form, entry, okay, cancel, answer, tb;
     const char * val;
     int rc = DLG_OKAY;
@@ -140,11 +140,11 @@ int inputBox(const char * text, int height, int width, poptContext optCon,
 
     val = poptGetArg(optCon);
     tb = textbox(height - 3 - buttonHeight, width - 2,
-                        text, flags, &top);
+                       text, flags, &top);
 
     form = newtForm(NULL, NULL, 0);
     entry = newtEntry(1, top + 1, val, width - 2, &val, 
-                        NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT);
+                       NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT);
 
     newtFormAddComponents(form, tb, entry, NULL);
 
@@ -152,7 +152,7 @@ int inputBox(const char * text, int height, int width, poptContext optCon,
 
     answer = newtRunForm(form);
     if (answer == cancel)
-        rc = DLG_CANCEL;
+       rc = DLG_CANCEL;
 
     *result = val;
 
@@ -160,7 +160,7 @@ int inputBox(const char * text, int height, int width, poptContext optCon,
 }
 
 int listBox(const char * text, int height, int width, poptContext optCon,
-                int flags, const char ** result) {
+               int flags, const char ** result) {
     newtComponent form, okay, tb, answer, listBox;
     newtComponent cancel = NULL;
     const char * arg;
@@ -175,8 +175,8 @@ int listBox(const char * text, int height, int width, poptContext optCon,
     int maxTextWidth = 0;
     int scrollFlag;
     struct {
-        const char * text;
-        const char * tag;
+       const char * text;
+       const char * tag;
     } * itemInfo = malloc(allocedItems * sizeof(*itemInfo));
 
     if (itemInfo == NULL) return DLG_ERROR;
@@ -185,56 +185,56 @@ int listBox(const char * text, int height, int width, poptContext optCon,
     if (*end) return DLG_ERROR;
 
     while ((arg = poptGetArg(optCon))) {
-        if (allocedItems == numItems) {
-            allocedItems += 5;
-            itemInfo = realloc(itemInfo, sizeof(*itemInfo) * allocedItems);
-            if (itemInfo == NULL) return DLG_ERROR;
-        }
-
-        itemInfo[numItems].tag = arg;
-        if (!(arg = poptGetArg(optCon))) return DLG_ERROR;
-
-        if (!(flags & FLAG_NOITEM)) {
-            itemInfo[numItems].text = arg;
-        } else
-            itemInfo[numItems].text = "";
-
-        if (wstrlen(itemInfo[numItems].text,-1) > (unsigned int)maxTextWidth)
-            maxTextWidth = wstrlen(itemInfo[numItems].text,-1);
-        if (wstrlen(itemInfo[numItems].tag,-1) > (unsigned int)maxTagWidth)
-            maxTagWidth = wstrlen(itemInfo[numItems].tag,-1);
-
-        numItems++;
+       if (allocedItems == numItems) {
+           allocedItems += 5;
+           itemInfo = realloc(itemInfo, sizeof(*itemInfo) * allocedItems);
+           if (itemInfo == NULL) return DLG_ERROR;
+       }
+
+       itemInfo[numItems].tag = arg;
+       if (!(arg = poptGetArg(optCon))) return DLG_ERROR;
+
+       if (!(flags & FLAG_NOITEM)) {
+           itemInfo[numItems].text = arg;
+       } else
+           itemInfo[numItems].text = "";
+
+       if (wstrlen(itemInfo[numItems].text,-1) > (unsigned int)maxTextWidth)
+           maxTextWidth = wstrlen(itemInfo[numItems].text,-1);
+       if (wstrlen(itemInfo[numItems].tag,-1) > (unsigned int)maxTagWidth)
+           maxTagWidth = wstrlen(itemInfo[numItems].tag,-1);
+
+       numItems++;
     }
     if (numItems == 0)
-        return DLG_ERROR;
+       return DLG_ERROR;
 
     if (flags & FLAG_NOTAGS) {
-            maxTagWidth = 0;
+           maxTagWidth = 0;
     }
 
     form = newtForm(NULL, NULL, 0);
 
     tb = textbox(height - 4 - buttonHeight - listHeight, width - 2,
-                        text, flags, &top);
+                       text, flags, &top);
 
     if (listHeight >= numItems) {
-        scrollFlag = 0;
-        i = 0;
+       scrollFlag = 0;
+       i = 0;
     } else {
-        scrollFlag = NEWT_FLAG_SCROLL;
-        i = 2;
+       scrollFlag = NEWT_FLAG_SCROLL;
+       i = 2;
     }
 
     listBox = newtListbox(3 + ((width - 10 - maxTagWidth - maxTextWidth - i) 
-                                        / 2),
-                          top + 1, listHeight, 
-                            NEWT_FLAG_RETURNEXIT | scrollFlag);
+                                       / 2),
+                         top + 1, listHeight, 
+                           NEWT_FLAG_RETURNEXIT | scrollFlag);
 
     snprintf(format, MAXFORMAT, "%%-%ds  %%s", maxTagWidth);
     for (i = 0; i < numItems; i++) {
-        snprintf(buf, MAXBUF, format, itemInfo[i].tag, itemInfo[i].text);
-        newtListboxAddEntry(listBox, buf, (void *) i);
+       snprintf(buf, MAXBUF, format, itemInfo[i].tag, itemInfo[i].text);
+       newtListboxAddEntry(listBox, buf, (void *) i);
     }
 
     newtFormAddComponents(form, tb, listBox, NULL);
@@ -243,7 +243,7 @@ int listBox(const char * text, int height, int width, poptContext optCon,
 
     answer = newtRunForm(form);
     if (answer == cancel)
-        rc = DLG_CANCEL;
+       rc = DLG_CANCEL;
 
     i = (int) newtListboxGetCurrent(listBox);
     *result = itemInfo[i].tag;
@@ -252,7 +252,7 @@ int listBox(const char * text, int height, int width, poptContext optCon,
 }
 
 int checkList(const char * text, int height, int width, poptContext optCon,
-                int useRadio, int flags, const char *** selections) {
+               int useRadio, int flags, const char *** selections) {
     newtComponent form, okay, tb, subform, answer;
     newtComponent sb = NULL, cancel = NULL;
     const char * arg;
@@ -267,9 +267,9 @@ int checkList(const char * text, int height, int width, poptContext optCon,
     int maxWidth = 0;
     int top;
     struct {
-        const char * text;
-        const char * tag;
-        newtComponent comp;
+       const char * text;
+       const char * tag;
+       newtComponent comp;
     } * cbInfo = malloc(allocedBoxes * sizeof(*cbInfo));
     char * cbStates = malloc(allocedBoxes * sizeof(cbStates));
 
@@ -279,63 +279,63 @@ int checkList(const char * text, int height, int width, poptContext optCon,
     if (*end) return DLG_ERROR;
 
     while ((arg = poptGetArg(optCon))) {
-        if (allocedBoxes == numBoxes) {
-            allocedBoxes += 5;
-            cbInfo = realloc(cbInfo, sizeof(*cbInfo) * allocedBoxes);
-            cbStates = realloc(cbStates, sizeof(*cbStates) * allocedBoxes);
-            if ((cbInfo == NULL) || (cbStates == NULL)) return DLG_ERROR;
-        }
-
-        cbInfo[numBoxes].tag = arg;
-        if (!(arg = poptGetArg(optCon))) return DLG_ERROR;
-
-        if (!(flags & FLAG_NOITEM)) {
-            cbInfo[numBoxes].text = arg;
-            if (!(arg = poptGetArg(optCon))) return DLG_ERROR;
-        } else
-            cbInfo[numBoxes].text = "";
-
-        if (!strcmp(arg, "1") || !strcasecmp(arg, "on") || 
-                !strcasecmp(arg, "yes"))
-            cbStates[numBoxes] = '*';
-        else
-            cbStates[numBoxes] = ' ';
-
-        if (wstrlen(cbInfo[numBoxes].tag,-1) > (unsigned int)maxWidth)
-            maxWidth = wstrlen(cbInfo[numBoxes].tag,-1);
-
-        numBoxes++;
+       if (allocedBoxes == numBoxes) {
+           allocedBoxes += 5;
+           cbInfo = realloc(cbInfo, sizeof(*cbInfo) * allocedBoxes);
+           cbStates = realloc(cbStates, sizeof(*cbStates) * allocedBoxes);
+           if ((cbInfo == NULL) || (cbStates == NULL)) return DLG_ERROR;
+       }
+
+       cbInfo[numBoxes].tag = arg;
+       if (!(arg = poptGetArg(optCon))) return DLG_ERROR;
+
+       if (!(flags & FLAG_NOITEM)) {
+           cbInfo[numBoxes].text = arg;
+           if (!(arg = poptGetArg(optCon))) return DLG_ERROR;
+       } else
+           cbInfo[numBoxes].text = "";
+
+       if (!strcmp(arg, "1") || !strcasecmp(arg, "on") || 
+               !strcasecmp(arg, "yes"))
+           cbStates[numBoxes] = '*';
+       else
+           cbStates[numBoxes] = ' ';
+
+       if (wstrlen(cbInfo[numBoxes].tag,-1) > (unsigned int)maxWidth)
+           maxWidth = wstrlen(cbInfo[numBoxes].tag,-1);
+
+       numBoxes++;
     }
 
-        
+       
     form = newtForm(NULL, NULL, 0);
 
     tb = textbox(height - 3 - buttonHeight - listHeight, width - 2,
-                        text, flags, &top);
+                       text, flags, &top);
 
     if (listHeight < numBoxes) { 
-        sb = newtVerticalScrollbar(width - 4, 
-                                   top + 1,
-                                   listHeight, NEWT_COLORSET_CHECKBOX,
-                                   NEWT_COLORSET_ACTCHECKBOX);
-        newtFormAddComponent(form, sb);
+       sb = newtVerticalScrollbar(width - 4, 
+                                  top + 1,
+                                  listHeight, NEWT_COLORSET_CHECKBOX,
+                                  NEWT_COLORSET_ACTCHECKBOX);
+       newtFormAddComponent(form, sb);
     }
     subform = newtForm(sb, NULL, 0);
     newtFormSetBackground(subform, NEWT_COLORSET_CHECKBOX);
 
     snprintf(format, MAXFORMAT, "%%-%ds  %%s", maxWidth);
     for (i = 0; i < numBoxes; i++) {
-        snprintf(buf, MAXBUF, format, cbInfo[i].tag, cbInfo[i].text);
+       snprintf(buf, MAXBUF, format, cbInfo[i].tag, cbInfo[i].text);
 
-        if (useRadio)
-            cbInfo[i].comp = newtRadiobutton(4, top + 1 + i, buf,
-                                        cbStates[i] != ' ', 
-                                        i ? cbInfo[i - 1].comp : NULL);
-        else
-            cbInfo[i].comp = newtCheckbox(4, top + 1 + i, buf,
-                              cbStates[i], NULL, cbStates + i);
+       if (useRadio)
+           cbInfo[i].comp = newtRadiobutton(4, top + 1 + i, buf,
+                                       cbStates[i] != ' ', 
+                                       i ? cbInfo[i - 1].comp : NULL);
+       else
+           cbInfo[i].comp = newtCheckbox(4, top + 1 + i, buf,
+                             cbStates[i], NULL, cbStates + i);
 
-        newtFormAddComponent(subform, cbInfo[i].comp);
+       newtFormAddComponent(subform, cbInfo[i].comp);
     }
 
     newtFormSetHeight(subform, listHeight);
@@ -347,34 +347,34 @@ int checkList(const char * text, int height, int width, poptContext optCon,
 
     answer = newtRunForm(form);
     if (answer == cancel)
-        rc = DLG_CANCEL;
+       rc = DLG_CANCEL;
 
     if (useRadio) {
-        answer = newtRadioGetCurrent(cbInfo[0].comp);
-        for (i = 0; i < numBoxes; i++) 
-            if (cbInfo[i].comp == answer) {
-                *selections = malloc(sizeof(char *) * 2);
-                if (*selections == NULL) return DLG_ERROR;
-                (*selections)[0] = cbInfo[i].tag;
-                (*selections)[1] = NULL;
-                break;
-            }
+       answer = newtRadioGetCurrent(cbInfo[0].comp);
+       for (i = 0; i < numBoxes; i++) 
+           if (cbInfo[i].comp == answer) {
+               *selections = malloc(sizeof(char *) * 2);
+               if (*selections == NULL) return DLG_ERROR;
+               (*selections)[0] = cbInfo[i].tag;
+               (*selections)[1] = NULL;
+               break;
+           }
     } else {
-        numSelected = 0;
-        for (i = 0; i < numBoxes; i++) {
-            if (cbStates[i] != ' ') numSelected++;
-        }
+       numSelected = 0;
+       for (i = 0; i < numBoxes; i++) {
+           if (cbStates[i] != ' ') numSelected++;
+       }
 
-        *selections = malloc(sizeof(char *) * (numSelected + 1));
-        if (*selections == NULL) return DLG_ERROR;
+       *selections = malloc(sizeof(char *) * (numSelected + 1));
+       if (*selections == NULL) return DLG_ERROR;
 
-        numSelected = 0;
-        for (i = 0; i < numBoxes; i++) {
-            if (cbStates[i] != ' ') 
-                (*selections)[numSelected++] = cbInfo[i].tag;
-        }
+       numSelected = 0;
+       for (i = 0; i < numBoxes; i++) {
+           if (cbStates[i] != ' ') 
+               (*selections)[numSelected++] = cbInfo[i].tag;
+       }
 
-        (*selections)[numSelected] = NULL;
+       (*selections)[numSelected] = NULL;
     }
 
     return rc;
@@ -388,41 +388,41 @@ int messageBox(const char * text, int height, int width, int type, int flags) {
     form = newtForm(NULL, NULL, 0);
 
     tb = newtTextbox(1, 1, width - 2, height - 3 - buttonHeight, 
-                        NEWT_FLAG_WRAP | tFlag);
+                       NEWT_FLAG_WRAP | tFlag);
     newtTextboxSetText(tb, text);
 
     newtFormAddComponent(form, tb);
 
     switch ( type ) {
     case MSGBOX_INFO:
-        break;
+       break;
     case MSGBOX_MSG:
-        yes = makeButton((width - 8) / 2, height - 1 - buttonHeight, "Ok");
-        newtFormAddComponent(form, yes);
-        break;
+       yes = makeButton((width - 8) / 2, height - 1 - buttonHeight, "Ok");
+       newtFormAddComponent(form, yes);
+       break;
     default:
-        yes = makeButton((width - 16) / 3, height - 1 - buttonHeight, "Yes");
-        no = makeButton(((width - 16) / 3) * 2 + 9, height - 1 - buttonHeight, 
-                        "No");
-        newtFormAddComponents(form, yes, no, NULL);
+       yes = makeButton((width - 16) / 3, height - 1 - buttonHeight, "Yes");
+       no = makeButton(((width - 16) / 3) * 2 + 9, height - 1 - buttonHeight, 
+                       "No");
+       newtFormAddComponents(form, yes, no, NULL);
 
-        if (flags & FLAG_DEFAULT_NO)
-            newtFormSetCurrent(form, no);
+       if (flags & FLAG_DEFAULT_NO)
+           newtFormSetCurrent(form, no);
     }
 
     if ( type != MSGBOX_INFO ) {
-        newtRunForm(form);
+       newtRunForm(form);
 
-        answer = newtFormGetCurrent(form);
+       answer = newtFormGetCurrent(form);
 
-        if (answer == no)
-            return DLG_CANCEL;
+       if (answer == no)
+           return DLG_CANCEL;
     }
     else {
-        newtDrawForm(form);
-        newtRefresh();
+       newtDrawForm(form);
+       newtRefresh();
     }
-        
+       
 
 
     return DLG_OKAY;
@@ -430,10 +430,10 @@ int messageBox(const char * text, int height, int width, int type, int flags) {
 
 void useFullButtons(int state) {
     if (state) {
-        buttonHeight = 3;
-        makeButton = newtButton;
+       buttonHeight = 3;
+       makeButton = newtButton;
    } else {
-        buttonHeight = 1;
-        makeButton = newtCompactButton;
+       buttonHeight = 1;
+       makeButton = newtCompactButton;
    }
 }
index d480bf527e7739bbcab5d7d640fe8e2552312f63..27f072c301d25e7099ca435f4cf4b29060e0e292 100644 (file)
@@ -7,25 +7,25 @@
 #define MSGBOX_YESNO 1
 #define MSGBOX_INFO 2
 
-#define FLAG_NOITEM             (1 << 0)
-#define FLAG_NOCANCEL           (1 << 1)
-#define FLAG_SCROLL_TEXT        (1 << 2)
-#define FLAG_DEFAULT_NO         (1 << 3)
-#define FLAG_NOTAGS             (1 << 5)
+#define FLAG_NOITEM            (1 << 0)
+#define FLAG_NOCANCEL          (1 << 1)
+#define FLAG_SCROLL_TEXT       (1 << 2)
+#define FLAG_DEFAULT_NO        (1 << 3)
+#define FLAG_NOTAGS            (1 << 5)
 
-#define DLG_ERROR               -1
-#define DLG_OKAY                0
-#define DLG_CANCEL              1
+#define DLG_ERROR              -1
+#define DLG_OKAY               0
+#define DLG_CANCEL             1
 
 int messageBox(const char * text, int height, int width, int type, int flags);
 int checkList(const char * text, int height, int width, poptContext optCon,
-                int useRadio, int flags, const char *** selections);
+               int useRadio, int flags, const char *** selections);
 int listBox(const char * text, int height, int width, poptContext optCon,
-                int flags, const char ** result);
+               int flags, const char ** result);
 int inputBox(const char * text, int height, int width, poptContext optCon, 
-                int flags, const char ** result);
+               int flags, const char ** result);
 int gauge(const char * text, int height, int width, poptContext optCon, int fd, 
-                int flags);
+               int flags);
 void useFullButtons(int state);
 
 #endif
index d142419ae98cef6af775851bfec9c3cac1b21671..7001e96c86815b1fb5baa51b126796c328083af2 100644 (file)
--- a/eawidth.c
+++ b/eawidth.c
@@ -23,128 +23,128 @@ typedef struct {
 
 static const eaw_db_type eaw_db[] = {
   { 0x0020,0x007E,narrow },
-  { 0x00A1,0x00A1,ambiguous },  /*INVERTED EXCLAMATION MARK*/
+  { 0x00A1,0x00A1,ambiguous }, /*INVERTED EXCLAMATION MARK*/
   { 0x00A2,0x00A3,narrow },
-  { 0x00A4,0x00A4,ambiguous },  /*CURRENCY SIGN*/
+  { 0x00A4,0x00A4,ambiguous }, /*CURRENCY SIGN*/
   { 0x00A5,0x00A6,narrow },
   { 0x00A7,0x00A8,ambiguous },
-  { 0x00AA,0x00AA,ambiguous },  /*FEMININE ORDINAL INDICATOR*/
-  { 0x00AC,0x00AC,narrow },     /*NOT SIGN*/
-  { 0x00AD,0x00AD,ambiguous },  /*SOFT HYPHEN*/
-  { 0x00AF,0x00AF,narrow },     /*MACRON*/
+  { 0x00AA,0x00AA,ambiguous }, /*FEMININE ORDINAL INDICATOR*/
+  { 0x00AC,0x00AC,narrow },    /*NOT SIGN*/
+  { 0x00AD,0x00AD,ambiguous }, /*SOFT HYPHEN*/
+  { 0x00AF,0x00AF,narrow },    /*MACRON*/
   { 0x00B0,0x00B4,ambiguous },
   { 0x00B6,0x00BA,ambiguous },
   { 0x00BC,0x00BF,ambiguous },
-  { 0x00C6,0x00C6,ambiguous },  /*LATIN CAPITAL LETTER AE*/
-  { 0x00D0,0x00D0,ambiguous },  /*LATIN CAPITAL LETTER ETH*/
+  { 0x00C6,0x00C6,ambiguous }, /*LATIN CAPITAL LETTER AE*/
+  { 0x00D0,0x00D0,ambiguous }, /*LATIN CAPITAL LETTER ETH*/
   { 0x00D7,0x00D8,ambiguous },
   { 0x00DE,0x00E1,ambiguous },
-  { 0x00E6,0x00E6,ambiguous },  /*LATIN SMALL LETTER AE*/
+  { 0x00E6,0x00E6,ambiguous }, /*LATIN SMALL LETTER AE*/
   { 0x00E8,0x00EA,ambiguous },
   { 0x00EC,0x00ED,ambiguous },
-  { 0x00F0,0x00F0,ambiguous },  /*LATIN SMALL LETTER ETH*/
+  { 0x00F0,0x00F0,ambiguous }, /*LATIN SMALL LETTER ETH*/
   { 0x00F2,0x00F3,ambiguous },
   { 0x00F7,0x00FA,ambiguous },
-  { 0x00FC,0x00FC,ambiguous },  /*LATIN SMALL LETTER U WITH DIAERESIS*/
-  { 0x00FE,0x00FE,ambiguous },  /*LATIN SMALL LETTER THORN*/
-  { 0x0101,0x0101,ambiguous },  /*LATIN SMALL LETTER A WITH MACRON*/
-  { 0x0111,0x0111,ambiguous },  /*LATIN SMALL LETTER D WITH STROKE*/
-  { 0x0113,0x0113,ambiguous },  /*LATIN SMALL LETTER E WITH MACRON*/
-  { 0x011B,0x011B,ambiguous },  /*LATIN SMALL LETTER E WITH CARON*/
+  { 0x00FC,0x00FC,ambiguous }, /*LATIN SMALL LETTER U WITH DIAERESIS*/
+  { 0x00FE,0x00FE,ambiguous }, /*LATIN SMALL LETTER THORN*/
+  { 0x0101,0x0101,ambiguous }, /*LATIN SMALL LETTER A WITH MACRON*/
+  { 0x0111,0x0111,ambiguous }, /*LATIN SMALL LETTER D WITH STROKE*/
+  { 0x0113,0x0113,ambiguous }, /*LATIN SMALL LETTER E WITH MACRON*/
+  { 0x011B,0x011B,ambiguous }, /*LATIN SMALL LETTER E WITH CARON*/
   { 0x0126,0x0127,ambiguous },
-  { 0x012B,0x012B,ambiguous },  /*LATIN SMALL LETTER I WITH MACRON*/
+  { 0x012B,0x012B,ambiguous }, /*LATIN SMALL LETTER I WITH MACRON*/
   { 0x0131,0x0133,ambiguous },
-  { 0x0138,0x0138,ambiguous },  /*LATIN SMALL LETTER KRA*/
+  { 0x0138,0x0138,ambiguous }, /*LATIN SMALL LETTER KRA*/
   { 0x013F,0x0142,ambiguous },
-  { 0x0144,0x0144,ambiguous },  /*LATIN SMALL LETTER N WITH ACUTE*/
+  { 0x0144,0x0144,ambiguous }, /*LATIN SMALL LETTER N WITH ACUTE*/
   { 0x0148,0x014A,ambiguous },
-  { 0x014D,0x014D,ambiguous },  /*LATIN SMALL LETTER O WITH MACRON*/
+  { 0x014D,0x014D,ambiguous }, /*LATIN SMALL LETTER O WITH MACRON*/
   { 0x0152,0x0153,ambiguous },
   { 0x0166,0x0167,ambiguous },
-  { 0x016B,0x016B,ambiguous },  /*LATIN SMALL LETTER U WITH MACRON*/
-  { 0x01CE,0x01CE,ambiguous },  /*LATIN SMALL LETTER A WITH CARON*/
-  { 0x01D0,0x01D0,ambiguous },  /*LATIN SMALL LETTER I WITH CARON*/
-  { 0x01D2,0x01D2,ambiguous },  /*LATIN SMALL LETTER O WITH CARON*/
-  { 0x01D4,0x01D4,ambiguous },  /*LATIN SMALL LETTER U WITH CARON*/
-  { 0x01D6,0x01D6,ambiguous },  /*LATIN SMALL LETTER U W/DIAERESIS+MACRON*/
-  { 0x01D8,0x01D8,ambiguous },  /*LATIN SMALL LETTER U W/DIAERESIS+ACUTE*/
-  { 0x01DA,0x01DA,ambiguous },  /*LATIN SMALL LETTER U W/DIAERESIS+CARON*/
-  { 0x01DC,0x01DC,ambiguous },  /*LATIN SMALL LETTER U W/DIAERESIS+GRAVE*/
-  { 0x0251,0x0251,ambiguous },  /*LATIN SMALL LETTER ALPHA*/
-  { 0x0261,0x0261,ambiguous },  /*LATIN SMALL LETTER SCRIPT G*/
-  { 0x02C7,0x02C7,ambiguous },  /*CARON*/
+  { 0x016B,0x016B,ambiguous }, /*LATIN SMALL LETTER U WITH MACRON*/
+  { 0x01CE,0x01CE,ambiguous }, /*LATIN SMALL LETTER A WITH CARON*/
+  { 0x01D0,0x01D0,ambiguous }, /*LATIN SMALL LETTER I WITH CARON*/
+  { 0x01D2,0x01D2,ambiguous }, /*LATIN SMALL LETTER O WITH CARON*/
+  { 0x01D4,0x01D4,ambiguous }, /*LATIN SMALL LETTER U WITH CARON*/
+  { 0x01D6,0x01D6,ambiguous }, /*LATIN SMALL LETTER U W/DIAERESIS+MACRON*/
+  { 0x01D8,0x01D8,ambiguous }, /*LATIN SMALL LETTER U W/DIAERESIS+ACUTE*/
+  { 0x01DA,0x01DA,ambiguous }, /*LATIN SMALL LETTER U W/DIAERESIS+CARON*/
+  { 0x01DC,0x01DC,ambiguous }, /*LATIN SMALL LETTER U W/DIAERESIS+GRAVE*/
+  { 0x0251,0x0251,ambiguous }, /*LATIN SMALL LETTER ALPHA*/
+  { 0x0261,0x0261,ambiguous }, /*LATIN SMALL LETTER SCRIPT G*/
+  { 0x02C7,0x02C7,ambiguous }, /*CARON*/
   { 0x02C9,0x02CB,ambiguous },
-  { 0x02CD,0x02CD,ambiguous },  /*MODIFIER LETTER LOW MACRON*/
-  { 0x02D0,0x02D0,ambiguous },  /*MODIFIER LETTER TRIANGULAR COLON*/
+  { 0x02CD,0x02CD,ambiguous }, /*MODIFIER LETTER LOW MACRON*/
+  { 0x02D0,0x02D0,ambiguous }, /*MODIFIER LETTER TRIANGULAR COLON*/
   { 0x02D8,0x02DB,ambiguous },
-  { 0x02DD,0x02DD,ambiguous },  /*DOUBLE ACUTE ACCENT*/
+  { 0x02DD,0x02DD,ambiguous }, /*DOUBLE ACUTE ACCENT*/
   { 0x0300,0x0362,ambiguous },
   { 0x0391,0x03A9,ambiguous },
   { 0x03B1,0x03C1,ambiguous },
   { 0x03C3,0x03C9,ambiguous },
-  { 0x0401,0x0401,ambiguous },  /*CYRILLIC CAPITAL LETTER IO*/
+  { 0x0401,0x0401,ambiguous }, /*CYRILLIC CAPITAL LETTER IO*/
   { 0x0410,0x044F,ambiguous },
-  { 0x0451,0x0451,ambiguous },  /*CYRILLIC SMALL LETTER IO*/
+  { 0x0451,0x0451,ambiguous }, /*CYRILLIC SMALL LETTER IO*/
   { 0x1100,0x115F,wide },
-  { 0x2010,0x2010,ambiguous },  /*HYPHEN*/
+  { 0x2010,0x2010,ambiguous }, /*HYPHEN*/
   { 0x2013,0x2016,ambiguous },
   { 0x2018,0x2019,ambiguous },
   { 0x201C,0x201D,ambiguous },
   { 0x2020,0x2021,ambiguous },
   { 0x2025,0x2027,ambiguous },
-  { 0x2030,0x2030,ambiguous },  /*PER MILLE SIGN*/
+  { 0x2030,0x2030,ambiguous }, /*PER MILLE SIGN*/
   { 0x2032,0x2033,ambiguous },
-  { 0x2035,0x2035,ambiguous },  /*REVERSED PRIME*/
-  { 0x203B,0x203B,ambiguous },  /*REFERENCE MARK*/
-  { 0x2074,0x2074,ambiguous },  /*SUPERSCRIPT FOUR*/
-  { 0x207F,0x207F,ambiguous },  /*SUPERSCRIPT LATIN SMALL LETTER N*/
+  { 0x2035,0x2035,ambiguous }, /*REVERSED PRIME*/
+  { 0x203B,0x203B,ambiguous }, /*REFERENCE MARK*/
+  { 0x2074,0x2074,ambiguous }, /*SUPERSCRIPT FOUR*/
+  { 0x207F,0x207F,ambiguous }, /*SUPERSCRIPT LATIN SMALL LETTER N*/
   { 0x2081,0x2084,ambiguous },
-  { 0x20A9,0x20A9,half_width }, /*WON SIGN*/
-  { 0x20AC,0x20AC,ambiguous },  /*EURO SIGN*/
-  { 0x2103,0x2103,ambiguous },  /*DEGREE CELSIUS*/
-  { 0x2105,0x2105,ambiguous },  /*CARE OF*/
-  { 0x2109,0x2109,ambiguous },  /*DEGREE FAHRENHEIT*/
-  { 0x2113,0x2113,ambiguous },  /*SCRIPT SMALL L*/
+  { 0x20A9,0x20A9,half_width },        /*WON SIGN*/
+  { 0x20AC,0x20AC,ambiguous }, /*EURO SIGN*/
+  { 0x2103,0x2103,ambiguous }, /*DEGREE CELSIUS*/
+  { 0x2105,0x2105,ambiguous }, /*CARE OF*/
+  { 0x2109,0x2109,ambiguous }, /*DEGREE FAHRENHEIT*/
+  { 0x2113,0x2113,ambiguous }, /*SCRIPT SMALL L*/
   { 0x2121,0x2122,ambiguous },
-  { 0x2126,0x2126,ambiguous },  /*OHM SIGN*/
-  { 0x212B,0x212B,ambiguous },  /*ANGSTROM SIGN*/
+  { 0x2126,0x2126,ambiguous }, /*OHM SIGN*/
+  { 0x212B,0x212B,ambiguous }, /*ANGSTROM SIGN*/
   { 0x2154,0x2155,ambiguous },
-  { 0x215B,0x215B,ambiguous },  /*VULGAR FRACTION ONE EIGHTH*/
-  { 0x215E,0x215E,ambiguous },  /*VULGAR FRACTION SEVEN EIGHTHS*/
+  { 0x215B,0x215B,ambiguous }, /*VULGAR FRACTION ONE EIGHTH*/
+  { 0x215E,0x215E,ambiguous }, /*VULGAR FRACTION SEVEN EIGHTHS*/
   { 0x2160,0x216B,ambiguous },
   { 0x2170,0x2179,ambiguous },
   { 0x2190,0x2199,ambiguous },
-  { 0x21D2,0x21D2,ambiguous },  /*RIGHTWARDS DOUBLE ARROW*/
-  { 0x21D4,0x21D4,ambiguous },  /*LEFT RIGHT DOUBLE ARROW*/
-  { 0x2200,0x2200,ambiguous },  /*FOR ALL*/
+  { 0x21D2,0x21D2,ambiguous }, /*RIGHTWARDS DOUBLE ARROW*/
+  { 0x21D4,0x21D4,ambiguous }, /*LEFT RIGHT DOUBLE ARROW*/
+  { 0x2200,0x2200,ambiguous }, /*FOR ALL*/
   { 0x2202,0x2203,ambiguous },
   { 0x2207,0x2208,ambiguous },
-  { 0x220B,0x220B,ambiguous },  /*CONTAINS AS MEMBER*/
-  { 0x220F,0x220F,ambiguous },  /*N-ARY PRODUCT*/
-  { 0x2211,0x2211,ambiguous },  /*N-ARY SUMMATION*/
-  { 0x2215,0x2215,ambiguous },  /*DIVISION SLASH*/
-  { 0x221A,0x221A,ambiguous },  /*SQUARE ROOT*/
+  { 0x220B,0x220B,ambiguous }, /*CONTAINS AS MEMBER*/
+  { 0x220F,0x220F,ambiguous }, /*N-ARY PRODUCT*/
+  { 0x2211,0x2211,ambiguous }, /*N-ARY SUMMATION*/
+  { 0x2215,0x2215,ambiguous }, /*DIVISION SLASH*/
+  { 0x221A,0x221A,ambiguous }, /*SQUARE ROOT*/
   { 0x221D,0x2220,ambiguous },
-  { 0x2223,0x2223,ambiguous },  /*DIVIDES*/
-  { 0x2225,0x2225,ambiguous },  /*PARALLEL TO*/
+  { 0x2223,0x2223,ambiguous }, /*DIVIDES*/
+  { 0x2225,0x2225,ambiguous }, /*PARALLEL TO*/
   { 0x2227,0x222C,ambiguous },
-  { 0x222E,0x222E,ambiguous },  /*CONTOUR INTEGRAL*/
+  { 0x222E,0x222E,ambiguous }, /*CONTOUR INTEGRAL*/
   { 0x2234,0x2237,ambiguous },
   { 0x223C,0x223D,ambiguous },
-  { 0x2248,0x2248,ambiguous },  /*ALMOST EQUAL TO*/
-  { 0x224C,0x224C,ambiguous },  /*ALL EQUAL TO*/
-  { 0x2252,0x2252,ambiguous },  /*APPROXIMATELY EQUAL TO OR THE IMAGE OF*/
+  { 0x2248,0x2248,ambiguous }, /*ALMOST EQUAL TO*/
+  { 0x224C,0x224C,ambiguous }, /*ALL EQUAL TO*/
+  { 0x2252,0x2252,ambiguous }, /*APPROXIMATELY EQUAL TO OR THE IMAGE OF*/
   { 0x2260,0x2261,ambiguous },
   { 0x2264,0x2267,ambiguous },
   { 0x226A,0x226B,ambiguous },
   { 0x226E,0x226F,ambiguous },
   { 0x2282,0x2283,ambiguous },
   { 0x2286,0x2287,ambiguous },
-  { 0x2295,0x2295,ambiguous },  /*CIRCLED PLUS*/
-  { 0x2299,0x2299,ambiguous },  /*CIRCLED DOT OPERATOR*/
-  { 0x22A5,0x22A5,ambiguous },  /*UP TACK*/
-  { 0x22BF,0x22BF,ambiguous },  /*RIGHT TRIANGLE*/
-  { 0x2312,0x2312,ambiguous },  /*ARC*/
+  { 0x2295,0x2295,ambiguous }, /*CIRCLED PLUS*/
+  { 0x2299,0x2299,ambiguous }, /*CIRCLED DOT OPERATOR*/
+  { 0x22A5,0x22A5,ambiguous }, /*UP TACK*/
+  { 0x22BF,0x22BF,ambiguous }, /*RIGHT TRIANGLE*/
+  { 0x2312,0x2312,ambiguous }, /*ARC*/
   { 0x2460,0x24BF,ambiguous },
   { 0x24D0,0x24E9,ambiguous },
   { 0x2500,0x254B,ambiguous },
@@ -157,22 +157,22 @@ static const eaw_db_type eaw_db[] = {
   { 0x25BC,0x25BD,ambiguous },
   { 0x25C0,0x25C1,ambiguous },
   { 0x25C6,0x25C8,ambiguous },
-  { 0x25CB,0x25CB,ambiguous },  /*WHITE CIRCLE*/
+  { 0x25CB,0x25CB,ambiguous }, /*WHITE CIRCLE*/
   { 0x25CE,0x25D1,ambiguous },
   { 0x25E2,0x25E5,ambiguous },
-  { 0x25EF,0x25EF,ambiguous },  /*LARGE CIRCLE*/
+  { 0x25EF,0x25EF,ambiguous }, /*LARGE CIRCLE*/
   { 0x2605,0x2606,ambiguous },
-  { 0x2609,0x2609,ambiguous },  /*SUN*/
+  { 0x2609,0x2609,ambiguous }, /*SUN*/
   { 0x260E,0x260F,ambiguous },
-  { 0x261C,0x261C,ambiguous },  /*WHITE LEFT POINTING INDEX*/
-  { 0x261E,0x261E,ambiguous },  /*WHITE RIGHT POINTING INDEX*/
-  { 0x2640,0x2640,ambiguous },  /*FEMALE SIGN*/
-  { 0x2642,0x2642,ambiguous },  /*MALE SIGN*/
+  { 0x261C,0x261C,ambiguous }, /*WHITE LEFT POINTING INDEX*/
+  { 0x261E,0x261E,ambiguous }, /*WHITE RIGHT POINTING INDEX*/
+  { 0x2640,0x2640,ambiguous }, /*FEMALE SIGN*/
+  { 0x2642,0x2642,ambiguous }, /*MALE SIGN*/
   { 0x2660,0x2661,ambiguous },
   { 0x2663,0x2665,ambiguous },
   { 0x2667,0x266A,ambiguous },
   { 0x266C,0x266D,ambiguous },
-  { 0x266F,0x266F,ambiguous },  /*MUSIC SHARP SIGN*/
+  { 0x266F,0x266F,ambiguous }, /*MUSIC SHARP SIGN*/
   { 0x2E80,0x3009,wide },
   { 0x300A,0x300B,ambiguous },
   { 0x300C,0x3019,wide },
@@ -239,81 +239,81 @@ get_east_asia_type (wchar_t unicode) {
 int
 east_asia_mblen (const char *locale_name, const char *s, size_t n, int x)
 {
-        wchar_t *wcs, *p;
-        int width = 0;
+       wchar_t *wcs, *p;
+       int width = 0;
 
-        if (NULL == s) s = "";
+       if (NULL == s) s = "";
 
-        /*
-         *  Getting the locale name via setlocale() is expensive, so we prefer
-         *  to have it passed to us.
-         */
-        if (NULL == locale_name) {
-                locale_name = setlocale(LC_CTYPE, NULL);
-                if (NULL == locale_name) return INT_MAX;
-        }
+       /*
+        *  Getting the locale name via setlocale() is expensive, so we prefer
+        *  to have it passed to us.
+        */
+       if (NULL == locale_name) {
+               locale_name = setlocale(LC_CTYPE, NULL);
+               if (NULL == locale_name) return INT_MAX;
+       }
 
-        wcs = (wchar_t *) calloc(n, sizeof(wchar_t));
-        if (NULL == wcs) return INT_MAX;
+       wcs = (wchar_t *) calloc(n, sizeof(wchar_t));
+       if (NULL == wcs) return INT_MAX;
 
 #if defined __GLIBC__ && !__GLIBC_PREREQ(2,2)
 #warning wide character support is broken. Glibc 2.2 or better needed.
 #endif
 
-        if ((size_t) -1 == mbstowcs(wcs, s, n)) return INT_MAX;
-
-        switch (get_east_asia_type(*wcs)) {
-                case neutral:
-
-                        /*
-                         *  Put characters that print nothing here.
-                         *
-                         *  XXX: Yes, I know there are a lot more than this in ISO-10646, but
-                         *  this function is intended to calculate the width of strings for
-                         *  fixed width terminals displaying legacy CJK character sets.
-                         *  State-of-the-art Unicode handling terminals probably won't need
-                         *  this function anyway.
-                         */
-                        if (0x0000 == *wcs) break; /* NULL */
-                        if (0x0007 == *wcs) break; /* BELL */
-                        
-                        /*  FIXME: there will probably be ASCII chars after the escape
-                         *  code, which will be counted as part of the width even though they
-                         *  aren't displayed.
-                         */
-                        if (0x001B == *wcs) break; /* ESC */
-                        if (0xFEFF == *wcs) break; /* ZWNBSP aka BOM (magic, signature) */
-                        
-                        /*
-                         *  Special characters go here
-                         */
-                        if (0x0008 == *wcs) { /* BACKSPACE */
-                                width = -1;
-                                break;
-                        }
-                        if (0x0009 == *wcs) { /* TAB */
-                                if (tab_width < 0) width = x % abs(tab_width);
-                                else width = tab_width;
-                                break;
-                        }
-                        
-                        /*FALLTHRU*/
-                case narrow:
-                case half_width:
-                        width = 1;
-                        break;
-                case wide:
-                case full_width:
-                        width = 2;
-                        break;
-                case ambiguous:
-                        width = is_cjk_locale(locale_name) ? 2 : 1;
-                        break;
-                default:
-                        width = INT_MAX;
+       if ((size_t) -1 == mbstowcs(wcs, s, n)) return INT_MAX;
+
+       switch (get_east_asia_type(*wcs)) {
+               case neutral:
+
+                       /*
+                        *  Put characters that print nothing here.
+                        *
+                        *  XXX: Yes, I know there are a lot more than this in ISO-10646, but
+                        *  this function is intended to calculate the width of strings for
+                        *  fixed width terminals displaying legacy CJK character sets.
+                        *  State-of-the-art Unicode handling terminals probably won't need
+                        *  this function anyway.
+                        */
+                       if (0x0000 == *wcs) break; /* NULL */
+                       if (0x0007 == *wcs) break; /* BELL */
+                       
+                       /*  FIXME: there will probably be ASCII chars after the escape
+                        *  code, which will be counted as part of the width even though they
+                        *  aren't displayed.
+                        */
+                       if (0x001B == *wcs) break; /* ESC */
+                       if (0xFEFF == *wcs) break; /* ZWNBSP aka BOM (magic, signature) */
+                       
+                       /*
+                        *  Special characters go here
+                        */
+                       if (0x0008 == *wcs) { /* BACKSPACE */
+                               width = -1;
+                               break;
+                       }
+                       if (0x0009 == *wcs) { /* TAB */
+                               if (tab_width < 0) width = x % abs(tab_width);
+                               else width = tab_width;
+                               break;
+                       }
+                       
+                       /*FALLTHRU*/
+               case narrow:
+               case half_width:
+                       width = 1;
+                       break;
+               case wide:
+               case full_width:
+                       width = 2;
+                       break;
+               case ambiguous:
+                       width = is_cjk_locale(locale_name) ? 2 : 1;
+                       break;
+               default:
+                       width = INT_MAX;
     }
-        free(wcs);
-        return width;
+       free(wcs);
+       return width;
 }
 
 int
diff --git a/entry.c b/entry.c
index 8281b1b371450dec3a24650a43b1c4114c025c83..2b289549b749759be5efb8dc5c9664bfeecc66bc 100644 (file)
--- a/entry.c
+++ b/entry.c
@@ -17,9 +17,9 @@ struct entry {
     char * buf;
     const char ** resultPtr;
     int bufAlloced;
-    int bufUsed;                /* amount of the buffer that's been used */
-    int cursorPosition;         /* cursor *in the string* on on screen */
-    int firstChar;              /* first character position being shown */
+    int bufUsed;               /* amount of the buffer that's been used */
+    int cursorPosition;        /* cursor *in the string* on on screen */
+    int firstChar;             /* first character position being shown */
     newtEntryFilter filter;
     void * filterData;
 };
@@ -27,7 +27,7 @@ struct entry {
 static void entryDraw(newtComponent co);
 static void entryDestroy(newtComponent co);
 static struct eventResult entryEvent(newtComponent co,
-                                     struct event ev);
+                                    struct event ev);
 
 static struct eventResult entryHandleKey(newtComponent co, int key);
 
@@ -43,25 +43,25 @@ void newtEntrySet(newtComponent co, const char * value, int cursorAtEnd) {
     struct entry * en = co->data;
 
     if ((strlen(value) + 1) > (unsigned int)en->bufAlloced) {
-        free(en->buf);
-        en->bufAlloced = strlen(value) + 1;
-        en->buf = malloc(en->bufAlloced);
-        if (en->resultPtr) *en->resultPtr = en->buf;
+       free(en->buf);
+       en->bufAlloced = strlen(value) + 1;
+       en->buf = malloc(en->bufAlloced);
+       if (en->resultPtr) *en->resultPtr = en->buf;
     }
-    memset(en->buf, 0, en->bufAlloced);         /* clear the buffer */
+    memset(en->buf, 0, en->bufAlloced);                /* clear the buffer */
     strcpy(en->buf, value);
     en->bufUsed = strlen(value);
     en->firstChar = 0;
     if (cursorAtEnd)
-        en->cursorPosition = en->bufUsed;
+       en->cursorPosition = en->bufUsed;
     else
-        en->cursorPosition = 0;
+       en->cursorPosition = 0;
 
     entryDraw(co);
 } ;
 
 newtComponent newtEntry(int left, int top, const char * initialValue, int width,
-                        const char ** resultPtr, int flags) {
+                       const char ** resultPtr, int flags) {
     newtComponent co;
     struct entry * en;
 
@@ -86,12 +86,12 @@ newtComponent newtEntry(int left, int top, const char * initialValue, int width,
     en->filter = NULL;
 
     if (!(en->flags & NEWT_FLAG_DISABLED))
-        co->takesFocus = 1;
+       co->takesFocus = 1;
     else
-        co->takesFocus = 0;
+       co->takesFocus = 0;
 
     if (initialValue && wstrlen(initialValue,-1) > (unsigned int)width) {
-        en->bufAlloced = wstrlen(initialValue,-1) + 1;
+       en->bufAlloced = wstrlen(initialValue,-1) + 1;
     }
     en->buf = malloc(en->bufAlloced);
     en->resultPtr = resultPtr;
@@ -99,13 +99,13 @@ newtComponent newtEntry(int left, int top, const char * initialValue, int width,
 
     memset(en->buf, 0, en->bufAlloced);
     if (initialValue) {
-        strcpy(en->buf, initialValue);
-        en->bufUsed = strlen(initialValue);
-        en->cursorPosition = en->bufUsed;
+       strcpy(en->buf, initialValue);
+       en->bufUsed = strlen(initialValue);
+       en->cursorPosition = en->bufUsed;
     } else {
-        *en->buf = '\0';
-        en->bufUsed = 0;
-        en->cursorPosition = 0;
+       *en->buf = '\0';
+       en->bufUsed = 0;
+       en->cursorPosition = 0;
     }
 
     return co;
@@ -120,58 +120,58 @@ static void entryDraw(newtComponent co) {
     if (!co->isMapped) return;
 
     if (en->flags & NEWT_FLAG_DISABLED)
-        SLsmg_set_color(NEWT_COLORSET_DISENTRY);
+       SLsmg_set_color(NEWT_COLORSET_DISENTRY);
     else
-        SLsmg_set_color(NEWT_COLORSET_ENTRY);
+       SLsmg_set_color(NEWT_COLORSET_ENTRY);
 
     if (en->flags & NEWT_FLAG_HIDDEN) {
-        newtGotorc(co->top, co->left);
-        for (i = 0; i < co->width; i++)
-            SLsmg_write_char('_');
-        newtGotorc(co->top, co->left);
+       newtGotorc(co->top, co->left);
+       for (i = 0; i < co->width; i++)
+           SLsmg_write_char('_');
+       newtGotorc(co->top, co->left);
 
-        return;
+       return;
     }
 
     newtGotorc(co->top, co->left);
 
     if (en->cursorPosition < en->firstChar) {
-        /* scroll to the left */
-        en->firstChar = en->cursorPosition;
+       /* scroll to the left */
+       en->firstChar = en->cursorPosition;
     } else if ((en->firstChar + co->width) <= en->cursorPosition) {
-        /* scroll to the right */
-        en->firstChar = en->cursorPosition - co->width + 1;
+       /* scroll to the right */
+       en->firstChar = en->cursorPosition - co->width + 1;
     }
 
     chptr = en->buf + en->firstChar;
 
     if (en->flags & NEWT_FLAG_PASSWORD) {
-        char *tmpptr, *p;
+       char *tmpptr, *p;
 
-        tmpptr = alloca(strlen(chptr)+2);
-        strcpy(tmpptr, chptr);
-        for (p = tmpptr; *p; p++)
-            *p = '*';
-        chptr = tmpptr;
-    }                   
+       tmpptr = alloca(strlen(chptr)+2);
+       strcpy(tmpptr, chptr);
+       for (p = tmpptr; *p; p++)
+           *p = '*';
+       chptr = tmpptr;
+    }                  
 
     len = wstrlen(chptr, -1);
 
     if (len <= co->width) {
-        i = len;
-        SLsmg_write_string(chptr);
-        while (i < co->width) {
-            SLsmg_write_char('_');
-            i++;
-        }
+       i = len;
+       SLsmg_write_string(chptr);
+       while (i < co->width) {
+           SLsmg_write_char('_');
+           i++;
+       }
     } else {
-        SLsmg_write_nstring(chptr, co->width);
+       SLsmg_write_nstring(chptr, co->width);
     }
 
     if (en->flags & NEWT_FLAG_HIDDEN)
-        newtGotorc(co->top, co->left);
+       newtGotorc(co->top, co->left);
     else
-        newtGotorc(co->top, co->left + (en->cursorPosition - en->firstChar));
+       newtGotorc(co->top, co->left + (en->cursorPosition - en->firstChar));
 }
 
 void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense) {
@@ -181,9 +181,9 @@ void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense) {
     en->flags = newtSetFlags(en->flags, flags, sense);
 
     if (!(en->flags & NEWT_FLAG_DISABLED))
-        co->takesFocus = 1;
+       co->takesFocus = 1;
     else
-        co->takesFocus = 0;
+       co->takesFocus = 0;
 
     newtGetrc(&row, &col);
     entryDraw(co);
@@ -199,55 +199,55 @@ static void entryDestroy(newtComponent co) {
 }
 
 static struct eventResult entryEvent(newtComponent co,
-                                     struct event ev) {
+                                    struct event ev) {
     struct entry * en = co->data;
     struct eventResult er;
     int ch;
 
     if (ev.when == EV_NORMAL) {
-        switch (ev.event) {
-        case EV_FOCUS:
-            newtCursorOn();
-            if (en->flags & NEWT_FLAG_HIDDEN)
-                newtGotorc(co->top, co->left);
-            else
-                newtGotorc(co->top, co->left +
-                           (en->cursorPosition - en->firstChar));
-            er.result = ER_SWALLOWED;
-            break;
-
-        case EV_UNFOCUS:
-            newtCursorOff();
-            newtGotorc(0, 0);
-            er.result = ER_SWALLOWED;
-            if (co->callback)
-                co->callback(co, co->callbackData);
-            break;
-
-        case EV_KEYPRESS:
-            ch = ev.u.key;
-            if (en->filter)
-                ch = en->filter(co, en->filterData, ch, en->cursorPosition);
-            if (ch) er = entryHandleKey(co, ch);
-            break;
-
-        case EV_MOUSE:
-            if ((ev.u.mouse.type == MOUSE_BUTTON_DOWN) &&
-                (en->flags ^ NEWT_FLAG_HIDDEN)) {
-                if (strlen(en->buf) >= ev.u.mouse.x - co->left) {
-                    en->cursorPosition = ev.u.mouse.x - co->left;
-                    newtGotorc(co->top,
-                               co->left +(en->cursorPosition - en->firstChar));
-                } else {
-                    en->cursorPosition = strlen(en->buf);
-                    newtGotorc(co->top,
-                               co->left +(en->cursorPosition - en->firstChar));
-                }
-            }
-            break;
-        }
+       switch (ev.event) {
+       case EV_FOCUS:
+           newtCursorOn();
+           if (en->flags & NEWT_FLAG_HIDDEN)
+               newtGotorc(co->top, co->left);
+           else
+               newtGotorc(co->top, co->left +
+                          (en->cursorPosition - en->firstChar));
+           er.result = ER_SWALLOWED;
+           break;
+
+       case EV_UNFOCUS:
+           newtCursorOff();
+           newtGotorc(0, 0);
+           er.result = ER_SWALLOWED;
+           if (co->callback)
+               co->callback(co, co->callbackData);
+           break;
+
+       case EV_KEYPRESS:
+           ch = ev.u.key;
+           if (en->filter)
+               ch = en->filter(co, en->filterData, ch, en->cursorPosition);
+           if (ch) er = entryHandleKey(co, ch);
+           break;
+
+       case EV_MOUSE:
+           if ((ev.u.mouse.type == MOUSE_BUTTON_DOWN) &&
+               (en->flags ^ NEWT_FLAG_HIDDEN)) {
+               if (strlen(en->buf) >= ev.u.mouse.x - co->left) {
+                   en->cursorPosition = ev.u.mouse.x - co->left;
+                   newtGotorc(co->top,
+                              co->left +(en->cursorPosition - en->firstChar));
+               } else {
+                   en->cursorPosition = strlen(en->buf);
+                   newtGotorc(co->top,
+                              co->left +(en->cursorPosition - en->firstChar));
+               }
+           }
+           break;
+       }
     } else
-        er.result = ER_IGNORED;
+       er.result = ER_IGNORED;
 
     return er;
 }
@@ -259,109 +259,109 @@ static struct eventResult entryHandleKey(newtComponent co, int key) {
 
     er.result = ER_SWALLOWED;
     switch (key) {
-      case '\r':                                /* Return */
-        if (en->flags & NEWT_FLAG_RETURNEXIT) {
-            er.result = ER_EXITFORM;
-        } else {
-            er.result = ER_NEXTCOMP;
-        }
-        break;
-
-      case '\001':                              /* ^A */
+      case '\r':                               /* Return */
+       if (en->flags & NEWT_FLAG_RETURNEXIT) {
+           er.result = ER_EXITFORM;
+       } else {
+           er.result = ER_NEXTCOMP;
+       }
+       break;
+
+      case '\001':                             /* ^A */
       case NEWT_KEY_HOME:
-        en->cursorPosition = 0;
-        break;
+       en->cursorPosition = 0;
+       break;
 
-      case '\005':                              /* ^E */
+      case '\005':                             /* ^E */
       case NEWT_KEY_END:
-        en->cursorPosition = en->bufUsed;
-        break;
+       en->cursorPosition = en->bufUsed;
+       break;
 
-      case '\013':                              /* ^K */
-        en->bufUsed = en->cursorPosition;
-        memset(en->buf + en->bufUsed, 0, en->bufAlloced - en->bufUsed);
-        break;
+      case '\013':                             /* ^K */
+       en->bufUsed = en->cursorPosition;
+       memset(en->buf + en->bufUsed, 0, en->bufAlloced - en->bufUsed);
+       break;
 
-      case '\002':                              /* ^B */
+      case '\002':                             /* ^B */
       case NEWT_KEY_LEFT:
-        if (en->cursorPosition)
-            en->cursorPosition--;
-        break;
+       if (en->cursorPosition)
+           en->cursorPosition--;
+       break;
 
       case '\004':
       case NEWT_KEY_DELETE:
-        chptr = en->buf + en->cursorPosition;
-        if (*chptr) {
-            chptr++;
-            while (*chptr) {
-                *(chptr - 1) = *chptr;
-                chptr++;
-            }
-            *(chptr - 1) = '\0';
-            en->bufUsed--;
-        }
-        break;
+       chptr = en->buf + en->cursorPosition;
+       if (*chptr) {
+           chptr++;
+           while (*chptr) {
+               *(chptr - 1) = *chptr;
+               chptr++;
+           }
+           *(chptr - 1) = '\0';
+           en->bufUsed--;
+       }
+       break;
 
       case NEWT_KEY_BKSPC:
-        if (en->cursorPosition) {
-            /* if this isn't true, there's nothing to erase */
-            chptr = en->buf + en->cursorPosition;
-            en->bufUsed--;
-            en->cursorPosition--;
-            while (*chptr) {
-                *(chptr - 1) = *chptr;
-                chptr++;
-            }
-            *(chptr - 1) = '\0';
-        }
-        break;
-
-      case '\006':                              /* ^B */
+       if (en->cursorPosition) {
+           /* if this isn't true, there's nothing to erase */
+           chptr = en->buf + en->cursorPosition;
+           en->bufUsed--;
+           en->cursorPosition--;
+           while (*chptr) {
+               *(chptr - 1) = *chptr;
+               chptr++;
+           }
+           *(chptr - 1) = '\0';
+       }
+       break;
+
+      case '\006':                             /* ^B */
       case NEWT_KEY_RIGHT:
-        if (en->cursorPosition < en->bufUsed)
-            en->cursorPosition++;
-        break;
+       if (en->cursorPosition < en->bufUsed)
+           en->cursorPosition++;
+       break;
 
       default:
-        if ((key >= 0x20 && key <= 0x7e) || (key >= 0xa0 && key <= 0xff)) {
-            if (!(en->flags & NEWT_FLAG_SCROLL) && en->bufUsed >= co->width) {
-                SLtt_beep();
-                break;
-            }
-
-            if ((en->bufUsed + 1) == en->bufAlloced) {
-                en->bufAlloced += 20;
-                en->buf = realloc(en->buf, en->bufAlloced);
-                if (en->resultPtr) *en->resultPtr = en->buf;
-                memset(en->buf + en->bufUsed + 1, 0, 20);
-            }
-
-            if (en->cursorPosition == en->bufUsed) {
-                en->bufUsed++;
-            } else {
-                /* insert the new character */
-
-                /* chptr is the last character in the string */
-                chptr = (en->buf + en->bufUsed) - 1;
-                if ((en->bufUsed + 1) == en->bufAlloced) {
-                    /* this string fills the buffer, so clip it */
-                    chptr--;
-                } else
-                    en->bufUsed++;
-
-                insPoint = en->buf + en->cursorPosition;
-
-                while (chptr >= insPoint) {
-                    *(chptr + 1) = *chptr;
-                    chptr--;
-                }
-
-            }
-
-            en->buf[en->cursorPosition++] = key;
-        } else {
-            er.result = ER_IGNORED;
-        }
+       if ((key >= 0x20 && key <= 0x7e) || (key >= 0xa0 && key <= 0xff)) {
+           if (!(en->flags & NEWT_FLAG_SCROLL) && en->bufUsed >= co->width) {
+               SLtt_beep();
+               break;
+           }
+
+           if ((en->bufUsed + 1) == en->bufAlloced) {
+               en->bufAlloced += 20;
+               en->buf = realloc(en->buf, en->bufAlloced);
+               if (en->resultPtr) *en->resultPtr = en->buf;
+               memset(en->buf + en->bufUsed + 1, 0, 20);
+           }
+
+           if (en->cursorPosition == en->bufUsed) {
+               en->bufUsed++;
+           } else {
+               /* insert the new character */
+
+               /* chptr is the last character in the string */
+               chptr = (en->buf + en->bufUsed) - 1;
+               if ((en->bufUsed + 1) == en->bufAlloced) {
+                   /* this string fills the buffer, so clip it */
+                   chptr--;
+               } else
+                   en->bufUsed++;
+
+               insPoint = en->buf + en->cursorPosition;
+
+               while (chptr >= insPoint) {
+                   *(chptr + 1) = *chptr;
+                   chptr--;
+               }
+
+           }
+
+           en->buf[en->cursorPosition++] = key;
+       } else {
+           er.result = ER_IGNORED;
+       }
     }
 
     entryDraw(co);
diff --git a/form.c b/form.c
index d12a3581c0f7df2cc5dcb7e643a55f8d91edd948..534ca29c17e4e7a18b7b65f8dab5319e6b73e709 100644 (file)
--- a/form.c
+++ b/form.c
@@ -372,8 +372,8 @@ static int Gpm_GetEvent(Gpm_Event *event)
 *****************************************************************************/
 
 struct element {
-    int top, left;              /* Actual, not virtual. These are translated */
-    newtComponent co;           /* into actual through vertOffset */
+    int top, left;             /* Actual, not virtual. These are translated */
+    newtComponent co;          /* into actual through vertOffset */
 };
 
 struct fdInfo {
@@ -428,7 +428,7 @@ static inline int componentFits(newtComponent co, int compNum) {
 
     if ((co->top + form->vertOffset) > el->top) return 0;
     if ((co->top + form->vertOffset + co->height) <
-            (el->top + el->co->height)) return 0;
+           (el->top + el->co->height)) return 0;
 
     return 1;
 }
@@ -446,7 +446,7 @@ newtComponent newtForm(newtComponent vertBar, void * help, int flags) {
     co->left = -1;
     co->isMapped = 0;
 
-    co->takesFocus = 0;                 /* we may have 0 components */
+    co->takesFocus = 0;                        /* we may have 0 components */
     co->ops = &formOps;
 
     form->help = help;
@@ -469,13 +469,13 @@ newtComponent newtForm(newtComponent vertBar, void * help, int flags) {
     form->timer = 0;
     form->lastTimeout.tv_sec = form->lastTimeout.tv_usec = 0;
     if (!(form->flags & NEWT_FLAG_NOF12)) {
-        newtFormAddHotKey(co, NEWT_KEY_F12);
+       newtFormAddHotKey(co, NEWT_KEY_F12);
     }
 
     if (vertBar)
-        form->vertBar = vertBar;
+       form->vertBar = vertBar;
     else
-        form->vertBar = NULL;
+       form->vertBar = NULL;
 
     form->helpTag = help;
     form->helpCb = helpCallback;
@@ -495,17 +495,17 @@ void newtFormSetCurrent(newtComponent co, newtComponent subco) {
     int i, new;
 
     for (i = 0; i < form->numComps; i++) {
-         if (form->elements[i].co == subco) break;
+        if (form->elements[i].co == subco) break;
     }
 
     if (form->elements[i].co != subco) return;
     new = i;
 
     if (co->isMapped && !componentFits(co, new)) {
-        gotoComponent(form, -1);
-        form->vertOffset = form->elements[new].top - co->top - 1;
-        if (form->vertOffset > (form->numRows - co->height))
-            form->vertOffset = form->numRows - co->height;
+       gotoComponent(form, -1);
+       form->vertOffset = form->elements[new].top - co->top - 1;
+       if (form->vertOffset > (form->numRows - co->height))
+           form->vertOffset = form->numRows - co->height;
     }
 
     gotoComponent(form, new);
@@ -536,9 +536,9 @@ void newtFormAddComponent(newtComponent co, newtComponent newco) {
     co->takesFocus = 1;
 
     if (form->numCompsAlloced == form->numComps) {
-        form->numCompsAlloced += 5;
-        form->elements = realloc(form->elements,
-                            sizeof(*(form->elements)) * form->numCompsAlloced);
+       form->numCompsAlloced += 5;
+       form->elements = realloc(form->elements,
+                           sizeof(*(form->elements)) * form->numCompsAlloced);
     }
 
     /* we grab real values for these a bit later */
@@ -547,7 +547,7 @@ void newtFormAddComponent(newtComponent co, newtComponent newco) {
     form->elements[form->numComps].co = newco;
 
     if (newco->takesFocus && form->currComp == -1)
-        form->currComp = form->numComps;
+       form->currComp = form->numComps;
 
     form->numComps++;
 }
@@ -559,7 +559,7 @@ void newtFormAddComponents(newtComponent co, ...) {
     va_start(ap, co);
 
     while ((subco = va_arg(ap, newtComponent)))
-        newtFormAddComponent(co, subco);
+       newtFormAddComponent(co, subco);
 
     va_end(ap);
 }
@@ -578,10 +578,10 @@ static void formPlace(newtComponent co, int left, int top) {
     co->left = left;
 
     for (i = 0, el = form->elements; i < form->numComps; i++, el++) {
-        el->co->top += vertDelta;
-        el->top += vertDelta;
-        el->co->left += horizDelta;
-        el->left += horizDelta;
+       el->co->top += vertDelta;
+       el->top += vertDelta;
+       el->co->left += horizDelta;
+       el->left += horizDelta;
     }
 }
 
@@ -596,25 +596,25 @@ void newtDrawForm(newtComponent co) {
     newtClearBox(co->left, co->top, co->width, co->height);
 
     for (i = 0, el = form->elements; i < form->numComps; i++, el++) {
-        /* the scrollbar *always* fits somewhere */
-        if (el->co == form->vertBar) {
-            el->co->ops->mapped(el->co, 1);
-            el->co->ops->draw(el->co);
-        } else {
-            /* only draw it if it'll fit on the screen vertically */
-            if (componentFits(co, i)) {
-                el->co->top = el->top - form->vertOffset;
-                el->co->ops->mapped(el->co, 1);
-                el->co->ops->draw(el->co);
-            } else {
-                el->co->ops->mapped(el->co, 0);
-            }
-        }
+       /* the scrollbar *always* fits somewhere */
+       if (el->co == form->vertBar) {
+           el->co->ops->mapped(el->co, 1);
+           el->co->ops->draw(el->co);
+       } else {
+           /* only draw it if it'll fit on the screen vertically */
+           if (componentFits(co, i)) {
+               el->co->top = el->top - form->vertOffset;
+               el->co->ops->mapped(el->co, 1);
+               el->co->ops->draw(el->co);
+           } else {
+               el->co->ops->mapped(el->co, 0);
+           }
+       }
     }
 
     if (form->vertBar)
-        newtScrollbarSet(form->vertBar, form->vertOffset,
-                         form->numRows - co->height);
+       newtScrollbarSet(form->vertBar, form->vertOffset,
+                        form->numRows - co->height);
 }
 
 static struct eventResult formEvent(newtComponent co, struct event ev) {
@@ -633,153 +633,153 @@ static struct eventResult formEvent(newtComponent co, struct event ev) {
 
     switch (ev.when) {
       case EV_EARLY:
-          if (ev.event == EV_KEYPRESS) {
-            if (ev.u.key == NEWT_KEY_TAB) {
-                er.result = ER_SWALLOWED;
-                dir = 1;
-                wrap = 1;
-            } else if (ev.u.key == NEWT_KEY_UNTAB) {
-                er.result = ER_SWALLOWED;
-                dir = -1;
-                wrap = 1;
-            }
-        }
-
-        if (form->numComps) {
-            i = form->currComp;
-            num = 0;
-            while (er.result == ER_IGNORED && num != form->numComps ) {
-                er = form->elements[i].co->ops->event(form->elements[i].co, ev);
-
-                num++;
-                i++;
-                if (i == form->numComps) i = 0;
-            }
-        }
-
-        break;
+         if (ev.event == EV_KEYPRESS) {
+           if (ev.u.key == NEWT_KEY_TAB) {
+               er.result = ER_SWALLOWED;
+               dir = 1;
+               wrap = 1;
+           } else if (ev.u.key == NEWT_KEY_UNTAB) {
+               er.result = ER_SWALLOWED;
+               dir = -1;
+               wrap = 1;
+           }
+       }
+
+       if (form->numComps) {
+           i = form->currComp;
+           num = 0;
+           while (er.result == ER_IGNORED && num != form->numComps ) {
+               er = form->elements[i].co->ops->event(form->elements[i].co, ev);
+
+               num++;
+               i++;
+               if (i == form->numComps) i = 0;
+           }
+       }
+
+       break;
 
       case EV_NORMAL:
-          if (ev.event == EV_MOUSE) {
-              found = 0;
-              for (i = 0, el = form->elements; i < form->numComps; i++, el++) {
-                  if ((el->co->top <= ev.u.mouse.y) &&
-                      (el->co->top + el->co->height > ev.u.mouse.y) &&
-                      (el->co->left <= ev.u.mouse.x) &&
-                      (el->co->left + el->co->width > ev.u.mouse.x)) {
-                      found = 1;
-                      if (el->co->takesFocus) {
-                          gotoComponent(form, i);
-                          subco = form->elements[form->currComp].co;
-                      }
-                  }
-                  /* If we did not find a co to send this event to, we
-                     should just swallow the event here. */
-              }
-              if (!found) {
-                  er.result = ER_SWALLOWED;
-
-                  return er;
-              }
-          }
-        er = subco->ops->event(subco, ev);
-        switch (er.result) {
-          case ER_NEXTCOMP:
-            er.result = ER_SWALLOWED;
-            dir = 1;
-            break;
-
-          case ER_EXITFORM:
-            form->exitComp = subco;
-            break;
-
-          default:
-            break;
-        }
-        break;
+         if (ev.event == EV_MOUSE) {
+             found = 0;
+             for (i = 0, el = form->elements; i < form->numComps; i++, el++) {
+                 if ((el->co->top <= ev.u.mouse.y) &&
+                     (el->co->top + el->co->height > ev.u.mouse.y) &&
+                     (el->co->left <= ev.u.mouse.x) &&
+                     (el->co->left + el->co->width > ev.u.mouse.x)) {
+                     found = 1;
+                     if (el->co->takesFocus) {
+                         gotoComponent(form, i);
+                         subco = form->elements[form->currComp].co;
+                     }
+                 }
+                 /* If we did not find a co to send this event to, we
+                    should just swallow the event here. */
+             }
+             if (!found) {
+                 er.result = ER_SWALLOWED;
+
+                 return er;
+             }
+         }
+       er = subco->ops->event(subco, ev);
+       switch (er.result) {
+         case ER_NEXTCOMP:
+           er.result = ER_SWALLOWED;
+           dir = 1;
+           break;
+
+         case ER_EXITFORM:
+           form->exitComp = subco;
+           break;
+
+         default:
+           break;
+       }
+       break;
 
       case EV_LATE:
-        er = subco->ops->event(subco, ev);
-
-        if (er.result == ER_IGNORED) {
-            switch (ev.u.key) {
-              case NEWT_KEY_UP:
-              case NEWT_KEY_LEFT:
-              case NEWT_KEY_BKSPC:
-                er.result = ER_SWALLOWED;
-                dir = -1;
-                break;
-
-              case NEWT_KEY_DOWN:
-              case NEWT_KEY_RIGHT:
-                er.result = ER_SWALLOWED;
-                dir = 1;
-                break;
-
-             case NEWT_KEY_PGUP:
-                er.result = ER_SWALLOWED;
-                dir = -1;
-                page = 1;
-                break;
-
-             case NEWT_KEY_PGDN:
-                er.result = ER_SWALLOWED;
-                dir = 1;
-                page = 1;
-                break;
-            }
-        }
+       er = subco->ops->event(subco, ev);
+
+       if (er.result == ER_IGNORED) {
+           switch (ev.u.key) {
+             case NEWT_KEY_UP:
+             case NEWT_KEY_LEFT:
+             case NEWT_KEY_BKSPC:
+               er.result = ER_SWALLOWED;
+               dir = -1;
+               break;
+
+             case NEWT_KEY_DOWN:
+             case NEWT_KEY_RIGHT:
+               er.result = ER_SWALLOWED;
+               dir = 1;
+               break;
+
+            case NEWT_KEY_PGUP:
+               er.result = ER_SWALLOWED;
+               dir = -1;
+               page = 1;
+               break;
+
+            case NEWT_KEY_PGDN:
+               er.result = ER_SWALLOWED;
+               dir = 1;
+               page = 1;
+               break;
+           }
+       }
     }
 
     if (dir) {
-        new = form->currComp;
-
-        if (page) {
-            new += dir * co->height;
-            if (new < 0)
-                new = 0;
-            else if (new >= form->numComps)
-                new = (form->numComps - 1);
-
-            while (!form->elements[new].co->takesFocus)
-                new = new - dir;
-        } else {
-            do {
-                new += dir;
-
-                if (wrap) {
-                    if (new < 0)
-                        new = form->numComps - 1;
-                    else if (new >= form->numComps)
-                        new = 0;
-                } else if (new < 0 || new >= form->numComps)
-                    return er;
-            } while (!form->elements[new].co->takesFocus);
-        }
-
-        /* make sure this component is visible */
-        if (!componentFits(co, new)) {
-            gotoComponent(form, -1);
-
-            if (dir < 0) {
-                /* make the new component the first one */
-                form->vertOffset = form->elements[new].top - co->top;
-            } else {
-                /* make the new component the last one */
-                form->vertOffset = (form->elements[new].top +
-                                        form->elements[new].co->height) -
-                                    (co->top + co->height);
-            }
-
-            if (form->vertOffset < 0) form->vertOffset = 0;
-            if (form->vertOffset > (form->numRows - co->height))
-                form->vertOffset = form->numRows - co->height;
-
-            newtDrawForm(co);
-        }
-
-        gotoComponent(form, new);
-        er.result = ER_SWALLOWED;
+       new = form->currComp;
+
+       if (page) {
+           new += dir * co->height;
+           if (new < 0)
+               new = 0;
+           else if (new >= form->numComps)
+               new = (form->numComps - 1);
+
+           while (!form->elements[new].co->takesFocus)
+               new = new - dir;
+       } else {
+           do {
+               new += dir;
+
+               if (wrap) {
+                   if (new < 0)
+                       new = form->numComps - 1;
+                   else if (new >= form->numComps)
+                       new = 0;
+               } else if (new < 0 || new >= form->numComps)
+                   return er;
+           } while (!form->elements[new].co->takesFocus);
+       }
+
+       /* make sure this component is visible */
+       if (!componentFits(co, new)) {
+           gotoComponent(form, -1);
+
+           if (dir < 0) {
+               /* make the new component the first one */
+               form->vertOffset = form->elements[new].top - co->top;
+           } else {
+               /* make the new component the last one */
+               form->vertOffset = (form->elements[new].top +
+                                       form->elements[new].co->height) -
+                                   (co->top + co->height);
+           }
+
+           if (form->vertOffset < 0) form->vertOffset = 0;
+           if (form->vertOffset > (form->numRows - co->height))
+               form->vertOffset = form->numRows - co->height;
+
+           newtDrawForm(co);
+       }
+
+       gotoComponent(form, new);
+       er.result = ER_SWALLOWED;
     }
 
     return er;
@@ -793,13 +793,13 @@ void newtFormDestroy(newtComponent co) {
 
     /* first, destroy all of the components */
     for (i = 0; i < form->numComps; i++) {
-        subco = form->elements[i].co;
-        if (subco->ops->destroy) {
-            subco->ops->destroy(subco);
-        } else {
-            if (subco->data) free(subco->data);
-            free(subco);
-        }
+       subco = form->elements[i].co;
+       if (subco->ops->destroy) {
+           subco->ops->destroy(subco);
+       } else {
+           if (subco->data) free(subco->data);
+           free(subco);
+       }
     }
 
     if (form->hotKeys) free(form->hotKeys);
@@ -814,12 +814,12 @@ newtComponent newtRunForm(newtComponent co) {
 
     newtFormRun(co, &es);
     if (es.reason == NEWT_EXIT_HOTKEY) {
-        if (es.u.key == NEWT_KEY_F12) {
-            es.reason = NEWT_EXIT_COMPONENT;
-            es.u.co = co;
-        } else {
-            return NULL;
-        }
+       if (es.u.key == NEWT_KEY_F12) {
+           es.reason = NEWT_EXIT_COMPONENT;
+           es.u.co = co;
+       } else {
+           return NULL;
+       }
     }
 
     return es.u.co;
@@ -850,36 +850,36 @@ void newtFormSetSize(newtComponent co) {
     co->top = form->elements[0].co->top;
     co->left = form->elements[0].co->left;
     for (i = 0, el = form->elements; i < form->numComps; i++, el++) {
-        if (el->co->ops == &formOps)
-            newtFormSetSize(el->co);
-
-        el->left = el->co->left;
-        el->top = el->co->top;
-
-        if (co->left > el->co->left) {
-            delta = co->left - el->co->left;
-            co->left -= delta;
-            co->width += delta;
-        }
-
-        if (co->top > el->co->top) {
-            delta = co->top - el->co->top;
-            co->top -= delta;
-            if (!form->fixedHeight)
-                co->height += delta;
-        }
-
-        if ((co->left + co->width) < (el->co->left + el->co->width))
-            co->width = (el->co->left + el->co->width) - co->left;
-
-        if (!form->fixedHeight) {
-            if ((co->top + co->height) < (el->co->top + el->co->height))
-                co->height = (el->co->top + el->co->height) - co->top;
-        }
-
-        if ((el->co->top + el->co->height - co->top) > form->numRows) {
-            form->numRows = el->co->top + el->co->height - co->top;
-        }
+       if (el->co->ops == &formOps)
+           newtFormSetSize(el->co);
+
+       el->left = el->co->left;
+       el->top = el->co->top;
+
+       if (co->left > el->co->left) {
+           delta = co->left - el->co->left;
+           co->left -= delta;
+           co->width += delta;
+       }
+
+       if (co->top > el->co->top) {
+           delta = co->top - el->co->top;
+           co->top -= delta;
+           if (!form->fixedHeight)
+               co->height += delta;
+       }
+
+       if ((co->left + co->width) < (el->co->left + el->co->width))
+           co->width = (el->co->left + el->co->width) - co->left;
+
+       if (!form->fixedHeight) {
+           if ((co->top + co->height) < (el->co->top + el->co->height))
+               co->height = (el->co->top + el->co->height) - co->top;
+       }
+
+       if ((el->co->top + el->co->height - co->top) > form->numRows) {
+           form->numRows = el->co->top + el->co->height - co->top;
+       }
     }
 }
 
@@ -910,155 +910,155 @@ void newtFormRun(newtComponent co, struct newtExitStruct * es) {
     newtDrawForm(co);
 
     if (form->currComp == -1) {
-        gotoComponent(form, 0);
+       gotoComponent(form, 0);
     } else
-        gotoComponent(form, form->currComp);
+       gotoComponent(form, form->currComp);
 
     while (!done) {
-        newtRefresh();
+       newtRefresh();
 
-        FD_ZERO(&readSet);
-        FD_ZERO(&writeSet);
-        FD_ZERO(&exceptSet);
-        FD_SET(0, &readSet);
+       FD_ZERO(&readSet);
+       FD_ZERO(&writeSet);
+       FD_ZERO(&exceptSet);
+       FD_SET(0, &readSet);
 #ifdef USE_GPM
-        if (gpm_fd > 0) {
-            FD_SET(gpm_fd, &readSet);
-        }
-        max = form->maxFd > gpm_fd ? form->maxFd : gpm_fd;
+       if (gpm_fd > 0) {
+           FD_SET(gpm_fd, &readSet);
+       }
+       max = form->maxFd > gpm_fd ? form->maxFd : gpm_fd;
 #else
-        max = form->maxFd;
+       max = form->maxFd;
 #endif
 
-        for (i = 0; i < form->numFds; i++) {
-            if (form->fds[i].flags & NEWT_FD_READ)
-                FD_SET(form->fds[i].fd, &readSet);
-            if (form->fds[i].flags & NEWT_FD_WRITE)
-                FD_SET(form->fds[i].fd, &writeSet);
-            if (form->fds[i].flags & NEWT_FD_EXCEPT)
-                FD_SET(form->fds[i].fd, &exceptSet);
-        }
-
-        if (form->timer) {
-            /* Calculate when we next need to return with a timeout. Do
-               this inside the loop in case a callback resets the timer. */
-            if (!form->lastTimeout.tv_sec && !form->lastTimeout.tv_usec)
-                gettimeofday(&form->lastTimeout, NULL);
-
-            nextTimeout.tv_sec = form->lastTimeout.tv_sec + 
-                    (form->timer / 1000);
-            nextTimeout.tv_usec = form->lastTimeout.tv_usec + 
-                                    (form->timer % 1000) * 1000;
-
-            gettimeofday(&now, 0);
-
-            if (now.tv_sec > nextTimeout.tv_sec) {
-                timeout.tv_sec = timeout.tv_usec = 0;
-            } else if (now.tv_sec == nextTimeout.tv_sec) {
-                timeout.tv_sec = 0;
-                if (now.tv_usec > nextTimeout.tv_usec)
-                    timeout.tv_usec = 0;
-                else
-                    timeout.tv_usec = nextTimeout.tv_usec - now.tv_usec;
-            } else if (now.tv_sec < nextTimeout.tv_sec) {
-                timeout.tv_sec = nextTimeout.tv_sec - now.tv_sec;
-                if (now.tv_usec > nextTimeout.tv_usec)
-                    timeout.tv_sec--,
-                    timeout.tv_usec = nextTimeout.tv_usec + 1000000 -
-                                        now.tv_usec;
-                else 
-                    timeout.tv_usec = nextTimeout.tv_usec - now.tv_usec;
-            }
-        } else {
-            timeout.tv_sec = timeout.tv_usec = 0;
-        }
-
-        i = select(max + 1, &readSet, &writeSet, &exceptSet, 
-                        form->timer ? &timeout : NULL);
-        if (i < 0) continue;    /* ?? What should we do here? */
-
-        if (i == 0) {
-            done = 1;
-            es->reason = NEWT_EXIT_TIMER;
-            gettimeofday(&form->lastTimeout, NULL);
-        } else
+       for (i = 0; i < form->numFds; i++) {
+           if (form->fds[i].flags & NEWT_FD_READ)
+               FD_SET(form->fds[i].fd, &readSet);
+           if (form->fds[i].flags & NEWT_FD_WRITE)
+               FD_SET(form->fds[i].fd, &writeSet);
+           if (form->fds[i].flags & NEWT_FD_EXCEPT)
+               FD_SET(form->fds[i].fd, &exceptSet);
+       }
+
+       if (form->timer) {
+           /* Calculate when we next need to return with a timeout. Do
+              this inside the loop in case a callback resets the timer. */
+           if (!form->lastTimeout.tv_sec && !form->lastTimeout.tv_usec)
+               gettimeofday(&form->lastTimeout, NULL);
+
+           nextTimeout.tv_sec = form->lastTimeout.tv_sec + 
+                   (form->timer / 1000);
+           nextTimeout.tv_usec = form->lastTimeout.tv_usec + 
+                                   (form->timer % 1000) * 1000;
+
+           gettimeofday(&now, 0);
+
+           if (now.tv_sec > nextTimeout.tv_sec) {
+               timeout.tv_sec = timeout.tv_usec = 0;
+           } else if (now.tv_sec == nextTimeout.tv_sec) {
+               timeout.tv_sec = 0;
+               if (now.tv_usec > nextTimeout.tv_usec)
+                   timeout.tv_usec = 0;
+               else
+                   timeout.tv_usec = nextTimeout.tv_usec - now.tv_usec;
+           } else if (now.tv_sec < nextTimeout.tv_sec) {
+               timeout.tv_sec = nextTimeout.tv_sec - now.tv_sec;
+               if (now.tv_usec > nextTimeout.tv_usec)
+                   timeout.tv_sec--,
+                   timeout.tv_usec = nextTimeout.tv_usec + 1000000 -
+                                       now.tv_usec;
+               else 
+                   timeout.tv_usec = nextTimeout.tv_usec - now.tv_usec;
+           }
+       } else {
+           timeout.tv_sec = timeout.tv_usec = 0;
+       }
+
+       i = select(max + 1, &readSet, &writeSet, &exceptSet, 
+                       form->timer ? &timeout : NULL);
+       if (i < 0) continue;    /* ?? What should we do here? */
+
+       if (i == 0) {
+           done = 1;
+           es->reason = NEWT_EXIT_TIMER;
+           gettimeofday(&form->lastTimeout, NULL);
+       } else
 #ifdef USE_GPM
-        if (gpm_fd > 0 && FD_ISSET(gpm_fd, &readSet)) {
-            Gpm_GetEvent(&event);
+       if (gpm_fd > 0 && FD_ISSET(gpm_fd, &readSet)) {
+           Gpm_GetEvent(&event);
 
-            if (event.type & GPM_DOWN) {
-                /* Transform coordinates to current window */
-                newtGetWindowPos(&x, &y);
+           if (event.type & GPM_DOWN) {
+               /* Transform coordinates to current window */
+               newtGetWindowPos(&x, &y);
 
-                ev.event = EV_MOUSE;
-                ev.u.mouse.type = MOUSE_BUTTON_DOWN;
-                ev.u.mouse.x = event.x - x - 1;
-                ev.u.mouse.y = event.y - y - 1;
+               ev.event = EV_MOUSE;
+               ev.u.mouse.type = MOUSE_BUTTON_DOWN;
+               ev.u.mouse.x = event.x - x - 1;
+               ev.u.mouse.y = event.y - y - 1;
 
-                /* Send the form the event */
-                er = sendEvent(co, ev);
+               /* Send the form the event */
+               er = sendEvent(co, ev);
 
-                if (er.result == ER_EXITFORM) {
-                    done = 1;
-                    es->reason = NEWT_EXIT_COMPONENT;
-                    es->u.co = form->exitComp;
-                }
+               if (er.result == ER_EXITFORM) {
+                   done = 1;
+                   es->reason = NEWT_EXIT_COMPONENT;
+                   es->u.co = form->exitComp;
+               }
 
-            }
-        } else
+           }
+       } else
 #endif
-        {
-            if (FD_ISSET(0, &readSet)) {
-
-                key = newtGetKey();
-
-                if (key == NEWT_KEY_RESIZE) {
-                    newtResizeScreen(1);
-                    continue;
-                }
-
-                for (i = 0; i < form->numHotKeys; i++) {
-                    if (form->hotKeys[i] == key) {
-                        es->reason = NEWT_EXIT_HOTKEY;
-                        es->u.key = key;
-                        done = 1;
-                        break;
-                    }
-                }
-
-                if (key == NEWT_KEY_F1 && form->helpTag && form->helpCb)
-                    form->helpCb(co, form->helpTag);
-
-                if (!done) {
-                    ev.event = EV_KEYPRESS;
-                    ev.u.key = key;
-
-                    er = sendEvent(co, ev);
-
-                    if (er.result == ER_EXITFORM) {
-                        done = 1;
-                        es->reason = NEWT_EXIT_COMPONENT;
-                        es->u.co = form->exitComp;
-                    }
-                }
-            } else {
-                for (i = 0; i < form->numFds; i++) {
-                    if (((form->fds[i].flags & NEWT_FD_READ)
-                        && FD_ISSET(form->fds[i].fd, &readSet))
-                        || ((form->fds[i].flags & NEWT_FD_WRITE)
-                        && FD_ISSET(form->fds[i].fd, &writeSet))
-                        || ((form->fds[i].flags & NEWT_FD_EXCEPT)
-                        && FD_ISSET(form->fds[i].fd, &exceptSet))) break;
-                }
-                if(i < form->numFds)
-                    es->u.watch = form->fds[i].fd;
-                else
-                    es->u.watch = -1;
-
-                es->reason = NEWT_EXIT_FDREADY;
-                done = 1;
-            }
-        }
+       {
+           if (FD_ISSET(0, &readSet)) {
+
+               key = newtGetKey();
+
+               if (key == NEWT_KEY_RESIZE) {
+                   newtResizeScreen(1);
+                   continue;
+               }
+
+               for (i = 0; i < form->numHotKeys; i++) {
+                   if (form->hotKeys[i] == key) {
+                       es->reason = NEWT_EXIT_HOTKEY;
+                       es->u.key = key;
+                       done = 1;
+                       break;
+                   }
+               }
+
+               if (key == NEWT_KEY_F1 && form->helpTag && form->helpCb)
+                   form->helpCb(co, form->helpTag);
+
+               if (!done) {
+                   ev.event = EV_KEYPRESS;
+                   ev.u.key = key;
+
+                   er = sendEvent(co, ev);
+
+                   if (er.result == ER_EXITFORM) {
+                       done = 1;
+                       es->reason = NEWT_EXIT_COMPONENT;
+                       es->u.co = form->exitComp;
+                   }
+               }
+           } else {
+               for (i = 0; i < form->numFds; i++) {
+                   if (((form->fds[i].flags & NEWT_FD_READ)
+                       && FD_ISSET(form->fds[i].fd, &readSet))
+                       || ((form->fds[i].flags & NEWT_FD_WRITE)
+                       && FD_ISSET(form->fds[i].fd, &writeSet))
+                       || ((form->fds[i].flags & NEWT_FD_EXCEPT)
+                       && FD_ISSET(form->fds[i].fd, &exceptSet))) break;
+               }
+               if(i < form->numFds)
+                   es->u.watch = form->fds[i].fd;
+               else
+                   es->u.watch = -1;
+
+               es->reason = NEWT_EXIT_FDREADY;
+               done = 1;
+           }
+       }
     }
     newtRefresh();
 #ifdef USE_GPM
@@ -1073,13 +1073,13 @@ static struct eventResult sendEvent(newtComponent co, struct event ev) {
     er = co->ops->event(co, ev);
 
     if (er.result == ER_IGNORED) {
-        ev.when = EV_NORMAL;
-        er = co->ops->event(co, ev);
+       ev.when = EV_NORMAL;
+       er = co->ops->event(co, ev);
     }
 
     if (er.result == ER_IGNORED) {
-        ev.when = EV_LATE;
-        er = co->ops->event(co, ev);
+       ev.when = EV_LATE;
+       er = co->ops->event(co, ev);
     }
 
     return er;
@@ -1089,16 +1089,16 @@ static void gotoComponent(struct form * form, int newComp) {
     struct event ev;
 
     if (form->currComp != -1) {
-        ev.event = EV_UNFOCUS;
-        sendEvent(form->elements[form->currComp].co, ev);
+       ev.event = EV_UNFOCUS;
+       sendEvent(form->elements[form->currComp].co, ev);
     }
 
     form->currComp = newComp;
 
     if (form->currComp != -1) {
-        ev.event = EV_FOCUS;
-        ev.when = EV_NORMAL;
-        sendEvent(form->elements[form->currComp].co, ev);
+       ev.event = EV_FOCUS;
+       ev.when = EV_NORMAL;
+       sendEvent(form->elements[form->currComp].co, ev);
     }
 }
 
@@ -1123,7 +1123,7 @@ void newtFormWatchFd(newtComponent co, int fd, int fdFlags) {
 
     for (i = 0; i < form->numFds; i++)
       if (form->fds[i].fd == fd)
-        break;
+       break;
 
     if(i >= form->numFds)
       form->fds = realloc(form->fds, (++form->numFds) * sizeof(*form->fds));
diff --git a/grid.c b/grid.c
index 0dde33618b7918b60507af0915eaaedd2cf87786..bedd02a5267cce15a71c5a3e7ec4c8f874da1ad8 100644 (file)
--- a/grid.c
+++ b/grid.c
@@ -12,8 +12,8 @@
 struct gridField {
     enum newtGridElement type;
     union {
-        newtGrid grid;
-        newtComponent co;
+       newtGrid grid;
+       newtComponent co;
     } u;
     int padLeft, padTop, padRight, padBottom;
     int anchor;
@@ -22,7 +22,7 @@ struct gridField {
 
 struct grid_s {
     int rows, cols;
-    int width, height;          /* totals, -1 means unknown */
+    int width, height;         /* totals, -1 means unknown */
     struct gridField ** fields;
 };
 
@@ -38,8 +38,8 @@ newtGrid newtCreateGrid(int cols, int rows) {
 
     grid->fields = malloc(sizeof(*grid->fields) * cols);
     while (cols--) {
-        grid->fields[cols] = malloc(sizeof(**(grid->fields)) * rows);
-        memset(grid->fields[cols], 0, sizeof(**(grid->fields)) * rows);
+       grid->fields[cols] = malloc(sizeof(**(grid->fields)) * rows);
+       memset(grid->fields[cols], 0, sizeof(**(grid->fields)) * rows);
     }
 
     grid->width = grid->height = -1;
@@ -48,13 +48,13 @@ newtGrid newtCreateGrid(int cols, int rows) {
 }
 
 void newtGridSetField(newtGrid grid, int col, int row, 
-                      enum newtGridElement type, void * val, int padLeft,
-                      int padTop, int padRight, int padBottom, int anchor,
-                      int flags) {
+                     enum newtGridElement type, void * val, int padLeft,
+                     int padTop, int padRight, int padBottom, int anchor,
+                     int flags) {
     struct gridField * field = &grid->fields[col][row];
 
     if (field->type == NEWT_GRID_SUBGRID) 
-        newtGridFree(field->u.grid, 1);
+       newtGridFree(field->u.grid, 1);
 
     field->type = type;
     field->u.co = (void *) val;
@@ -75,11 +75,11 @@ static void distSpace(int extra, int items, int * list) {
     all = extra / items;
     some = extra % items;
     for (i = 0; i < items; i++) {
-        list[i] += all;
-        if (some) {
-            list[i]++;
-            some--;
-        }
+       list[i] += all;
+       if (some) {
+           list[i]++;
+           some--;
+       }
     }
 }
 
@@ -99,57 +99,57 @@ static void shuffleGrid(newtGrid grid, int left, int top, int set) {
 
     minWidth = 0;
     for (row = 0; row < grid->rows; row++) {
-        i = 0;
-        for (col = 0; col < grid->cols; col++) {
-            field = &grid->fields[col][row];
-            if (field->type == NEWT_GRID_SUBGRID) {
-                /* we'll have to redo this later */
-                if (field->u.grid->width == -1) 
-                    shuffleGrid(field->u.grid, left, top, 0);
-                j = field->u.grid->width;
-            } else if (field->type == NEWT_GRID_COMPONENT) {
-                if (field->u.co->ops == formOps)
-                    newtFormSetSize(field->u.co);
-                j = field->u.co->width;
-            } else 
-                j = 0;
-
-            j += field->padLeft + field->padRight;
-
-            if (j > widths[col]) widths[col] = j;
-            i += widths[col];
-        }
-
-        if (i > minWidth) minWidth = i;
+       i = 0;
+       for (col = 0; col < grid->cols; col++) {
+           field = &grid->fields[col][row];
+           if (field->type == NEWT_GRID_SUBGRID) {
+               /* we'll have to redo this later */
+               if (field->u.grid->width == -1) 
+                   shuffleGrid(field->u.grid, left, top, 0);
+               j = field->u.grid->width;
+           } else if (field->type == NEWT_GRID_COMPONENT) {
+               if (field->u.co->ops == formOps)
+                   newtFormSetSize(field->u.co);
+               j = field->u.co->width;
+           } else 
+               j = 0;
+
+           j += field->padLeft + field->padRight;
+
+           if (j > widths[col]) widths[col] = j;
+           i += widths[col];
+       }
+
+       if (i > minWidth) minWidth = i;
     }
 
     minHeight = 0;
     for (col = 0; col < grid->cols; col++) {
-        i = 0;
-        for (row = 0; row < grid->rows; row++) {
-            field = &grid->fields[col][row];
-            if (field->type == NEWT_GRID_SUBGRID) {
-                /* we'll have to redo this later */
-                if (field->u.grid->height == -1) 
-                    shuffleGrid(field->u.grid, 0, 0, 0);
-                j = field->u.grid->height;
-            } else if (field->type == NEWT_GRID_COMPONENT){
-                j = field->u.co->height;
-            } else 
-                j = 0;
-
-            j += field->padTop + field->padBottom;
-
-            if (j > heights[row]) heights[row] = j;
-            i += heights[row];
-        }
-
-        if (i > minHeight) minHeight = i;
+       i = 0;
+       for (row = 0; row < grid->rows; row++) {
+           field = &grid->fields[col][row];
+           if (field->type == NEWT_GRID_SUBGRID) {
+               /* we'll have to redo this later */
+               if (field->u.grid->height == -1) 
+                   shuffleGrid(field->u.grid, 0, 0, 0);
+               j = field->u.grid->height;
+           } else if (field->type == NEWT_GRID_COMPONENT){
+               j = field->u.co->height;
+           } else 
+               j = 0;
+
+           j += field->padTop + field->padBottom;
+
+           if (j > heights[row]) heights[row] = j;
+           i += heights[row];
+       }
+
+       if (i > minHeight) minHeight = i;
     }
 
     /* this catches the -1 case */
-    if (grid->width < minWidth) grid->width = minWidth;         /* ack! */
-    if (grid->height < minHeight) grid->height = minHeight;     /* ditto! */
+    if (grid->width < minWidth) grid->width = minWidth;                /* ack! */
+    if (grid->height < minHeight) grid->height = minHeight;    /* ditto! */
 
     if (!set) return;
 
@@ -158,57 +158,57 @@ static void shuffleGrid(newtGrid grid, int left, int top, int set) {
 
     thisTop = top;
     for (row = 0; row < grid->rows; row++) {
-        i = 0;
-        thisLeft = left;
-        for (col = 0; col < grid->cols; col++) {
-            field = &grid->fields[col][row];
-
-            if (field->type == NEWT_GRID_EMPTY) continue;
-
-            x = thisLeft + field->padLeft;
-            remx = widths[col] - field->padLeft - field->padRight;
-            y = thisTop + field->padTop;
-            remy = heights[row] - field->padTop - field->padBottom;
-
-            if (field->type == NEWT_GRID_SUBGRID) {
-                remx -= field->u.grid->width;
-                remy -= field->u.grid->height;
-            } else if (field->type == NEWT_GRID_COMPONENT) {
-                remx -= field->u.co->width;
-                remy -= field->u.co->height;
-            }
-
-            if (!(field->flags & NEWT_GRID_FLAG_GROWX)) {
-                if (field->anchor & NEWT_ANCHOR_RIGHT)
-                    x += remx;
-                else if (!(field->anchor & NEWT_ANCHOR_LEFT))
-                    x += (remx / 2);
-            }
-         
-            if (!(field->flags & NEWT_GRID_FLAG_GROWY)) {
-                if (field->anchor & NEWT_ANCHOR_BOTTOM)
-                    y += remx;
-                else if (!(field->anchor & NEWT_ANCHOR_TOP))
-                    y += (remy / 2);
-            }
-
-            if (field->type == NEWT_GRID_SUBGRID) {
-                if (field->flags & NEWT_GRID_FLAG_GROWX)
-                    field->u.grid->width = widths[col] - field->padLeft 
-                                                - field->padRight;
-                if (field->flags & NEWT_GRID_FLAG_GROWY)
-                    field->u.grid->height = heights[col] - field->padTop
-                                                - field->padBottom;
-
-                shuffleGrid(field->u.grid, x, y, 1);
-            } else if (field->type == NEWT_GRID_COMPONENT) {
-                field->u.co->ops->place(field->u.co, x, y);
-            }
-
-            thisLeft += widths[col];
-        }
-
-        thisTop += heights[row];
+       i = 0;
+       thisLeft = left;
+       for (col = 0; col < grid->cols; col++) {
+           field = &grid->fields[col][row];
+
+           if (field->type == NEWT_GRID_EMPTY) continue;
+
+           x = thisLeft + field->padLeft;
+           remx = widths[col] - field->padLeft - field->padRight;
+           y = thisTop + field->padTop;
+           remy = heights[row] - field->padTop - field->padBottom;
+
+           if (field->type == NEWT_GRID_SUBGRID) {
+               remx -= field->u.grid->width;
+               remy -= field->u.grid->height;
+           } else if (field->type == NEWT_GRID_COMPONENT) {
+               remx -= field->u.co->width;
+               remy -= field->u.co->height;
+           }
+
+           if (!(field->flags & NEWT_GRID_FLAG_GROWX)) {
+               if (field->anchor & NEWT_ANCHOR_RIGHT)
+                   x += remx;
+               else if (!(field->anchor & NEWT_ANCHOR_LEFT))
+                   x += (remx / 2);
+           }
+        
+           if (!(field->flags & NEWT_GRID_FLAG_GROWY)) {
+               if (field->anchor & NEWT_ANCHOR_BOTTOM)
+                   y += remx;
+               else if (!(field->anchor & NEWT_ANCHOR_TOP))
+                   y += (remy / 2);
+           }
+
+           if (field->type == NEWT_GRID_SUBGRID) {
+               if (field->flags & NEWT_GRID_FLAG_GROWX)
+                   field->u.grid->width = widths[col] - field->padLeft 
+                                               - field->padRight;
+               if (field->flags & NEWT_GRID_FLAG_GROWY)
+                   field->u.grid->height = heights[col] - field->padTop
+                                               - field->padBottom;
+
+               shuffleGrid(field->u.grid, x, y, 1);
+           } else if (field->type == NEWT_GRID_COMPONENT) {
+               field->u.co->ops->place(field->u.co, x, y);
+           }
+
+           thisLeft += widths[col];
+       }
+
+       thisTop += heights[row];
     }
 }
 
@@ -220,14 +220,14 @@ void newtGridFree(newtGrid grid, int recurse) {
     int row, col;
 
     for (col = 0; col < grid->cols; col++) {
-        if (recurse) {
-            for (row = 0; row < grid->rows; row++) {
-                if (grid->fields[col][row].type == NEWT_GRID_SUBGRID)
-                    newtGridFree(grid->fields[col][row].u.grid, 1);
-            }
-        }
-
-        free(grid->fields[col]);
+       if (recurse) {
+           for (row = 0; row < grid->rows; row++) {
+               if (grid->fields[col][row].type == NEWT_GRID_SUBGRID)
+                   newtGridFree(grid->fields[col][row].u.grid, 1);
+           }
+       }
+
+       free(grid->fields[col]);
     }
 
     free(grid->fields);
@@ -236,8 +236,8 @@ void newtGridFree(newtGrid grid, int recurse) {
 
 void newtGridGetSize(newtGrid grid, int * width, int * height) {
     if (grid->width == -1 || grid->height == -1) {
-        grid->width = grid->height = -1;
-        shuffleGrid(grid, 0, 0, 1);
+       grid->width = grid->height = -1;
+       shuffleGrid(grid, 0, 0, 1);
     }
 
     *width = grid->width;
@@ -250,8 +250,8 @@ void newtGridWrappedWindow(newtGrid grid, char * title) {
     newtGridGetSize(grid, &width, &height);
     w = wstrlen(title,-1);
     if (width < w + 2) {
-        offset = ((w + 2) - width) / 2; 
-        width = w + 2;
+       offset = ((w + 2) - width) / 2; 
+       width = w + 2;
     }
     newtCenteredWindow(width + 2, height + 2, title);
     newtGridPlace(grid, 1 + offset, 1);
@@ -266,46 +266,46 @@ void newtGridWrappedWindowAt(newtGrid grid, char * title, int left, int top) {
 }
 
 void newtGridAddComponentsToForm(newtGrid grid, newtComponent form, 
-                                 int recurse) {
+                                int recurse) {
     int row, col;
 
     for (col = 0; col < grid->cols; col++) {
-        for (row = 0; row < grid->rows; row++) {
-            if (grid->fields[col][row].type == NEWT_GRID_SUBGRID && recurse)
-                newtGridAddComponentsToForm(grid->fields[col][row].u.grid,
-                                            form, 1);
-            else if (grid->fields[col][row].type == NEWT_GRID_COMPONENT)
-                newtFormAddComponent(form, grid->fields[col][row].u.co);
-        }
+       for (row = 0; row < grid->rows; row++) {
+           if (grid->fields[col][row].type == NEWT_GRID_SUBGRID && recurse)
+               newtGridAddComponentsToForm(grid->fields[col][row].u.grid,
+                                           form, 1);
+           else if (grid->fields[col][row].type == NEWT_GRID_COMPONENT)
+               newtFormAddComponent(form, grid->fields[col][row].u.co);
+       }
     }
 }
 
 /* this handles up to 50 items */
 static newtGrid stackem(int isVert, enum newtGridElement type1, void * what1,
-                        va_list args, int close) {
+                       va_list args, int close) {
     struct item {
-        enum newtGridElement type;
-        void * what;
+       enum newtGridElement type;
+       void * what;
     } items[50];
     int i, num;
     newtGrid grid;
     
     items[0].type = type1, items[0].what = what1, num = 1;
     while (1) {
-        items[num].type = va_arg(args, enum newtGridElement);
-        if (items[num].type == NEWT_GRID_EMPTY) break;
+       items[num].type = va_arg(args, enum newtGridElement);
+       if (items[num].type == NEWT_GRID_EMPTY) break;
 
-        items[num].what = va_arg(args, void *);
-        num++;
+       items[num].what = va_arg(args, void *);
+       num++;
     }
 
     grid = newtCreateGrid(isVert ? 1 : num, isVert ? num : 1);
 
     for (i = 0; i < num; i++) {
-        newtGridSetField(grid, isVert ? 0 : i, isVert ? i : 0, 
-                         items[i].type, items[i].what,
-                         close ? 0 : (i ? (isVert ? 0 : 1) : 0),
-                         close ? 0 : (i ? (isVert ? 1 : 0) : 0), 0, 0, 0, 0);
+       newtGridSetField(grid, isVert ? 0 : i, isVert ? i : 0, 
+                        items[i].type, items[i].what,
+                        close ? 0 : (i ? (isVert ? 0 : 1) : 0),
+                        close ? 0 : (i ? (isVert ? 1 : 0) : 0), 0, 0, 0, 0);
     }
 
     return grid;
@@ -364,31 +364,31 @@ newtGrid newtGridHStacked(enum newtGridElement type1, void * what1, ...) {
 }
 
 newtGrid newtGridBasicWindow(newtComponent text, newtGrid middle,
-                             newtGrid buttons) {
+                            newtGrid buttons) {
     newtGrid grid;
 
     grid = newtCreateGrid(1, 3);
     newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, text,
-                     0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);
+                    0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);
     newtGridSetField(grid, 0, 1, NEWT_GRID_SUBGRID, middle,
-                     0, 1, 0, 0, 0, 0);
+                    0, 1, 0, 0, 0, 0);
     newtGridSetField(grid, 0, 2, NEWT_GRID_SUBGRID, buttons,
-                     0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);
+                    0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);
 
     return grid;
 }
 
 newtGrid newtGridSimpleWindow(newtComponent text, newtComponent middle,
-                             newtGrid buttons) {
+                            newtGrid buttons) {
     newtGrid grid;
 
     grid = newtCreateGrid(1, 3);
     newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, text,
-                     0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);
+                    0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);
     newtGridSetField(grid, 0, 1, NEWT_GRID_COMPONENT, middle,
-                     0, 1, 0, 0, 0, 0);
+                    0, 1, 0, 0, 0, 0);
     newtGridSetField(grid, 0, 2, NEWT_GRID_SUBGRID, buttons,
-                     0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);
+                    0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);
 
     return grid;
 }
diff --git a/label.c b/label.c
index d4f508d4aaae2181d751d9649ab80608cfd59f63..ad8665b82068cea9a6b3f76478f3ae6de31b0c7e 100644 (file)
--- a/label.c
+++ b/label.c
@@ -50,12 +50,12 @@ void newtLabelSetText(newtComponent co, const char * text) {
     co->width = wstrlen(text,-1);
     newLength = strlen(text);
     if (newLength <= la->length) {
-        memset(la->text, ' ', la->length);
-        memcpy(la->text, text, newLength);
+       memset(la->text, ' ', la->length);
+       memcpy(la->text, text, newLength);
     } else {
-        free(la->text);
-        la->text = strdup(text);
-        la->length = newLength;
+       free(la->text);
+       la->text = strdup(text);
+       la->length = newLength;
     }
 
     labelDraw(co);
index a2e7b4c910dc96a7611dd8618443e3c7959ff436..a8957373107725e76453b192e1090158dcbe4e1b 100644 (file)
--- a/listbox.c
+++ b/listbox.c
@@ -24,21 +24,21 @@ struct items {
 /* Holds all the relevant information for this listbox */
 struct listbox {
     newtComponent sb;   /* Scrollbar on right side of listbox */
-    int curWidth;       /* size of text w/o scrollbar or border*/
-    int curHeight;      /* size of text w/o border */
+    int curWidth;      /* size of text w/o scrollbar or border*/
+    int curHeight;     /* size of text w/o border */
     int sbAdjust;
     int bdxAdjust, bdyAdjust;
     int numItems, numSelected;
     int userHasSetWidth;
     int currItem, startShowItem; /* startShowItem is the first item displayed
-                                   on the screen */
+                                  on the screen */
     int isActive; /* If we handle key events all the time, it seems
-                     to do things even when they are supposed to be for
-                     another button/whatever */
+                    to do things even when they are supposed to be for
+                    another button/whatever */
     struct items *boxItems;
     int grow;
     int flags; /* flags for this listbox, right now just
-                  NEWT_FLAG_RETURNEXIT */
+                 NEWT_FLAG_RETURNEXIT */
 };
 
 static void listboxDraw(newtComponent co);
@@ -47,7 +47,7 @@ static struct eventResult listboxEvent(newtComponent co, struct event ev);
 static void newtListboxRealSetCurrent(newtComponent co);
 static void listboxPlace(newtComponent co, int newLeft, int newTop);
 static inline void updateWidth(newtComponent co, struct listbox * li,
-                                int maxField);
+                               int maxField);
 static void listboxMapped(newtComponent co, int isMapped);
 
 static struct componentOps listboxOps = {
@@ -63,7 +63,7 @@ static void listboxMapped(newtComponent co, int isMapped) {
 
     co->isMapped = isMapped;
     if (li->sb)
-        li->sb->ops->mapped(li->sb, isMapped);
+       li->sb->ops->mapped(li->sb, isMapped);
 }
 
 static void listboxPlace(newtComponent co, int newLeft, int newTop) {
@@ -73,8 +73,8 @@ static void listboxPlace(newtComponent co, int newLeft, int newTop) {
     co->left = newLeft;
 
     if (li->sb)
-        li->sb->ops->place(li->sb, co->left + co->width - li->bdxAdjust - 1,
-                           co->top);
+       li->sb->ops->place(li->sb, co->left + co->width - li->bdxAdjust - 1,
+                          co->top);
 }
 
 newtComponent newtListbox(int left, int top, int height, int flags) {
@@ -82,11 +82,11 @@ newtComponent newtListbox(int left, int top, int height, int flags) {
     struct listbox * li;
 
     if (!(co = malloc(sizeof(*co))))
-        return NULL;
+       return NULL;
 
     if (!(li = malloc(sizeof(struct listbox)))) {
-        free(co);
-        return NULL;
+       free(co);
+       return NULL;
     }
 
     li->boxItems = NULL;
@@ -100,29 +100,29 @@ newtComponent newtListbox(int left, int top, int height, int flags) {
     li->bdxAdjust = 0;
     li->bdyAdjust = 0;
     li->flags = flags & (NEWT_FLAG_RETURNEXIT | NEWT_FLAG_BORDER |
-                         NEWT_FLAG_MULTIPLE | NEWT_FLAG_SHOWCURSOR);
+                        NEWT_FLAG_MULTIPLE | NEWT_FLAG_SHOWCURSOR);
 
     if (li->flags & NEWT_FLAG_BORDER) {
-        li->bdxAdjust = 2;
-        li->bdyAdjust = 1;
+       li->bdxAdjust = 2;
+       li->bdyAdjust = 1;
     }
 
     co->height = height;
     li->curHeight = co->height - (2 * li->bdyAdjust);
 
     if (height) {
-        li->grow = 0;
-        if (flags & NEWT_FLAG_SCROLL) {
-            sb = newtVerticalScrollbar(left, top + li->bdyAdjust,
-                                        li->curHeight,
-                                        COLORSET_LISTBOX, COLORSET_ACTLISTBOX);
-            li->sbAdjust = 3;
-        } else {
-            sb = NULL;
-        }
+       li->grow = 0;
+       if (flags & NEWT_FLAG_SCROLL) {
+           sb = newtVerticalScrollbar(left, top + li->bdyAdjust,
+                                       li->curHeight,
+                                       COLORSET_LISTBOX, COLORSET_ACTLISTBOX);
+           li->sbAdjust = 3;
+       } else {
+           sb = NULL;
+       }
     } else {
-        li->grow = 1;
-        sb = NULL;
+       li->grow = 1;
+       sb = NULL;
     }
 
     li->sb = sb;
@@ -140,12 +140,12 @@ newtComponent newtListbox(int left, int top, int height, int flags) {
 }
 
 static inline void updateWidth(newtComponent co, struct listbox * li,
-                                int maxField) {
+                               int maxField) {
     li->curWidth = maxField;
     co->width = li->curWidth + li->sbAdjust + 2 * li->bdxAdjust;
 
     if (li->sb)
-        li->sb->left = co->left + co->width - li->bdxAdjust - 1;
+       li->sb->left = co->left + co->width - li->bdxAdjust - 1;
 }
 
 void newtListboxSetCurrentByKey(newtComponent co, void * key) {
@@ -155,10 +155,10 @@ void newtListboxSetCurrentByKey(newtComponent co, void * key) {
 
     item = li->boxItems, i = 0;
     while (item && item->data != key)
-        item = item->next, i++;
+       item = item->next, i++;
 
     if (item)
-        newtListboxSetCurrent(co, i);
+       newtListboxSetCurrent(co, i);
 }
 
 void newtListboxSetCurrent(newtComponent co, int num)
@@ -166,20 +166,20 @@ void newtListboxSetCurrent(newtComponent co, int num)
     struct listbox * li = co->data;
 
     if (num >= li->numItems)
-        li->currItem = li->numItems - 1;
+       li->currItem = li->numItems - 1;
     else if (num < 0)
-        li->currItem = 0;
+       li->currItem = 0;
     else
-        li->currItem = num;
+       li->currItem = num;
 
     if (li->currItem < li->startShowItem)
-        li->startShowItem = li->currItem;
+       li->startShowItem = li->currItem;
     else if (li->currItem - li->startShowItem > li->curHeight - 1)
-        li->startShowItem = li->currItem - li->curHeight + 1;
+       li->startShowItem = li->currItem - li->curHeight + 1;
     if (li->startShowItem + li->curHeight > li->numItems)
-        li->startShowItem = li->numItems - li->curHeight;
+       li->startShowItem = li->numItems - li->curHeight;
     if(li->startShowItem < 0)
-        li->startShowItem = 0;
+       li->startShowItem = 0;
 
     newtListboxRealSetCurrent(co);
 }
@@ -189,7 +189,7 @@ static void newtListboxRealSetCurrent(newtComponent co)
     struct listbox * li = co->data;
 
     if(li->sb)
-        newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
+       newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
     listboxDraw(co);
     if(co->callback) co->callback(co, co->callbackData);
 }
@@ -210,16 +210,16 @@ void * newtListboxGetCurrent(newtComponent co) {
     struct items *item;
 
     for(i = 0, item = li->boxItems; item != NULL && i < li->currItem;
-        i++, item = item->next);
+       i++, item = item->next);
 
     if (item)
-        return (void *)item->data;
+       return (void *)item->data;
     else
-        return NULL;
+       return NULL;
 }
 
 void newtListboxSelectItem(newtComponent co, const void * key,
-        enum newtFlagsSense sense)
+       enum newtFlagsSense sense)
 {
     struct listbox * li = co->data;
     int i;
@@ -227,24 +227,24 @@ void newtListboxSelectItem(newtComponent co, const void * key,
 
     item = li->boxItems, i = 0;
     while (item && item->data != key)
-        item = item->next, i++;
+       item = item->next, i++;
 
     if (!item) return;
 
     if (item->isSelected)
-        li->numSelected--;
+       li->numSelected--;
 
     switch(sense) {
-        case NEWT_FLAGS_RESET:
-                item->isSelected = 0; break;
-        case NEWT_FLAGS_SET:
-                item->isSelected = 1; break;
-        case NEWT_FLAGS_TOGGLE:
-                item->isSelected = !item->isSelected;
+       case NEWT_FLAGS_RESET:
+               item->isSelected = 0; break;
+       case NEWT_FLAGS_SET:
+               item->isSelected = 1; break;
+       case NEWT_FLAGS_TOGGLE:
+               item->isSelected = !item->isSelected;
     }
 
     if (item->isSelected)
-        li->numSelected++;
+       li->numSelected++;
 
     listboxDraw(co);
 }
@@ -255,8 +255,8 @@ void newtListboxClearSelection(newtComponent co)
     struct listbox * li = co->data;
 
     for(item = li->boxItems; item != NULL;
-        item = item->next)
-        item->isSelected = 0;
+       item = item->next)
+       item->isSelected = 0;
     li->numSelected = 0;
     listboxDraw(co);
 }
@@ -276,9 +276,9 @@ void ** newtListboxGetSelection(newtComponent co, int *numitems)
 
     retval = malloc(li->numSelected * sizeof(void *));
     for(i = 0, item = li->boxItems; item != NULL;
-        item = item->next)
-        if(item->isSelected)
-            retval[i++] = (void *)item->data;
+       item = item->next)
+       if(item->isSelected)
+           retval[i++] = (void *)item->data;
     *numitems = li->numSelected;
     return retval;
 }
@@ -289,20 +289,20 @@ void newtListboxSetEntry(newtComponent co, int num, const char * text) {
     struct items *item;
 
     for(i = 0, item = li->boxItems; item != NULL && i < num;
-        i++, item = item->next);
+       i++, item = item->next);
 
     if(!item)
-        return;
+       return;
     else {
-        free(item->text);
-        item->text = strdup(text);
+       free(item->text);
+       item->text = strdup(text);
     }
     if (li->userHasSetWidth == 0 && wstrlen(text,-1) > li->curWidth) {
-        updateWidth(co, li, wstrlen(text,-1));
+       updateWidth(co, li, wstrlen(text,-1));
     }
 
     if (num >= li->startShowItem && num <= li->startShowItem + co->height)
-        listboxDraw(co);
+       listboxDraw(co);
 }
 
 void newtListboxSetData(newtComponent co, int num, void * data) {
@@ -311,72 +311,72 @@ void newtListboxSetData(newtComponent co, int num, void * data) {
     struct items *item;
 
     for(i = 0, item = li->boxItems; item != NULL && i < num;
-        i++, item = item->next);
+       i++, item = item->next);
 
     item->data = data;
 }
 
 int newtListboxAppendEntry(newtComponent co, const char * text,
-                        const void * data) {
+                       const void * data) {
     struct listbox * li = co->data;
     struct items *item;
 
     if(li->boxItems) {
-        for (item = li->boxItems; item->next != NULL; item = item->next);
+       for (item = li->boxItems; item->next != NULL; item = item->next);
 
-        item = item->next = malloc(sizeof(struct items));
+       item = item->next = malloc(sizeof(struct items));
     } else {
-        item = li->boxItems = malloc(sizeof(struct items));
+       item = li->boxItems = malloc(sizeof(struct items));
     }
 
     if (!li->userHasSetWidth && text && (wstrlen(text,-1) > li->curWidth))
-        updateWidth(co, li, wstrlen(text,-1));
+       updateWidth(co, li, wstrlen(text,-1));
 
     item->text = strdup(text); item->data = data; item->next = NULL;
     item->isSelected = 0;
 
     if (li->grow)
-        co->height++, li->curHeight++;
+       co->height++, li->curHeight++;
     li->numItems++;
 
     return 0;
 }
 
 int newtListboxInsertEntry(newtComponent co, const char * text,
-                           const void * data, void * key) {
+                          const void * data, void * key) {
     struct listbox * li = co->data;
     struct items *item, *t;
 
     if (li->boxItems) {
-        if (key) {
-            item = li->boxItems;
-            while (item && item->data != key) item = item->next;
-
-            if (!item) return 1;
-
-            t = item->next;
-            item = item->next = malloc(sizeof(struct items));
-            item->next = t;
-        } else {
-            t = li->boxItems;
-            item = li->boxItems = malloc(sizeof(struct items));
-            item->next = t;
-        }
+       if (key) {
+           item = li->boxItems;
+           while (item && item->data != key) item = item->next;
+
+           if (!item) return 1;
+
+           t = item->next;
+           item = item->next = malloc(sizeof(struct items));
+           item->next = t;
+       } else {
+           t = li->boxItems;
+           item = li->boxItems = malloc(sizeof(struct items));
+           item->next = t;
+       }
     } else if (key) {
-        return 1;
+       return 1;
     } else {
-        item = li->boxItems = malloc(sizeof(struct items));
-        item->next = NULL;
+       item = li->boxItems = malloc(sizeof(struct items));
+       item->next = NULL;
     }
 
     if (!li->userHasSetWidth && text && (wstrlen(text,-1) > li->curWidth))
-        updateWidth(co, li, wstrlen(text,-1));
+       updateWidth(co, li, wstrlen(text,-1));
 
     item->text = strdup(text?text:"(null)"); item->data = data;
     item->isSelected = 0;
 
     if (li->sb)
-        li->sb->left = co->left + co->width - li->bdxAdjust - 1;
+       li->sb->left = co->left + co->width - li->bdxAdjust - 1;
     li->numItems++;
 
     listboxDraw(co);
@@ -391,40 +391,40 @@ int newtListboxDeleteEntry(newtComponent co, void * key) {
     int num;
 
     if (li->boxItems == NULL || li->numItems <= 0)
-        return 0;
+       return 0;
 
     num = 0;
 
     item2 = NULL, item = li->boxItems;
     while (item && item->data != key) {
-        item2 = item;
-        item = item->next;
-        num++;
+       item2 = item;
+       item = item->next;
+       num++;
     }
 
     if (!item)
-        return -1;
+       return -1;
 
     if (item2)
-        item2->next = item->next;
+       item2->next = item->next;
     else
-        li->boxItems = item->next;
+       li->boxItems = item->next;
 
     free(item->text);
     free(item);
     li->numItems--;
 
     if (!li->userHasSetWidth) {
-        widest = 0;
-        for (item = li->boxItems; item != NULL; item = item->next)
-            if ((t = wstrlen(item->text,-1)) > widest) widest = t;
+       widest = 0;
+       for (item = li->boxItems; item != NULL; item = item->next)
+           if ((t = wstrlen(item->text,-1)) > widest) widest = t;
     }
 
     if (li->currItem >= num)
-        li->currItem--;
+       li->currItem--;
 
     if (!li->userHasSetWidth) {
-        updateWidth(co, li, widest);
+       updateWidth(co, li, widest);
     }
 
     listboxDraw(co);
@@ -437,16 +437,16 @@ void newtListboxClear(newtComponent co)
     struct listbox * li;
     struct items *anitem, *nextitem;
     if(co == NULL || (li = co->data) == NULL)
-        return;
+       return;
     for(anitem = li->boxItems; anitem != NULL; anitem = nextitem) {
-        nextitem = anitem->next;
-        free(anitem->text);
-        free(anitem);
+       nextitem = anitem->next;
+       free(anitem->text);
+       free(anitem);
     }
     li->numItems = li->numSelected = li->currItem = li->startShowItem = 0;
     li->boxItems = NULL;
     if (!li->userHasSetWidth)
-        updateWidth(co, li, 5);
+       updateWidth(co, li, 5);
 }
 
 int newtListboxItemCount(newtComponent co)
@@ -463,24 +463,24 @@ void newtListboxGetEntry(newtComponent co, int num, char **text, void **data) {
     struct items *item;
 
     if (!li->boxItems || num >= li->numItems) {
-        if(text)
-            *text = NULL;
-        if(data)
-            *data = NULL;
-        return;
+       if(text)
+           *text = NULL;
+       if(data)
+           *data = NULL;
+       return;
     }
 
     i = 0;
     item = li->boxItems;
     while (item && i < num) {
-        i++, item = item->next;
+       i++, item = item->next;
     }
 
     if (item) {
-        if (text)
-            *text = item->text;
-        if (data)
-            *data = (void *)item->data;
+       if (text)
+           *text = item->text;
+       if (data)
+           *data = (void *)item->data;
     }
 }
 
@@ -496,7 +496,7 @@ static void listboxDraw(newtComponent co)
     
     if(li->flags & NEWT_FLAG_BORDER) {
       if(li->isActive)
-          SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
+         SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
       else
           SLsmg_set_color(NEWT_COLORSET_LISTBOX);
 
@@ -504,30 +504,30 @@ static void listboxDraw(newtComponent co)
     }
 
     if(li->sb)
-        li->sb->ops->draw(li->sb);
+       li->sb->ops->draw(li->sb);
 
     SLsmg_set_color(NEWT_COLORSET_LISTBOX);
 
     for(i = 0, item = li->boxItems; item != NULL && i < li->startShowItem;
-        i++, item = item->next);
+       i++, item = item->next);
 
     j = i;
 
     for (i = 0; item != NULL && i < li->curHeight; i++, item = item->next) {
-        if (!item->text) continue;
+       if (!item->text) continue;
 
-        newtGotorc(co->top + i + li->bdyAdjust, co->left + li->bdxAdjust);
-        if(j + i == li->currItem) {
-            if(item->isSelected)
-                SLsmg_set_color(NEWT_COLORSET_ACTSELLISTBOX);
-            else
-                SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
-        } else if(item->isSelected)
-            SLsmg_set_color(NEWT_COLORSET_SELLISTBOX);
-        else
-            SLsmg_set_color(NEWT_COLORSET_LISTBOX);
+       newtGotorc(co->top + i + li->bdyAdjust, co->left + li->bdxAdjust);
+       if(j + i == li->currItem) {
+           if(item->isSelected)
+               SLsmg_set_color(NEWT_COLORSET_ACTSELLISTBOX);
+           else
+               SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
+       } else if(item->isSelected)
+           SLsmg_set_color(NEWT_COLORSET_SELLISTBOX);
+       else
+           SLsmg_set_color(NEWT_COLORSET_LISTBOX);
 
-        SLsmg_write_nstring(item->text, li->curWidth);
+       SLsmg_write_nstring(item->text, li->curWidth);
 
     }
     newtGotorc(co->top + (li->currItem - li->startShowItem) + li->bdyAdjust,
@@ -543,203 +543,203 @@ static struct eventResult listboxEvent(newtComponent co, struct event ev) {
     er.result = ER_IGNORED;
 
     if(ev.when == EV_EARLY || ev.when == EV_LATE) {
-        return er;
+       return er;
     }
 
     switch(ev.event) {
       case EV_KEYPRESS:
-        if (!li->isActive) break;
-
-        switch(ev.u.key) {
-          case ' ':
-            if(!(li->flags & NEWT_FLAG_MULTIPLE)) break;
-            newtListboxSelectItem(co, newtListboxGetCurrent(co),
-                                  NEWT_FLAGS_TOGGLE);
-            er.result = ER_SWALLOWED;
-            /* We don't break here, because it is cool to be able to
-               hold space to select a bunch of items in a list at once */
-
-          case NEWT_KEY_DOWN:
-            if(li->numItems <= 0) break;
-            if(li->currItem < li->numItems - 1) {
-                li->currItem++;
-                if(li->currItem > (li->startShowItem + li->curHeight - 1)) {
-                    li->startShowItem = li->currItem - li->curHeight + 1;
-                    if(li->startShowItem + li->curHeight > li->numItems)
-                        li->startShowItem = li->numItems - li->curHeight;
-                }
-                if(li->sb)
-                    newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
-                listboxDraw(co);
-            }
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case NEWT_KEY_ENTER:
-            if(li->numItems <= 0) break;
-            if(li->flags & NEWT_FLAG_RETURNEXIT)
-                er.result = ER_EXITFORM;
-            break;
-
-          case NEWT_KEY_UP:
-            if(li->numItems <= 0) break;
-            if(li->currItem > 0) {
-                li->currItem--;
-                if(li->currItem < li->startShowItem)
-                    li->startShowItem = li->currItem;
-                if(li->sb)
-                    newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
-                listboxDraw(co);
-            }
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case NEWT_KEY_PGUP:
-            if(li->numItems <= 0) break;
-            li->startShowItem -= li->curHeight - 1;
-            if(li->startShowItem < 0)
-                li->startShowItem = 0;
-            li->currItem -= li->curHeight - 1;
-            if(li->currItem < 0)
-                li->currItem = 0;
-            newtListboxRealSetCurrent(co);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case NEWT_KEY_PGDN:
-            if(li->numItems <= 0) break;
-            li->startShowItem += li->curHeight;
-            if(li->startShowItem > (li->numItems - li->curHeight)) {
-                li->startShowItem = li->numItems - li->curHeight;
-            }
-            li->currItem += li->curHeight;
-            if(li->currItem >= li->numItems) {
-                li->currItem = li->numItems - 1;
-            }
-            newtListboxRealSetCurrent(co);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case NEWT_KEY_HOME:
-            if(li->numItems <= 0) break;
-            newtListboxSetCurrent(co, 0);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case NEWT_KEY_END:
-            if(li->numItems <= 0) break;
-            li->startShowItem = li->numItems - li->curHeight;
-            if(li->startShowItem < 0)
-                li->startShowItem = 0;
-            li->currItem = li->numItems - 1;
-            newtListboxRealSetCurrent(co);
-            er.result = ER_SWALLOWED;
-            break;
-          default:
-              if (li->numItems <= 0) break;
+       if (!li->isActive) break;
+
+       switch(ev.u.key) {
+         case ' ':
+           if(!(li->flags & NEWT_FLAG_MULTIPLE)) break;
+           newtListboxSelectItem(co, newtListboxGetCurrent(co),
+                                 NEWT_FLAGS_TOGGLE);
+           er.result = ER_SWALLOWED;
+           /* We don't break here, because it is cool to be able to
+              hold space to select a bunch of items in a list at once */
+
+         case NEWT_KEY_DOWN:
+           if(li->numItems <= 0) break;
+           if(li->currItem < li->numItems - 1) {
+               li->currItem++;
+               if(li->currItem > (li->startShowItem + li->curHeight - 1)) {
+                   li->startShowItem = li->currItem - li->curHeight + 1;
+                   if(li->startShowItem + li->curHeight > li->numItems)
+                       li->startShowItem = li->numItems - li->curHeight;
+               }
+               if(li->sb)
+                   newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
+               listboxDraw(co);
+           }
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case NEWT_KEY_ENTER:
+           if(li->numItems <= 0) break;
+           if(li->flags & NEWT_FLAG_RETURNEXIT)
+               er.result = ER_EXITFORM;
+           break;
+
+         case NEWT_KEY_UP:
+           if(li->numItems <= 0) break;
+           if(li->currItem > 0) {
+               li->currItem--;
+               if(li->currItem < li->startShowItem)
+                   li->startShowItem = li->currItem;
+               if(li->sb)
+                   newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
+               listboxDraw(co);
+           }
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case NEWT_KEY_PGUP:
+           if(li->numItems <= 0) break;
+           li->startShowItem -= li->curHeight - 1;
+           if(li->startShowItem < 0)
+               li->startShowItem = 0;
+           li->currItem -= li->curHeight - 1;
+           if(li->currItem < 0)
+               li->currItem = 0;
+           newtListboxRealSetCurrent(co);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case NEWT_KEY_PGDN:
+           if(li->numItems <= 0) break;
+           li->startShowItem += li->curHeight;
+           if(li->startShowItem > (li->numItems - li->curHeight)) {
+               li->startShowItem = li->numItems - li->curHeight;
+           }
+           li->currItem += li->curHeight;
+           if(li->currItem >= li->numItems) {
+               li->currItem = li->numItems - 1;
+           }
+           newtListboxRealSetCurrent(co);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case NEWT_KEY_HOME:
+           if(li->numItems <= 0) break;
+           newtListboxSetCurrent(co, 0);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case NEWT_KEY_END:
+           if(li->numItems <= 0) break;
+           li->startShowItem = li->numItems - li->curHeight;
+           if(li->startShowItem < 0)
+               li->startShowItem = 0;
+           li->currItem = li->numItems - 1;
+           newtListboxRealSetCurrent(co);
+           er.result = ER_SWALLOWED;
+           break;
+         default:
+             if (li->numItems <= 0) break;
               if (ev.u.key < NEWT_KEY_EXTRA_BASE && isalpha(ev.u.key)) {
-                  for(i = 0, item = li->boxItems; item != NULL &&
-                          i < li->currItem; i++, item = item->next);
-
-                  if (item && item->text && (toupper(*item->text) == toupper(ev.u.key))) {
-                      item = item->next;
-                      i++;
-                  } else { 
-                      item = li->boxItems;
-                      i = 0;
-                  }
-                  while (item && item->text &&
-                         toupper(*item->text) != toupper(ev.u.key)) {
-                      item = item->next;
-                      i++;
-                  }
-                  if (item) {
-                      li->currItem = i;
-                      if(li->currItem < li->startShowItem ||
-                         li->currItem > li->startShowItem)
-                          li->startShowItem =
-                              li->currItem > li->numItems - li->curHeight ?
-                              li->startShowItem = li->numItems - li->curHeight :
-                              li->currItem;
-                      if(li->sb)
-                          newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
-                      newtListboxRealSetCurrent(co);
-                      er.result = ER_SWALLOWED;
-                  }
-              }
-        }
-        break;
+                 for(i = 0, item = li->boxItems; item != NULL &&
+                         i < li->currItem; i++, item = item->next);
+
+                 if (item && item->text && (toupper(*item->text) == toupper(ev.u.key))) {
+                     item = item->next;
+                     i++;
+                 } else { 
+                     item = li->boxItems;
+                     i = 0;
+                 }
+                 while (item && item->text &&
+                        toupper(*item->text) != toupper(ev.u.key)) {
+                     item = item->next;
+                     i++;
+                 }
+                 if (item) {
+                     li->currItem = i;
+                     if(li->currItem < li->startShowItem ||
+                        li->currItem > li->startShowItem)
+                         li->startShowItem =
+                             li->currItem > li->numItems - li->curHeight ?
+                             li->startShowItem = li->numItems - li->curHeight :
+                             li->currItem;
+                     if(li->sb)
+                         newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
+                     newtListboxRealSetCurrent(co);
+                     er.result = ER_SWALLOWED;
+                 }
+             }
+       }
+       break;
 
       case EV_FOCUS:
-        li->isActive = 1;
-        listboxDraw(co);
-        if(li->flags & NEWT_FLAG_SHOWCURSOR)
-          newtCursorOn();
-        er.result = ER_SWALLOWED;
-        break;
+       li->isActive = 1;
+       listboxDraw(co);
+       if(li->flags & NEWT_FLAG_SHOWCURSOR)
+         newtCursorOn();
+       er.result = ER_SWALLOWED;
+       break;
 
       case EV_UNFOCUS:
-        li->isActive = 0;
-        listboxDraw(co);
-        if(li->flags & NEWT_FLAG_SHOWCURSOR)
-          newtCursorOff();
-        er.result = ER_SWALLOWED;
-        break;
+       li->isActive = 0;
+       listboxDraw(co);
+       if(li->flags & NEWT_FLAG_SHOWCURSOR)
+         newtCursorOff();
+       er.result = ER_SWALLOWED;
+       break;
 
       case EV_MOUSE:
-          /* if this mouse click was within the listbox, make the current
-             item the item clicked on. */
-        /* Up scroll arrow */
-        if (li->sb &&
-            ev.u.mouse.x == co->left + co->width - li->bdxAdjust - 1 &&
-            ev.u.mouse.y == co->top + li->bdyAdjust) {
-            if(li->numItems <= 0) break;
-            if(li->currItem > 0) {
-                li->currItem--;
-                if(li->currItem < li->startShowItem)
-                    li->startShowItem = li->currItem;
-                if(li->sb)
-                    newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
-                listboxDraw(co);
-            }
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            break;
-        }
-        /* Down scroll arrow */
-        if (li->sb &&
-            ev.u.mouse.x == co->left + co->width - li->bdxAdjust - 1 &&
-            ev.u.mouse.y == co->top + co->height - li->bdyAdjust - 1) {
-            if(li->numItems <= 0) break;
-            if(li->currItem < li->numItems - 1) {
-                li->currItem++;
-                if(li->currItem > (li->startShowItem + li->curHeight - 1)) {
-                    li->startShowItem = li->currItem - li->curHeight + 1;
-                    if(li->startShowItem + li->curHeight > li->numItems)
-                        li->startShowItem = li->numItems - li->curHeight;
-                }
-                if(li->sb)
-                    newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
-                listboxDraw(co);
-            }
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            break;
-        }
-        if ((ev.u.mouse.y >= co->top + li->bdyAdjust) &&
-            (ev.u.mouse.y <= co->top + co->height - (li->bdyAdjust * 2)) &&
-            (ev.u.mouse.x >= co->left + li->bdxAdjust) &&
-            (ev.u.mouse.x <= co->left + co->width + (li->bdxAdjust * 2))) {
-            li->currItem = li->startShowItem +
-                (ev.u.mouse.y - li->bdyAdjust - co->top);
-            newtListboxRealSetCurrent(co);
-            listboxDraw(co);
-            if(co->callback) co->callback(co, co->callbackData);
-            er.result = ER_SWALLOWED;
-            break;
-        }
+         /* if this mouse click was within the listbox, make the current
+            item the item clicked on. */
+       /* Up scroll arrow */
+       if (li->sb &&
+           ev.u.mouse.x == co->left + co->width - li->bdxAdjust - 1 &&
+           ev.u.mouse.y == co->top + li->bdyAdjust) {
+           if(li->numItems <= 0) break;
+           if(li->currItem > 0) {
+               li->currItem--;
+               if(li->currItem < li->startShowItem)
+                   li->startShowItem = li->currItem;
+               if(li->sb)
+                   newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
+               listboxDraw(co);
+           }
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           break;
+       }
+       /* Down scroll arrow */
+       if (li->sb &&
+           ev.u.mouse.x == co->left + co->width - li->bdxAdjust - 1 &&
+           ev.u.mouse.y == co->top + co->height - li->bdyAdjust - 1) {
+           if(li->numItems <= 0) break;
+           if(li->currItem < li->numItems - 1) {
+               li->currItem++;
+               if(li->currItem > (li->startShowItem + li->curHeight - 1)) {
+                   li->startShowItem = li->currItem - li->curHeight + 1;
+                   if(li->startShowItem + li->curHeight > li->numItems)
+                       li->startShowItem = li->numItems - li->curHeight;
+               }
+               if(li->sb)
+                   newtScrollbarSet(li->sb, li->currItem + 1, li->numItems);
+               listboxDraw(co);
+           }
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           break;
+       }
+       if ((ev.u.mouse.y >= co->top + li->bdyAdjust) &&
+           (ev.u.mouse.y <= co->top + co->height - (li->bdyAdjust * 2)) &&
+           (ev.u.mouse.x >= co->left + li->bdxAdjust) &&
+           (ev.u.mouse.x <= co->left + co->width + (li->bdxAdjust * 2))) {
+           li->currItem = li->startShowItem +
+               (ev.u.mouse.y - li->bdyAdjust - co->top);
+           newtListboxRealSetCurrent(co);
+           listboxDraw(co);
+           if(co->callback) co->callback(co, co->callbackData);
+           er.result = ER_SWALLOWED;
+           break;
+       }
     }
 
     return er;
@@ -752,10 +752,10 @@ static void listboxDestroy(newtComponent co) {
     nextitem = item = li->boxItems;
 
     while (item != NULL) {
-        nextitem = item->next;
-        free(item->text);
-        free(item);
-        item = nextitem;
+       nextitem = item->next;
+       free(item->text);
+       free(item);
+       item = nextitem;
     }
 
     if (li->sb) li->sb->ops->destroy(li->sb);
diff --git a/newt.c b/newt.c
index ed7c9c94a3da388365d30ab46416bcb3bc59f55b..4cc22d0507eca8084136aacbe7f3213e4af45f11 100644 (file)
--- a/newt.c
+++ b/newt.c
@@ -46,81 +46,81 @@ static const char * defaultHelpLine =
 ;
 
 const struct newtColors newtDefaultColorPalette = {
-        "white", "blue",                        /* root fg, bg */
-        "black", "lightgray",                   /* border fg, bg */
-        "black", "lightgray",                   /* window fg, bg */
-        "white", "black",                       /* shadow fg, bg */
-        "red", "lightgray",                     /* title fg, bg */
-        "lightgray", "red",                     /* button fg, bg */
-        "red", "lightgray",                     /* active button fg, bg */
-        "yellow", "blue",                       /* checkbox fg, bg */
-        "blue", "brown",                        /* active checkbox fg, bg */
-        "yellow", "blue",                       /* entry box fg, bg */
-        "blue", "lightgray",                    /* label fg, bg */
-        "black", "lightgray",                   /* listbox fg, bg */
-        "yellow", "blue",                       /* active listbox fg, bg */
-        "black", "lightgray",                   /* textbox fg, bg */
-        "lightgray", "black",                   /* active textbox fg, bg */
-        "white", "blue",                        /* help line */
-        "yellow", "blue",                       /* root text */
-        "blue",                                 /* scale full */
-        "red",                                  /* scale empty */
-        "blue", "lightgray",                    /* disabled entry fg, bg */
-        "white", "blue",                        /* compact button fg, bg */
-        "yellow", "red",                        /* active & sel listbox */
-        "black", "brown"                        /* selected listbox */
+       "white", "blue",                        /* root fg, bg */
+       "black", "lightgray",                   /* border fg, bg */
+       "black", "lightgray",                   /* window fg, bg */
+       "white", "black",                       /* shadow fg, bg */
+       "red", "lightgray",                     /* title fg, bg */
+       "lightgray", "red",                     /* button fg, bg */
+       "red", "lightgray",                     /* active button fg, bg */
+       "yellow", "blue",                       /* checkbox fg, bg */
+       "blue", "brown",                        /* active checkbox fg, bg */
+       "yellow", "blue",                       /* entry box fg, bg */
+       "blue", "lightgray",                    /* label fg, bg */
+       "black", "lightgray",                   /* listbox fg, bg */
+       "yellow", "blue",                       /* active listbox fg, bg */
+       "black", "lightgray",                   /* textbox fg, bg */
+       "lightgray", "black",                   /* active textbox fg, bg */
+       "white", "blue",                        /* help line */
+       "yellow", "blue",                       /* root text */
+       "blue",                                 /* scale full */
+       "red",                                  /* scale empty */
+       "blue", "lightgray",                    /* disabled entry fg, bg */
+       "white", "blue",                        /* compact button fg, bg */
+       "yellow", "red",                        /* active & sel listbox */
+       "black", "brown"                        /* selected listbox */
 };
 
 static const struct keymap keymap[] = {
-        { "\033OA",             NEWT_KEY_UP,            "kh" },
-        { "\033[A",             NEWT_KEY_UP,            "ku" },
-        { "\033OB",             NEWT_KEY_DOWN,          "kd" },
-        { "\033[B",             NEWT_KEY_DOWN,          "kd" },
-        { "\033[C",             NEWT_KEY_RIGHT,         "kr" },
-        { "\033OC",             NEWT_KEY_RIGHT,         "kr" },
-        { "\033[D",             NEWT_KEY_LEFT,          "kl" },
-        { "\033OD",             NEWT_KEY_LEFT,          "kl" },
-        { "\033[H",             NEWT_KEY_HOME,          "kh" },
-        { "\033[1~",            NEWT_KEY_HOME,          "kh" },
-        { "\033Ow",             NEWT_KEY_END,           "kH" },
-        { "\033[4~",            NEWT_KEY_END,           "kH" },
-
-        { "\033[3~",            NEWT_KEY_DELETE,        "kl" },
-        { "\033[2~",            NEWT_KEY_INSERT,        NULL },
-
-        { "\033\t",             NEWT_KEY_UNTAB,         NULL },
-
-        { "\033[5~",            NEWT_KEY_PGUP,          NULL },
-        { "\033[6~",            NEWT_KEY_PGDN,          NULL },
-        { "\033V",              NEWT_KEY_PGUP,          "kH" },
-        { "\033v",              NEWT_KEY_PGUP,          "kH" },
-
-        { "\033[[A",            NEWT_KEY_F1,            NULL },
-        { "\033[[B",            NEWT_KEY_F2,            NULL },
-        { "\033[[C",            NEWT_KEY_F3,            NULL },
-        { "\033[[D",            NEWT_KEY_F4,            NULL },
-        { "\033[[E",            NEWT_KEY_F5,            NULL },
-
-        { "\033OP",             NEWT_KEY_F1,            NULL },
-        { "\033OQ",             NEWT_KEY_F2,            NULL },
-        { "\033OR",             NEWT_KEY_F3,            NULL },
-        { "\033OS",             NEWT_KEY_F4,            NULL },
-
-        { "\033[11~",           NEWT_KEY_F1,            NULL },
-        { "\033[12~",           NEWT_KEY_F2,            NULL },
-        { "\033[13~",           NEWT_KEY_F3,            NULL },
-        { "\033[14~",           NEWT_KEY_F4,            NULL },
-        { "\033[15~",           NEWT_KEY_F5,            NULL },
-        { "\033[17~",           NEWT_KEY_F6,            NULL },
-        { "\033[18~",           NEWT_KEY_F7,            NULL },
-        { "\033[19~",           NEWT_KEY_F8,            NULL },
-        { "\033[20~",           NEWT_KEY_F9,            NULL },
-        { "\033[21~",           NEWT_KEY_F10,           NULL },
-        { "\033[23~",           NEWT_KEY_F11,           NULL },
-        { "\033[24~",           NEWT_KEY_F12,           NULL },
-        { "\033",               NEWT_KEY_ESCAPE,        NULL },
-
-        { 0 },  /* LEAVE this one */
+       { "\033OA",             NEWT_KEY_UP,            "kh" },
+       { "\033[A",             NEWT_KEY_UP,            "ku" },
+       { "\033OB",             NEWT_KEY_DOWN,          "kd" },
+       { "\033[B",             NEWT_KEY_DOWN,          "kd" },
+       { "\033[C",             NEWT_KEY_RIGHT,         "kr" },
+       { "\033OC",             NEWT_KEY_RIGHT,         "kr" },
+       { "\033[D",             NEWT_KEY_LEFT,          "kl" },
+       { "\033OD",             NEWT_KEY_LEFT,          "kl" },
+       { "\033[H",             NEWT_KEY_HOME,          "kh" },
+       { "\033[1~",            NEWT_KEY_HOME,          "kh" },
+       { "\033Ow",             NEWT_KEY_END,           "kH" },
+       { "\033[4~",            NEWT_KEY_END,           "kH" },
+
+       { "\033[3~",            NEWT_KEY_DELETE,        "kl" },
+       { "\033[2~",            NEWT_KEY_INSERT,        NULL },
+
+       { "\033\t",             NEWT_KEY_UNTAB,         NULL },
+
+       { "\033[5~",            NEWT_KEY_PGUP,          NULL },
+       { "\033[6~",            NEWT_KEY_PGDN,          NULL },
+       { "\033V",              NEWT_KEY_PGUP,          "kH" },
+       { "\033v",              NEWT_KEY_PGUP,          "kH" },
+
+       { "\033[[A",            NEWT_KEY_F1,            NULL },
+       { "\033[[B",            NEWT_KEY_F2,            NULL },
+       { "\033[[C",            NEWT_KEY_F3,            NULL },
+       { "\033[[D",            NEWT_KEY_F4,            NULL },
+       { "\033[[E",            NEWT_KEY_F5,            NULL },
+
+       { "\033OP",             NEWT_KEY_F1,            NULL },
+       { "\033OQ",             NEWT_KEY_F2,            NULL },
+       { "\033OR",             NEWT_KEY_F3,            NULL },
+       { "\033OS",             NEWT_KEY_F4,            NULL },
+
+       { "\033[11~",           NEWT_KEY_F1,            NULL },
+       { "\033[12~",           NEWT_KEY_F2,            NULL },
+       { "\033[13~",           NEWT_KEY_F3,            NULL },
+       { "\033[14~",           NEWT_KEY_F4,            NULL },
+       { "\033[15~",           NEWT_KEY_F5,            NULL },
+       { "\033[17~",           NEWT_KEY_F6,            NULL },
+       { "\033[18~",           NEWT_KEY_F7,            NULL },
+       { "\033[19~",           NEWT_KEY_F8,            NULL },
+       { "\033[20~",           NEWT_KEY_F9,            NULL },
+       { "\033[21~",           NEWT_KEY_F10,           NULL },
+       { "\033[23~",           NEWT_KEY_F11,           NULL },
+       { "\033[24~",           NEWT_KEY_F12,           NULL },
+       { "\033",               NEWT_KEY_ESCAPE,        NULL },
+
+       { 0 },  /* LEAVE this one */
 };
 static char keyPrefix = '\033';
 
@@ -146,27 +146,27 @@ static int getkeyInterruptHook(void) {
 }
 
 int wstrlen(const char *str, int len) {
-        mbstate_t ps;
-        wchar_t tmp;
-        int nchars = 0;
-        
-        if (!str) return 0;
-        if (!len) return 0;
-        if (len < 0) len = strlen(str);
-        memset(&ps,0,sizeof(mbstate_t));
-        while (len > 0) {
-                int x,y;
-                
-                x = mbrtowc(&tmp,str,len,&ps);
-                if (x >0) {
-                        str += x;
-                        len -= x;
-                        y = wcwidth(tmp);
-                        if (y>0)
-                          nchars+=y;
-                } else break;
-        }
-        return nchars;
+       mbstate_t ps;
+       wchar_t tmp;
+       int nchars = 0;
+       
+       if (!str) return 0;
+       if (!len) return 0;
+       if (len < 0) len = strlen(str);
+       memset(&ps,0,sizeof(mbstate_t));
+       while (len > 0) {
+               int x,y;
+               
+               x = mbrtowc(&tmp,str,len,&ps);
+               if (x >0) {
+                       str += x;
+                       len -= x;
+                       y = wcwidth(tmp);
+                       if (y>0)
+                         nchars+=y;
+               } else break;
+       }
+       return nchars;
 }
 
 static int getkey() {
@@ -182,7 +182,7 @@ static int getkey() {
 
 void newtFlushInput(void) {
     while (SLang_input_pending(0)) {
-        getkey();
+       getkey();
     }
 }
 
@@ -245,7 +245,7 @@ int newtInit(void) {
             if ((lang = getenv("LANG")) == NULL)
                 lang = "";
     if (strstr (lang, ".euc") != NULL)
-        trashScreen = 1;
+       trashScreen = 1;
 
     (void) strlen(ident);
 
@@ -254,15 +254,15 @@ int newtInit(void) {
 
     MonoValue = getenv(MonoEnv);
     if ( MonoValue == NULL ) {
-        SLtt_Use_Ansi_Colors = 1;
+       SLtt_Use_Ansi_Colors = 1;
     } else {
-        SLtt_Use_Ansi_Colors = 0;
+       SLtt_Use_Ansi_Colors = 0;
     }
 
     if ((ret = SLsmg_init_smg()) < 0)
-        return ret;
+       return ret;
     if ((ret = SLang_init_tty(0, 0, 0)) < 0)
-        return ret;
+       return ret;
 
     newtSetColors(newtDefaultColorPalette);
     newtCursorOff();
@@ -324,40 +324,40 @@ void newtSetColors(struct newtColors colors) {
     SLtt_set_color(NEWT_COLORSET_TITLE, "", colors.titleFg, colors.titleBg);
     SLtt_set_color(NEWT_COLORSET_BUTTON, "", colors.buttonFg, colors.buttonBg);
     SLtt_set_color(NEWT_COLORSET_ACTBUTTON, "", colors.actButtonFg,
-                        colors.actButtonBg);
+                       colors.actButtonBg);
     SLtt_set_color(NEWT_COLORSET_CHECKBOX, "", colors.checkboxFg,
-                        colors.checkboxBg);
+                       colors.checkboxBg);
     SLtt_set_color(NEWT_COLORSET_ACTCHECKBOX, "", colors.actCheckboxFg,
-                        colors.actCheckboxBg);
+                       colors.actCheckboxBg);
     SLtt_set_color(NEWT_COLORSET_ENTRY, "", colors.entryFg, colors.entryBg);
     SLtt_set_color(NEWT_COLORSET_LABEL, "", colors.labelFg, colors.labelBg);
     SLtt_set_color(NEWT_COLORSET_LISTBOX, "", colors.listboxFg,
-                        colors.listboxBg);
+                       colors.listboxBg);
     SLtt_set_color(NEWT_COLORSET_ACTLISTBOX, "", colors.actListboxFg,
-                        colors.actListboxBg);
+                       colors.actListboxBg);
     SLtt_set_color(NEWT_COLORSET_TEXTBOX, "", colors.textboxFg,
-                        colors.textboxBg);
+                       colors.textboxBg);
     SLtt_set_color(NEWT_COLORSET_ACTTEXTBOX, "", colors.actTextboxFg,
-                        colors.actTextboxBg);
+                       colors.actTextboxBg);
     SLtt_set_color(NEWT_COLORSET_HELPLINE, "", colors.helpLineFg,
-                        colors.helpLineBg);
+                       colors.helpLineBg);
     SLtt_set_color(NEWT_COLORSET_ROOTTEXT, "", colors.rootTextFg,
-                        colors.rootTextBg);
+                       colors.rootTextBg);
 
     SLtt_set_color(NEWT_COLORSET_EMPTYSCALE, "", "white",
-                        colors.emptyScale);
+                       colors.emptyScale);
     SLtt_set_color(NEWT_COLORSET_FULLSCALE, "", "white",
-                        colors.fullScale);
+                       colors.fullScale);
     SLtt_set_color(NEWT_COLORSET_DISENTRY, "", colors.disabledEntryFg,
-                        colors.disabledEntryBg);
+                       colors.disabledEntryBg);
 
     SLtt_set_color(NEWT_COLORSET_COMPACTBUTTON, "", colors.compactButtonFg,
-                        colors.compactButtonBg);
+                       colors.compactButtonBg);
 
     SLtt_set_color(NEWT_COLORSET_ACTSELLISTBOX, "", colors.actSelListboxFg,
-                   colors.actSelListboxBg);
+                  colors.actSelListboxBg);
     SLtt_set_color(NEWT_COLORSET_SELLISTBOX, "", colors.selListboxFg,
-                   colors.selListboxBg);
+                  colors.selListboxBg);
 }
 
 int newtGetKey(void) {
@@ -366,76 +366,76 @@ int newtGetKey(void) {
     const struct keymap * curr;
 
     do {
-        key = getkey();
-        if (key == SLANG_GETKEY_ERROR) {
-            /* Either garbage was read, or stdin disappeared
-             * (the parent terminal was proably closed)
-             * if the latter, die.
-             */
-            if (feof(stdin))
-                    exit(1);
-            if (needResize) {
+       key = getkey();
+       if (key == SLANG_GETKEY_ERROR) {
+           /* Either garbage was read, or stdin disappeared
+            * (the parent terminal was proably closed)
+            * if the latter, die.
+            */
+           if (feof(stdin))
+                   exit(1);
+           if (needResize) {
                 needResize = 0;
-                return NEWT_KEY_RESIZE;
+               return NEWT_KEY_RESIZE;
             }
 
-            /* ignore other signals */
-            continue;
-        }
+           /* ignore other signals */
+           continue;
+       }
 
-        if (key == NEWT_KEY_SUSPEND && suspendCallback)
-            suspendCallback(suspendCallbackData);
+       if (key == NEWT_KEY_SUSPEND && suspendCallback)
+           suspendCallback(suspendCallbackData);
     } while (key == NEWT_KEY_SUSPEND);
 
     switch (key) {
       case 'v' | 0x80:
       case 'V' | 0x80:
-        return NEWT_KEY_PGUP;
+       return NEWT_KEY_PGUP;
 
       case 22:
-        return NEWT_KEY_PGDN;
+       return NEWT_KEY_PGDN;
 
-        return NEWT_KEY_BKSPC;
+       return NEWT_KEY_BKSPC;
       case 0x7f:
-        return NEWT_KEY_BKSPC;
+       return NEWT_KEY_BKSPC;
 
       case 0x08:
-        return NEWT_KEY_BKSPC;
+       return NEWT_KEY_BKSPC;
 
       default:
-        if (key != keyPrefix) return key;
+       if (key != keyPrefix) return key;
     }
 
     memset(buf, 0, sizeof(buf));
 
     *chptr++ = key;
     while (SLang_input_pending(5)) {
-        key = getkey();
-        if (key == keyPrefix) {
-            /* he hit unknown keys too many times -- start over */
-            memset(buf, 0, sizeof(buf));
-            chptr = buf;
-        }
-
-        *chptr++ = key;
-
-        /* this search should use bsearch(), but when we only look through
-           a list of 20 (or so) keymappings, it's probably faster just to
-           do a inline linear search */
-
-        for (curr = keymap; curr->code; curr++) {
-            if (curr->str) {
-                if (!strcmp(curr->str, buf))
-                    return curr->code;
-            }
-        }
+       key = getkey();
+       if (key == keyPrefix) {
+           /* he hit unknown keys too many times -- start over */
+           memset(buf, 0, sizeof(buf));
+           chptr = buf;
+       }
+
+       *chptr++ = key;
+
+       /* this search should use bsearch(), but when we only look through
+          a list of 20 (or so) keymappings, it's probably faster just to
+          do a inline linear search */
+
+       for (curr = keymap; curr->code; curr++) {
+           if (curr->str) {
+               if (!strcmp(curr->str, buf))
+                   return curr->code;
+           }
+       }
     }
 
     for (curr = keymap; curr->code; curr++) {
-        if (curr->str) {
-            if (!strcmp(curr->str, buf))
-                return curr->code;
-        }
+       if (curr->str) {
+           if (!strcmp(curr->str, buf))
+               return curr->code;
+       }
     }
 
     /* Looks like we were a bit overzealous in reading characters. Return
@@ -444,7 +444,7 @@ int newtGetKey(void) {
 
     chptr--;
     while (chptr > buf)
-        SLang_ungetkey(*chptr--);
+       SLang_ungetkey(*chptr--);
 
     return *chptr;
 }
@@ -464,7 +464,7 @@ void newtWaitForKey(void) {
  */
 void newtClearKeyBuffer(void) {
     while (SLang_input_pending(1)) {
-        getkey();
+       getkey();
     }
 }
 
@@ -478,7 +478,7 @@ void newtClearKeyBuffer(void) {
  * @return zero on success (currently no errors reported)
  */
 int newtOpenWindow(unsigned left, unsigned top, unsigned width, unsigned height,
-                          const char * title) {
+                         const char * title) {
     int j, row, col;
     int n;
     int i;
@@ -486,9 +486,9 @@ int newtOpenWindow(unsigned left, unsigned top, unsigned width, unsigned height,
     newtFlushInput();
 
     if (!currentWindow) {
-        currentWindow = windowStack;
+       currentWindow = windowStack;
     } else {
-        currentWindow++;
+       currentWindow++;
     }
 
     currentWindow->left = left;
@@ -503,19 +503,19 @@ int newtOpenWindow(unsigned left, unsigned top, unsigned width, unsigned height,
     col = left - 1;
     /* clip to the current screen bounds - msw */
     if (row < 0)
-        row = 0;
+       row = 0;
     if (col < 0)
-        col = 0;
+       col = 0;
     if (left + width > SLtt_Screen_Cols)
-        width = SLtt_Screen_Cols - left;
+       width = SLtt_Screen_Cols - left;
     if (top + height > SLtt_Screen_Rows)
-        height = SLtt_Screen_Rows - top;
+       height = SLtt_Screen_Rows - top;
     n = 0;
     for (j = 0; j < height + 3; j++, row++) {
-        SLsmg_gotorc(row, col);
-        SLsmg_read_raw(currentWindow->buffer + n,
-                       currentWindow->width + 3);
-        n += currentWindow->width + 3;
+       SLsmg_gotorc(row, col);
+       SLsmg_read_raw(currentWindow->buffer + n,
+                      currentWindow->width + 3);
+       n += currentWindow->width + 3;
     }
 
     newtTrashScreen();
@@ -524,20 +524,20 @@ int newtOpenWindow(unsigned left, unsigned top, unsigned width, unsigned height,
     SLsmg_draw_box(top - 1, left - 1, height + 2, width + 2);
 
     if (currentWindow->title) {
-        i = wstrlen(currentWindow->title,-1) + 4;
-        i = ((width - i) / 2) + left;
-        SLsmg_gotorc(top - 1, i);
-        SLsmg_set_char_set(1);
-        SLsmg_write_char(SLSMG_RTEE_CHAR);
-        SLsmg_set_char_set(0);
-        SLsmg_write_char(' ');
-        SLsmg_set_color(NEWT_COLORSET_TITLE);
-        SLsmg_write_string((char *)currentWindow->title);
-        SLsmg_set_color(NEWT_COLORSET_BORDER);
-        SLsmg_write_char(' ');
-        SLsmg_set_char_set(1);
-        SLsmg_write_char(SLSMG_LTEE_CHAR);
-        SLsmg_set_char_set(0);
+       i = wstrlen(currentWindow->title,-1) + 4;
+       i = ((width - i) / 2) + left;
+       SLsmg_gotorc(top - 1, i);
+       SLsmg_set_char_set(1);
+       SLsmg_write_char(SLSMG_RTEE_CHAR);
+       SLsmg_set_char_set(0);
+       SLsmg_write_char(' ');
+       SLsmg_set_color(NEWT_COLORSET_TITLE);
+       SLsmg_write_string((char *)currentWindow->title);
+       SLsmg_set_color(NEWT_COLORSET_BORDER);
+       SLsmg_write_char(' ');
+       SLsmg_set_char_set(1);
+       SLsmg_write_char(SLSMG_LTEE_CHAR);
+       SLsmg_set_char_set(0);
     }
 
     SLsmg_set_color(NEWT_COLORSET_WINDOW);
@@ -548,8 +548,8 @@ int newtOpenWindow(unsigned left, unsigned top, unsigned width, unsigned height,
     SLsmg_fill_region(top, left + width + 1, height + 1, 1, ' ');
 
     for (i = top; i < (top + height + 1); i++) {
-        SLsmg_gotorc(i, left + width + 1);
-        SLsmg_write_string(" ");
+       SLsmg_gotorc(i, left + width + 1);
+       SLsmg_write_string(" ");
     }
 
     return 0;
@@ -589,23 +589,23 @@ void newtPopWindow(void) {
     row = currentWindow->top - 1;
     col = currentWindow->left - 1;
     if (row < 0)
-        row = 0;
+       row = 0;
     if (col < 0)
-        col = 0;
+       col = 0;
     for (j = 0; j < currentWindow->height + 3; j++, row++) {
-        SLsmg_gotorc(row, col);
-        SLsmg_write_raw(currentWindow->buffer + n,
-                        currentWindow->width + 3);
-        n += currentWindow->width + 3;
+       SLsmg_gotorc(row, col);
+       SLsmg_write_raw(currentWindow->buffer + n,
+                       currentWindow->width + 3);
+       n += currentWindow->width + 3;
     }
 
     free(currentWindow->buffer);
     free(currentWindow->title);
 
     if (currentWindow == windowStack)
-        currentWindow = NULL;
+       currentWindow = NULL;
     else
-        currentWindow--;
+       currentWindow--;
 
     SLsmg_set_char_set(0);
 
@@ -616,10 +616,10 @@ void newtPopWindow(void) {
 
 void newtGetWindowPos(int * x, int * y) {
     if (currentWindow) {
-        *x = currentWindow->left;
-        *y = currentWindow->top;
+       *x = currentWindow->left;
+       *y = currentWindow->top;
     } else
-        *x = *y = 0;
+       *x = *y = 0;
 }
 
 void newtGetrc(int * row, int * col) {
@@ -629,8 +629,8 @@ void newtGetrc(int * row, int * col) {
 
 void newtGotorc(int newRow, int newCol) {
     if (currentWindow) {
-        newRow += currentWindow->top;
-        newCol += currentWindow->left;
+       newRow += currentWindow->top;
+       newCol += currentWindow->left;
     }
 
     cursorRow = newRow;
@@ -640,23 +640,23 @@ void newtGotorc(int newRow, int newCol) {
 
 void newtDrawBox(int left, int top, int width, int height, int shadow) {
     if (currentWindow) {
-        top += currentWindow->top;
-        left += currentWindow->left;
+       top += currentWindow->top;
+       left += currentWindow->left;
     }
 
     SLsmg_draw_box(top, left, height, width);
 
     if (shadow) {
-        SLsmg_set_color(NEWT_COLORSET_SHADOW);
-        SLsmg_fill_region(top + height, left + 1, 1, width - 1, ' ');
-        SLsmg_fill_region(top + 1, left + width, height, 1, ' ');
+       SLsmg_set_color(NEWT_COLORSET_SHADOW);
+       SLsmg_fill_region(top + height, left + 1, 1, width - 1, ' ');
+       SLsmg_fill_region(top + 1, left + width, height, 1, ' ');
     }
 }
 
 void newtClearBox(int left, int top, int width, int height) {
     if (currentWindow) {
-        top += currentWindow->top;
-        left += currentWindow->left;
+       top += currentWindow->top;
+       left += currentWindow->left;
     }
 
     SLsmg_fill_region(top, left, height, width, ' ');
@@ -670,8 +670,8 @@ static void initKeymap(void) {
     struct keymap * curr;
 
     for (curr = keymap; curr->code; curr++) {
-        if (!curr->str)
-            curr->str = SLtt_tgetstr(curr->tc);
+       if (!curr->str)
+           curr->str = SLtt_tgetstr(curr->tc);
     }
 
     /* Newt's keymap handling is a bit broken. It assumes that any extended
@@ -679,7 +679,7 @@ static void initKeymap(void) {
        will probably need to fix this, or just yell at me and I'll be so
        ashamed of myself for doing it this way I'll fix it */
 
-    keyPrefix = 0x1b;           /* ESC */
+    keyPrefix = 0x1b;          /* ESC */
 }
 #endif
 
@@ -700,7 +700,7 @@ void newtDelay(unsigned usecs) {
 }
 
 struct eventResult newtDefaultEventHandler(newtComponent c,
-                                           struct event ev) {
+                                          struct event ev) {
     struct eventResult er;
 
     er.result = ER_IGNORED;
@@ -713,22 +713,22 @@ void newtRedrawHelpLine(void) {
     SLsmg_set_color(NEWT_COLORSET_HELPLINE);
 
     if (currentHelpline) {
-        /* buffer size needs to be wide enough to hold all the multibyte
-           currentHelpline + all the single byte ' ' to fill the line */
-        int wlen = wstrlen(*currentHelpline, -1);
-        int len;
-
-        if (wlen > SLtt_Screen_Cols)
-            wlen = SLtt_Screen_Cols;
-        len = strlen(*currentHelpline) + (SLtt_Screen_Cols - wlen);
-        buf = alloca(len + 1);
-        memset(buf, ' ', len);
-        memcpy(buf, *currentHelpline, strlen(*currentHelpline));
-        buf[len] = '\0';
+       /* buffer size needs to be wide enough to hold all the multibyte
+          currentHelpline + all the single byte ' ' to fill the line */
+       int wlen = wstrlen(*currentHelpline, -1);
+       int len;
+
+       if (wlen > SLtt_Screen_Cols)
+           wlen = SLtt_Screen_Cols;
+       len = strlen(*currentHelpline) + (SLtt_Screen_Cols - wlen);
+       buf = alloca(len + 1);
+       memset(buf, ' ', len);
+       memcpy(buf, *currentHelpline, strlen(*currentHelpline));
+       buf[len] = '\0';
     } else {
-        buf = alloca(SLtt_Screen_Cols + 1);
-        memset(buf, ' ', SLtt_Screen_Cols);
-        buf[SLtt_Screen_Cols] = '\0';
+       buf = alloca(SLtt_Screen_Cols + 1);
+       memset(buf, ' ', SLtt_Screen_Cols);
+       buf[SLtt_Screen_Cols] = '\0';
     }
     SLsmg_gotorc(SLtt_Screen_Rows - 1, 0);
     SLsmg_write_string(buf);
@@ -736,13 +736,13 @@ void newtRedrawHelpLine(void) {
 
 void newtPushHelpLine(const char * text) {
     if (!text)
-        text = defaultHelpLine;
+       text = defaultHelpLine;
 
     if (currentHelpline)
-        (*(++currentHelpline)) = strdup(text);
+       (*(++currentHelpline)) = strdup(text);
     else {
-        currentHelpline = helplineStack;
-        *currentHelpline = strdup(text);
+       currentHelpline = helplineStack;
+       *currentHelpline = strdup(text);
     }
 
     newtRedrawHelpLine();
@@ -753,9 +753,9 @@ void newtPopHelpLine(void) {
 
     free(*currentHelpline);
     if (currentHelpline == helplineStack)
-        currentHelpline = NULL;
+       currentHelpline = NULL;
     else
-        currentHelpline--;
+       currentHelpline--;
 
     newtRedrawHelpLine();
 }
@@ -764,11 +764,11 @@ void newtDrawRootText(int col, int row, const char * text) {
     SLsmg_set_color(NEWT_COLORSET_ROOTTEXT);
 
     if (col < 0) {
-        col = SLtt_Screen_Cols + col;
+       col = SLtt_Screen_Cols + col;
     }
 
     if (row < 0) {
-        row = SLtt_Screen_Rows + row;
+       row = SLtt_Screen_Rows + row;
     }
 
     SLsmg_gotorc(row, col);
@@ -778,16 +778,16 @@ void newtDrawRootText(int col, int row, const char * text) {
 int newtSetFlags(int oldFlags, int newFlags, enum newtFlagsSense sense) {
     switch (sense) {
       case NEWT_FLAGS_SET:
-        return oldFlags | newFlags;
+       return oldFlags | newFlags;
 
       case NEWT_FLAGS_RESET:
-        return oldFlags & (~newFlags);
+       return oldFlags & (~newFlags);
 
       case NEWT_FLAGS_TOGGLE:
-        return oldFlags ^ newFlags;
+       return oldFlags ^ newFlags;
 
       default:
-        return oldFlags;
+       return oldFlags;
     }
 }
 
@@ -822,6 +822,6 @@ void newtCursorOn(void) {
 
 void newtTrashScreen(void) {
     if (trashScreen)
-        SLsmg_touch_lines (0, SLtt_Screen_Rows - 1);
+       SLsmg_touch_lines (0, SLtt_Screen_Rows - 1);
 }
      
diff --git a/newt.h b/newt.h
index 651322b0b6231351d7cab3934238662b552246d5..b179da105f556307c03f0030c3f387f28e9a2937 100644 (file)
--- a/newt.h
+++ b/newt.h
@@ -7,378 +7,365 @@ extern "C" {
 
 #include <stdarg.h>
 
-#define NEWT_COLORSET_ROOT              2
-#define NEWT_COLORSET_BORDER            3
-#define NEWT_COLORSET_WINDOW            4
-#define NEWT_COLORSET_SHADOW            5
-#define NEWT_COLORSET_TITLE             6
-#define NEWT_COLORSET_BUTTON            7
-#define NEWT_COLORSET_ACTBUTTON         8
-#define NEWT_COLORSET_CHECKBOX          9
-#define NEWT_COLORSET_ACTCHECKBOX       10
-#define NEWT_COLORSET_ENTRY             11
-#define NEWT_COLORSET_LABEL             12
-#define NEWT_COLORSET_LISTBOX           13
-#define NEWT_COLORSET_ACTLISTBOX        14
-#define NEWT_COLORSET_TEXTBOX           15
-#define NEWT_COLORSET_ACTTEXTBOX        16
-#define NEWT_COLORSET_HELPLINE          17
-#define NEWT_COLORSET_ROOTTEXT          18
-#define NEWT_COLORSET_EMPTYSCALE        19
-#define NEWT_COLORSET_FULLSCALE         20
-#define NEWT_COLORSET_DISENTRY          21
-#define NEWT_COLORSET_COMPACTBUTTON     22
-#define NEWT_COLORSET_ACTSELLISTBOX     23
-#define NEWT_COLORSET_SELLISTBOX        24
-
-#define NEWT_ARG_LAST                   -100000
-#define NEWT_ARG_APPEND                 -1
-
-       struct newtColors {
-               char * rootFg, * rootBg;
-               char * borderFg, * borderBg;
-               char * windowFg, * windowBg;
-               char * shadowFg, * shadowBg;
-               char * titleFg, * titleBg;
-               char * buttonFg, * buttonBg;
-               char * actButtonFg, * actButtonBg;
-               char * checkboxFg, * checkboxBg;
-               char * actCheckboxFg, * actCheckboxBg;
-               char * entryFg, * entryBg;
-               char * labelFg, * labelBg;
-               char * listboxFg, * listboxBg;
-               char * actListboxFg, * actListboxBg;
-               char * textboxFg, * textboxBg;
-               char * actTextboxFg, * actTextboxBg;
-               char * helpLineFg, * helpLineBg;
-               char * rootTextFg, * rootTextBg;
-               char * emptyScale, * fullScale;
-               char * disabledEntryFg, * disabledEntryBg;
-               char * compactButtonFg, * compactButtonBg;
-               char * actSelListboxFg, * actSelListboxBg;
-               char * selListboxFg, * selListboxBg;
-       };
-
-       enum newtFlagsSense { NEWT_FLAGS_SET, NEWT_FLAGS_RESET, NEWT_FLAGS_TOGGLE };
-
-#define NEWT_FLAG_RETURNEXIT    (1 << 0)
-#define NEWT_FLAG_HIDDEN        (1 << 1)
-#define NEWT_FLAG_SCROLL        (1 << 2)
-#define NEWT_FLAG_DISABLED      (1 << 3)
-       /* OBSOLETE #define NEWT_FLAG_NOSCROLL  (1 << 4)        for listboxes */
-#define NEWT_FLAG_BORDER        (1 << 5)
-#define NEWT_FLAG_WRAP          (1 << 6)
-#define NEWT_FLAG_NOF12         (1 << 7)
+#define NEWT_COLORSET_ROOT             2
+#define NEWT_COLORSET_BORDER           3
+#define NEWT_COLORSET_WINDOW           4
+#define NEWT_COLORSET_SHADOW           5
+#define NEWT_COLORSET_TITLE            6
+#define NEWT_COLORSET_BUTTON           7
+#define NEWT_COLORSET_ACTBUTTON                8
+#define NEWT_COLORSET_CHECKBOX         9
+#define NEWT_COLORSET_ACTCHECKBOX      10
+#define NEWT_COLORSET_ENTRY            11
+#define NEWT_COLORSET_LABEL            12
+#define NEWT_COLORSET_LISTBOX          13
+#define NEWT_COLORSET_ACTLISTBOX       14
+#define NEWT_COLORSET_TEXTBOX          15
+#define NEWT_COLORSET_ACTTEXTBOX       16
+#define NEWT_COLORSET_HELPLINE         17
+#define NEWT_COLORSET_ROOTTEXT         18
+#define NEWT_COLORSET_EMPTYSCALE       19
+#define NEWT_COLORSET_FULLSCALE                20
+#define NEWT_COLORSET_DISENTRY         21
+#define NEWT_COLORSET_COMPACTBUTTON    22
+#define NEWT_COLORSET_ACTSELLISTBOX    23
+#define NEWT_COLORSET_SELLISTBOX       24
+
+#define NEWT_ARG_LAST                  -100000
+#define NEWT_ARG_APPEND                        -1
+
+struct newtColors {
+    char * rootFg, * rootBg;
+    char * borderFg, * borderBg;
+    char * windowFg, * windowBg;
+    char * shadowFg, * shadowBg;
+    char * titleFg, * titleBg;
+    char * buttonFg, * buttonBg;
+    char * actButtonFg, * actButtonBg;
+    char * checkboxFg, * checkboxBg;
+    char * actCheckboxFg, * actCheckboxBg;
+    char * entryFg, * entryBg;
+    char * labelFg, * labelBg;
+    char * listboxFg, * listboxBg;
+    char * actListboxFg, * actListboxBg;
+    char * textboxFg, * textboxBg;
+    char * actTextboxFg, * actTextboxBg;
+    char * helpLineFg, * helpLineBg;
+    char * rootTextFg, * rootTextBg;
+    char * emptyScale, * fullScale;
+    char * disabledEntryFg, * disabledEntryBg;
+    char * compactButtonFg, * compactButtonBg;
+    char * actSelListboxFg, * actSelListboxBg;
+    char * selListboxFg, * selListboxBg;
+};
+
+enum newtFlagsSense { NEWT_FLAGS_SET, NEWT_FLAGS_RESET, NEWT_FLAGS_TOGGLE };
+
+#define NEWT_FLAG_RETURNEXIT   (1 << 0)
+#define NEWT_FLAG_HIDDEN       (1 << 1)
+#define NEWT_FLAG_SCROLL       (1 << 2)
+#define NEWT_FLAG_DISABLED     (1 << 3)
+/* OBSOLETE #define NEWT_FLAG_NOSCROLL         (1 << 4)        for listboxes */
+#define NEWT_FLAG_BORDER       (1 << 5)
+#define NEWT_FLAG_WRAP         (1 << 6)
+#define NEWT_FLAG_NOF12                (1 << 7)
 #define NEWT_FLAG_MULTIPLE      (1 << 8)
-#define NEWT_FLAG_SELECTED      (1 << 9)
-#define NEWT_FLAG_CHECKBOX      (1 << 10)
+#define NEWT_FLAG_SELECTED     (1 << 9)
+#define NEWT_FLAG_CHECKBOX     (1 << 10)
 #define NEWT_FLAG_PASSWORD      (1 << 11)  /* draw '*'  of chars in entrybox */
 #define NEWT_FLAG_SHOWCURSOR    (1 << 12) /* Only applies to listbox for now */
-#define NEWT_FD_READ            (1 << 0)
-#define NEWT_FD_WRITE           (1 << 1)
-#define NEWT_FD_EXCEPT          (1 << 2)
+#define NEWT_FD_READ           (1 << 0)
+#define NEWT_FD_WRITE          (1 << 1)
+#define NEWT_FD_EXCEPT         (1 << 2)
 
-#define NEWT_CHECKBOXTREE_UNSELECTABLE  (1 << 12)
-#define NEWT_CHECKBOXTREE_HIDE_BOX      (1 << 13)
+#define NEWT_CHECKBOXTREE_UNSELECTABLE (1 << 12)
+#define NEWT_CHECKBOXTREE_HIDE_BOX     (1 << 13)
 
-#define NEWT_CHECKBOXTREE_COLLAPSED     '\0'
-#define NEWT_CHECKBOXTREE_EXPANDED      '\1'
-#define NEWT_CHECKBOXTREE_UNSELECTED    ' '
-#define NEWT_CHECKBOXTREE_SELECTED      '*'
+#define NEWT_CHECKBOXTREE_COLLAPSED    '\0'
+#define NEWT_CHECKBOXTREE_EXPANDED     '\1'
+#define NEWT_CHECKBOXTREE_UNSELECTED   ' '
+#define NEWT_CHECKBOXTREE_SELECTED     '*'
 
-       /* Backwards compatibility */
+/* Backwards compatibility */
 #define NEWT_LISTBOX_RETURNEXIT NEWT_FLAG_RETURNEXIT
-#define NEWT_ENTRY_SCROLL       NEWT_FLAG_SCROLL
-#define NEWT_ENTRY_HIDDEN       NEWT_FLAG_HIDDEN
-#define NEWT_ENTRY_RETURNEXIT   NEWT_FLAG_RETURNEXIT
-#define NEWT_ENTRY_DISABLED     NEWT_FLAG_DISABLED
-
-#define NEWT_TEXTBOX_WRAP       NEWT_FLAG_WRAP
-#define NEWT_TEXTBOX_SCROLL     NEWT_FLAG_SCROLL
-#define NEWT_FORM_NOF12         NEWT_FLAG_NOF12
-
-#define newtListboxAddEntry     newtListboxAppendEntry
-
-
-       /**
-          @brief An opaque component pointer
-          
-          The newtComponent type is used as an opaque pointer to arbitrary
-          "component" (or widget) of the user interface. This component is
-          polymorphic on operations defined in struct componentOps (draw, event,
-          destroy, place and mapped). All others are monomorphic and defined
-          via newt<Component>* functions (eg. newtTextboxSetText and alike).
-
-          Usually, newtComponent instances are created using constructors
-          (like newtTextbox). The individual component implementations are
-          documented in more detail in their constructors.
-       */
-       typedef struct newtComponent_struct * newtComponent;
-
-       extern const struct newtColors newtDefaultColorPalette;
-
-       typedef void (*newtCallback)(newtComponent, void *);
-       typedef void (*newtSuspendCallback)(void * data);
-
-       int newtInit(void);
-       int newtFinished(void);
-       void newtCls(void);
-       void newtResizeScreen(int redraw);
-       void newtWaitForKey(void);
-       void newtClearKeyBuffer(void);
-       void newtDelay(unsigned int usecs);
-       /* top, left are *not* counting the border */
-       int newtOpenWindow(unsigned int left,unsigned int top, 
-                                          unsigned int width,unsigned  int height, 
-                                          const char * title);
-       int newtCenteredWindow(unsigned int width,unsigned int height, const char * title);
-       void newtPopWindow(void);
-       void newtSetColors(struct newtColors colors);
-       void newtRefresh(void);
-       void newtSuspend(void);
-       void newtSetSuspendCallback(newtSuspendCallback cb, void * data);
-       void newtSetHelpCallback(newtCallback cb);
-       int  newtResume(void);
-       void newtPushHelpLine(const char * text);
-       void newtRedrawHelpLine(void);
-       void newtPopHelpLine(void);
-       void newtDrawRootText(int col, int row, const char * text);
-       void newtBell(void);
-       void newtCursorOff(void);
-       void newtCursorOn(void);
-
-       /* Components */
-
-       newtComponent newtCompactButton(int left, int top, const char * text);
-       newtComponent newtButton(int left, int top, const char * text);
-       newtComponent newtCheckbox(int left, int top, const char * text, char defValue,
-                                                          const char * seq, char * result);
-       char newtCheckboxGetValue(newtComponent co);
-       void newtCheckboxSetValue(newtComponent co, char value);
-       void newtCheckboxSetFlags(newtComponent co, int flags, enum newtFlagsSense sense);
+#define NEWT_ENTRY_SCROLL      NEWT_FLAG_SCROLL
+#define NEWT_ENTRY_HIDDEN      NEWT_FLAG_HIDDEN
+#define NEWT_ENTRY_RETURNEXIT  NEWT_FLAG_RETURNEXIT
+#define NEWT_ENTRY_DISABLED    NEWT_FLAG_DISABLED
+
+#define NEWT_TEXTBOX_WRAP      NEWT_FLAG_WRAP
+#define NEWT_TEXTBOX_SCROLL    NEWT_FLAG_SCROLL
+#define NEWT_FORM_NOF12                NEWT_FLAG_NOF12
+
+#define newtListboxAddEntry    newtListboxAppendEntry
+
+
+typedef struct newtComponent_struct * newtComponent;
+
+extern const struct newtColors newtDefaultColorPalette;
+
+typedef void (*newtCallback)(newtComponent, void *);
+typedef void (*newtSuspendCallback)(void * data);
+
+int newtInit(void);
+int newtFinished(void);
+void newtCls(void);
+void newtResizeScreen(int redraw);
+void newtWaitForKey(void);
+void newtClearKeyBuffer(void);
+void newtDelay(unsigned int usecs);
+/* top, left are *not* counting the border */
+int newtOpenWindow(unsigned int left,unsigned int top, 
+                  unsigned int width,unsigned  int height, 
+                 const char * title);
+int newtCenteredWindow(unsigned int width,unsigned int height, const char * title);
+void newtPopWindow(void);
+void newtSetColors(struct newtColors colors);
+void newtRefresh(void);
+void newtSuspend(void);
+void newtSetSuspendCallback(newtSuspendCallback cb, void * data);
+void newtSetHelpCallback(newtCallback cb);
+int  newtResume(void);
+void newtPushHelpLine(const char * text);
+void newtRedrawHelpLine(void);
+void newtPopHelpLine(void);
+void newtDrawRootText(int col, int row, const char * text);
+void newtBell(void);
+void newtCursorOff(void);
+void newtCursorOn(void);
+
+/* Components */
+
+newtComponent newtCompactButton(int left, int top, const char * text);
+newtComponent newtButton(int left, int top, const char * text);
+newtComponent newtCheckbox(int left, int top, const char * text, char defValue,
+                          const char * seq, char * result);
+char newtCheckboxGetValue(newtComponent co);
+void newtCheckboxSetValue(newtComponent co, char value);
+void newtCheckboxSetFlags(newtComponent co, int flags, enum newtFlagsSense sense);
 
     
-       newtComponent newtRadiobutton(int left, int top, const char * text, int isDefault,
-                                                                 newtComponent prevButton);
-       newtComponent newtRadioGetCurrent(newtComponent setMember);
-       newtComponent newtListitem(int left, int top, const char * text, int isDefault,
-                                                          newtComponent prevItem, const void * data, int flags);
-       void newtListitemSet(newtComponent co, const char * text);
-       void * newtListitemGetData(newtComponent co);
-       void newtGetScreenSize(int * cols, int * rows);
-
-       newtComponent newtLabel(int left, int top, const char * text);
-       void newtLabelSetText(newtComponent co, const char * text);
-       newtComponent newtVerticalScrollbar(int left, int top, int height,
-                                                                               int normalColorset, int thumbColorset);
-       void newtScrollbarSet(newtComponent co, int where, int total);
-
-       newtComponent newtListbox(int left, int top, int height, int flags);
-       void * newtListboxGetCurrent(newtComponent co);
-       void newtListboxSetCurrent(newtComponent co, int num);
-       void newtListboxSetCurrentByKey(newtComponent co, void * key);
-       void newtListboxSetEntry(newtComponent co, int num, const char * text);
-       void newtListboxSetWidth(newtComponent co, int width);
-       void newtListboxSetData(newtComponent co, int num, void * data);
-       int newtListboxAppendEntry(newtComponent co, const char * text, 
-                                                          const void * data);
-       /* Send the key to insert after, or NULL to insert at the top */
-       int newtListboxInsertEntry(newtComponent co, const char * text, const void * data, void * key);
-       int newtListboxDeleteEntry(newtComponent co, void * data);
-       void newtListboxClear(newtComponent co); /* removes all entries from listbox */
-       void newtListboxGetEntry(newtComponent co, int num, char **text, void **data);
-       /* Returns an array of data pointers from items, last element is NULL */
-       void **newtListboxGetSelection(newtComponent co, int *numitems);
-       void newtListboxClearSelection(newtComponent co);
-       void newtListboxSelectItem(newtComponent co, const void * key,
-                                                          enum newtFlagsSense sense);
-       /* Returns number of items currently in listbox. */
-       int newtListboxItemCount(newtComponent co);
-
-       newtComponent newtCheckboxTree(int left, int top, int height, int flags);
-       newtComponent newtCheckboxTreeMulti(int left, int top, int height, char *seq, int flags);
-       const void ** newtCheckboxTreeGetSelection(newtComponent co, int *numitems);
-       const void * newtCheckboxTreeGetCurrent(newtComponent co);
-       void newtCheckboxTreeSetCurrent(newtComponent co, void * item);
-       const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, int *numitems, char seqnum);
-       /* last item is NEWT_ARG_LAST for all of these */
-       int newtCheckboxTreeAddItem(newtComponent co, 
-                                                               const char * text, const void * data,
-                                                               int flags, int index, ...);
-       int newtCheckboxTreeAddArray(newtComponent co, 
-                                                                const char * text, const void * data,
-                                                                int flags, int * indexes);
-       int * newtCheckboxTreeFindItem(newtComponent co, void * data);
-       void newtCheckboxTreeSetEntry(newtComponent co, const void * data,
-                                                                 const char * text);
-       void newtCheckboxTreeSetWidth(newtComponent co, int width);
-       char newtCheckboxTreeGetEntryValue(newtComponent co, const void * data);
-       void newtCheckboxTreeSetEntryValue(newtComponent co, const void * data,
-                                                                          char value);
+newtComponent newtRadiobutton(int left, int top, const char * text, int isDefault,
+                             newtComponent prevButton);
+newtComponent newtRadioGetCurrent(newtComponent setMember);
+newtComponent newtListitem(int left, int top, const char * text, int isDefault,
+                             newtComponent prevItem, const void * data, int flags);
+void newtListitemSet(newtComponent co, const char * text);
+void * newtListitemGetData(newtComponent co);
+void newtGetScreenSize(int * cols, int * rows);
+
+newtComponent newtLabel(int left, int top, const char * text);
+void newtLabelSetText(newtComponent co, const char * text);
+newtComponent newtVerticalScrollbar(int left, int top, int height,
+                                   int normalColorset, int thumbColorset);
+void newtScrollbarSet(newtComponent co, int where, int total);
+
+newtComponent newtListbox(int left, int top, int height, int flags);
+void * newtListboxGetCurrent(newtComponent co);
+void newtListboxSetCurrent(newtComponent co, int num);
+void newtListboxSetCurrentByKey(newtComponent co, void * key);
+void newtListboxSetEntry(newtComponent co, int num, const char * text);
+void newtListboxSetWidth(newtComponent co, int width);
+void newtListboxSetData(newtComponent co, int num, void * data);
+int newtListboxAppendEntry(newtComponent co, const char * text, 
+                          const void * data);
+/* Send the key to insert after, or NULL to insert at the top */
+int newtListboxInsertEntry(newtComponent co, const char * text, const void * data, void * key);
+int newtListboxDeleteEntry(newtComponent co, void * data);
+void newtListboxClear(newtComponent co); /* removes all entries from listbox */
+void newtListboxGetEntry(newtComponent co, int num, char **text, void **data);
+/* Returns an array of data pointers from items, last element is NULL */
+void **newtListboxGetSelection(newtComponent co, int *numitems);
+void newtListboxClearSelection(newtComponent co);
+void newtListboxSelectItem(newtComponent co, const void * key,
+       enum newtFlagsSense sense);
+/* Returns number of items currently in listbox. */
+int newtListboxItemCount(newtComponent co);
+
+newtComponent newtCheckboxTree(int left, int top, int height, int flags);
+newtComponent newtCheckboxTreeMulti(int left, int top, int height, char *seq, int flags);
+const void ** newtCheckboxTreeGetSelection(newtComponent co, int *numitems);
+const void * newtCheckboxTreeGetCurrent(newtComponent co);
+void newtCheckboxTreeSetCurrent(newtComponent co, void * item);
+const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, int *numitems, char seqnum);
+/* last item is NEWT_ARG_LAST for all of these */
+int newtCheckboxTreeAddItem(newtComponent co, 
+                           const char * text, const void * data,
+                           int flags, int index, ...);
+int newtCheckboxTreeAddArray(newtComponent co, 
+                            const char * text, const void * data,
+                            int flags, int * indexes);
+int * newtCheckboxTreeFindItem(newtComponent co, void * data);
+void newtCheckboxTreeSetEntry(newtComponent co, const void * data,
+                             const char * text);
+void newtCheckboxTreeSetWidth(newtComponent co, int width);
+char newtCheckboxTreeGetEntryValue(newtComponent co, const void * data);
+void newtCheckboxTreeSetEntryValue(newtComponent co, const void * data,
+                                  char value);
  
-       newtComponent newtTextboxReflowed(int left, int top, char * text, int width,
-                                                                         int flexDown, int flexUp, int flags);
-       newtComponent newtTextbox(int left, int top, int width, int height, int flags);
-       void newtTextboxSetText(newtComponent co, const char * text);
-       void newtTextboxSetHeight(newtComponent co, int height);
-       int newtTextboxGetNumLines(newtComponent co);
-       char * newtReflowText(char * text, int width, int flexDown, int flexUp,
-                                                 int * actualWidth, int * actualHeight);
-
-       struct newtExitStruct {
-               enum { NEWT_EXIT_HOTKEY, NEWT_EXIT_COMPONENT, NEWT_EXIT_FDREADY,
-                          NEWT_EXIT_TIMER } reason;
-               union {
-                       int watch;
-                       int key;
-                       newtComponent co;
-               } u;
-       } ;
-
-       newtComponent newtForm(newtComponent vertBar, void * helpTag, int flags);
-       void newtFormSetTimer(newtComponent form, int millisecs);
-       void newtFormWatchFd(newtComponent form, int fd, int fdFlags);
-       void newtFormSetSize(newtComponent co);
-       newtComponent newtFormGetCurrent(newtComponent co);
-       void newtFormSetBackground(newtComponent co, int color);
-       void newtFormSetCurrent(newtComponent co, newtComponent subco);
-       void newtFormAddComponent(newtComponent form, newtComponent co);
-       void newtFormAddComponents(newtComponent form, ...);
-       void newtFormSetHeight(newtComponent co, int height);
-       void newtFormSetWidth(newtComponent co, int width);
-       newtComponent newtRunForm(newtComponent form);          /* obsolete */
-       void newtFormRun(newtComponent co, struct newtExitStruct * es);
-       void newtDrawForm(newtComponent form);
-       void newtFormAddHotKey(newtComponent co, int key);
-
-       typedef int (*newtEntryFilter)(newtComponent entry, void * data, int ch,
-                                                                  int cursor);
-       newtComponent newtEntry(int left, int top, const char * initialValue, int width,
-                                                       const char ** resultPtr, int flags);
-       void newtEntrySet(newtComponent co, const char * value, int cursorAtEnd);
-       void newtEntrySetFilter(newtComponent co, newtEntryFilter filter, void * data);
-       char * newtEntryGetValue(newtComponent co);
-       void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense);
-
-       newtComponent newtScale(int left, int top, int width, long long fullValue);
-       void newtScaleSet(newtComponent co, unsigned long long amount);
-
-       void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
-       void newtComponentTakesFocus(newtComponent co, int val);
-
-       /* this also destroys all of the components (including other forms) on the 
-          form */
-       void newtFormDestroy(newtComponent form);       
-
-       /* Key codes */
-
-#define NEWT_KEY_TAB                    '\t'
-#define NEWT_KEY_ENTER                  '\r'
-#define NEWT_KEY_SUSPEND                '\032'                  /* ctrl - z*/
-#define NEWT_KEY_ESCAPE                 '\e'
-#define NEWT_KEY_RETURN                 NEWT_KEY_ENTER
-
-#define NEWT_KEY_EXTRA_BASE             0x8000
-#define NEWT_KEY_UP                     NEWT_KEY_EXTRA_BASE + 1
-#define NEWT_KEY_DOWN                   NEWT_KEY_EXTRA_BASE + 2
-#define NEWT_KEY_LEFT                   NEWT_KEY_EXTRA_BASE + 4
-#define NEWT_KEY_RIGHT                  NEWT_KEY_EXTRA_BASE + 5
-#define NEWT_KEY_BKSPC                  NEWT_KEY_EXTRA_BASE + 6
-#define NEWT_KEY_DELETE                 NEWT_KEY_EXTRA_BASE + 7
-#define NEWT_KEY_HOME                   NEWT_KEY_EXTRA_BASE + 8
-#define NEWT_KEY_END                    NEWT_KEY_EXTRA_BASE + 9
-#define NEWT_KEY_UNTAB                  NEWT_KEY_EXTRA_BASE + 10
-#define NEWT_KEY_PGUP                   NEWT_KEY_EXTRA_BASE + 11
-#define NEWT_KEY_PGDN                   NEWT_KEY_EXTRA_BASE + 12
-#define NEWT_KEY_INSERT                 NEWT_KEY_EXTRA_BASE + 13
-
-#define NEWT_KEY_F1                     NEWT_KEY_EXTRA_BASE + 101
-#define NEWT_KEY_F2                     NEWT_KEY_EXTRA_BASE + 102
-#define NEWT_KEY_F3                     NEWT_KEY_EXTRA_BASE + 103
-#define NEWT_KEY_F4                     NEWT_KEY_EXTRA_BASE + 104
-#define NEWT_KEY_F5                     NEWT_KEY_EXTRA_BASE + 105
-#define NEWT_KEY_F6                     NEWT_KEY_EXTRA_BASE + 106
-#define NEWT_KEY_F7                     NEWT_KEY_EXTRA_BASE + 107
-#define NEWT_KEY_F8                     NEWT_KEY_EXTRA_BASE + 108
-#define NEWT_KEY_F9                     NEWT_KEY_EXTRA_BASE + 109
-#define NEWT_KEY_F10                    NEWT_KEY_EXTRA_BASE + 110
-#define NEWT_KEY_F11                    NEWT_KEY_EXTRA_BASE + 111
-#define NEWT_KEY_F12                    NEWT_KEY_EXTRA_BASE + 112
-
-       /* not really a key, but newtGetKey returns it */
-#define NEWT_KEY_RESIZE                 NEWT_KEY_EXTRA_BASE + 113
-
-#define NEWT_ANCHOR_LEFT                (1 << 0)
-#define NEWT_ANCHOR_RIGHT               (1 << 1)
-#define NEWT_ANCHOR_TOP                 (1 << 2)
-#define NEWT_ANCHOR_BOTTOM              (1 << 3)
-
-#define NEWT_GRID_FLAG_GROWX            (1 << 0)
-#define NEWT_GRID_FLAG_GROWY            (1 << 1)
-
-       typedef struct grid_s * newtGrid;
-       enum newtGridElement { NEWT_GRID_EMPTY = 0,
-                                                  NEWT_GRID_COMPONENT, NEWT_GRID_SUBGRID };
-
-       newtGrid newtCreateGrid(int cols, int rows);
-       /* TYPE, what, TYPE, what, ..., NULL */
-       newtGrid newtGridVStacked(enum newtGridElement type, void * what, ...);
-       newtGrid newtGridVCloseStacked(enum newtGridElement type, void * what, ...);
-       newtGrid newtGridHStacked(enum newtGridElement type1, void * what1, ...);
-       newtGrid newtGridHCloseStacked(enum newtGridElement type1, void * what1, ...);
-       newtGrid newtGridBasicWindow(newtComponent text, newtGrid middle,
-                                                                newtGrid buttons);
-       newtGrid newtGridSimpleWindow(newtComponent text, newtComponent middle,
-                                                                 newtGrid buttons);
-       void newtGridSetField(newtGrid grid, int col, int row, 
-                                                 enum newtGridElement type, void * val, int padLeft,
-                                                 int padTop, int padRight, int padBottom, int anchor,
-                                                 int flags);
-       void newtGridPlace(newtGrid grid, int left, int top);
+newtComponent newtTextboxReflowed(int left, int top, char * text, int width,
+                                 int flexDown, int flexUp, int flags);
+newtComponent newtTextbox(int left, int top, int width, int height, int flags);
+void newtTextboxSetText(newtComponent co, const char * text);
+void newtTextboxSetHeight(newtComponent co, int height);
+int newtTextboxGetNumLines(newtComponent co);
+char * newtReflowText(char * text, int width, int flexDown, int flexUp,
+                     int * actualWidth, int * actualHeight);
+
+struct newtExitStruct {
+    enum { NEWT_EXIT_HOTKEY, NEWT_EXIT_COMPONENT, NEWT_EXIT_FDREADY,
+          NEWT_EXIT_TIMER } reason;
+    union {
+       int watch;
+       int key;
+       newtComponent co;
+    } u;
+} ;
+
+newtComponent newtForm(newtComponent vertBar, void * helpTag, int flags);
+void newtFormSetTimer(newtComponent form, int millisecs);
+void newtFormWatchFd(newtComponent form, int fd, int fdFlags);
+void newtFormSetSize(newtComponent co);
+newtComponent newtFormGetCurrent(newtComponent co);
+void newtFormSetBackground(newtComponent co, int color);
+void newtFormSetCurrent(newtComponent co, newtComponent subco);
+void newtFormAddComponent(newtComponent form, newtComponent co);
+void newtFormAddComponents(newtComponent form, ...);
+void newtFormSetHeight(newtComponent co, int height);
+void newtFormSetWidth(newtComponent co, int width);
+newtComponent newtRunForm(newtComponent form);         /* obsolete */
+void newtFormRun(newtComponent co, struct newtExitStruct * es);
+void newtDrawForm(newtComponent form);
+void newtFormAddHotKey(newtComponent co, int key);
+
+typedef int (*newtEntryFilter)(newtComponent entry, void * data, int ch,
+                              int cursor);
+newtComponent newtEntry(int left, int top, const char * initialValue, int width,
+                       const char ** resultPtr, int flags);
+void newtEntrySet(newtComponent co, const char * value, int cursorAtEnd);
+void newtEntrySetFilter(newtComponent co, newtEntryFilter filter, void * data);
+char * newtEntryGetValue(newtComponent co);
+void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense);
+
+newtComponent newtScale(int left, int top, int width, long long fullValue);
+void newtScaleSet(newtComponent co, unsigned long long amount);
+
+void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
+void newtComponentTakesFocus(newtComponent co, int val);
+
+/* this also destroys all of the components (including other forms) on the 
+   form */
+void newtFormDestroy(newtComponent form);      
+
+/* Key codes */
+
+#define NEWT_KEY_TAB                   '\t'
+#define NEWT_KEY_ENTER                 '\r'
+#define NEWT_KEY_SUSPEND               '\032'                  /* ctrl - z*/
+#define NEWT_KEY_ESCAPE                        '\e'
+#define NEWT_KEY_RETURN                        NEWT_KEY_ENTER
+
+#define NEWT_KEY_EXTRA_BASE            0x8000
+#define NEWT_KEY_UP                    NEWT_KEY_EXTRA_BASE + 1
+#define NEWT_KEY_DOWN                  NEWT_KEY_EXTRA_BASE + 2
+#define NEWT_KEY_LEFT                  NEWT_KEY_EXTRA_BASE + 4
+#define NEWT_KEY_RIGHT                 NEWT_KEY_EXTRA_BASE + 5
+#define NEWT_KEY_BKSPC                 NEWT_KEY_EXTRA_BASE + 6
+#define NEWT_KEY_DELETE                        NEWT_KEY_EXTRA_BASE + 7
+#define NEWT_KEY_HOME                  NEWT_KEY_EXTRA_BASE + 8
+#define NEWT_KEY_END                   NEWT_KEY_EXTRA_BASE + 9
+#define NEWT_KEY_UNTAB                 NEWT_KEY_EXTRA_BASE + 10
+#define NEWT_KEY_PGUP                  NEWT_KEY_EXTRA_BASE + 11
+#define NEWT_KEY_PGDN                  NEWT_KEY_EXTRA_BASE + 12
+#define NEWT_KEY_INSERT                        NEWT_KEY_EXTRA_BASE + 13
+
+#define NEWT_KEY_F1                    NEWT_KEY_EXTRA_BASE + 101
+#define NEWT_KEY_F2                    NEWT_KEY_EXTRA_BASE + 102
+#define NEWT_KEY_F3                    NEWT_KEY_EXTRA_BASE + 103
+#define NEWT_KEY_F4                    NEWT_KEY_EXTRA_BASE + 104
+#define NEWT_KEY_F5                    NEWT_KEY_EXTRA_BASE + 105
+#define NEWT_KEY_F6                    NEWT_KEY_EXTRA_BASE + 106
+#define NEWT_KEY_F7                    NEWT_KEY_EXTRA_BASE + 107
+#define NEWT_KEY_F8                    NEWT_KEY_EXTRA_BASE + 108
+#define NEWT_KEY_F9                    NEWT_KEY_EXTRA_BASE + 109
+#define NEWT_KEY_F10                   NEWT_KEY_EXTRA_BASE + 110
+#define NEWT_KEY_F11                   NEWT_KEY_EXTRA_BASE + 111
+#define NEWT_KEY_F12                   NEWT_KEY_EXTRA_BASE + 112
+
+/* not really a key, but newtGetKey returns it */
+#define NEWT_KEY_RESIZE                        NEWT_KEY_EXTRA_BASE + 113
+
+#define NEWT_ANCHOR_LEFT               (1 << 0)
+#define NEWT_ANCHOR_RIGHT              (1 << 1)
+#define NEWT_ANCHOR_TOP                        (1 << 2)
+#define NEWT_ANCHOR_BOTTOM             (1 << 3)
+
+#define NEWT_GRID_FLAG_GROWX           (1 << 0)
+#define NEWT_GRID_FLAG_GROWY           (1 << 1)
+
+typedef struct grid_s * newtGrid;
+enum newtGridElement { NEWT_GRID_EMPTY = 0,
+                      NEWT_GRID_COMPONENT, NEWT_GRID_SUBGRID };
+
+newtGrid newtCreateGrid(int cols, int rows);
+/* TYPE, what, TYPE, what, ..., NULL */
+newtGrid newtGridVStacked(enum newtGridElement type, void * what, ...);
+newtGrid newtGridVCloseStacked(enum newtGridElement type, void * what, ...);
+newtGrid newtGridHStacked(enum newtGridElement type1, void * what1, ...);
+newtGrid newtGridHCloseStacked(enum newtGridElement type1, void * what1, ...);
+newtGrid newtGridBasicWindow(newtComponent text, newtGrid middle,
+                            newtGrid buttons);
+newtGrid newtGridSimpleWindow(newtComponent text, newtComponent middle,
+                            newtGrid buttons);
+void newtGridSetField(newtGrid grid, int col, int row, 
+                     enum newtGridElement type, void * val, int padLeft,
+                     int padTop, int padRight, int padBottom, int anchor,
+                     int flags);
+void newtGridPlace(newtGrid grid, int left, int top);
 #define newtGridDestroy newtGridFree
-       void newtGridFree(newtGrid grid, int recurse);
-       void newtGridGetSize(newtGrid grid, int * width, int * height);
-       void newtGridWrappedWindow(newtGrid grid, char * title);
-       void newtGridWrappedWindowAt(newtGrid grid, char * title, int left, int top);
-       void newtGridAddComponentsToForm(newtGrid grid, newtComponent form, 
-                                                                        int recurse);
-
-       /* convienve */
-       newtGrid newtButtonBarv(char * button1, newtComponent * b1comp, va_list args);
-       newtGrid newtButtonBar(char * button1, newtComponent * b1comp, ...);
-
-       /* automatically centered and shrink wrapped */
-       void newtWinMessage(char * title, char * buttonText, char * text, ...);
-       void newtWinMessagev(char * title, char * buttonText, char * text, 
-                                                va_list argv);
-
-       /* having separate calls for these two seems silly, but having two separate
-          variable length-arg lists seems like a bad idea as well */
-
-       /* Returns 0 if F12 was pressed, 1 for button1, 2 for button2 */
-       int newtWinChoice(char * title, char * button1, char * button2, 
-                                         char * text, ...);
-       /* Returns 0 if F12 was pressed, 1 for button1, 2 for button2, 
-          3 for button3 */
-       int newtWinTernary(char * title, char * button1, char * button2, 
-                                          char * button3, char * message, ...);
-
-       /* Returns the button number pressed, 0 on F12 */
-       int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown, 
-                                       int flexUp, int maxListHeight, char ** items, int * listItem,
-                                       char * button1, ...);
-
-       struct newtWinEntry {
-               char * text;
-               const char ** value;                /* may be initialized to set default */
-               int flags;
-       };
-
-       /* Returns the button number pressed, 0 on F12. The final values are
-          dynamically allocated, and need to be freed. */
-       int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown, 
-                                          int flexUp, int dataWidth, 
-                                          struct newtWinEntry * items, char * button1, ...);
+void newtGridFree(newtGrid grid, int recurse);
+void newtGridGetSize(newtGrid grid, int * width, int * height);
+void newtGridWrappedWindow(newtGrid grid, char * title);
+void newtGridWrappedWindowAt(newtGrid grid, char * title, int left, int top);
+void newtGridAddComponentsToForm(newtGrid grid, newtComponent form, 
+                                int recurse);
+
+/* convienve */
+newtGrid newtButtonBarv(char * button1, newtComponent * b1comp, va_list args);
+newtGrid newtButtonBar(char * button1, newtComponent * b1comp, ...);
+
+/* automatically centered and shrink wrapped */
+void newtWinMessage(char * title, char * buttonText, char * text, ...);
+void newtWinMessagev(char * title, char * buttonText, char * text, 
+                    va_list argv);
+
+/* having separate calls for these two seems silly, but having two separate
+   variable length-arg lists seems like a bad idea as well */
+
+/* Returns 0 if F12 was pressed, 1 for button1, 2 for button2 */
+int newtWinChoice(char * title, char * button1, char * button2, 
+                  char * text, ...);
+/* Returns 0 if F12 was pressed, 1 for button1, 2 for button2, 
+   3 for button3 */
+int newtWinTernary(char * title, char * button1, char * button2, 
+                  char * button3, char * message, ...);
+
+/* Returns the button number pressed, 0 on F12 */
+int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown, 
+               int flexUp, int maxListHeight, char ** items, int * listItem,
+               char * button1, ...);
+
+struct newtWinEntry {
+    char * text;
+    const char ** value;               /* may be initialized to set default */
+    int flags;
+};
+
+/* Returns the button number pressed, 0 on F12. The final values are
+   dynamically allocated, and need to be freed. */
+int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown, 
+                  int flexUp, int dataWidth, 
+                  struct newtWinEntry * items, char * button1, ...);
 
 #ifdef __cplusplus
 } /* End of extern "C" { */
index 2bd2f18c5825dda4d3b2921ac15dc49f0f697d4b..911898cfb38fc0fc7f6c7fe65cfc0df0fe43ad61 100644 (file)
--- a/newt_pr.h
+++ b/newt_pr.h
@@ -1,21 +1,21 @@
 #ifndef H_NEWT_PR
 #define H_NEWT_PR
 
-#define COLORSET_ROOT           NEWT_COLORSET_ROOT
-#define COLORSET_BORDER         NEWT_COLORSET_BORDER
-#define COLORSET_WINDOW         NEWT_COLORSET_WINDOW
-#define COLORSET_SHADOW         NEWT_COLORSET_SHADOW
-#define COLORSET_TITLE          NEWT_COLORSET_TITLE
-#define COLORSET_BUTTON         NEWT_COLORSET_BUTTON
-#define COLORSET_ACTBUTTON      NEWT_COLORSET_ACTBUTTON
-#define COLORSET_CHECKBOX       NEWT_COLORSET_CHECKBOX
-#define COLORSET_ACTCHECKBOX    NEWT_COLORSET_ACTCHECKBOX
-#define COLORSET_ENTRY          NEWT_COLORSET_ENTRY
-#define COLORSET_LABEL          NEWT_COLORSET_LABEL
-#define COLORSET_LISTBOX        NEWT_COLORSET_LISTBOX
-#define COLORSET_ACTLISTBOX     NEWT_COLORSET_ACTLISTBOX
-#define COLORSET_TEXTBOX        NEWT_COLORSET_TEXTBOX
-#define COLORSET_ACTTEXTBOX     NEWT_COLORSET_ACTTEXTBOX
+#define COLORSET_ROOT          NEWT_COLORSET_ROOT
+#define COLORSET_BORDER        NEWT_COLORSET_BORDER
+#define COLORSET_WINDOW                NEWT_COLORSET_WINDOW
+#define COLORSET_SHADOW                NEWT_COLORSET_SHADOW
+#define COLORSET_TITLE         NEWT_COLORSET_TITLE
+#define COLORSET_BUTTON                NEWT_COLORSET_BUTTON
+#define COLORSET_ACTBUTTON     NEWT_COLORSET_ACTBUTTON
+#define COLORSET_CHECKBOX      NEWT_COLORSET_CHECKBOX
+#define COLORSET_ACTCHECKBOX   NEWT_COLORSET_ACTCHECKBOX
+#define COLORSET_ENTRY         NEWT_COLORSET_ENTRY
+#define COLORSET_LABEL         NEWT_COLORSET_LABEL
+#define COLORSET_LISTBOX       NEWT_COLORSET_LISTBOX
+#define COLORSET_ACTLISTBOX    NEWT_COLORSET_ACTLISTBOX
+#define COLORSET_TEXTBOX       NEWT_COLORSET_TEXTBOX
+#define COLORSET_ACTTEXTBOX    NEWT_COLORSET_ACTTEXTBOX
 
 int newtSetFlags(int oldFlags, int newFlags, enum newtFlagsSense sense);
 
@@ -44,11 +44,11 @@ struct newtComponent_struct {
 } ;
 
 enum eventResultTypes { ER_IGNORED, ER_SWALLOWED, ER_EXITFORM, ER_SETFOCUS,
-                        ER_NEXTCOMP };
+                       ER_NEXTCOMP };
 struct eventResult {
     enum eventResultTypes result;
     union {
-        newtComponent focus;
+       newtComponent focus;
     } u;
 };
 
@@ -59,11 +59,11 @@ struct event {
     enum eventTypes event;
     enum eventSequence when;
     union {
-        int key;
-        struct {
-            enum { MOUSE_MOTION, MOUSE_BUTTON_DOWN, MOUSE_BUTTON_UP } type;
-            int x, y;
-        } mouse;
+       int key;
+       struct {
+           enum { MOUSE_MOTION, MOUSE_BUTTON_DOWN, MOUSE_BUTTON_UP } type;
+           int x, y;
+       } mouse;
     } u;
 } ;
 
@@ -78,7 +78,7 @@ struct componentOps {
 void newtDefaultPlaceHandler(newtComponent c, int newLeft, int newTop);
 void newtDefaultMappedHandler(newtComponent c, int isMapped);
 struct eventResult newtDefaultEventHandler(newtComponent c,
-                                           struct event ev);
+                                          struct event ev);
 
 int wstrlen(const char *str, int len);
 
diff --git a/scale.c b/scale.c
index 43ab44852e70af531066cc3f5c101db7ea1e1306..f898916b339327b8b18c1931dfd2441bd2833b7e 100644 (file)
--- a/scale.c
+++ b/scale.c
@@ -52,11 +52,11 @@ void newtScaleSet(newtComponent co, unsigned long long amount) {
     newPercentage = (amount * 100) / sc->fullValue;
 
     if (newPercentage > 100)
-        newPercentage = 100;
+       newPercentage = 100;
     
     if (newPercentage != sc->percentage) {
-        sc->percentage = newPercentage;
-        scaleDraw(co);
+       sc->percentage = newPercentage;
+       scaleDraw(co);
     }
 }
 
index ca9f595e6ad9a22e3e728b9853bcf8cefec8a90c..1a737a40900456267a2dcccbf837b8bfef58e5cb 100644 (file)
@@ -28,18 +28,18 @@ void newtScrollbarSet(newtComponent co, int where, int total) {
     int new;
 
     if (sb->arrows)
-        new = (where * (co->height - 3)) / (total ? total : 1) + 1;
+       new = (where * (co->height - 3)) / (total ? total : 1) + 1;
     else
-        new = (where * (co->height - 1)) / (total ? total : 1);
+       new = (where * (co->height - 1)) / (total ? total : 1);
     if (new != sb->curr) {
-        sbDrawThumb(co, 0);
-        sb->curr = new;
-        sbDrawThumb(co, 1);
+       sbDrawThumb(co, 0);
+       sb->curr = new;
+       sbDrawThumb(co, 1);
     }
 }
 
 newtComponent newtVerticalScrollbar(int left, int top, int height,
-                                    int normalColorset, int thumbColorset) {
+                                   int normalColorset, int thumbColorset) {
     newtComponent co;
     struct scrollbar * sb;
 
@@ -48,11 +48,11 @@ newtComponent newtVerticalScrollbar(int left, int top, int height,
     co->data = sb;
 
     if (!strcmp(getenv("TERM"), "linux") && height >= 2) {
-        sb->arrows = 1;
-        sb->curr = 1;
+       sb->arrows = 1;
+       sb->curr = 1;
     } else {
-        sb->arrows = 0;
-        sb->curr = 0;
+       sb->arrows = 0;
+       sb->curr = 0;
     }
     sb->cs = normalColorset;
     sb->csThumb = thumbColorset;
@@ -78,19 +78,19 @@ static void sbDraw(newtComponent co) {
 
     SLsmg_set_char_set(1);
     if (sb->arrows) {
-        newtGotorc(co->top, co->left);
-        SLsmg_write_char(SLSMG_UARROW_CHAR);
-        for (i = 1; i < co->height - 1; i++) {
-            newtGotorc(i + co->top, co->left);
-            SLsmg_write_char(SLSMG_CKBRD_CHAR);
-        }
-        newtGotorc(co->top + co->height - 1, co->left);
-        SLsmg_write_char(SLSMG_DARROW_CHAR);
+       newtGotorc(co->top, co->left);
+       SLsmg_write_char(SLSMG_UARROW_CHAR);
+       for (i = 1; i < co->height - 1; i++) {
+           newtGotorc(i + co->top, co->left);
+           SLsmg_write_char(SLSMG_CKBRD_CHAR);
+       }
+       newtGotorc(co->top + co->height - 1, co->left);
+       SLsmg_write_char(SLSMG_DARROW_CHAR);
     } else {
-        for (i = 0; i < co->height; i++) {
-            newtGotorc(i + co->top, co->left);
-            SLsmg_write_char(SLSMG_CKBRD_CHAR);
-        }
+       for (i = 0; i < co->height; i++) {
+           newtGotorc(i + co->top, co->left);
+           SLsmg_write_char(SLSMG_CKBRD_CHAR);
+       }
     }
 
     SLsmg_set_char_set(0);
@@ -108,9 +108,9 @@ static void sbDrawThumb(newtComponent co, int isOn) {
     SLsmg_set_char_set(1);
 
     /*if (isOn)
-        SLsmg_set_color(sb->csThumb);
+       SLsmg_set_color(sb->csThumb);
     else*/
-        SLsmg_set_color(sb->cs);
+       SLsmg_set_color(sb->cs);
 
     SLsmg_write_char(ch);
     SLsmg_set_char_set(0);
index 1225e733fb909883db4b52d8210940e565728050..eb999eda851ef007b27242fbbb2098b2859b8c94 100644 (file)
@@ -7,12 +7,12 @@ void printall(int offset) {
     SLsmg_gotorc(0, offset);
     SLsmg_write_string("  0 1 2 3 4 5 6 7 8 9 A B C D E F");
     for (i = 0; i < 16; i++) {
-        SLsmg_gotorc(i + 1, offset);
-        SLsmg_printf("%x", i);
-        for (j = 0; j < 16; j++) {
-            SLsmg_gotorc(i + 1, (j + 1) * 2 + offset);
-            SLsmg_write_char(n++);
-        }
+       SLsmg_gotorc(i + 1, offset);
+       SLsmg_printf("%x", i);
+       for (j = 0; j < 16; j++) {
+           SLsmg_gotorc(i + 1, (j + 1) * 2 + offset);
+           SLsmg_write_char(n++);
+       }
     }
 }
 
index 7770a0c2b8d4e0f41bc7ec8127a25c03308e7237..14baf6c3c2ad548f61825594e07ea11b9c4bc278 100644 (file)
--- a/showkey.c
+++ b/showkey.c
@@ -10,13 +10,13 @@ int main(void) {
 
     buf = SLtt_tgetstr("ku");
     if (!buf) {
-        printf("termcap entry not found for kl\n\r");
+       printf("termcap entry not found for kl\n\r");
     } else {
-        printf("termcap entry found for kl: %s", buf);
-        while (*buf) {
-            printf("0x%02x ", *buf++);
-        }
-        printf("\n\r");
+       printf("termcap entry found for kl: %s", buf);
+       while (*buf) {
+           printf("0x%02x ", *buf++);
+       }
+       printf("\n\r");
     }
 
     printf("\n\r");
@@ -30,8 +30,8 @@ int main(void) {
     printf("You pressed: ");
 
     while (SLang_input_pending(1)) {
-        i = SLang_getkey();
-        printf("0x%02x ", i);
+       i = SLang_getkey();
+       printf("0x%02x ", i);
     }
 
     printf("\n\r");
index d961cb2095bb6dde61a3dcda9be5fd356d522061..f992e44692a893d8556cd3da3cc32479cadaf652 100644 (file)
@@ -123,15 +123,15 @@ static PyTypeObject snackGridType = {
         "snackgrid",                    /* tp_name */
         sizeof(snackGrid),              /* tp_size */
         0,                              /* tp_itemsize */
-        emptyDestructor,                        /* tp_dealloc */
+        emptyDestructor,                       /* tp_dealloc */
         0,                              /* tp_print */
-        gridGetAttr,                    /* tp_getattr */
+        gridGetAttr,                   /* tp_getattr */
         0,                              /* tp_setattr */
         0,                              /* tp_compare */
         0,                              /* tp_repr */
         0,                              /* tp_as_number */
         0,                              /* tp_as_sequence */
-        0,                              /* tp_as_mapping */
+        0,                             /* tp_as_mapping */
 };
 
 struct snackForm_s {
@@ -165,15 +165,15 @@ static PyTypeObject snackFormType = {
         "snackform",                    /* tp_name */
         sizeof(snackForm),              /* tp_size */
         0,                              /* tp_itemsize */
-        emptyDestructor,                /* tp_dealloc */
+        emptyDestructor,               /* tp_dealloc */
         0,                              /* tp_print */
-        formGetAttr,                    /* tp_getattr */
+        formGetAttr,                   /* tp_getattr */
         0,                              /* tp_setattr */
         0,                              /* tp_compare */
         0,                              /* tp_repr */
         0,                              /* tp_as_number */
         0,                              /* tp_as_sequence */
-        0,                              /* tp_as_mapping */
+        0,                             /* tp_as_mapping */
 };
 
 struct snackWidget_s {
@@ -250,15 +250,15 @@ static PyTypeObject snackWidgetType = {
         "snackwidget",                  /* tp_name */
         sizeof(snackWidget),            /* tp_size */
         0,                              /* tp_itemsize */
-        widgetDestructor,               /* tp_dealloc */
+        widgetDestructor,                      /* tp_dealloc */
         0,                              /* tp_print */
-        widgetGetAttr,                  /* tp_getattr */
+        widgetGetAttr,                 /* tp_getattr */
         0,                              /* tp_setattr */
         0,                              /* tp_compare */
         0,                              /* tp_repr */
         0,                              /* tp_as_number */
         0,                              /* tp_as_sequence */
-        0,                              /* tp_as_mapping */
+        0,                             /* tp_as_mapping */
 };
 
 static snackWidget * snackWidgetNew (void) {
@@ -325,7 +325,7 @@ static PyObject * screenSize(PyObject * s, PyObject * args) {
     int width, height;
 
     if (!PyArg_ParseTuple(args, ""))
-        return NULL;
+       return NULL;
 
     newtGetScreenSize(&width, &height);
 
@@ -348,15 +348,15 @@ static void suspendCallbackMarshall(void * data) {
     PyObject * args, * result;
 
     if (scs->data) {
-        args = Py_BuildValue("(O)", scs->data);
-        result = PyEval_CallObject(scs->cb, args);
-        Py_DECREF (args);
+       args = Py_BuildValue("(O)", scs->data);
+       result = PyEval_CallObject(scs->cb, args);
+       Py_DECREF (args);
     } else
-        result = PyEval_CallObject(scs->cb, NULL);
+       result = PyEval_CallObject(scs->cb, NULL);
     
     if (!result) {
-        PyErr_Print();
-        PyErr_Clear();
+       PyErr_Print();
+       PyErr_Clear();
     }
 
     Py_XDECREF(result);
@@ -369,15 +369,15 @@ static void callbackMarshall(newtComponent co, void * data) {
     PyObject * args, * result;
 
     if (scs->data) {
-        args = Py_BuildValue("(O)", scs->data);
-        result = PyEval_CallObject(scs->cb, args);
-        Py_DECREF (args);
+       args = Py_BuildValue("(O)", scs->data);
+       result = PyEval_CallObject(scs->cb, args);
+       Py_DECREF (args);
     } else
-        result = PyEval_CallObject(scs->cb, NULL);
+       result = PyEval_CallObject(scs->cb, NULL);
 
     if (!result) {
-        PyErr_Print();
-        PyErr_Clear();
+       PyErr_Print();
+       PyErr_Clear();
     }
     
     Py_XDECREF(result);
@@ -387,7 +387,7 @@ static void callbackMarshall(newtComponent co, void * data) {
 
 static PyObject * setSuspendCallback(PyObject * s, PyObject * args) {
     if (!PyArg_ParseTuple(args, "O|O", &suspend.cb, &suspend.data))
-        return NULL;
+       return NULL;
 
     Py_INCREF (suspend.cb);
     Py_XINCREF (suspend.data);    
@@ -400,10 +400,10 @@ static PyObject * setSuspendCallback(PyObject * s, PyObject * args) {
 
 static PyObject * setHelpCallback(PyObject * s, PyObject * args) {
     if (!PyArg_ParseTuple(args, "O", &helpCallback.cb))
-        return NULL;
+       return NULL;
 
     /*if (helpCallback.cb) {
-        Py_DECREF (helpCallback.cb);
+       Py_DECREF (helpCallback.cb);
     }*/
 
     Py_INCREF (helpCallback.cb);
@@ -419,7 +419,7 @@ static PyObject * drawRootText(PyObject * s, PyObject * args) {
     char * text;
 
     if (!PyArg_ParseTuple(args, "iis", &left, &top, &text))
-        return NULL;
+       return NULL;
 
     newtDrawRootText(left, top, text);
 
@@ -451,12 +451,12 @@ static PyObject * pushHelpLine(PyObject * s, PyObject * args) {
     char * text;
 
     if (!PyArg_ParseTuple(args, "s", &text))
-        return NULL;
+       return NULL;
 
     if (!strcmp(text, "*default*"))
-        newtPushHelpLine(NULL);
+       newtPushHelpLine(NULL);
     else
-        newtPushHelpLine(text);
+       newtPushHelpLine(text);
 
     Py_INCREF(Py_None);
     return Py_None;
@@ -469,7 +469,7 @@ static PyObject * reflowText(PyObject * s, PyObject * args) {
     PyObject * tuple;
 
     if (!PyArg_ParseTuple(args, "si|ii", &text, &width, &minus, &plus))
-        return NULL;
+       return NULL;
 
     new = newtReflowText(text, width, minus, plus, &realWidth, &realHeight);
 
@@ -484,7 +484,7 @@ static PyObject * centeredWindow(PyObject * s, PyObject * args) {
     char * title;
 
     if (!PyArg_ParseTuple(args, "iis", &width, &height, &title))
-        return NULL;
+       return NULL;
 
     newtCenteredWindow(width, height, title);
 
@@ -498,13 +498,13 @@ static PyObject * gridWrappedWindow(PyObject * s, PyObject * args) {
     int x = -1, y = -1;
 
     if (!PyArg_ParseTuple(args, "O!s|ii", &snackGridType, &grid, &title, 
-                          &x, &y))
-        return NULL;
+                         &x, &y))
+       return NULL;
 
     if (y == -1)
-        newtGridWrappedWindow(grid->grid, title);
+       newtGridWrappedWindow(grid->grid, title);
     else
-        newtGridWrappedWindowAt(grid->grid, title, x, y);
+       newtGridWrappedWindowAt(grid->grid, title, x, y);
 
     Py_INCREF(Py_None);
     return Py_None;
@@ -515,7 +515,7 @@ static PyObject * openWindow(PyObject * s, PyObject * args) {
     char * title;
 
     if (!PyArg_ParseTuple(args, "iiiis", &left, &top, &width, &height, &title))
-        return NULL;
+       return NULL;
 
     newtOpenWindow(left, top, width, height, title);
 
@@ -534,7 +534,7 @@ static PyObject * messageWindow(PyObject * s, PyObject * args) {
     char * okbutton = "Ok";
 
     if (!PyArg_ParseTuple(args, "ss|s", &title, &text, &okbutton)) 
-        return NULL;
+       return NULL;
 
     newtWinMessage(title, okbutton, text);
 
@@ -549,8 +549,8 @@ static PyObject * choiceWindow(PyObject * s, PyObject * args) {
     int rc;
 
     if (!PyArg_ParseTuple(args, "ss|ss", &title, &text, &okbutton, 
-                          &cancelbutton)) 
-        return NULL;
+                         &cancelbutton)) 
+       return NULL;
 
     rc = newtWinChoice(title, okbutton, cancelbutton, text);
 
@@ -562,8 +562,8 @@ static PyObject * ternaryWindow(PyObject * s, PyObject * args) {
     int rc;
 
     if (!PyArg_ParseTuple(args, "sssss", &title, &text, &button1, &button2, 
-                          &button3)) 
-        return NULL;
+                         &button3)) 
+       return NULL;
 
     rc = newtWinTernary(title, button1, button2, button3, text);
 
@@ -634,14 +634,14 @@ static snackWidget * listboxWidget(PyObject * s, PyObject * args) {
     int doScroll = 0, returnExit = 0, showCursor = 0 ;
 
     if (!PyArg_ParseTuple(args, "i|iii", &height, &doScroll, &returnExit, &showCursor))
-        return NULL;
+       return NULL;
 
     widget = snackWidgetNew ();
     widget->co = newtListbox(-1, -1, height,
-                             (doScroll ? NEWT_FLAG_SCROLL : 0) |
-                             (returnExit ? NEWT_FLAG_RETURNEXIT : 0) |
-                             (showCursor ? NEWT_FLAG_SHOWCURSOR : 0)
-                             );
+                            (doScroll ? NEWT_FLAG_SCROLL : 0) |
+                            (returnExit ? NEWT_FLAG_RETURNEXIT : 0) |
+                            (showCursor ? NEWT_FLAG_SHOWCURSOR : 0)
+                            );
     widget->anint = 1;
     
     return widget;
@@ -655,12 +655,12 @@ static snackWidget * textWidget(PyObject * s, PyObject * args) {
     snackWidget * widget;
     
     if (!PyArg_ParseTuple(args, "iis|ii", &width, &height, &text, &scrollBar, &wrap))
-        return NULL;
+       return NULL;
 
     widget = snackWidgetNew ();
     widget->co = newtTextbox(-1, -1, width, height,
-                                (scrollBar ? NEWT_FLAG_SCROLL : 0) |
-                                (wrap ? NEWT_FLAG_WRAP : 0));
+                               (scrollBar ? NEWT_FLAG_SCROLL : 0) |
+                               (wrap ? NEWT_FLAG_WRAP : 0));
     newtTextboxSetText(widget->co, text);
     
     return widget;
@@ -672,14 +672,14 @@ static snackWidget * radioButtonWidget(PyObject * s, PyObject * args) {
     int isOn;
 
     if (!PyArg_ParseTuple(args, "sOi", &text, &group, &isOn)) 
-                return NULL;
+               return NULL;
 
     widget = snackWidgetNew ();
 
     if ((PyObject *) group == Py_None)
-        widget->co = newtRadiobutton(-1, -1, text, isOn, NULL);
+       widget->co = newtRadiobutton(-1, -1, text, isOn, NULL);
     else
-        widget->co = newtRadiobutton(-1, -1, text, isOn, group->co);
+       widget->co = newtRadiobutton(-1, -1, text, isOn, group->co);
 
     return widget;
 }
@@ -693,7 +693,7 @@ static snackWidget * checkboxWidget(PyObject * s, PyObject * args) {
 
     widget = snackWidgetNew ();
     widget->co = newtCheckbox(-1, -1, text, isOn ? '*' : ' ', NULL, 
-                                &widget->achar);
+                               &widget->achar);
 
     return widget;
 }
@@ -727,15 +727,15 @@ static snackWidget * entryWidget(PyObject * s, PyObject * args) {
     int isHidden, isScrolled, returnExit, isPassword;
 
     if (!PyArg_ParseTuple(args, "isiiii", &width, &initial,
-                          &isHidden, &isPassword, &isScrolled, &returnExit)) return NULL;
+                         &isHidden, &isPassword, &isScrolled, &returnExit)) return NULL;
 
     widget = snackWidgetNew ();
     widget->co = newtEntry(-1, -1, initial, width,
                            (const char **) &widget->apointer, 
-                           (isHidden ? NEWT_FLAG_HIDDEN : 0) |
-                           (isPassword ? NEWT_FLAG_PASSWORD : 0) |
-                           (returnExit ? NEWT_FLAG_RETURNEXIT : 0) |
-                           (isScrolled ? NEWT_FLAG_SCROLL : 0));
+                          (isHidden ? NEWT_FLAG_HIDDEN : 0) |
+                          (isPassword ? NEWT_FLAG_PASSWORD : 0) |
+                          (returnExit ? NEWT_FLAG_RETURNEXIT : 0) |
+                          (isScrolled ? NEWT_FLAG_SCROLL : 0));
 
     return widget;
 }
@@ -747,7 +747,7 @@ static snackForm * formCreate(PyObject * s, PyObject * args) {
     if (!PyArg_ParseTuple(args, "|O", &help)) return NULL;
 
     if (help == Py_None)
-        help = NULL;
+       help = NULL;
 
     form = PyObject_NEW(snackForm, &snackFormType);
     form->fo = newtForm(NULL, help, 0);
@@ -790,19 +790,19 @@ static PyObject * gridSetField(snackGrid * grid, PyObject * args) {
     int anchorFlags = 0, growFlags = 0;
 
     if (!PyArg_ParseTuple(args, "iiO|(iiii)ii", &x, &y, 
-                                &w, &pLeft, &pTop, &pRight, &pBottom,
-                                &anchorFlags, &growFlags)) 
-        return NULL;
+                               &w, &pLeft, &pTop, &pRight, &pBottom,
+                               &anchorFlags, &growFlags)) 
+       return NULL;
 
     if (w->ob_type == &snackWidgetType) {
-        newtGridSetField(grid->grid, x, y, NEWT_GRID_COMPONENT,
-                         w->co, pLeft, pTop, pRight, pBottom, anchorFlags, 
-                         growFlags);
+       newtGridSetField(grid->grid, x, y, NEWT_GRID_COMPONENT,
+                        w->co, pLeft, pTop, pRight, pBottom, anchorFlags, 
+                        growFlags);
     } else {
-        g = (snackGrid *) w;
-        newtGridSetField(grid->grid, x, y, NEWT_GRID_SUBGRID,
-                         g->grid, pLeft, pTop, pRight, pBottom, anchorFlags, 
-                         growFlags);
+       g = (snackGrid *) w;
+       newtGridSetField(grid->grid, x, y, NEWT_GRID_SUBGRID,
+                        g->grid, pLeft, pTop, pRight, pBottom, anchorFlags, 
+                        growFlags);
     }
 
     Py_INCREF(Py_None);
@@ -825,14 +825,14 @@ static PyObject * formAdd(snackForm * s, PyObject * args) {
     int size = PyTuple_Size(args), i;
     
     if (!size) {
-        /* this is a hack, I should give an error directly */
-        if (!PyArg_ParseTuple(args, "O!", &snackWidgetType, &w)) 
-            return NULL;
+       /* this is a hack, I should give an error directly */
+       if (!PyArg_ParseTuple(args, "O!", &snackWidgetType, &w)) 
+           return NULL;
     }
 
     for (i = 0; i < size; i++) {
-        w = (snackWidget *) PyTuple_GET_ITEM(args, i);
-        newtFormAddComponent(s->fo, w->co);
+       w = (snackWidget *) PyTuple_GET_ITEM(args, i);
+       newtFormAddComponent(s->fo, w->co);
     }
 
     Py_INCREF(Py_None);
@@ -845,20 +845,20 @@ static PyObject * formRun(snackForm * s, PyObject * args) {
     newtFormRun(s->fo, &result);
 
     if (result.reason == NEWT_EXIT_HOTKEY)
-        return Py_BuildValue("(si)", "hotkey", result.u.key);
+       return Py_BuildValue("(si)", "hotkey", result.u.key);
     else if (result.reason == NEWT_EXIT_TIMER)
-        return Py_BuildValue("(si)", "timer", 0);
+       return Py_BuildValue("(si)", "timer", 0);
     else if (result.reason == NEWT_EXIT_FDREADY)
-        return Py_BuildValue("(si)", "fdready", result.u.watch);
+       return Py_BuildValue("(si)", "fdready", result.u.watch);
     else
-        return Py_BuildValue("(si)", "widget", result.u.co);
+       return Py_BuildValue("(si)", "widget", result.u.co);
 }
 
 static PyObject * formHotKey(snackForm * s, PyObject * args) {
     int key;
 
     if (!PyArg_ParseTuple(args, "i", &key))
-        return NULL;
+       return NULL;
 
     newtFormAddHotKey(s->fo, key);
 
@@ -870,7 +870,7 @@ static PyObject * formSetTimer(snackForm * form, PyObject * args) {
     int millisecs;
 
     if (!PyArg_ParseTuple(args, "i", &millisecs))
-        return NULL;
+       return NULL;
 
     newtFormSetTimer(form->fo, millisecs);
 
@@ -882,7 +882,7 @@ static PyObject * formWatchFD(snackForm * form, PyObject * args) {
     int fd, fdflags;
 
     if (!PyArg_ParseTuple(args, "ii", &fd, &fdflags))
-        return NULL;
+       return NULL;
 
     newtFormWatchFd(form->fo, fd, fdflags);
 
@@ -894,7 +894,7 @@ static PyObject * formSetCurrent(snackForm * form, PyObject * args) {
     snackWidget * w;
 
     if (!PyArg_ParseTuple(args, "O", &w))
-        return NULL;
+       return NULL;
 
     newtFormSetCurrent(form->fo, w->co);
 
@@ -906,13 +906,13 @@ static PyObject * widgetGetAttr(PyObject * s, char * name) {
     snackWidget * w = (snackWidget *) s;
 
     if (!strcmp(name, "key")) {
-        return Py_BuildValue("i", w->co);
+       return Py_BuildValue("i", w->co);
     } else if (!strcmp(name, "entryValue")) {
-        return Py_BuildValue("s", w->apointer);
+       return Py_BuildValue("s", w->apointer);
     } else if (!strcmp(name, "checkboxValue")) {
-        return Py_BuildValue("i", w->achar == ' ' ? 0 : 1);
+       return Py_BuildValue("i", w->achar == ' ' ? 0 : 1);
     } else if (!strcmp(name, "radioValue")) {
-        return Py_BuildValue("i", newtRadioGetCurrent(w->co));
+       return Py_BuildValue("i", newtRadioGetCurrent(w->co));
     }
 
     return Py_FindMethod(widgetMethods, s, name);
@@ -932,7 +932,7 @@ static PyObject * widgetAddCallback(snackWidget * s, PyObject * args) {
     s->scs.data = NULL;
     
     if (!PyArg_ParseTuple(args, "O|O", &s->scs.cb, &s->scs.data))
-        return NULL;
+       return NULL;
 
     Py_INCREF (s->scs.cb);
     Py_XINCREF (s->scs.data);
@@ -947,7 +947,7 @@ static PyObject * widgetEntrySetValue(snackWidget * s, PyObject * args) {
     char * val;
 
     if (!PyArg_ParseTuple(args, "s", &val))
-        return NULL;
+       return NULL;
 
     newtEntrySet(s->co, val, 1);
 
@@ -971,7 +971,7 @@ static PyObject * widgetListboxAdd(snackWidget * s, PyObject * args) {
     char * text;
     
     if (!PyArg_ParseTuple(args, "s", &text))
-        return NULL;
+       return NULL;
 
     newtListboxAddEntry(s->co, text, I2P(s->anint));
 
@@ -983,7 +983,7 @@ static PyObject * widgetListboxIns(snackWidget * s, PyObject * args) {
     int key;
     
     if (!PyArg_ParseTuple(args, "si", &text, &key))
-        return NULL;
+       return NULL;
 
     newtListboxInsertEntry(s->co, text, I2P(s->anint), I2P(key));
 
@@ -994,7 +994,7 @@ static PyObject * widgetListboxDel(snackWidget * s, PyObject * args) {
     int key;
     
     if (!PyArg_ParseTuple(args, "i", &key))
-        return NULL;
+       return NULL;
 
     newtListboxDeleteEntry(s->co, I2P(key));
 
@@ -1004,7 +1004,7 @@ static PyObject * widgetListboxDel(snackWidget * s, PyObject * args) {
 
 static PyObject * widgetListboxGet(snackWidget * s, PyObject * args) {
     if (!PyArg_ParseTuple(args, ""))
-        return NULL;
+       return NULL;
 
     return PyInt_FromLong((long) newtListboxGetCurrent(s->co));
 }
@@ -1013,7 +1013,7 @@ static PyObject * widgetListboxSet(snackWidget * s, PyObject * args) {
     int index;
     
     if (!PyArg_ParseTuple(args, "i", &index))
-        return NULL;
+       return NULL;
 
     newtListboxSetCurrentByKey(s->co, I2P(index));
 
@@ -1025,7 +1025,7 @@ static PyObject * widgetListboxSetW(snackWidget * s, PyObject * args) {
     int width;
 
     if (!PyArg_ParseTuple(args, "i", &width))
-        return NULL;
+       return NULL;
 
     newtListboxSetWidth(s->co, width);
 
@@ -1056,12 +1056,12 @@ static snackWidget * checkboxTreeWidget(PyObject * s, PyObject * args, PyObject
     const char *kw[] = {"height", "scrollbar", "hide_checkbox", "unselectable", NULL};
     
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|iii", (char **) kw,
-                &height, &scrollBar, &hide_checkbox, &unselectable))
-        return NULL;
+               &height, &scrollBar, &hide_checkbox, &unselectable))
+       return NULL;
 
     flags = (scrollBar ? NEWT_FLAG_SCROLL : 0) |
-        (hide_checkbox ? NEWT_CHECKBOXTREE_HIDE_BOX : 0) |    
-        (unselectable ? NEWT_CHECKBOXTREE_UNSELECTABLE : 0);
+       (hide_checkbox ? NEWT_CHECKBOXTREE_HIDE_BOX : 0) |    
+       (unselectable ? NEWT_CHECKBOXTREE_UNSELECTABLE : 0);
 
     widget = snackWidgetNew ();
     widget->co = newtCheckboxTree(-1, -1, height, flags);
@@ -1080,25 +1080,25 @@ static PyObject * widgetCheckboxTreeAddItem(snackWidget * s, PyObject * args) {
     int i;
 
     if (!PyArg_ParseTuple(args, "sOi", &text, &pathList, &selected))
-        return NULL;
+       return NULL;
 
     len = PyTuple_Size(pathList);
     path = alloca(sizeof(*path) * (len + 1));
     for (i = 0; i < len; i++) {
         o = PyTuple_GetItem(pathList, i);
-        path[i] = PyInt_AsLong(o);
+       path[i] = PyInt_AsLong(o);
     }
     path[len] = NEWT_ARG_LAST;
 
     newtCheckboxTreeAddArray(s->co, text, I2P(s->anint),
-                             selected ? NEWT_FLAG_SELECTED : 0, path);
+                            selected ? NEWT_FLAG_SELECTED : 0, path);
 
     return PyInt_FromLong(s->anint++);
 }
 
 static PyObject * widgetCheckboxTreeGetCur(snackWidget * s, PyObject * args) {
     if (!PyArg_ParseTuple(args, ""))
-        return NULL;
+       return NULL;
 
     return PyInt_FromLong((long)newtCheckboxTreeGetCurrent(s->co));
 }
@@ -1119,7 +1119,7 @@ static PyObject * widgetCheckboxTreeSetWidth(snackWidget * s, PyObject * args) {
     int width;
 
     if (!PyArg_ParseTuple(args, "i", &width))
-        return NULL;
+       return NULL;
 
     newtCheckboxTreeSetWidth(s->co, width);
 
@@ -1145,8 +1145,8 @@ static PyObject * widgetCheckboxTreeSetEntryValue(snackWidget * s, PyObject * ar
     if (!PyArg_ParseTuple(args, "i|i", &data, &isOn)) return NULL;
 
     newtCheckboxTreeSetEntryValue(s->co, I2P(data),
-                                  isOn ? NEWT_CHECKBOXTREE_SELECTED :
-                                         NEWT_CHECKBOXTREE_UNSELECTED);
+                                 isOn ? NEWT_CHECKBOXTREE_SELECTED :
+                                        NEWT_CHECKBOXTREE_UNSELECTED);
 
     Py_INCREF(Py_None);
     return Py_None;
@@ -1166,40 +1166,40 @@ static PyObject * widgetCheckboxTreeGetEntryValue(snackWidget * s, PyObject * ar
 
     switch (selection) {
     case NEWT_CHECKBOXTREE_EXPANDED:
-        isOn = 1;
+       isOn = 1;
     case NEWT_CHECKBOXTREE_COLLAPSED:
-        isBranch = 1;
-        break;
+       isBranch = 1;
+       break;
     case NEWT_CHECKBOXTREE_UNSELECTED:
-        break;
+       break;
     default:
-        isOn = 1;
-        break;
+       isOn = 1;
+       break;
     }    
     return Py_BuildValue("(ii)", isBranch, isOn);
 }
 
 static PyObject * widgetCheckboxTreeGetSel(snackWidget * s,
-                                              PyObject * args) {
+                                             PyObject * args) {
     void ** selection;
     int numselected;
     int i;
     PyObject * sel;
 
     if (!PyArg_ParseTuple(args, ""))
-        return NULL;
+       return NULL;
 
     selection = (void **) newtCheckboxTreeGetSelection(s->co, &numselected);
 
     sel = PyList_New(0);
     
     if (!selection) {
-        return sel;
+       return sel;
     }
 
     sel = PyList_New(0);
     for (i = 0; i < numselected; i++) {
-        PyList_Append(sel, PyInt_FromLong((long) selection[i]));
+       PyList_Append(sel, PyInt_FromLong((long) selection[i]));
     }
     free(selection);
 
@@ -1226,7 +1226,7 @@ void init_snack(void) {
     PyDict_SetItemString(d, "ANCHOR_TOP", PyInt_FromLong(NEWT_ANCHOR_TOP));
     PyDict_SetItemString(d, "ANCHOR_RIGHT", PyInt_FromLong(NEWT_ANCHOR_RIGHT));
     PyDict_SetItemString(d, "ANCHOR_BOTTOM", 
-                         PyInt_FromLong(NEWT_ANCHOR_BOTTOM));
+                        PyInt_FromLong(NEWT_ANCHOR_BOTTOM));
     PyDict_SetItemString(d, "GRID_GROWX", PyInt_FromLong(NEWT_GRID_FLAG_GROWX));
     PyDict_SetItemString(d, "GRID_GROWY", PyInt_FromLong(NEWT_GRID_FLAG_GROWY));
 
diff --git a/test.c b/test.c
index 4c2074db54a9a91eaabdf6940a2f81c667048236..c1b9aa8d16045a5f8ff63b131fe54c991cdcb1e0 100644 (file)
--- a/test.c
+++ b/test.c
@@ -14,9 +14,9 @@ void disableCallback(newtComponent co, void * data) {
     struct callbackInfo * cbi = data;
 
     if (*cbi->state == ' ') {
-        newtEntrySetFlags(cbi->en, NEWT_FLAG_DISABLED, NEWT_FLAGS_RESET);
+       newtEntrySetFlags(cbi->en, NEWT_FLAG_DISABLED, NEWT_FLAGS_RESET);
     } else {
-        newtEntrySetFlags(cbi->en, NEWT_FLAG_DISABLED, NEWT_FLAGS_SET);
+       newtEntrySetFlags(cbi->en, NEWT_FLAG_DISABLED, NEWT_FLAGS_SET);
     }
 
     newtRefresh();
@@ -73,9 +73,9 @@ int main(void) {
     newtFormSetBackground(rsf, NEWT_COLORSET_CHECKBOX);
 
     for (i = 0; i < 10; i++) {
-        sprintf(buf, "Check %d", i);
-        cs[i] = newtCheckbox(3, 10 + i, buf, ' ', NULL, &results[i]);
-        newtFormAddComponent(chklist, cs[i]);
+       sprintf(buf, "Check %d", i);
+       cs[i] = newtCheckbox(3, 10 + i, buf, ' ', NULL, &results[i]);
+       newtFormAddComponent(chklist, cs[i]);
     }
 
     l1 = newtLabel(3, 6, "Scale:");
@@ -98,7 +98,7 @@ int main(void) {
     newtFormAddComponents(f, rsf, scale, NULL);
 
     lb = newtListbox(45, 1, 6, NEWT_FLAG_MULTIPLE | NEWT_FLAG_BORDER |
-                                NEWT_FLAG_SCROLL | NEWT_FLAG_SHOWCURSOR);
+                               NEWT_FLAG_SCROLL | NEWT_FLAG_SHOWCURSOR);
     newtListboxAppendEntry(lb, "First", (void *) 1);
     newtListboxAppendEntry(lb, "Second", (void *) 2);
     newtListboxAppendEntry(lb, "Third", (void *) 3);
@@ -124,18 +124,18 @@ int main(void) {
     newtFormSetTimer(f, 200);
 
     do {
-        newtFormRun(f, &es);
-
-        if (es.reason == NEWT_EXIT_COMPONENT && es.u.co == b2) {
-            newtScaleSet(scale, atoi(scaleVal));
-            newtRefresh();
-            answer = NULL;
-        } else if (es.reason == NEWT_EXIT_TIMER) {
-            spinState++;
-            if (!*spinState) spinState = spinner;
-            sprintf(buf, "Spinner: %c", *spinState);
-            newtLabelSetText(timeLabel, buf);
-        }
+       newtFormRun(f, &es);
+
+       if (es.reason == NEWT_EXIT_COMPONENT && es.u.co == b2) {
+           newtScaleSet(scale, atoi(scaleVal));
+           newtRefresh();
+           answer = NULL;
+       } else if (es.reason == NEWT_EXIT_TIMER) {
+           spinState++;
+           if (!*spinState) spinState = spinner;
+           sprintf(buf, "Spinner: %c", *spinState);
+           newtLabelSetText(timeLabel, buf);
+       }
     } while (es.reason != NEWT_EXIT_COMPONENT || es.u.co == b2);
 
     scaleVal = strdup(scaleVal);
@@ -156,8 +156,8 @@ int main(void) {
 
     printf("\nSelected listbox items (%d):\n", numsel);
     if(selectedList) {
-        for(i = 0; i < numsel; i++)
-            printf("#%d\n", (int) selectedList[i]);
+       for(i = 0; i < numsel; i++)
+           printf("#%d\n", (int) selectedList[i]);
     }
 
     return 0;
index f2b7c581786f528028b974843d79dbb962eeebb4..0d3aa85f9278219d4f9fc7c6b0f918d8b49238f6 100644 (file)
@@ -14,11 +14,11 @@ int main(void) {
     char * menuContents[] = { "One", "Two", "Three", "Four", "Five", NULL };
     const char * entries[10];
     struct newtWinEntry autoEntries[] = {
-        { "An entry", entries + 0, 0 },
-        { "Another entry", entries + 1, 0 },
-        { "Third entry", entries + 2, 0 },
-        { "Fourth entry", entries + 3, 0 },
-        { NULL, NULL, 0 } };
+       { "An entry", entries + 0, 0 },
+       { "Another entry", entries + 1, 0 },
+       { "Third entry", entries + 2, 0 },
+       { "Fourth entry", entries + 3, 0 },
+       { NULL, NULL, 0 } };
 
     memset(entries, 0, sizeof(entries));
 
@@ -34,7 +34,7 @@ int main(void) {
 
     grid = newtCreateGrid(2, 2);
     newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, b1, 0, 0, 0, 0, 
-                        NEWT_ANCHOR_RIGHT, 0);
+                       NEWT_ANCHOR_RIGHT, 0);
     newtGridSetField(grid, 0, 1, NEWT_GRID_COMPONENT, b2, 0, 0, 0, 0, 0, 0);
     newtGridSetField(grid, 1, 0, NEWT_GRID_COMPONENT, b3, 0, 0, 0, 0, 0, 0);
     newtGridSetField(grid, 1, 1, NEWT_GRID_COMPONENT, b4, 0, 0, 0, 0, 0, 0);
@@ -46,17 +46,17 @@ int main(void) {
     newtGridFree(grid, 1);
 
     answer = newtRunForm(f);
-        
+       
     newtFormDestroy(f);
     newtPopWindow();
 
     flowedText = newtReflowText("This is a quite a bit of text. It is 40 "
-                                "columns long, so some wrapping should be "
-                                "done. Did you know that the quick, brown "
-                                "fox jumped over the lazy dog?\n\n"
-                                "In other news, it's pretty important that we "
-                                "can properly force a line break.",
-                                40, 5, 5, &textWidth, &textHeight);
+                               "columns long, so some wrapping should be "
+                               "done. Did you know that the quick, brown "
+                               "fox jumped over the lazy dog?\n\n"
+                               "In other news, it's pretty important that we "
+                               "can properly force a line break.",
+                               40, 5, 5, &textWidth, &textHeight);
     t = newtTextbox(-1, -1, textWidth, textHeight, NEWT_FLAG_WRAP);
     newtTextboxSetText(t, flowedText);
     free(flowedText);
@@ -73,7 +73,7 @@ int main(void) {
 
     newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, t, 0, 0, 0, 1, 0, 0);
     newtGridSetField(grid, 0, 1, NEWT_GRID_SUBGRID, subgrid, 0, 0, 0, 0, 0,
-                        NEWT_GRID_FLAG_GROWX);
+                       NEWT_GRID_FLAG_GROWX);
     newtGridWrappedWindow(grid, "another example");
     newtGridDestroy(grid, 1);
 
@@ -89,14 +89,14 @@ int main(void) {
 
     textWidth = 0;
     rc = newtWinMenu("Test Menu", "This is a sample invovation of the "
-                     "newtWinMenu() call. It may or may not have a scrollbar, "
-                     "depending on the need for one.", 50, 5, 5, 3, 
-                     menuContents, &textWidth, "Ok", "Cancel", NULL);
+                    "newtWinMenu() call. It may or may not have a scrollbar, "
+                    "depending on the need for one.", 50, 5, 5, 3, 
+                    menuContents, &textWidth, "Ok", "Cancel", NULL);
 
     rc = newtWinEntries("Text newtWinEntries()", "This is a sample invovation of "
-                     "newtWinEntries() call. It lets you get a lot of input "
-                     "quite easily.", 50, 5, 5, 20, autoEntries, "Ok", 
-                     "Cancel", NULL);
+                    "newtWinEntries() call. It lets you get a lot of input "
+                    "quite easily.", 50, 5, 5, 20, autoEntries, "Ok", 
+                    "Cancel", NULL);
 
     newtFinished();
 
diff --git a/tests/window.c b/tests/window.c
deleted file mode 100644 (file)
index 65eb039..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-int main() {
-       newtInit();
-       newtCls();
-       newtOpenWindow(2, 2, 20, 10, "blabla");
-       newtFinished();
-       return 0;
-}
index 28d41c4953e2d7967ffb3e8df17bcf1088ba89d8..62494b8b98ea369b6c53daf54c29ab97c298cc85 100644 (file)
@@ -20,73 +20,73 @@ int main(void) {
 
     checktree = newtCheckboxTreeMulti(-1, -1, 10, " ab", NEWT_FLAG_SCROLL);
     newtCheckboxTreeAddItem(checktree, "Numbers", (void *) 2, 0,
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Really really long thing",
-                           (void *) 3, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                          (void *) 3, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "number 5", (void *) 5, 
-                            NEWT_FLAG_SELECTED, 
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_FLAG_SELECTED, 
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "number 6", (void *) 6, 0, 
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "number 7", (void *) 7, 
-                            NEWT_FLAG_SELECTED, 
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_FLAG_SELECTED, 
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "number 8", (void *) 8, 0, 
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "number 9", (void *) 9, 0, 
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "number 10", (void *) 10,
-                            NEWT_FLAG_SELECTED,
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_FLAG_SELECTED,
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "number 11", (void *) 11, 0, 
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Donuts", (void *) 12,
-                            NEWT_FLAG_SELECTED,
-                            NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_FLAG_SELECTED,
+                           NEWT_ARG_APPEND, NEWT_ARG_LAST);
 
     newtCheckboxTreeAddItem(checktree, "Bavarian Cream", (void *) 301,
-                            NEWT_FLAG_SELECTED,
-                            9, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_FLAG_SELECTED,
+                           9, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Honey dipped", (void *) 302,
-                            NEWT_FLAG_SELECTED,
-                            9, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_FLAG_SELECTED,
+                           9, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Jelly", (void *) 303,
-                            NEWT_FLAG_SELECTED,
-                            9, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           NEWT_FLAG_SELECTED,
+                           9, NEWT_ARG_APPEND, NEWT_ARG_LAST);
 
     newtCheckboxTreeAddItem(checktree, "Colors", (void *) 1, 0,
-                            0, NEWT_ARG_LAST);
+                           0, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Red", (void *) 100, 0,
-                            0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "White", (void *) 101, 0,
-                            0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Blue", (void *) 102, 0,
-                            0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
 
     newtCheckboxTreeAddItem(checktree, "number 4", (void *) 4, 0,
-                            3, NEWT_ARG_LAST);
+                           3, NEWT_ARG_LAST);
 
     newtCheckboxTreeAddItem(checktree, "Single digit", (void *) 200, 0,
-                            1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "One", (void *) 201, 0,
-                            1, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Two", (void *) 202, 0,
-                            1, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Three", (void *) 203, 0,
-                            1, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Four", (void *) 204, 0,
-                            1, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, 0, NEWT_ARG_APPEND, NEWT_ARG_LAST);
 
     newtCheckboxTreeAddItem(checktree, "Double digit", (void *) 300, 0,
-                            1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Ten", (void *) 210, 0,
-                            1, 1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, 1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Eleven", (void *) 211, 0,
-                            1, 1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, 1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Twelve", (void *) 212, 0,
-                            1, 1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, 1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
     newtCheckboxTreeAddItem(checktree, "Thirteen", (void *) 213, 0,
-                            1, 1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
+                           1, 1, NEWT_ARG_APPEND, NEWT_ARG_LAST);
 
     newtCheckboxTreeSetCurrent(checktree, (void *) 12);
 
@@ -94,9 +94,9 @@ int main(void) {
     
     grid = newtCreateGrid(1, 2);
     newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, checktree, 0, 0, 0, 1, 
-                     NEWT_ANCHOR_RIGHT, 0);
+                    NEWT_ANCHOR_RIGHT, 0);
     newtGridSetField(grid, 0, 1, NEWT_GRID_COMPONENT, button, 0, 0, 0, 0, 
-                     0, 0);
+                    0, 0);
 
     newtGridWrappedWindow(grid, "Checkbox Tree Test");
     newtGridFree(grid, 1);
@@ -111,26 +111,26 @@ int main(void) {
     result = newtCheckboxTreeGetSelection(checktree, &numselected);
     ptr = result;
     if (!result || !numselected)
-        printf("none selected\n");
+       printf("none selected\n");
     else
-        printf("Current selection (all) (%d):\n", numselected);
+       printf("Current selection (all) (%d):\n", numselected);
     for (i = 0; i < numselected; i++) {
-        j = (int) *ptr++;
-        printf("%d\n", j);
+       j = (int) *ptr++;
+       printf("%d\n", j);
     }
     result = newtCheckboxTreeGetMultiSelection(checktree, &numselected, 'b');
     ptr = result;
     if (!result || !numselected)
-        printf("none selected\n");
+       printf("none selected\n");
     else
-        printf("Current selection (b) (%d):\n",numselected);
+       printf("Current selection (b) (%d):\n",numselected);
     for (i = 0; i < numselected; i++) {
-        j = (int) *ptr++;
-        printf("%d\n", j);
+       j = (int) *ptr++;
+       printf("%d\n", j);
     }
-        
+       
     if (result)
-        free(result);
+       free(result);
 
     list = newtCheckboxTreeFindItem(checktree, (void *) 213);
     printf("path:");
index abb5c921e1bad7cb7a897aff2e733d0c4c93119f..68742cfef46c3720853f41ef76d467de2c44633c 100644 (file)
--- a/textbox.c
+++ b/textbox.c
@@ -24,9 +24,9 @@ static char * expandTabs(const char * text);
 static void textboxDraw(newtComponent co);
 static void addLine(newtComponent co, const char * s, int len);
 static void doReflow(const char * text, char ** resultPtr, int width, 
-                     int * badness, int * heightPtr);
+                    int * badness, int * heightPtr);
 static struct eventResult textboxEvent(newtComponent c,
-                                      struct event ev);
+                                     struct event ev);
 static void textboxDestroy(newtComponent co);
 static void textboxPlace(newtComponent co, int newLeft, int newTop);
 static void textboxMapped(newtComponent co, int isMapped);
@@ -44,7 +44,7 @@ static void textboxMapped(newtComponent co, int isMapped) {
 
     co->isMapped = isMapped;
     if (tb->sb)
-        tb->sb->ops->mapped(tb->sb, isMapped);
+       tb->sb->ops->mapped(tb->sb, isMapped);
 }
 
 static void textboxPlace(newtComponent co, int newLeft, int newTop) {
@@ -54,7 +54,7 @@ static void textboxPlace(newtComponent co, int newLeft, int newTop) {
     co->left = newLeft;
 
     if (tb->sb)
-        tb->sb->ops->place(tb->sb, co->left + co->width - 1, co->top);
+       tb->sb->ops->place(tb->sb, co->left + co->width - 1, co->top);
 }
 
 void newtTextboxSetHeight(newtComponent co, int height) {
@@ -68,13 +68,13 @@ int newtTextboxGetNumLines(newtComponent co) {
 }
 
 newtComponent newtTextboxReflowed(int left, int top, char * text, int width,
-                                  int flexDown, int flexUp, int flags) {
+                                 int flexDown, int flexUp, int flags) {
     newtComponent co;
     char * reflowedText;
     int actWidth, actHeight;
 
     reflowedText = newtReflowText(text, width, flexDown, flexUp,
-                                  &actWidth, &actHeight);
+                                 &actWidth, &actHeight);
     
     co = newtTextbox(left, top, actWidth, actHeight, NEWT_FLAG_WRAP);
     newtTextboxSetText(co, reflowedText);
@@ -110,11 +110,11 @@ newtComponent newtTextbox(int left, int top, int width, int height, int flags) {
     tb->blankline[width] = '\0';
 
     if (flags & NEWT_FLAG_SCROLL) {
-        co->width += 2;
-        tb->sb = newtVerticalScrollbar(co->left + co->width - 1, co->top, 
-                           co->height, COLORSET_TEXTBOX, COLORSET_TEXTBOX);
+       co->width += 2;
+       tb->sb = newtVerticalScrollbar(co->left + co->width - 1, co->top, 
+                          co->height, COLORSET_TEXTBOX, COLORSET_TEXTBOX);
     } else {
-        tb->sb = NULL;
+       tb->sb = NULL;
     }
 
     return co;
@@ -130,24 +130,24 @@ static char * expandTabs(const char * text) {
 
     buf = malloc(bufAlloced + 1);
     for (src = text, dest = buf; *src; src++) {
-        if ((bufUsed + 10) > bufAlloced) {
-            bufAlloced += strlen(text) / 2;
-            buf = realloc(buf, bufAlloced + 1);
-            dest = buf + bufUsed;
-        }
-        if (*src == '\t') {
-            i = 8 - (linePos & 8);
-            memset(dest, ' ', i);
-            dest += i, bufUsed += i, linePos += i;
-        } else {
-            if (*src == '\n')
-                linePos = 0;
-            else
-                linePos++;
-
-            *dest++ = *src;
-            bufUsed++;
-        }
+       if ((bufUsed + 10) > bufAlloced) {
+           bufAlloced += strlen(text) / 2;
+           buf = realloc(buf, bufAlloced + 1);
+           dest = buf + bufUsed;
+       }
+       if (*src == '\t') {
+           i = 8 - (linePos & 8);
+           memset(dest, ' ', i);
+           dest += i, bufUsed += i, linePos += i;
+       } else {
+           if (*src == '\n')
+               linePos = 0;
+           else
+               linePos++;
+
+           *dest++ = *src;
+           bufUsed++;
+       }
     }
 
     *dest = '\0';
@@ -155,7 +155,7 @@ static char * expandTabs(const char * text) {
 }
 
 static void doReflow(const char * text, char ** resultPtr, int width, 
-                     int * badness, int * heightPtr) {
+                    int * badness, int * heightPtr) {
     char * result = NULL;
     const char * chptr, * end;
     int i;
@@ -165,77 +165,77 @@ static void doReflow(const char * text, char ** resultPtr, int width,
     mbstate_t ps;
 
     if (resultPtr) {
-        /* XXX I think this will work */
-        result = malloc(strlen(text) + (strlen(text) / width) + 2);
-        *result = '\0';
+       /* XXX I think this will work */
+       result = malloc(strlen(text) + (strlen(text) / width) + 2);
+       *result = '\0';
     }
-        
+       
     memset(&ps,0,sizeof(mbstate_t));
     while (*text) {
-        end = strchr(text, '\n');
-        if (!end)
-            end = text + strlen(text);
-
-        while (*text && text <= end) {
-            int len;
-                
-            len = wstrlen(text, end - text);
-            if (len < width) {
-                if (result) {
-                    strncat(result, text, end - text);
-                    strcat(result, "\n");
-                    height++;
-                }
-
-                if (len < (width / 2)) {
-#ifdef DEBUG_WRAP                   
-                fprintf(stderr,"adding %d\n",((width / 2) - (len)) / 2);
-#endif                                  
-                    howbad += ((width / 2) - (len)) / 2;
-                }
-                text = end;
-                if (*text) text++;
-            } else {
-                const char *spcptr = NULL;
-                int spc =0,w2, x;
-
-                chptr = text;
-                w2 = 0;
-                for (i = 0; i < width - 1;) {
-                        if ((x=mbrtowc(&tmp,chptr,end-chptr,&ps))<=0)
-                                break;
-                        if (spc && !iswspace(tmp))
-                                spc = 0;
-                        else if (!spc && iswspace(tmp)) {
-                                spc = 1;
-                                spcptr = chptr;
-                                w2 = i;
-                        }
-                        chptr += x;
-                        x = wcwidth(tmp);
-                        if (x>0)
-                            i+=x;
-                }
-                howbad += width - w2 + 1;
-#ifdef DEBUG_WRAP                   
-                fprintf(stderr,"adding %d\n",width - w2 + 1, chptr);
-#endif                                  
-                if (spcptr) chptr = spcptr;
-                if (result) {
-                    strncat(result, text, chptr - text );
-                    strcat(result, "\n");
-                    height++;
-                }
-
-                text = chptr;
-                while (1) {
-                        if ((x=mbrtowc(&tmp,text,end-text,NULL))<=0)
-                                break;
-                        if (!iswspace(tmp)) break;
-                        text += x;
-                }
-            }
-        }
+       end = strchr(text, '\n');
+       if (!end)
+           end = text + strlen(text);
+
+       while (*text && text <= end) {
+           int len;
+               
+           len = wstrlen(text, end - text);
+           if (len < width) {
+               if (result) {
+                   strncat(result, text, end - text);
+                   strcat(result, "\n");
+                   height++;
+               }
+
+               if (len < (width / 2)) {
+#ifdef DEBUG_WRAP                  
+               fprintf(stderr,"adding %d\n",((width / 2) - (len)) / 2);
+#endif                                 
+                   howbad += ((width / 2) - (len)) / 2;
+               }
+               text = end;
+               if (*text) text++;
+           } else {
+               const char *spcptr = NULL;
+               int spc =0,w2, x;
+
+               chptr = text;
+               w2 = 0;
+               for (i = 0; i < width - 1;) {
+                       if ((x=mbrtowc(&tmp,chptr,end-chptr,&ps))<=0)
+                               break;
+                       if (spc && !iswspace(tmp))
+                               spc = 0;
+                       else if (!spc && iswspace(tmp)) {
+                               spc = 1;
+                               spcptr = chptr;
+                               w2 = i;
+                       }
+                       chptr += x;
+                       x = wcwidth(tmp);
+                       if (x>0)
+                           i+=x;
+               }
+               howbad += width - w2 + 1;
+#ifdef DEBUG_WRAP                  
+               fprintf(stderr,"adding %d\n",width - w2 + 1, chptr);
+#endif                                 
+               if (spcptr) chptr = spcptr;
+               if (result) {
+                   strncat(result, text, chptr - text );
+                   strcat(result, "\n");
+                   height++;
+               }
+
+               text = chptr;
+               while (1) {
+                       if ((x=mbrtowc(&tmp,text,end-text,NULL))<=0)
+                               break;
+                       if (!iswspace(tmp)) break;
+                       text += x;
+               }
+           }
+       }
     }
 
     if (badness) *badness = howbad;
@@ -247,7 +247,7 @@ static void doReflow(const char * text, char ** resultPtr, int width,
 }
 
 char * newtReflowText(char * text, int width, int flexDown, int flexUp,
-                      int * actualWidth, int * actualHeight) {
+                     int * actualWidth, int * actualHeight) {
     int min, max;
     int i;
     char * result;
@@ -257,22 +257,22 @@ char * newtReflowText(char * text, int width, int flexDown, int flexUp,
     expandedText = expandTabs(text);
 
     if (flexDown || flexUp) {
-        min = width - flexDown;
-        max = width + flexUp;
+       min = width - flexDown;
+       max = width + flexUp;
 
-        minbad = -1;
-        minbadwidth = width;
+       minbad = -1;
+       minbadwidth = width;
 
-        for (i = min; i <= max; i++) {
-            doReflow(expandedText, NULL, i, &howbad, NULL);
+       for (i = min; i <= max; i++) {
+           doReflow(expandedText, NULL, i, &howbad, NULL);
 
-            if (minbad == -1 || howbad < minbad) {
-                minbad = howbad;
-                minbadwidth = i;
-            }
-        }
+           if (minbad == -1 || howbad < minbad) {
+               minbad = howbad;
+               minbadwidth = i;
+           }
+       }
 
-        width = minbadwidth;
+       width = minbadwidth;
     }
 
     doReflow(expandedText, &result, width, NULL, actualHeight);
@@ -288,20 +288,20 @@ void newtTextboxSetText(newtComponent co, const char * text) {
     int badness, height;
 
     if (tb->lines) {
-        free(tb->lines);
-        tb->linesAlloced = tb->numLines = 0;
+       free(tb->lines);
+       tb->linesAlloced = tb->numLines = 0;
     }
 
     expanded = expandTabs(text);
 
     if (tb->doWrap) {
-        doReflow(expanded, &reflowed, tb->textWidth, &badness, &height);
-        free(expanded);
-        expanded = reflowed;
+       doReflow(expanded, &reflowed, tb->textWidth, &badness, &height);
+       free(expanded);
+       expanded = reflowed;
     }
 
     for (start = expanded; *start; start++)
-        if (*start == '\n') tb->linesAlloced++;
+       if (*start == '\n') tb->linesAlloced++;
 
     /* This ++ leaves room for an ending line w/o a \n */
     tb->linesAlloced++;
@@ -309,12 +309,12 @@ void newtTextboxSetText(newtComponent co, const char * text) {
 
     start = expanded;
     while ((end = strchr(start, '\n'))) {
-        addLine(co, start, end - start);
-        start = end + 1;
+       addLine(co, start, end - start);
+       start = end + 1;
     }
 
     if (*start)
-        addLine(co, start, strlen(start));
+       addLine(co, start, strlen(start));
 
     free(expanded);
     
@@ -326,7 +326,7 @@ static void addLine(newtComponent co, const char * s, int len) {
     struct textbox * tb = co->data;
 
     while (wstrlen(s,len) > tb->textWidth) {
-            len--;
+           len--;
     }
     tb->lines[tb->numLines] = malloc(len + 1);
     memcpy(tb->lines[tb->numLines], s, len);
@@ -339,77 +339,77 @@ static void textboxDraw(newtComponent c) {
     int size;
 
     if (tb->sb) {
-        size = tb->numLines - c->height;
-        newtScrollbarSet(tb->sb, tb->topLine, size ? size : 0);
-        tb->sb->ops->draw(tb->sb);
+       size = tb->numLines - c->height;
+       newtScrollbarSet(tb->sb, tb->topLine, size ? size : 0);
+       tb->sb->ops->draw(tb->sb);
     }
 
     SLsmg_set_color(NEWT_COLORSET_TEXTBOX);
 
     for (i = 0; (i + tb->topLine) < tb->numLines && i < c->height; i++) {
-        newtGotorc(c->top + i, c->left);
-        SLsmg_write_string(tb->blankline);
-        newtGotorc(c->top + i, c->left);
-        SLsmg_write_string(tb->lines[i + tb->topLine]);
+       newtGotorc(c->top + i, c->left);
+       SLsmg_write_string(tb->blankline);
+       newtGotorc(c->top + i, c->left);
+       SLsmg_write_string(tb->lines[i + tb->topLine]);
     }
 }
 
 static struct eventResult textboxEvent(newtComponent co, 
-                                      struct event ev) {
+                                     struct event ev) {
     struct textbox * tb = co->data;
     struct eventResult er;
 
     er.result = ER_IGNORED;
 
     if (ev.when == EV_EARLY && ev.event == EV_KEYPRESS && tb->sb) {
-        newtTrashScreen();
-        switch (ev.u.key) {
-          case NEWT_KEY_UP:
-            if (tb->topLine) tb->topLine--;
-            textboxDraw(co);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case NEWT_KEY_DOWN:
-            if (tb->topLine < (tb->numLines - co->height)) tb->topLine++;
-            textboxDraw(co);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case NEWT_KEY_PGDN:
-            tb->topLine += co->height;
-            if (tb->topLine > (tb->numLines - co->height)) {
-                tb->topLine = tb->numLines - co->height;
-                if (tb->topLine < 0) tb->topLine = 0;
-            }
-            textboxDraw(co);
-            er.result = ER_SWALLOWED;
-            break;
-
-          case NEWT_KEY_PGUP:
-            tb->topLine -= co->height;
-            if (tb->topLine < 0) tb->topLine = 0;
-            textboxDraw(co);
-            er.result = ER_SWALLOWED;
-            break;
-        }
+       newtTrashScreen();
+       switch (ev.u.key) {
+         case NEWT_KEY_UP:
+           if (tb->topLine) tb->topLine--;
+           textboxDraw(co);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case NEWT_KEY_DOWN:
+           if (tb->topLine < (tb->numLines - co->height)) tb->topLine++;
+           textboxDraw(co);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case NEWT_KEY_PGDN:
+           tb->topLine += co->height;
+           if (tb->topLine > (tb->numLines - co->height)) {
+               tb->topLine = tb->numLines - co->height;
+               if (tb->topLine < 0) tb->topLine = 0;
+           }
+           textboxDraw(co);
+           er.result = ER_SWALLOWED;
+           break;
+
+         case NEWT_KEY_PGUP:
+           tb->topLine -= co->height;
+           if (tb->topLine < 0) tb->topLine = 0;
+           textboxDraw(co);
+           er.result = ER_SWALLOWED;
+           break;
+       }
     }
     if (ev.when == EV_EARLY && ev.event == EV_MOUSE && tb->sb) {
-        /* Top scroll arrow */
-        if (ev.u.mouse.x == co->width && ev.u.mouse.y == co->top) {
-            if (tb->topLine) tb->topLine--;
-            textboxDraw(co);
-            
-            er.result = ER_SWALLOWED;
-        }
-        /* Bottom scroll arrow */
-        if (ev.u.mouse.x == co->width &&
-            ev.u.mouse.y == co->top + co->height - 1) {
-            if (tb->topLine < (tb->numLines - co->height)) tb->topLine++;
-            textboxDraw(co);
-            
-            er.result = ER_SWALLOWED;
-        }
+       /* Top scroll arrow */
+       if (ev.u.mouse.x == co->width && ev.u.mouse.y == co->top) {
+           if (tb->topLine) tb->topLine--;
+           textboxDraw(co);
+           
+           er.result = ER_SWALLOWED;
+       }
+       /* Bottom scroll arrow */
+       if (ev.u.mouse.x == co->width &&
+           ev.u.mouse.y == co->top + co->height - 1) {
+           if (tb->topLine < (tb->numLines - co->height)) tb->topLine++;
+           textboxDraw(co);
+           
+           er.result = ER_SWALLOWED;
+       }
     }
     return er;
 }
@@ -419,7 +419,7 @@ static void textboxDestroy(newtComponent co) {
     struct textbox * tb = co->data;
 
     for (i = 0; i < tb->numLines; i++) 
-        free(tb->lines[i]);
+       free(tb->lines[i]);
     free(tb->lines);
     free(tb->blankline);
     free(tb);
index be5fd41e43e835b68b95fea7cc6af405759f4812..6b9a4fb8f3c9ccd465d8a541bdd98279075b2df3 100644 (file)
 #include "newt.h"
 
 enum mode { MODE_NONE, MODE_INFOBOX, MODE_MSGBOX, MODE_YESNO, MODE_CHECKLIST,
-            MODE_INPUTBOX, MODE_RADIOLIST, MODE_MENU, MODE_GAUGE,
+           MODE_INPUTBOX, MODE_RADIOLIST, MODE_MENU, MODE_GAUGE,
             MODE_TEXTBOX };
 
-#define OPT_MSGBOX              1000
-#define OPT_CHECKLIST           1001
-#define OPT_YESNO               1002
-#define OPT_INPUTBOX            1003
-#define OPT_FULLBUTTONS         1004
-#define OPT_MENU                1005
-#define OPT_RADIOLIST           1006
-#define OPT_GAUGE               1007
-#define OPT_INFOBOX             1008
-#define OPT_TEXTBOX             1009
+#define OPT_MSGBOX             1000
+#define OPT_CHECKLIST          1001
+#define OPT_YESNO              1002
+#define OPT_INPUTBOX           1003
+#define OPT_FULLBUTTONS        1004
+#define OPT_MENU               1005
+#define OPT_RADIOLIST          1006
+#define OPT_GAUGE              1007
+#define OPT_INFOBOX            1008
+#define OPT_TEXTBOX            1009
 
 static void usage(void) {
     newtFinished(); 
@@ -82,89 +82,89 @@ int main(int argc, const char ** argv) {
     char * title = NULL;
     char * backtitle = NULL;
     struct poptOption optionsTable[] = {
-            { "backtitle", '\0', POPT_ARG_STRING, &backtitle, 0 },
-            { "checklist", '\0', 0, 0, OPT_CHECKLIST },
-            { "clear", '\0', 0, &clear, 0 },
-            { "defaultno", '\0', 0, &defaultNo, 0 },
-            { "inputbox", '\0', 0, 0, OPT_INPUTBOX },
-            { "fb", '\0', 0, 0, OPT_FULLBUTTONS },
-            { "fullbuttons", '\0', 0, 0, OPT_FULLBUTTONS },
-            { "gauge", '\0', 0, 0, OPT_GAUGE },
-            { "infobox", '\0', 0, 0, OPT_INFOBOX },
-            { "menu", '\0', 0, 0, OPT_MENU },
-            { "msgbox", '\0', 0, 0, OPT_MSGBOX },
-            { "nocancel", '\0', 0, &noCancel, 0 },
-            { "noitem", '\0', 0, &noItem, 0 },
-            { "notags", '\0', 0, &noTags, 0 },
-            { "radiolist", '\0', 0, 0, OPT_RADIOLIST },
-            { "scrolltext", '\0', 0, &scrollText, 0 },
-            { "separate-output", '\0', 0, &separateOutput, 0 },
-            { "title", '\0', POPT_ARG_STRING, &title, 0 },
-            { "yesno", '\0', 0, 0, OPT_YESNO },
-            { "textbox", '\0', 0, 0, OPT_TEXTBOX },
-            { 0, 0, 0, 0, 0 } 
+           { "backtitle", '\0', POPT_ARG_STRING, &backtitle, 0 },
+           { "checklist", '\0', 0, 0, OPT_CHECKLIST },
+           { "clear", '\0', 0, &clear, 0 },
+           { "defaultno", '\0', 0, &defaultNo, 0 },
+           { "inputbox", '\0', 0, 0, OPT_INPUTBOX },
+           { "fb", '\0', 0, 0, OPT_FULLBUTTONS },
+           { "fullbuttons", '\0', 0, 0, OPT_FULLBUTTONS },
+           { "gauge", '\0', 0, 0, OPT_GAUGE },
+           { "infobox", '\0', 0, 0, OPT_INFOBOX },
+           { "menu", '\0', 0, 0, OPT_MENU },
+           { "msgbox", '\0', 0, 0, OPT_MSGBOX },
+           { "nocancel", '\0', 0, &noCancel, 0 },
+           { "noitem", '\0', 0, &noItem, 0 },
+           { "notags", '\0', 0, &noTags, 0 },
+           { "radiolist", '\0', 0, 0, OPT_RADIOLIST },
+           { "scrolltext", '\0', 0, &scrollText, 0 },
+           { "separate-output", '\0', 0, &separateOutput, 0 },
+           { "title", '\0', POPT_ARG_STRING, &title, 0 },
+           { "yesno", '\0', 0, 0, OPT_YESNO },
+           { "textbox", '\0', 0, 0, OPT_TEXTBOX },
+           { 0, 0, 0, 0, 0 } 
     };
     
     optCon = poptGetContext("whiptail", argc, argv, optionsTable, 0);
 
     while ((arg = poptGetNextOpt(optCon)) > 0) {
-        optArg = poptGetOptArg(optCon);
-
-        switch (arg) {
-          case OPT_INFOBOX:
-            if (mode != MODE_NONE) usage();
-            mode = MODE_INFOBOX;
-            break;
-
-          case OPT_MENU:
-            if (mode != MODE_NONE) usage();
-            mode = MODE_MENU;
-            break;
-
-          case OPT_MSGBOX:
-            if (mode != MODE_NONE) usage();
-            mode = MODE_MSGBOX;
-            break;
+       optArg = poptGetOptArg(optCon);
+
+       switch (arg) {
+         case OPT_INFOBOX:
+           if (mode != MODE_NONE) usage();
+           mode = MODE_INFOBOX;
+           break;
+
+         case OPT_MENU:
+           if (mode != MODE_NONE) usage();
+           mode = MODE_MENU;
+           break;
+
+         case OPT_MSGBOX:
+           if (mode != MODE_NONE) usage();
+           mode = MODE_MSGBOX;
+           break;
           case OPT_TEXTBOX:
             if (mode != MODE_NONE) usage();
             mode = MODE_TEXTBOX;
             break;
-          case OPT_RADIOLIST:
-            if (mode != MODE_NONE) usage();
-            mode = MODE_RADIOLIST;
-            break;
-
-          case OPT_CHECKLIST:
-            if (mode != MODE_NONE) usage();
-            mode = MODE_CHECKLIST;
-            break;
-
-          case OPT_FULLBUTTONS:
-            useFullButtons(1);
-            break;
-
-          case OPT_YESNO:
-            if (mode != MODE_NONE) usage();
-            mode = MODE_YESNO;
-            break;
-
-          case OPT_GAUGE:
-            if (mode != MODE_NONE) usage();
-            mode = MODE_GAUGE;
-            break;
-
-          case OPT_INPUTBOX:
-            if (mode != MODE_NONE) usage();
-            mode = MODE_INPUTBOX;
-            break;
-        }
+         case OPT_RADIOLIST:
+           if (mode != MODE_NONE) usage();
+           mode = MODE_RADIOLIST;
+           break;
+
+         case OPT_CHECKLIST:
+           if (mode != MODE_NONE) usage();
+           mode = MODE_CHECKLIST;
+           break;
+
+         case OPT_FULLBUTTONS:
+           useFullButtons(1);
+           break;
+
+         case OPT_YESNO:
+           if (mode != MODE_NONE) usage();
+           mode = MODE_YESNO;
+           break;
+
+         case OPT_GAUGE:
+           if (mode != MODE_NONE) usage();
+           mode = MODE_GAUGE;
+           break;
+
+         case OPT_INPUTBOX:
+           if (mode != MODE_NONE) usage();
+           mode = MODE_INPUTBOX;
+           break;
+       }
     }
     
     if (arg < -1) {
-        fprintf(stderr, "%s: %s\n", 
-                poptBadOption(optCon, POPT_BADOPTION_NOALIAS), 
-                poptStrerror(arg));
-        exit(1);
+       fprintf(stderr, "%s: %s\n", 
+               poptBadOption(optCon, POPT_BADOPTION_NOALIAS), 
+               poptStrerror(arg));
+       exit(1);
     }
 
     output = fdopen (outputfd, "w");
@@ -188,9 +188,9 @@ int main(int argc, const char ** argv) {
     if (*end) usage();
 
     if (mode == MODE_GAUGE) {
-        fd = dup(0);
-        close(0);
-        if (open("/dev/tty", O_RDWR) != 0) perror("open /dev/tty");
+       fd = dup(0);
+       close(0);
+       if (open("/dev/tty", O_RDWR) != 0) perror("open /dev/tty");
     }
 
     newtInit();
@@ -200,7 +200,7 @@ int main(int argc, const char ** argv) {
     newtOpenWindow((80 - width) / 2, (24 - height) / 2, width, height, title);
 
     if (backtitle)
-        newtDrawRootText(0, 0, backtitle);
+       newtDrawRootText(0, 0, backtitle);
 
     if (noCancel) flags |= FLAG_NOCANCEL;
     if (noItem) flags |= FLAG_NOITEM;
@@ -211,65 +211,65 @@ int main(int argc, const char ** argv) {
     switch (mode) {
       case MODE_MSGBOX:
       case MODE_TEXTBOX:
-        rc = messageBox(text, height, width, MSGBOX_MSG, flags);
-        break;
+       rc = messageBox(text, height, width, MSGBOX_MSG, flags);
+       break;
 
       case MODE_INFOBOX:
-        rc = messageBox(text, height, width, MSGBOX_INFO, flags);
-        break;
+       rc = messageBox(text, height, width, MSGBOX_INFO, flags);
+       break;
 
       case MODE_YESNO:
-        rc = messageBox(text, height, width, MSGBOX_YESNO, flags);
-        break;
+       rc = messageBox(text, height, width, MSGBOX_YESNO, flags);
+       break;
 
       case MODE_INPUTBOX:
-        rc = inputBox(text, height, width, optCon, flags, &result);
+       rc = inputBox(text, height, width, optCon, flags, &result);
         if (rc == DLG_OKAY) fprintf(output, "%s", result);
-        break;
+       break;
 
       case MODE_MENU:
-        rc = listBox(text, height, width, optCon, flags, &result);
-        if (rc == DLG_OKAY) fprintf(output, "%s", result);
-        break;
+       rc = listBox(text, height, width, optCon, flags, &result);
+       if (rc == DLG_OKAY) fprintf(output, "%s", result);
+       break;
 
       case MODE_RADIOLIST:
-        rc = checkList(text, height, width, optCon, 1, flags, &selections);
+       rc = checkList(text, height, width, optCon, 1, flags, &selections);
         if (rc == DLG_OKAY) {
             fprintf(output, "%s", selections[0]);
-            free(selections);
-        }
-        break;
+           free(selections);
+       }
+       break;
 
       case MODE_CHECKLIST:
-        rc = checkList(text, height, width, optCon, 0, flags, &selections);
-
-        if (!rc) {
-            for (next = selections; *next; next++) {
-                if (!separateOutput) {
-                    if (needSpace) putc(' ', output);
-                    fprintf(output, "\"%s\"", *next);
-                    needSpace = 1;
-                } else {
-                    fprintf(output, "%s\n", *next);
-                }
-            }
-
-            free(selections);
-        }
-        break;
+       rc = checkList(text, height, width, optCon, 0, flags, &selections);
+
+       if (!rc) {
+           for (next = selections; *next; next++) {
+               if (!separateOutput) {
+                   if (needSpace) putc(' ', output);
+                   fprintf(output, "\"%s\"", *next);
+                   needSpace = 1;
+               } else {
+                   fprintf(output, "%s\n", *next);
+               }
+           }
+
+           free(selections);
+       }
+       break;
 
       case MODE_GAUGE:
-        rc = gauge(text, height, width, optCon, fd, flags);
-        break;
+       rc = gauge(text, height, width, optCon, fd, flags);
+       break;
 
       default:
-        usage();
+       usage();
     }
 
     if (rc == -1) usage();
 
     if (clear)
-        newtPopWindow();
+       newtPopWindow();
     newtFinished();
 
     return rc;
index a5fd027dec4793e134cca701c09f9cc8cc5416e0..6e496f84c785803dadff8570c2834de3cef13b3d 100644 (file)
--- a/whiptcl.c
+++ b/whiptcl.c
@@ -7,21 +7,21 @@
 #include "tcl.h"
 
 enum mode { MODE_NONE, MODE_MSGBOX, MODE_YESNO, MODE_CHECKLIST, MODE_INPUTBOX,
-            MODE_RADIOLIST, MODE_MENU };
+           MODE_RADIOLIST, MODE_MENU };
 
-#define OPT_MSGBOX              1000
-#define OPT_CHECKLIST           1001
-#define OPT_YESNO               1002
-#define OPT_INPUTBOX            1003
-#define OPT_MENU                1005
-#define OPT_RADIOLIST           1006
+#define OPT_MSGBOX             1000
+#define OPT_CHECKLIST          1001
+#define OPT_YESNO              1002
+#define OPT_INPUTBOX           1003
+#define OPT_MENU               1005
+#define OPT_RADIOLIST          1006
 
 static char * setBacktext(ClientData data, Tcl_Interp * interp, 
-                          char * name1, char * name2, int flags);
+                         char * name1, char * name2, int flags);
 static char * setHelptext(ClientData data, Tcl_Interp * interp,
-                          char * name1, char * name2, int flags);
+                         char * name1, char * name2, int flags);
 static char * setFullButtons(ClientData data, Tcl_Interp * interp, 
-                             char * name1, char * name2, int flags);
+                            char * name1, char * name2, int flags);
 
 static int wtFinish(ClientData clientData, Tcl_Interp * interp, int argc,
                   char ** argv) {
@@ -38,13 +38,13 @@ static int wtInit(ClientData clientData, Tcl_Interp * interp, int argc,
     newtPushHelpLine("");
 
     Tcl_TraceVar(interp, "whiptcl_backtext", 
-                 TCL_TRACE_WRITES | TCL_GLOBAL_ONLY, setBacktext, NULL);
+                TCL_TRACE_WRITES | TCL_GLOBAL_ONLY, setBacktext, NULL);
     Tcl_TraceVar(interp, "whiptcl_helpline", 
-                 TCL_TRACE_WRITES | TCL_TRACE_UNSETS | TCL_GLOBAL_ONLY, 
-                 setHelptext, NULL);
+                TCL_TRACE_WRITES | TCL_TRACE_UNSETS | TCL_GLOBAL_ONLY, 
+                setHelptext, NULL);
     Tcl_TraceVar(interp, "whiptcl_fullbuttons", 
-                 TCL_TRACE_WRITES | TCL_TRACE_UNSETS | TCL_GLOBAL_ONLY, 
-                 setFullButtons, NULL);
+                TCL_TRACE_WRITES | TCL_TRACE_UNSETS | TCL_GLOBAL_ONLY, 
+                setFullButtons, NULL);
 
     Tcl_SetVar(interp, "whiptcl_helpline", "", TCL_GLOBAL_ONLY);
     Tcl_SetVar(interp, "whiptcl_fullbuttons", "1", TCL_GLOBAL_ONLY);
@@ -73,100 +73,100 @@ static int wtCmd(ClientData clientData, Tcl_Interp * interp, int argc,
     const char ** selections, ** next;
     char * title = NULL;
     struct poptOption optionsTable[] = {
-            { "checklist", '\0', 0, 0, OPT_CHECKLIST },
-            { "defaultno", '\0', 0, &defaultNo, 0 },
-            { "inputbox", '\0', 0, 0, OPT_INPUTBOX },
-            { "menu", '\0', 0, 0, OPT_MENU },
-            { "msgbox", '\0', 0, 0, OPT_MSGBOX },
-            { "nocancel", '\0', 0, &noCancel, 0 },
-            { "noitem", '\0', 0, &noItem, 0 },
-            { "radiolist", '\0', 0, 0, OPT_RADIOLIST },
-            { "scrolltext", '\0', 0, &scrollText, 0 },
-            { "title", '\0', POPT_ARG_STRING, &title, 0 },
-            { "yesno", '\0', 0, 0, OPT_YESNO },
-            { 0, 0, 0, 0, 0 } 
+           { "checklist", '\0', 0, 0, OPT_CHECKLIST },
+           { "defaultno", '\0', 0, &defaultNo, 0 },
+           { "inputbox", '\0', 0, 0, OPT_INPUTBOX },
+           { "menu", '\0', 0, 0, OPT_MENU },
+           { "msgbox", '\0', 0, 0, OPT_MSGBOX },
+           { "nocancel", '\0', 0, &noCancel, 0 },
+           { "noitem", '\0', 0, &noItem, 0 },
+           { "radiolist", '\0', 0, 0, OPT_RADIOLIST },
+           { "scrolltext", '\0', 0, &scrollText, 0 },
+           { "title", '\0', POPT_ARG_STRING, &title, 0 },
+           { "yesno", '\0', 0, 0, OPT_YESNO },
+           { 0, 0, 0, 0, 0 } 
     };
     
     optCon = poptGetContext("whiptcl", argc, argv, optionsTable, 0);
 
     while ((arg = poptGetNextOpt(optCon)) > 0) {
-        optArg = poptGetOptArg(optCon);
-
-        switch (arg) {
-          case OPT_MENU:
-            if (mode != MODE_NONE) rc = -1;
-            mode = MODE_MENU;
-            break;
-
-          case OPT_MSGBOX:
-            if (mode != MODE_NONE) rc = -1;
-            mode = MODE_MSGBOX;
-            break;
-
-          case OPT_RADIOLIST:
-            if (mode != MODE_NONE) rc = -1;
-            mode = MODE_RADIOLIST;
-            break;
-
-          case OPT_CHECKLIST:
-            if (mode != MODE_NONE) rc = -1;
-            mode = MODE_CHECKLIST;
-            break;
-
-          case OPT_YESNO:
-            if (mode != MODE_NONE) rc = -1;
-            mode = MODE_YESNO;
-            break;
-
-          case OPT_INPUTBOX:
-            if (mode != MODE_NONE) rc = -1;
-            mode = MODE_INPUTBOX;
-            break;
-        }
+       optArg = poptGetOptArg(optCon);
+
+       switch (arg) {
+         case OPT_MENU:
+           if (mode != MODE_NONE) rc = -1;
+           mode = MODE_MENU;
+           break;
+
+         case OPT_MSGBOX:
+           if (mode != MODE_NONE) rc = -1;
+           mode = MODE_MSGBOX;
+           break;
+
+         case OPT_RADIOLIST:
+           if (mode != MODE_NONE) rc = -1;
+           mode = MODE_RADIOLIST;
+           break;
+
+         case OPT_CHECKLIST:
+           if (mode != MODE_NONE) rc = -1;
+           mode = MODE_CHECKLIST;
+           break;
+
+         case OPT_YESNO:
+           if (mode != MODE_NONE) rc = -1;
+           mode = MODE_YESNO;
+           break;
+
+         case OPT_INPUTBOX:
+           if (mode != MODE_NONE) rc = -1;
+           mode = MODE_INPUTBOX;
+           break;
+       }
     }
     
     if (arg < -1) {
-        /* this could buffer oveflow, bug we're not setuid so I don't care */
-        interp->result = malloc(200);
-        interp->freeProc = TCL_DYNAMIC;
-        sprintf(interp->result, "%s: %s\n", 
-                poptBadOption(optCon, POPT_BADOPTION_NOALIAS), 
-                poptStrerror(arg));
-
-        return TCL_ERROR;
+       /* this could buffer oveflow, bug we're not setuid so I don't care */
+       interp->result = malloc(200);
+       interp->freeProc = TCL_DYNAMIC;
+       sprintf(interp->result, "%s: %s\n", 
+               poptBadOption(optCon, POPT_BADOPTION_NOALIAS), 
+               poptStrerror(arg));
+
+       return TCL_ERROR;
     }
 
     if (mode == MODE_NONE) {
-        interp->result = "no dialog mode was specified";
-        return TCL_ERROR;
+       interp->result = "no dialog mode was specified";
+       return TCL_ERROR;
     } else if (rc) {
-        interp->result = "multiple modes were specified";
-        return TCL_ERROR;
+       interp->result = "multiple modes were specified";
+       return TCL_ERROR;
     }
 
     if (!(text = poptGetArg(optCon))) {
-        interp->result = "missing text parameter";
-        return TCL_ERROR;
+       interp->result = "missing text parameter";
+       return TCL_ERROR;
     }
 
     if (!(nextArg = poptGetArg(optCon))) {
-        interp->result = "height missing";
-        return TCL_ERROR;
+       interp->result = "height missing";
+       return TCL_ERROR;
     }
     height = strtoul(nextArg, &end, 10);
     if (*end) {
-        interp->result = "height is not a number";
-        return TCL_ERROR;
+       interp->result = "height is not a number";
+       return TCL_ERROR;
     }
 
     if (!(nextArg = poptGetArg(optCon))) {
-        interp->result = "width missing";
-        return TCL_ERROR;
+       interp->result = "width missing";
+       return TCL_ERROR;
     }
     width = strtoul(nextArg, &end, 10);
     if (*end) {
-        interp->result = "width is not a number";
-        return TCL_ERROR;
+       interp->result = "width is not a number";
+       return TCL_ERROR;
     }
 
     width -= 2;
@@ -180,91 +180,91 @@ static int wtCmd(ClientData clientData, Tcl_Interp * interp, int argc,
 
     switch (mode) {
       case MODE_MSGBOX:
-        rc = messageBox(text, height, width, MSGBOX_MSG, flags);
-        break;
+       rc = messageBox(text, height, width, MSGBOX_MSG, flags);
+       break;
 
       case MODE_YESNO:
-        rc = messageBox(text, height, width, MSGBOX_YESNO, flags);
-        if (rc == DLG_OKAY)
-            interp->result = "yes";
-        else 
-            interp->result = "no";
-        if (rc == DLG_ERROR) rc = 0;
-        break;
+       rc = messageBox(text, height, width, MSGBOX_YESNO, flags);
+       if (rc == DLG_OKAY)
+           interp->result = "yes";
+       else 
+           interp->result = "no";
+       if (rc == DLG_ERROR) rc = 0;
+       break;
 
       case MODE_INPUTBOX:
-        rc = inputBox(text, height, width, optCon, flags, &result);
-        if (!rc) {
-            interp->result = strdup(result);
-            interp->freeProc = TCL_DYNAMIC;
-        }
-        break;
+       rc = inputBox(text, height, width, optCon, flags, &result);
+       if (!rc) {
+           interp->result = strdup(result);
+           interp->freeProc = TCL_DYNAMIC;
+       }
+       break;
 
       case MODE_MENU:
-        rc = listBox(text, height, width, optCon, flags, &result);
-        if (!rc) {
-            interp->result = strdup(result);
-            interp->freeProc = TCL_DYNAMIC;
-        }
-        break;
+       rc = listBox(text, height, width, optCon, flags, &result);
+       if (!rc) {
+           interp->result = strdup(result);
+           interp->freeProc = TCL_DYNAMIC;
+       }
+       break;
 
       case MODE_RADIOLIST:
-        rc = checkList(text, height, width, optCon, 1, flags, &selections);
-        if (!rc) {
-            interp->result = strdup(selections[0]);
-            interp->freeProc = TCL_DYNAMIC;
-        }
-        break;
+       rc = checkList(text, height, width, optCon, 1, flags, &selections);
+       if (!rc) {
+           interp->result = strdup(selections[0]);
+           interp->freeProc = TCL_DYNAMIC;
+       }
+       break;
 
       case MODE_CHECKLIST:
-        rc = checkList(text, height, width, optCon, 0, flags, &selections);
+       rc = checkList(text, height, width, optCon, 0, flags, &selections);
 
-        if (!rc) {
-            for (next = selections; *next; next++) 
-                Tcl_AppendElement(interp, *next);
+       if (!rc) {
+           for (next = selections; *next; next++) 
+               Tcl_AppendElement(interp, *next);
 
-            free(selections);
-        }
-        break;
+           free(selections);
+       }
+       break;
 
       case MODE_NONE:
-        /* this can't happen */
+       /* this can't happen */
         break;
     }
 
     newtPopWindow();
 
     if (rc == DLG_ERROR) {
-        interp->result = "bad paramter for whiptcl dialog box";
-        return TCL_ERROR;
+       interp->result = "bad paramter for whiptcl dialog box";
+       return TCL_ERROR;
     } 
 
     Tcl_SetVar(interp, "whiptcl_canceled", (rc == DLG_CANCEL) ? "1" : "0",
-                0);
+               0);
 
     return TCL_OK;
 }
 
 static char * setBacktext(ClientData data, Tcl_Interp * interp, 
-                          char * name1, char * name2, int flags) {
+                         char * name1, char * name2, int flags) {
     static char blankLine[81] = "                                        "
                          "                                        ";
 
     newtDrawRootText(0, 0, blankLine);
     newtDrawRootText(0, 0, Tcl_GetVar(interp, "whiptcl_backtext",
-                                      TCL_GLOBAL_ONLY));
+                                     TCL_GLOBAL_ONLY));
 
     return NULL;
 }
 
 static char * setHelptext(ClientData data, Tcl_Interp * interp, 
-                          char * name1, char * name2, int flags) {
+                         char * name1, char * name2, int flags) {
     char * text = Tcl_GetVar(interp, "whiptcl_helpline", TCL_GLOBAL_ONLY);
 
     if (!text)
-        text = "";
+       text = "";
     else if (!strlen(text))
-        text = NULL;
+       text = NULL;
 
     newtPopHelpLine();
     newtPushHelpLine(text);
@@ -273,14 +273,14 @@ static char * setHelptext(ClientData data, Tcl_Interp * interp,
 }
 
 static char * setFullButtons(ClientData data, Tcl_Interp * interp, 
-                             char * name1, char * name2, int flags) {
+                            char * name1, char * name2, int flags) {
     char * val = Tcl_GetVar(interp, "whiptcl_fullbuttons", TCL_GLOBAL_ONLY);
     int rc;
     int state;
     
     if ((rc = Tcl_ExprBoolean(interp, val, &state))) {
-        Tcl_FreeResult(interp);
-        return "whiptcl_fullbuttons may only contain a boolean value";
+       Tcl_FreeResult(interp);
+       return "whiptcl_fullbuttons may only contain a boolean value";
     }
 
     useFullButtons(state);
index 806f17b476f7d66cc5aa8437e901aac211933f48..9f9b8b349ab256c37f8cb9015476c6950f87f2fe 100644 (file)
--- a/windows.c
+++ b/windows.c
@@ -8,7 +8,7 @@
 #include "newt.h"
 
 static void * newtvwindow(char * title, char * button1, char * button2, 
-                       char * button3, char * message, va_list args) {
+                      char * button3, char * message, va_list args) {
     newtComponent b1, b2 = NULL, b3 = NULL, t, f, answer;
     char * buf = NULL;
     int size = 0;
@@ -19,52 +19,52 @@ static void * newtvwindow(char * title, char * button1, char * button2,
     newtGrid grid, buttonGrid;
 
     do {
-        size += 1000;
-        if (buf) free(buf);
-        buf = malloc(size);
-        i = vsnprintf(buf, size, message, args);
+       size += 1000;
+       if (buf) free(buf);
+       buf = malloc(size);
+       i = vsnprintf(buf, size, message, args);
     } while (i >= size || i == -1);
 
     flowedText = newtReflowText(buf, 35, 5, 5, &width, &height);
     if (height > 6) {
-        free(flowedText);
-        flowedText = newtReflowText(buf, 60, 5, 5, &width, &height);
+       free(flowedText);
+       flowedText = newtReflowText(buf, 60, 5, 5, &width, &height);
     }
     free(buf);
 
     if (height > 12) {
-        height = 12;
-        scroll = NEWT_FLAG_SCROLL;
+       height = 12;
+       scroll = NEWT_FLAG_SCROLL;
     }
     t = newtTextbox(-1, -1, width, height, NEWT_TEXTBOX_WRAP | scroll);
     newtTextboxSetText(t, flowedText);
     free(flowedText);
 
     if (button3) {
-        buttonGrid = newtButtonBar(button1, &b1, button2, &b2, 
-                                   button3, &b3, NULL);
+       buttonGrid = newtButtonBar(button1, &b1, button2, &b2, 
+                                  button3, &b3, NULL);
     } else if (button2) {
-        buttonGrid = newtButtonBar(button1, &b1, button2, &b2, NULL);
+       buttonGrid = newtButtonBar(button1, &b1, button2, &b2, NULL);
     } else {
-        buttonGrid = newtButtonBar(button1, &b1, NULL);
+       buttonGrid = newtButtonBar(button1, &b1, NULL);
     }
 
     newtGridSetField(buttonGrid, 0, 0, NEWT_GRID_COMPONENT, b1, 
-                     0, 0, button2 ? 1 : 0, 0, 0, 0);
+                    0, 0, button2 ? 1 : 0, 0, 0, 0);
 
     grid = newtCreateGrid(1, 2);
     newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, t, 0, 0, 0, 0, 0, 0);
     newtGridSetField(grid, 0, 1, NEWT_GRID_SUBGRID, buttonGrid, 
-                     0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);
+                    0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);
     newtGridWrappedWindow(grid, title);
 
     f = newtForm(NULL, NULL, 0);
     newtFormAddComponents(f, t, b1, NULL);
 
     if (button2)
-        newtFormAddComponent(f, b2);
+       newtFormAddComponent(f, b2);
     if (button3)
-        newtFormAddComponent(f, b3);
+       newtFormAddComponent(f, b3);
 
     answer = newtRunForm(f);
     newtGridFree(grid, 1);
@@ -73,17 +73,17 @@ static void * newtvwindow(char * title, char * button1, char * button2,
     newtPopWindow();
 
     if (answer == f)
-        return NULL;
+       return NULL;
     else if (answer == b1)
-        return button1;
+       return button1;
     else if (answer == b2)
-        return button2;
+       return button2;
 
     return button3;
 }
 
 int newtWinChoice(char * title, char * button1, char * button2, 
-                   char * message, ...) {
+                  char * message, ...) {
     va_list args;
     void * rc;
 
@@ -92,9 +92,9 @@ int newtWinChoice(char * title, char * button1, char * button2,
     va_end(args);
 
     if (rc == button1)
-        return 1;
+       return 1;
     else if (rc == button2)
-        return 2;
+       return 2;
 
     return 0;
 }
@@ -108,12 +108,12 @@ void newtWinMessage(char * title, char * buttonText, char * text, ...) {
 }
 
 void newtWinMessagev(char * title, char * buttonText, char * text, 
-                     va_list argv) {
+                    va_list argv) {
     newtvwindow(title, buttonText, NULL, NULL, text, argv);
 }
 
 int newtWinTernary(char * title, char * button1, char * button2, 
-                   char * button3, char * message, ...) {
+                  char * button3, char * message, ...) {
     va_list args;
     void * rc;
 
@@ -122,18 +122,18 @@ int newtWinTernary(char * title, char * button1, char * button2,
     va_end(args);
 
     if (rc == button1)
-        return 1;
+       return 1;
     else if (rc == button2)
-        return 2;
+       return 2;
     else if (rc == button3)
-        return 3;
+       return 3;
 
     return 0;
 }
 
 int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown, 
-                int flexUp, int maxListHeight, char ** items, int * listItem,
-                char * button1, ...) {
+               int flexUp, int maxListHeight, char ** items, int * listItem,
+               char * button1, ...) {
     newtComponent textbox, listbox, result, form;
     va_list args;
     newtComponent *buttons = NULL;
@@ -144,16 +144,16 @@ int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown,
     char * buttonName;
 
     textbox = newtTextboxReflowed(-1, -1, text, suggestedWidth, flexDown,
-                                  flexUp, 0);
+                                 flexUp, 0);
 
     for (i = 0; items[i]; i++) ;
     if (i < maxListHeight) maxListHeight = i;
     needScroll = i > maxListHeight;
 
     listbox = newtListbox(-1, -1, maxListHeight, 
-                  (needScroll ? NEWT_FLAG_SCROLL : 0) | NEWT_FLAG_RETURNEXIT);
+                 (needScroll ? NEWT_FLAG_SCROLL : 0) | NEWT_FLAG_RETURNEXIT);
     for (i = 0; items[i]; i++) {
-        newtListboxAddEntry(listbox, items[i], (void *) i);
+       newtListboxAddEntry(listbox, items[i], (void *) i);
     }
 
     newtListboxSetCurrent(listbox, *listItem);
@@ -171,9 +171,9 @@ int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown,
 
     buttonBar = newtCreateGrid(numButtons, 1);
     for (i = 0; i < numButtons; i++) {
-        newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT, 
-                         buttons[i],
-                         i ? 1 : 0, 0, 0, 0, 0, 0);
+       newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT, 
+                        buttons[i],
+                        i ? 1 : 0, 0, 0, 0, 0, 0);
     }
 
     grid = newtGridSimpleWindow(textbox, listbox, buttonBar);
@@ -189,9 +189,9 @@ int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown,
 
     for (rc = 0; result != buttons[rc] && rc < numButtons; rc++);
     if (rc == numButtons) 
-        rc = 0; /* F12 or return-on-exit (which are the same for us) */
+       rc = 0; /* F12 or return-on-exit (which are the same for us) */
     else 
-        rc++;
+       rc++;
 
     newtFormDestroy(form);
     newtPopWindow();
@@ -200,8 +200,8 @@ int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown,
 }
 
 int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown, 
-                   int flexUp, int dataWidth, 
-                   struct newtWinEntry * items, char * button1, ...) {
+                  int flexUp, int dataWidth, 
+                  struct newtWinEntry * items, char * button1, ...) {
     newtComponent *buttons, result, form, textw;
     newtGrid grid, buttonBar, subgrid;
     int numItems;
@@ -211,7 +211,7 @@ int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown,
     va_list args;
 
     textw = newtTextboxReflowed(-1, -1, text, suggestedWidth, flexDown,
-                                flexUp, 0);
+                               flexUp, 0);
 
     for (numItems = 0; items[numItems].text; numItems++); 
 
@@ -229,31 +229,31 @@ int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown,
 
     buttonBar = newtCreateGrid(numButtons, 1);
     for (i = 0; i < numButtons; i++) {
-        newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT, 
-                         buttons[i],
-                         i ? 1 : 0, 0, 0, 0, 0, 0);
+       newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT, 
+                        buttons[i],
+                        i ? 1 : 0, 0, 0, 0, 0, 0);
     }
 
     subgrid = newtCreateGrid(2, numItems);
     for (i = 0; i < numItems; i++) {
-        newtGridSetField(subgrid, 0, i, NEWT_GRID_COMPONENT,
-                         newtLabel(-1, -1, items[i].text),
-                         0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);
-        newtGridSetField(subgrid, 1, i, NEWT_GRID_COMPONENT,
-                         newtEntry(-1, -1, items[i].value ? 
-                                    *items[i].value : NULL, dataWidth,
-                                    items[i].value, items[i].flags),
-                         1, 0, 0, 0, 0, 0);
+       newtGridSetField(subgrid, 0, i, NEWT_GRID_COMPONENT,
+                        newtLabel(-1, -1, items[i].text),
+                        0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);
+       newtGridSetField(subgrid, 1, i, NEWT_GRID_COMPONENT,
+                        newtEntry(-1, -1, items[i].value ? 
+                                   *items[i].value : NULL, dataWidth,
+                                   items[i].value, items[i].flags),
+                        1, 0, 0, 0, 0, 0);
     }
 
     grid = newtCreateGrid(1, 3);
     form = newtForm(NULL, 0, 0);
     newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, textw, 
-                     0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);
+                    0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);
     newtGridSetField(grid, 0, 1, NEWT_GRID_SUBGRID, subgrid, 
-                     0, 1, 0, 0, 0, 0);
+                    0, 1, 0, 0, 0, 0);
     newtGridSetField(grid, 0, 2, NEWT_GRID_SUBGRID, buttonBar, 
-                     0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);
+                    0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);
     newtGridAddComponentsToForm(grid, form, 1);
     newtGridWrappedWindow(grid, title);
     newtGridFree(grid, 1);
@@ -261,13 +261,13 @@ int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown,
     result = newtRunForm(form);
 
     for (rc = 0; rc < numItems; rc++)
-        *items[rc].value = strdup(*items[rc].value);
+       *items[rc].value = strdup(*items[rc].value);
 
     for (rc = 0; result != buttons[rc] && rc < numButtons; rc++);
     if (rc == numButtons) 
-        rc = 0; /* F12 */
+       rc = 0; /* F12 */
     else 
-        rc++;
+       rc++;
 
     newtFormDestroy(form);
     newtPopWindow();