home *** CD-ROM | disk | FTP | other *** search
- #include "swears.h"
- extern int _attr;
-
- int main()
- {
- int i,j;
- WINDOW *w1, *w2, *w3, *w4, *w5;
-
- if( initscr() == ERR )
- return(-1);
-
- refresh();
-
- if( (w1 = newwin(5,5,10,20)) == NULL ) {
- printf("w1 = newwin() error\n");
- return(-1);
- }
- _attr = 0x1700;
- for(i=0;i<100;i++)
- waddch(w1,65);
- wrefresh(w1);
-
- if( (w2 = newwin(15,15,20,30)) == NULL ) {
- printf("w2 = newwin() error\n");
- return(-1);
- }
- _attr = 0x2700;
- for(i=0;i<100;i++)
- waddch(w2,66);
- wrefresh(w2);
-
- if( (w3 = newwin(2,30,5,30)) == NULL ) {
- printf("w3 = newwin() error\n");
- return(-1);
- }
- _attr = 0x3700;
- for(i=0;i<100;i++)
- waddch(w3,67);
- wrefresh(w3);
-
- if( (w4 = newwin(12,40,19,79)) == NULL ) {
- printf("w4 = newwin() error\n");
- return(-1);
- }
- _attr = 0x4700;
- for(i=0;i<100;i++)
- waddch(w4,68);
- wrefresh(w4);
-
- if( (w5 = newwin(20,50,22,80)) == NULL ) {
- printf("w5 = newwin() error\n");
- return(-1);
- }
- _attr = 0x5700;
- for(i=0;i<100;i++)
- waddch(w5,69);
- wrefresh(w5);
-
- addstr("This is a test string printed using the addstr() function...");
- move(5,5);
- addstr("at 5,5 this string should print...");
- mvaddstr(10,10,"at 10,10 for this one...");
- refresh();
-
- delwin(w1);
- delwin(w2);
- delwin(w3);
- delwin(w4);
- delwin(w5);
-
- endwin();
- return(0);
- }
-