Dec 082017
Mini Curses. Complete and portable - UNIX/MINIX/TC/DOS.
File MIC.ZIP from The Programmer’s Corner in
Category C Source Code
Mini Curses. Complete and portable – UNIX/MINIX/TC/DOS.
File Name File Size Zip Size Zip Type
CURSES.H 1515 629 deflated
CURSES.MAN 10401 3485 deflated
DEMO.C 4309 1122 deflated
DEMO.PRJ 21 20 deflated
LIBCURSE.C 29226 6203 deflated
MAKEFILE 167 96 deflated
MAKEFILE.MNX 178 99 deflated
MAKEFILE.MWC 237 140 deflated
README.DOC 5326 2184 deflated
TCAPSET 51 43 deflated
TCAPSET.BAT 36 31 deflated
TCAPSET.MNX 52 44 deflated
TERMCAP 436 225 deflated
TERMCAP.MAN 2504 860 deflated

Download File MIC.ZIP Here

Contents of the README.DOC file

MIC - MIni Curses

Enclosed is a (hopefully complete!) set of files to provide screen
I/O support compatible with Unix's -DMINICURSES option. It is my hope
that this will spur some machine/OS independent application development
(especially in MINIX!), now that there exists a way to control the screen.
The same hope applies to DOS, however I fully recognize that DOS has plenty of
applications, with FAR more sophisticated screen control than any version
of curses could provide. My concern is P-O-R-T-A-B-I-L-I-T-Y.
Any software written using this package should run on any MSDOS
machine, Unix, Xenix, Unix clones such as MINIX, and even CP/M with a
slight adjustment to the library. As far as I know, it might port to the
Atari ST, Mac, or other machine that has a C compiler and uses a set of
escape/control sequences for its screen. I don't have a Mac or Atari, so
I don't know if that is the case: if you have some input, please let me know.

Now, to business: Here is a list of the files in this package:

libcurse.c --- the curses library.
curses.h --- the include file. required by libcurses, and
any program you write using curses.
demo.c --- my little test demo program.
demo.prj --- for Turbo C users, they know what it is.
makefile.mwc - my makefile, written for Mark Williams C.
makefile --- Unix (Xenix?) makefile.
makefile.mnx - Minix makefile.
makefile.bat - example bat file to compile system.
termcap --- contains escape sequences for your term.
tcapset.bat -- for DOS. sets environment right.
tcapset --- for UNIX. ditto. -- man page (docs) describing termcap file. --- man page describing curses package.

How to compile and run:

For MINIX users: rm makefile
mv makefile.mnx makefile
rm tcapset
mv tcapset.mnx tcapset
{proceed with UNIX instructions}

For UNIX users: run make
chmod 755 tcapset
at a prompt, type:
. tcapset
to set environment.
type demo and demo should run.

For Mark Williams users: del makefile.
ren makefile.mwc makefile.
run make.
run tcapset.bat.
run demo.exe.

For TURBO-C users: run tcapset.bat first. bring up interactive TC.
load demo.c in editor. on line 6, remove
comment symbols around define for Turbo and save.
set project to demo.prj. run it.

For non-TURBO DOS users: you will need to look at makefile.bat.
it contains the steps for compiling.
Edit it for any special switches your
compiler may need.

Notice that I keep referring to this as a library, even though we are
merely linking an obj file. It is (can be) a library, but rather than
bring up the complications of creating a library file with your specific
OS/compiler, the makefile's just link the whole thing. Creating a library
module is left as an exercise for the student.

The demo waits every little bit: it wants you to press a key when
you are ready to go on, even tho it doesn't say so. UNIX/MINIX users
ignore that: it will just sleep 1 sec. then continue on. Note that
it is because my mini-curses package does not provide any input support
(that is per -DMINICURSES standard), similar to a BASIC inkey() function.
I have kludged code in the demo for TURBO & Mark Williams: other compiler/
OS users that want keyboard input will need to supply their own. If
any Unix Sys V users wants an inkey() equivalent, let me know and I can
provide one. I hope this paragraph makes sense, if you need further
explanation, let me know.

I know, I know... this is NOT IMPRESSIVE. Microsoft Windows it ain't.
If you think the computer world is divided into PC-compatible and trash,
then this is a waste of time. I however, am tired of seeing people re-
invent the wheel to write for diverse machines. I am also tired of seeing
software being available for only one OS. Ok, so maybe commercial software
will always be that way. But public domain stuff?? Looks to me like it
outta be a lot more portable than it is.

Note that this is distributed in source code. This package is totally
PUBLIC DOMAIN. My only request is that if you modify it, please remove
my name from the sources.

Many thanks to the following folk on Compuserve Information Services,
who volunteered their valuable time to give this a test run.

Steve Sampson
Don Gloistein
Paul D. Watson
Wayne Brown
Serge Burjak

Randall D. Smith

 December 8, 2017  Add comments

Leave a Reply