% ndialog -- a free dialog replacement % David Parsons % Wed Jan 16 08:31:27 PST 2008 #Ndialog **Ndialog** is a outgrowth of some of the work I had been doing on building installers for Linux, based on the installation program that comes with [FreeBSD](http://www.freebsd.org). This installation program used a greatly hacked-up version of the GPL'ed dialog library, with some extra glue on it to support multiple items on a form. I tweaked it into shape, converting the extra glue into a generalized `MENU()` function, and used it for a while in my own installers, and later in McAfee's WebShield installer. But, eventually I decided to write my own version; first, because libdialog was GPLed, and I preferred to have a free dialog library, and secondly because libdialog was a nonmodular pile of hackery, made much worse by the tweaks I put into it to make it work with my installer. **Ndialog** is only superficially like libdialog. It has glue functions that provide some libdialog functionality, but it is based on a wad of objects that can be glued together and passed to a new (_and totally incompatable_) `MENU()` function. It also supports online help, by both the existing dialog helpline (`use_helpline()`, `get_helpline()`), and by an imbedded mini-html browser that reads helpfiles. Also, if you're running `gpm`, it supports pointing and clicking with an attached mouse. ##Description **Ndialog** takes over the screen and breaks it into two windows; a **helpline** window, which is the botton line on the screen, for short reminders about what commands you can do (``_F1 for help_'', for example) and the rest of the screen for windows. Like libdialog, it's kind of stupid about window sizing, but if you ask for an item that takes up too much real estate, the dialog functions will return an error code instead of exiting the program. **Ndialog** should work with every version of curses out there; it works with ncurses (tested against ncurses 1.9.9, 4.0, and 4.1) and BSD curses (the ancient creaking version found in Linux libc 4). It looks and acts slightly differently on curses and ncurses; curses windows look like ->![ndialog with BSD curses](ndcurses.png =821x530)<- while ncurses windows look like ->![ndialog with ncurses](ndialog.png =821x530)<- In addition, ndialog doesn't use `libpanel` if it's built against curses, so windows sort of haphazardly pile on top of another. One thing that does behave the same with curses and ncurses are arrow keys -- ndialog provides its own `keypad()` support when built against versions of curses that don't support that function. ##Documentation 1. [[Core functions](core.html)](id:INDEX) 2. [Dialog-compatable functions](dialog.html) 3. [New dialog functions](ndialog.html) 4. [Using ndialog in your applications](ndialog.html#EXAMPLES) ##Source Code =[1.0.4](ndialog-1.0.4.tar.gz)= And fast on the heels of 1.0.3 comes 1.0.4, where I worked over `configure.sh` to clean up shared vs. non-shared library generation, the source to make it less whiny on newer versions of gcc/clang, and the makefile setup. This version properly generates shared and static libraries on macosx 10.12 (beta), FreeBSD 4.1, and at least one modern version of Debian Linux. =[1.0.3](ndialog-1.0.3.tar.gz)= A few configuration tweaks to try and drag it into the bold new world of being usable by people other than me. I've updated the license to a 3-clause BSD license and have started tweaking the configuration environment so I will eventually be able to reliably generate a shared libndialog. =[1.0.1](ndialog-1.0.1.tar.gz)= After quite a few years, I dragged ndialog out to do some debugging and discovered a few places where it was rather bugged. I don't know if I've discovered the reported bug, but I found and fixed a few other bugs that were causing hilarious coredumps, so it's time for a new release. =[1.0](ndialog-1.0.tar.gz)= Ndialog hasn't changed in a while, so there's just one [tarball with current sources](ndialog-1.0.tar.gz)