Library / SDK
wmcbrine/PDCurses avatar
wmcbrine/PDCurses

PDCurses gives curses programs a console on platforms termcap cannot describe

A curses library for environments that don't fit the termcap/terminfo model.

1,255 stars199 forksCLicense varies

At a glance

What is it?
PDCurses is a public domain C implementation of most of the X/Open and System V R4 curses functions with ports for DOS, OS/2, the Windows console, X11 and SDL. The X11 and SDL ports are what make it unusual: they let an existing text-mode curses program be recompiled into a graphical application.
Who is it for?
Adopt PDCurses if you are porting a curses program to Windows, DOS or OS/2 and want the same API rather than a Windows console rewrite, since the point of the library is that the source barely changes. Do not adopt it for a new Linux terminal application, where ncurses is the usual choice and PDCurses is a compatibility layer.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 35 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 24, 2026, and from our analysis. They are not legal advice.

Editorial analysis

One API, five very different consoles

PDCurses is described as a public domain curses library for environments that do not fit the termcap and terminfo model, and the portability list is the whole point: DOS, OS/2, the Windows console, X11 and SDL. It implements most of the functions available in X/Open and System V R4 curses, and it supports a variety of compilers for these platforms. The reason a library like this exists is that termcap and terminfo describe a terminal's capabilities through a database of escape sequences, and that model was built around Unix serial terminals. A Windows console, a DOS text mode and an X11 window are not terminals in that sense, so a curses program written for Unix either does not compile there or needs a different rendering model. PDCurses supplies that model behind the familiar function names.

The X11 and SDL ports turn a text program into a GUI

The README states the most unusual property of the library directly: the X11 and SDL ports let you recompile existing text-mode curses programs to produce GUI applications. That is a different claim from porting, and it is the one that makes PDCurses interesting beyond retro computing. A program written against the curses API draws characters to a virtual screen with attributes, and PDCurses renders that screen as a window with a font rather than as character cells in a terminal. The trade is that you get a window that looks like a terminal rather than a real widget toolkit, so the result is limited by what the curses drawing primitives can express.

Public domain for the core, with exceptions in the extras

The legal section is worth reading carefully because the answer is not uniform. The core package and most ports are in the public domain, but a few files in the demos directory and in the X11 directory are subject to copyright under licences described in those directories. So the license of the library you link against is public domain, and the licence of the extra material is not, and the distinction matters if you are redistributing a binary that includes a demo. The software is provided as is with no warranty whatsoever, which is the customary disclaimer for software of this vintage and also a fair description of what you are getting: a compatibility library maintained by one person.

The layout is one directory per port

The repository top level maps directly onto the portability story. There is a `common/` directory holding the code shared across ports, and then a directory per target: `dos/`, `os2/`, `wincon/` for the Windows console, `sdl1/`, `sdl2/` and `x11/`. Each of those carries its own README with a distribution status section, which is where the per-directory licence exceptions are described. The public headers are at the top level, with `curses.h` as the API surface, `panel.h` for the panel extension and `curspriv.h` for the internals. The `demos/` directory holds the example programs, and the `pdcurses/` directory is the library itself in its packaged form. The `docs/` directory holds the main documentation and the change history, and the README notes that the main documentation is now in that directory rather than in the README itself.

Stable release from 2019, development continues on the branch

The version story is explicit. The stable release is v3.9, dated 2019-09-04, with the current development work to be found in the git repository. The release history before that is v3.8 from 2019-02-02 and v3.7 from 2018-12-31. So the pattern is the same one a lot of infrastructure libraries follow: a stable tag that people pin to, and a moving default branch. The last push to the master branch was on 2026-09-20, which is a long way after the last tag, so the master branch has years of accumulated work in it. The project is distributed mainly as source code, though some pre-compiled libraries may be available, and the canonical download location is the pdcurses.org site with a SourceForge page and a GitHub page also linked. The maintainer is William McBrine, and the documentation points to a docs directory README for the substantive material.

Where the limits are

Three limits are visible from the documentation. First, the compatibility target is X/Open and System V R4 curses, implemented in most but not necessarily all of it, so a program relying on the rarer extensions may not port cleanly. Second, the graphical ports give you a window, not a widget toolkit, so the ceiling on what a ported program can look like is the curses drawing model rather than the platform. Third, the SDL and X11 backends mean the library depends on those libraries being present, which is a heavier dependency footprint than a console-only build, and the DOS and OS/2 ports have their own constraints. The practical way to evaluate it is to read the distribution status notes in the directory for the port you care about, because they state what works on that platform, and the documentation directory is where the change history lives if you need to know what changed since the tag you would install.

Editorial conclusion

Adopt PDCurses if you are porting a curses program to Windows, DOS or OS/2 and want the same API rather than a Windows console rewrite, since the point of the library is that the source barely changes. Do not adopt it for a new Linux terminal application, where ncurses is the usual choice and PDCurses is a compatibility layer. Verify first which port you need, since the Windows console and the X11 and SDL ports behave differently, and read the distribution status notes because a few files in the demos and X11 directories carry their own licences.

Frequently asked questions

What is PDCurses?

It is a public domain curses library written in C for environments that do not fit the termcap and terminfo model, with ports for DOS, OS/2, the Windows console, X11 and SDL. It implements most of the functions available in X/Open and System V R4 curses.

Can PDCurses turn a terminal program into a graphical application?

Yes. The X11 and SDL ports let you recompile existing text-mode curses programs to produce GUI applications, by rendering the curses virtual screen as a window rather than as character cells in a terminal.

What licence is PDCurses released under?

The core package and most ports are in the public domain, though a few files in the demos and X11 directories are subject to copyright under licences described in those directories. The software is provided as is with no warranty.

What is the latest stable version of PDCurses?

The stable release is v3.9, dated 2019-09-04, with the current development version to be found in the git repository. The last push to the master branch was on 2026-09-20.

Where are the PDCurses documentation and change history?

The README states that the main documentation is now in the docs directory, with the change history in the History file there, and each port directory has its own README with a distribution status section. The project is also listed on SourceForge.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Releases
  5. wmcbrine/PDCurses on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/wmcbrine-pdcurses.svg)](https://hysenlabs.com/projects/wmcbrine-pdcurses)

Was this useful?