Category : C Source Code
Archive   : SWEARS10.ZIP
Filename : SWEARS.DOC

 
Output of file : SWEARS.DOC contained in archive : SWEARS10.ZIP

Help!
Here's the first release beta version of my "swears" curses-look-alike lib
for the pc environment. BUT I need help. This package is far from complete,
so why don't you try it with your Quick C compiler, and e-mail me some
suggestions...
Thanks!
Jim Dunn, [email protected]

/**************************************************************************\
* Swears *
* by Professor Von Ignatius Pseudo, E.K.C.P. *
* *
* Swears is a C add-on library giving you various windowing and utility *
* functions provided in unix curses. There's no termcap, but there IS *
* direct video screen writes with TRUE refresh functions! Use at your *
* own risk... *
* *
* This implementation of Swears is for the Microsoft Quick C language on *
* the IBM PC compatibles, based on the unix curses package. You'll need *
* the two files: SWEARS.H and SWEARS.LIB (renamed from SWEARS_x.LIB) and *
* these two files may be renamed to CURSES.H and CURSES.LIB if you like. *
* As usual, if you are having any problems, you might try a vacation... *
* *
* Swears is TOTALLY, COMPLETELY, ENTIRELY free! You may use the Swears *
* library to create any program, either free or for sale, without paying *
* any royalty fees. You don't even have to display any sort of Swears *
* logo, copyright or info about Swears in your program, at all. Swears *
* is IdeaRighted (I) 1990 by ACME F.S.P.F. Please see attached document. *
* *
* Yes, this was another TEAM ATTACK project... *
* "I tried to get the team to work on it, but they attacked me !?!" *
* -Professor Von Ignatius Pseudo, E.K.C.P. *
\***************************************************************************/

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³
³ NAME ³
³ ³
³ swears - screen functions to emulate the unix curses library. ³
³ ³
³ SYNTAX ³
³ ³
³ #include ³
³ ³
³ This will automatically include the stdio.h header file. ³
³ ³
³ DESCRIPTION ³
³ ³
³ This version of curses for the pc is based upon a direct ³
³ screen write algorithm. No termcap is used, just arrays and ³
³ video memory writes. The original screen is saved, an image ³
³ of the screen is built in memory and that memory is written ³
³ to the screen each time the REFRESH() function is called. ³
³ The INITSCR() function MUST be used before any other of the ³
³ functions, and you MUST end with ENDWIN() before exiting. ³
³ ³
³ FUNCTIONS ³
³ ³
³ addch(ch) add a character to stdscr ³
³ addstr(str) add a string to stdscr ³
³ ³
³ box(win,vert,hor) draw a box around a window ³
³ ³
³ cbreak() set cbreak mode ³
³ clear() clear stdscr ³
³ clearok(scr,boolf) set clear flag for scr ³
³ clrtobot() clear to bottom on stdscr ³
³ clrtoeol() clear to end of line on stdscr ³
³ ³
³ delch() delete a character ³
³ deleteln() delete a line ³
³ delwin(win) delete win ³
³ ³
³ echo() set echo mode ³
³ endwin() end window modes ³
³ erase() erase stdscr ³
³ ³
³ flushok(win,boolf) set flush-on-refresh flag for win ³
³ ³
³ getch() get a char through stdscr ³
³ getcap(name) get terminal capability name ³
³ getstr(str) get a string through stdscr ³
³ gettmode() get tty modes ³
³ getyx(win,y,x) get (y,x) co-ordinates ³
³ ³
³ inch() get char at current (y,x) co-ordinates ³
³ initscr() initialize screens ³
³ insch(c) insert a char ³
³ insertln() insert a line ³
³ ³
³ leaveok(win,boolf) set leave flag for win ³
³ longname(termbuf,name) get long name from termbuf ³
³ ³
³ move(y,x) move to (y,x) on stdscr ³
³ mvcur(lasty,lastx,newy,newx) ³
³ actually move cursor ³
³ newwin(lines,cols,begin_y,begin_x) ³
³ create a new window ³
³ nl() set newline mapping ³
³ nocbreak() unset cbreak mode ³
³ noecho() unset echo mode ³
³ nonl() unset newline mapping ³
³ noraw() unset raw mode ³
³ ³
³ overlay(win1,win2) overlay win1 on win2 ³
³ overwrite(win1,win2) overwrite win1 on top of win2 ³
³ ³
³ printw(fmt,arg1,arg2,...) ³
³ printf on stdscr ³
³ ³
³ raw() set raw mode ³
³ refresh() make current screen look like stdscr ³
³ resetty() reset tty flags to stored value ³
³ ³
³ savetty() stored current tty flags ³
³ scanw(fmt,arg1,arg2,...) scanf through stdscr ³
³ scroll(win) scroll win one line ³
³ scrollok(win,boolf) set scroll flag ³
³ setterm(name) set term variables for name ³
³ standend() end standout mode ³
³ standout() start standout mode ³
³ subwin(win,lines,cols,begin_y,begin_x) ³
³ create a subwindow ³
³ ³
³ touchline(win,y,sx,ex) mark line y sx through ex as changed ³
³ touchoverlap(win1,win2) mark overlap of win1 and win2 as changed ³
³ touchwin(win) change all of win ³
³ ³
³ unctrl(ch) printable version of ch ³
³ ³
³ waddch(win,ch) add char to win ³
³ waddstr(win,str) add string to win ³
³ wclear(win) clear win ³
³ wclrtobot(win) clear to bottom of win ³
³ wclrtoeol(win) clear to end of line on win ³
³ wdelch(win,c) delete char from win ³
³ wdeleteln(win) delete line from win ³
³ werase(win) erase win ³
³ wgetch(win) get a char through win ³
³ wgetstr(win,str) get a string through win ³
³ winch(win) get char at current (y,x) in win ³
³ winsch(win,c) insert char into win ³
³ ³
³ winsertln(win) insert line into win ³
³ wmove(win,y,x) set current (y,x) co-ordinates on win ³
³ wprintw(win,fmt,arg1,arg2,...) ³
³ printf on win ³
³ wrefresh(win) make screen look like win ³
³ wscanw(win,fmt,arg1,arg2,...) ³
³ scanf through win ³
³ wstandend(win) end standout mode on win ³
³ wstandout(win) start standout mode on win ³
³ ³
³ EXAMPLE ³
³ ³
³ The following example shows how to compile a swears program. ³
³ ³
³ qcl SWEARS.LIB ³
³ cl SWEARS.LIB ³
³ ³
³ EOF ³
³ by Jim Dunn, [email protected] ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ