Cardfile - Index card catalog

download source Download source tarball 51K

download Solaris pkg Download Solaris x86 package 52K

Cardfile is a simple screen oriented database manager. It does have some rudimentary file formatting and printing capabilities. I use it as a library catalog. The metaphor is a stack of index cards with fields and subfields on them. To explain subfields, think of a book with multiple authors. Each author must be treated equally and there may be many authors. If you search for any book written by "John Smith" you want to find it whether he is the only author or the fifteenth author.

There are parameters in the Makefile to configure it for Linux, System V, Sun OS/Solaris, or BSD. I do not have access to a BSD system so the ioctl calls are from the book. If you have problems and make changes to screen.c, please send the patches to me.

Some of the source may look a little strange because I wrote it originally to run under CPM.

Included in the package is a piece of the catalog file for my library so that you can get the feeling for what it does. After you make it, execute "cardfile library" and then play.

If anyone finds any bugs (What? Bugs in MY code? :-) ), or makes any improvements, please let me know.

Changes in 2.1

Fixed the Change screen so that the ctrl-c works correctly.
Added prototypes for all subroutines.


This is the screen used to define each field in a new card deck. All the fields except for the Name and the Length may be left blank or the defaults accepted. The defaults are that the field is not required, it will be indexed, the screen layout will follow the last field defined, and no input validation will be performed.

If the field is madeup of independant subfields, for example a book may have multiple authors, enter the character used to separate them in the Separators field.

If the input is to be validated, enter the regular expression that must be matched in the Format field. For example a date field might be matched against "^[12][0-9][0-9][0-9]$"


After all the fields are defined, executing cardfile with the name of the database will result in the Main menu. The arrow keys, space or tab will move around on the screen. When the cursor is on the desired option, return will select it. Maintenance will bring up another menu of infrequently used commands.


This screen is used to add records to the database. The appearance depends on the fields defined during the definition of the database. The function keys may be used to perform field editing and to switch pages if all the fields will not fit on one screen.


To find records in the database, a screen with all the indexed fields will be presented. Enter whatever strings will identify the desired records and then hit return. The matching records, if any, will be displayed and you can scroll forward or backward through the list.

download source Download source tarball 51K

download Solaris pkg Download Solaris x86 package 52K

If you are looking for a cardfile program for Microsoft Windows, go to azzcardfile