Copyright © 1999-2012,2013 by Thomas E. Dickey
CDK was originally written by Mike Glover. I have extended and improved it.
Though similar in style to dialog, it is different, being a library of curses widgets which can be linked into your application. Widgets are objects whose appearance and behavior can be customized.
Mike Glover started CDK sometime in the
mid-1990s. The earliest version that I have encountered is
(sources dated January 20, 1996). It has no change-history or
identifiers predating December 1995. Mike Glover announced
CDK 4.6.0 as part of
comp.sources.unix, volume 29, issue 80, on January
12, 1996. The tarball at QNX was constructed by Michael Hunter.
(In Glover's initial email to me, he also mentioned that the
first public release of CDK was in 1996).
Based on comments in the makefile, CDK had
been built on Linux, SunOS (using
HP-UX, AIX and QNX 4. The Linux configuration also built a shared
There was some occasional comment on the ncurses mailing list
about CDK: people would ask for some
higher-level interface than
ncurses, and someone
would suggest CDK. This started around the end
of 1997. However, I was too busy with ncurses and lynx (among others) to investigate the
library, to decide if/how I should recommend it myself.
Mike Glover asked me in late 1998 (email dated December 7) to
distribute CDK with ncurses. In my initial response I
suggested that the package needed a
script. He did that during the next two weeks.
That was CDK 4.9.8.
I reviewed it a few months later, made several fixes. See the changelog for details:
The principal changes were:
I attempted to contact Mike Glover, to discuss with him the problem with the license/copyright information. But I got no response other than a bounce, suggesting that the machine he used for email was no longer available. So... I repaired it, citing the correct copyright owner. And I continued cleaning up the code, spending about a month on that.
After the code was cleaned up however, it was fine with me to mention it in the ncurses release announcements, e.g., 5.0. Following that, I continued to improve CDK, releasing CDK 5.0 in April 2005. Along the way, I also fixed up the perl extension.
There was a short-lived fork in NetBSD by Charles Hannum, from which I gathered some improvements (via email):
The improvements went both ways. Most of my interaction was
with Brett Lymn and Simon Burge. I pointed out in discussion with
Brett Lymn that NetBSD's BSD curses implementation would not work
with CDK, because it refers to members of the
WINDOW structure, while NetBSD had made that opaque.
According to Thomas Dickey: > >BSD curses doesn't provide enough macros to make direct access to the >WINDOW member unnecessary (SVr4 curses _almost_ does this). We fixed that. All the macros are now functions and we implemented parts of the SUSv2 interface, we intend to get all the SUSv2 functions in ultimately. The current interface is "good enough" to compile CDK without complaints (apart from those direct accesses) and a lot of the other things in our package tree, this was intentional—we went through the packages and implemented the required functions as a priority. It gave us some sort of ordering at least :-) > So putting >things on the end is a Good Thing unless you like to bump the shared >library version. > Actually the NetBSD people make you bump the library minor for a change like that anyway :-) The major thing that made things come unstuck for us and forced a library major number bump was the attributes (I think it was) support. Julian found himself in a no-win situation where he needed to update the size of the attributes but could not because it would change the size of the structure—if he did not update the size then we would have had to keep the same information in two places and try to deal with the updates somehow.
It was not until 2003 that I got email from Mike Glover. I replied:
On Wed, Apr 16, 2003 at 10:52:10PM -0400, Mike Glover wrote: > Hi Thomas, > > It's been a very long time since exchanged emails. Really should > have done some time ago. :) > > I've been thinking we need to merge the two copies of CDK and > produce one version so there are no more (this is not the same > as X's) email which I sure you get too. If yours has been > actively maintained I can just merge the two and be done with > it. I make occasional changes (had a bug report which I dealt with this week, catching up after a time-consuming project). It wouldn't be a merge, per se, since my version has everything that's in 4.9.10, with several extensions. (Aside from dropping most of the fixed-size buffers, it's upward-compatible). It would be possible to add macros to make 4.9.10 look much like that, as a compatibility aid. > I was also thinking sourceforge might be a good idea too. not really – I don't work with sourceforge (don't want to owe favors to their sponsors).
but did not see any further response on that thread. Mike asked advice on a port to 64-bit AIX later that year.
However, the following year (August 2004), I received email from someone at IBM Canada, posing this question:
I understand you had a contribution to Mike Glover's CDK Package. Mike has stated that he owns the package and that you transfered copyright to him in regards to your contribution. Can you please confirm this.
I responding, clarifying the situation somewhat: no, I have not transferred copyright, nor do I intend to do that. Mike and I each are authors of the program, and I do maintain my version.
CDK's license is its copyright statement. The problem that I noticed in May 1998 was that it was flawed. Simon Burge also noticed this, and I replied in email (August 2000):
> One thing of note with the current CDK distribution is that the licence > in the COPYING file is a literal UCB licence – it actually mentions "The > Regents of the University of California" as the copyright holder. This > should be tidied up a little bit. I already corrected that in my copy (not only the name was incorrect, but iirc, the year of copyright). I sent email to Mike Glover about that but never received a response.
That is, the date was given as "1990", and the owner of the copyright was given as "The Regents of the University of California". The copyright notice is (you may have guessed) the BSD 4-clause form.
A "1995" or "1996" for the date would have been plausible, and I would not have argued with that. Checking with web searches found that there was no connection between Mike Glover and the University of California. At the time, he was apparently at the University of Toronto.
Lacking better information, I changed that to "1999", which corresponded to the file timestamps. Likewise, I changed the copyright owner to Mike Glover.
Oddly enough, CDK 4.6.0 used GPLv2 (and was copyright by Mike Glover, dated 1995). The intervening change-log does not mention any of this.
To maintain license compatibility, I have used the same licensing terms (with appropriate date and ownership).
There are several areas where CDK could be improved:
panellibrary which is available via ncurses.
The wide-character support is most important to most users.
Implementing it is not as simple as plugging in the
ncursesw library. You can do that, but all that it
achieves at the moment is to make line-drawing work properly with
The problem with wide-characters in CDK is
that the program makes extensive use (and assumptions) regarding
chtype — the datatype used to store "narrow"
characters. There are many arrays of
are assumed to be a given number of columns. The corresponding
wide-character datatype is
cchar_t, which is handled
This version of CDK is not the same as that at
Ignoring the configure script (mine is about seven times larger), here is a comparison using diffstat.
You should report bugs either to me. or to the ncurses mailing list email@example.com.
Because (like dialog) my involvement with CDK was aimed at improving ncurses my policy has also been to accept bug reports for these programs on the ncurses mailing list.
cdk main page (links to others).