Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els11.x86_64 #1 SMP Sun Nov 3 09:06:59 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 18.216.42.225
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
ncurses-devel-5.9 /
test /
[ HOME SHELL ]
Name
Size
Permission
Action
package
[ DIR ]
drwxr-xr-x
Makefile.in
4.92
KB
-rw-r--r--
README
35.89
KB
-rw-r--r--
aclocal.m4
108.83
KB
-rw-r--r--
background.c
6.84
KB
-rw-r--r--
blue.c
12.4
KB
-rw-r--r--
bs.6
3.91
KB
-rw-r--r--
bs.c
29.95
KB
-rw-r--r--
bulgarian-utf8.txt
340
B
-rw-r--r--
cardfile.c
13.26
KB
-rw-r--r--
cardfile.dat
394
B
-rw-r--r--
chgat.c
9.03
KB
-rw-r--r--
clip_printw.c
9.1
KB
-rw-r--r--
color_name.h
3.32
KB
-rw-r--r--
color_set.c
3.25
KB
-rw-r--r--
configure
449.42
KB
-rw-r--r--
configure.in
9.57
KB
-rw-r--r--
demo_altkeys.c
4.77
KB
-rw-r--r--
demo_defkey.c
7.4
KB
-rw-r--r--
demo_forms.c
13.01
KB
-rw-r--r--
demo_keyok.c
3.24
KB
-rw-r--r--
demo_menus.c
18.74
KB
-rw-r--r--
demo_panels.c
16.89
KB
-rw-r--r--
demo_termcap.c
10.09
KB
-rw-r--r--
demo_terminfo.c
10.05
KB
-rw-r--r--
ditto.c
11.04
KB
-rw-r--r--
dots.c
4.52
KB
-rw-r--r--
dots_mvcur.c
4.66
KB
-rw-r--r--
echochar.c
4.35
KB
-rw-r--r--
edit_field.c
11.21
KB
-rw-r--r--
edit_field.h
2.57
KB
-rw-r--r--
filter.c
4.97
KB
-rw-r--r--
firework.c
5.53
KB
-rw-r--r--
firstlast.c
3.72
KB
-rw-r--r--
foldkeys.c
7.44
KB
-rw-r--r--
gdc.6
3.03
KB
-rw-r--r--
gdc.c
8.74
KB
-rw-r--r--
hanoi.c
8.58
KB
-rw-r--r--
hashtest.c
6.58
KB
-rw-r--r--
inch_wide.c
7.21
KB
-rw-r--r--
inchs.c
7.15
KB
-rw-r--r--
ins_wide.c
12.25
KB
-rw-r--r--
insdelln.c
9.16
KB
-rw-r--r--
inserts.c
10.62
KB
-rw-r--r--
install-sh
6.96
KB
-rw-r--r--
key_names.c
3.22
KB
-rw-r--r--
keynames.c
3.07
KB
-rw-r--r--
knight.c
18.54
KB
-rw-r--r--
linedata.h
3.16
KB
-rw-r--r--
linux-color.dat
2.56
KB
-rw-r--r--
listused.sh
5.46
KB
-rw-r--r--
lrtest.c
5.24
KB
-rw-r--r--
make-tar.sh
4.8
KB
-rw-r--r--
mk-test.awk
4.42
KB
-rw-r--r--
modules
5.07
KB
-rw-r--r--
movewindow.c
16.44
KB
-rw-r--r--
ncurses.c
154.98
KB
-rw-r--r--
ncurses_tst.hin
2.88
KB
-rw-r--r--
newdemo.c
7.38
KB
-rw-r--r--
programs
5.28
KB
-rw-r--r--
railroad.c
5.66
KB
-rw-r--r--
rain.c
8.44
KB
-rw-r--r--
redraw.c
4.66
KB
-rw-r--r--
savescreen.c
7.49
KB
-rw-r--r--
savescreen.sh
2.66
KB
-rw-r--r--
tclock.c
5.26
KB
-rw-r--r--
test.priv.h
19.55
KB
-rw-r--r--
test_add_wchstr.c
14.08
KB
-rw-r--r--
test_addchstr.c
12.14
KB
-rw-r--r--
test_addstr.c
10.3
KB
-rw-r--r--
test_addwstr.c
12.37
KB
-rw-r--r--
test_arrays.c
3.83
KB
-rw-r--r--
test_get_wstr.c
8.94
KB
-rw-r--r--
test_getstr.c
8.88
KB
-rw-r--r--
test_instr.c
6.49
KB
-rw-r--r--
test_inwstr.c
6.69
KB
-rw-r--r--
test_opaque.c
10.42
KB
-rw-r--r--
test_vid_puts.c
3.97
KB
-rw-r--r--
test_vidputs.c
3.92
KB
-rw-r--r--
testaddch.c
3.46
KB
-rw-r--r--
testcurs.c
16.69
KB
-rw-r--r--
testscanw.c
2.88
KB
-rw-r--r--
tracemunch
5.01
KB
-rw-r--r--
view.c
13.84
KB
-rw-r--r--
widechars-utf8.txt
389
B
-rw-r--r--
widechars.h
3.19
KB
-rw-r--r--
worm.c
14.01
KB
-rw-r--r--
xmas.c
33.47
KB
-rw-r--r--
xterm-16color.dat
2.99
KB
-rw-r--r--
xterm-256color.dat
6.88
KB
-rw-r--r--
xterm-88color.dat
4.11
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : xmas.c
/******************************************************************************/ /* asciixmas */ /* December 1989 Larry Bartz Indianapolis, IN */ /* */ /* */ /* I'm dreaming of an ascii character-based monochrome Christmas, */ /* Just like the one's I used to know! */ /* Via a full duplex communications channel, */ /* At 9600 bits per second, */ /* Even though it's kinda slow. */ /* */ /* I'm dreaming of an ascii character-based monochrome Christmas, */ /* With ev'ry C program I write! */ /* May your screen be merry and bright! */ /* And may all your Christmases be amber or green, */ /* (for reduced eyestrain and improved visibility)! */ /* */ /* */ /* */ /* */ /* */ /* IMPLEMENTATION */ /* */ /* Feel free to modify the defined string FROMWHO to reflect you, your */ /* organization, your site, whatever. */ /* */ /* This really looks a lot better if you can turn off your cursor before */ /* execution. I wanted to do that here but very few termcap entries or */ /* terminfo definitions have the appropriate string defined. If you know */ /* the string(s) for the terminal(s) you use or which your site supports, */ /* you could call asciixmas from within a shell in which you issue the */ /* string to the terminal. The cursor is distracting but it doesn't really */ /* ruin the show. */ /* */ /* At our site, we invoke this for our users just after login and the */ /* determination of terminal type. */ /* */ /* */ /* PORTABILITY */ /* */ /* I wrote this using only the very simplest curses functions so that it */ /* might be the most portable. I was personally able to test on five */ /* different cpu/UNIX combinations. */ /* */ /* */ /* COMPILE */ /* */ /* usually this: */ /* */ /* cc -O asciixmas.c -lcurses -o asciixmas -s */ /* */ /* */ /* Zilog S8000 models 11, 21, 31, etc with ZEUS variant of SYSTEM III */ /* maybe other SYSTEM III also: */ /* */ /* cc asciixmas.c -lcurses -ltermlib -o asciixmas -s */ /* */ /* as above with optional "peephole optimizer" installed: */ /* */ /* cc -O asciixmas.c -lcurses -ltermlib -o asciixmas -s */ /* */ /* */ /* Zilog S8000 models 32, 130 with WE32100 chip and SYS V, REL2 */ /* maybe 3B2 also? */ /* */ /* cc -f -O -K sd asciixmas.c -lcurses -o asciixmas -s */ /* */ /* */ /* Pyramid, Sequent, any other "dual universe" types compile and execute */ /* under either universe. The compile line for the ucb universe (as you */ /* might expect) is the same as for SYS III UNIX: */ /* */ /* cc -O asciixmas.c -lcurses -ltermlib -o asciixmas -s */ /* */ /* The above compile will also hold true for other BSD systems. (I hope) */ /* */ /* */ /* */ /* */ /* For the Scrooges out there among you who don't want this thing to loop */ /* forever (or until the user hits a key), insert this into your compile */ /* line just after "cc" : */ /* */ /* -DNOLOOP */ /* */ /* like so: */ /* */ /* cc -DNOLOOP -O asciixmas.c -lcurses -o asciixmas -s */ /* */ /* */ /* */ /******************************************************************************/ /* * $Id: xmas.c,v 1.28 2013/04/27 19:46:53 tom Exp $ */ #include <test.priv.h> #define FROMWHO "Mark Hessling - (M.Hessling@gu.edu.au)" static int my_bg = COLOR_BLACK; static int y_pos, x_pos; static WINDOW *treescrn; static WINDOW *treescrn2; static WINDOW *treescrn3; static WINDOW *treescrn4; static WINDOW *treescrn5; static WINDOW *treescrn6; static WINDOW *treescrn7; static WINDOW *treescrn8; static WINDOW *dotdeer0; static WINDOW *stardeer0; static WINDOW *lildeer0; static WINDOW *lildeer1; static WINDOW *lildeer2; static WINDOW *lildeer3; static WINDOW *middeer0; static WINDOW *middeer1; static WINDOW *middeer2; static WINDOW *middeer3; static WINDOW *bigdeer0; static WINDOW *bigdeer1; static WINDOW *bigdeer2; static WINDOW *bigdeer3; static WINDOW *bigdeer4; static WINDOW *lookdeer0; static WINDOW *lookdeer1; static WINDOW *lookdeer2; static WINDOW *lookdeer3; static WINDOW *lookdeer4; static WINDOW *w_holiday; static WINDOW *w_del_msg; static bool *my_pairs; static int boxit(void); static int seas(void); static int greet(void); static int fromwho(void); static int tree(void); static int balls(void); static int star(void); static int strng1(void); static int strng2(void); static int strng3(void); static int strng4(void); static int strng5(void); static int reindeer(void); static int blinkit(void); static void done(int sig) GCC_NORETURN; static void set_color(WINDOW *win, chtype color) { if (has_colors()) { int n = (int) (color + 1); if (my_pairs == 0) my_pairs = typeCalloc(bool, (size_t) (COLORS + 1)); if (!my_pairs[n]) { init_pair((short) n, (short) color, (short) my_bg); my_pairs[n] = TRUE; } wattroff(win, A_COLOR); wattron(win, COLOR_PAIR(n)); } } static void unset_color(WINDOW *win) { if (has_colors()) (void) wattrset(win, COLOR_PAIR(0)); } static void look_out(int msecs) { napms(msecs); if (getch() != ERR) { beep(); done(0); } } int main(int argc GCC_UNUSED, char **argv GCC_UNUSED) { int loopy; setlocale(LC_ALL, ""); initscr(); noecho(); nonl(); refresh(); CATCHALL(done); if (has_colors()) { start_color(); #if HAVE_USE_DEFAULT_COLORS if (use_default_colors() == OK) my_bg = -1; #endif } curs_set(0); if ((treescrn = newwin(16, 27, 3, 53)) == 0 || (treescrn2 = newwin(16, 27, 3, 53)) == 0 || (treescrn3 = newwin(16, 27, 3, 53)) == 0 || (treescrn4 = newwin(16, 27, 3, 53)) == 0 || (treescrn5 = newwin(16, 27, 3, 53)) == 0 || (treescrn6 = newwin(16, 27, 3, 53)) == 0 || (treescrn7 = newwin(16, 27, 3, 53)) == 0 || (treescrn8 = newwin(16, 27, 3, 53)) == 0 || (dotdeer0 = newwin(3, 71, 0, 8)) == 0 || (stardeer0 = newwin(4, 56, 0, 8)) == 0 || (lildeer0 = newwin(7, 53, 0, 8)) == 0 || (lildeer1 = newwin(2, 4, 0, 0)) == 0 || (lildeer2 = newwin(2, 4, 0, 0)) == 0 || (lildeer3 = newwin(2, 4, 0, 0)) == 0 || (middeer0 = newwin(15, 42, 0, 8)) == 0 || (middeer1 = newwin(3, 7, 0, 0)) == 0 || (middeer2 = newwin(3, 7, 0, 0)) == 0 || (middeer3 = newwin(3, 7, 0, 0)) == 0 || (bigdeer0 = newwin(10, 23, 0, 0)) == 0 || (bigdeer1 = newwin(10, 23, 0, 0)) == 0 || (bigdeer2 = newwin(10, 23, 0, 0)) == 0 || (bigdeer3 = newwin(10, 23, 0, 0)) == 0 || (bigdeer4 = newwin(10, 23, 0, 0)) == 0 || (lookdeer0 = newwin(10, 25, 0, 0)) == 0 || (lookdeer1 = newwin(10, 25, 0, 0)) == 0 || (lookdeer2 = newwin(10, 25, 0, 0)) == 0 || (lookdeer3 = newwin(10, 25, 0, 0)) == 0 || (lookdeer4 = newwin(10, 25, 0, 0)) == 0 || (w_holiday = newwin(1, 26, 3, 27)) == 0 || (w_del_msg = newwin(1, 19, 23, 60)) == 0) { endwin(); fprintf(stderr, "Cannot create windows - screen too small\n"); ExitProgram(EXIT_FAILURE); } MvWAddStr(w_del_msg, 0, 0, "Hit any key to quit"); MvWAddStr(w_holiday, 0, 0, "H A P P Y H O L I D A Y S"); /* set up the windows for our various reindeer */ /* lildeer1 */ MvWAddCh(lildeer1, 0, 0, (chtype) 'V'); MvWAddCh(lildeer1, 1, 0, (chtype) '@'); MvWAddCh(lildeer1, 1, 1, (chtype) '<'); MvWAddCh(lildeer1, 1, 2, (chtype) '>'); MvWAddCh(lildeer1, 1, 3, (chtype) '~'); /* lildeer2 */ MvWAddCh(lildeer2, 0, 0, (chtype) 'V'); MvWAddCh(lildeer2, 1, 0, (chtype) '@'); MvWAddCh(lildeer2, 1, 1, (chtype) '|'); MvWAddCh(lildeer2, 1, 2, (chtype) '|'); MvWAddCh(lildeer2, 1, 3, (chtype) '~'); /* lildeer3 */ MvWAddCh(lildeer3, 0, 0, (chtype) 'V'); MvWAddCh(lildeer3, 1, 0, (chtype) '@'); MvWAddCh(lildeer3, 1, 1, (chtype) '>'); MvWAddCh(lildeer3, 1, 2, (chtype) '<'); MvWAddCh(lildeer2, 1, 3, (chtype) '~'); /* middeer1 */ MvWAddCh(middeer1, 0, 2, (chtype) 'y'); MvWAddCh(middeer1, 0, 3, (chtype) 'y'); MvWAddCh(middeer1, 1, 2, (chtype) '0'); MvWAddCh(middeer1, 1, 3, (chtype) '('); MvWAddCh(middeer1, 1, 4, (chtype) '='); MvWAddCh(middeer1, 1, 5, (chtype) ')'); MvWAddCh(middeer1, 1, 6, (chtype) '~'); MvWAddCh(middeer1, 2, 3, (chtype) '\\'); MvWAddCh(middeer1, 2, 4, (chtype) '/'); /* middeer2 */ MvWAddCh(middeer2, 0, 2, (chtype) 'y'); MvWAddCh(middeer2, 0, 3, (chtype) 'y'); MvWAddCh(middeer2, 1, 2, (chtype) '0'); MvWAddCh(middeer2, 1, 3, (chtype) '('); MvWAddCh(middeer2, 1, 4, (chtype) '='); MvWAddCh(middeer2, 1, 5, (chtype) ')'); MvWAddCh(middeer2, 1, 6, (chtype) '~'); MvWAddCh(middeer2, 2, 3, (chtype) '|'); MvWAddCh(middeer2, 2, 5, (chtype) '|'); /* middeer3 */ MvWAddCh(middeer3, 0, 2, (chtype) 'y'); MvWAddCh(middeer3, 0, 3, (chtype) 'y'); MvWAddCh(middeer3, 1, 2, (chtype) '0'); MvWAddCh(middeer3, 1, 3, (chtype) '('); MvWAddCh(middeer3, 1, 4, (chtype) '='); MvWAddCh(middeer3, 1, 5, (chtype) ')'); MvWAddCh(middeer3, 1, 6, (chtype) '~'); MvWAddCh(middeer3, 2, 2, (chtype) '/'); MvWAddCh(middeer3, 2, 6, (chtype) '\\'); /* bigdeer1 */ MvWAddCh(bigdeer1, 0, 17, (chtype) '\\'); MvWAddCh(bigdeer1, 0, 18, (chtype) '/'); MvWAddCh(bigdeer1, 0, 20, (chtype) '\\'); MvWAddCh(bigdeer1, 0, 21, (chtype) '/'); MvWAddCh(bigdeer1, 1, 18, (chtype) '\\'); MvWAddCh(bigdeer1, 1, 20, (chtype) '/'); MvWAddCh(bigdeer1, 2, 19, (chtype) '|'); MvWAddCh(bigdeer1, 2, 20, (chtype) '_'); MvWAddCh(bigdeer1, 3, 18, (chtype) '/'); MvWAddCh(bigdeer1, 3, 19, (chtype) '^'); MvWAddCh(bigdeer1, 3, 20, (chtype) '0'); MvWAddCh(bigdeer1, 3, 21, (chtype) '\\'); MvWAddCh(bigdeer1, 4, 17, (chtype) '/'); MvWAddCh(bigdeer1, 4, 18, (chtype) '/'); MvWAddCh(bigdeer1, 4, 19, (chtype) '\\'); MvWAddCh(bigdeer1, 4, 22, (chtype) '\\'); MvWAddStr(bigdeer1, 5, 7, "^~~~~~~~~// ~~U"); MvWAddStr(bigdeer1, 6, 7, "( \\_____( /"); MvWAddStr(bigdeer1, 7, 8, "( ) /"); MvWAddStr(bigdeer1, 8, 9, "\\\\ /"); MvWAddStr(bigdeer1, 9, 11, "\\>/>"); /* bigdeer2 */ MvWAddCh(bigdeer2, 0, 17, (chtype) '\\'); MvWAddCh(bigdeer2, 0, 18, (chtype) '/'); MvWAddCh(bigdeer2, 0, 20, (chtype) '\\'); MvWAddCh(bigdeer2, 0, 21, (chtype) '/'); MvWAddCh(bigdeer2, 1, 18, (chtype) '\\'); MvWAddCh(bigdeer2, 1, 20, (chtype) '/'); MvWAddCh(bigdeer2, 2, 19, (chtype) '|'); MvWAddCh(bigdeer2, 2, 20, (chtype) '_'); MvWAddCh(bigdeer2, 3, 18, (chtype) '/'); MvWAddCh(bigdeer2, 3, 19, (chtype) '^'); MvWAddCh(bigdeer2, 3, 20, (chtype) '0'); MvWAddCh(bigdeer2, 3, 21, (chtype) '\\'); MvWAddCh(bigdeer2, 4, 17, (chtype) '/'); MvWAddCh(bigdeer2, 4, 18, (chtype) '/'); MvWAddCh(bigdeer2, 4, 19, (chtype) '\\'); MvWAddCh(bigdeer2, 4, 22, (chtype) '\\'); MvWAddStr(bigdeer2, 5, 7, "^~~~~~~~~// ~~U"); MvWAddStr(bigdeer2, 6, 7, "(( )____( /"); MvWAddStr(bigdeer2, 7, 7, "( / |"); MvWAddStr(bigdeer2, 8, 8, "\\/ |"); MvWAddStr(bigdeer2, 9, 9, "|> |>"); /* bigdeer3 */ MvWAddCh(bigdeer3, 0, 17, (chtype) '\\'); MvWAddCh(bigdeer3, 0, 18, (chtype) '/'); MvWAddCh(bigdeer3, 0, 20, (chtype) '\\'); MvWAddCh(bigdeer3, 0, 21, (chtype) '/'); MvWAddCh(bigdeer3, 1, 18, (chtype) '\\'); MvWAddCh(bigdeer3, 1, 20, (chtype) '/'); MvWAddCh(bigdeer3, 2, 19, (chtype) '|'); MvWAddCh(bigdeer3, 2, 20, (chtype) '_'); MvWAddCh(bigdeer3, 3, 18, (chtype) '/'); MvWAddCh(bigdeer3, 3, 19, (chtype) '^'); MvWAddCh(bigdeer3, 3, 20, (chtype) '0'); MvWAddCh(bigdeer3, 3, 21, (chtype) '\\'); MvWAddCh(bigdeer3, 4, 17, (chtype) '/'); MvWAddCh(bigdeer3, 4, 18, (chtype) '/'); MvWAddCh(bigdeer3, 4, 19, (chtype) '\\'); MvWAddCh(bigdeer3, 4, 22, (chtype) '\\'); MvWAddStr(bigdeer3, 5, 7, "^~~~~~~~~// ~~U"); MvWAddStr(bigdeer3, 6, 6, "( ()_____( /"); MvWAddStr(bigdeer3, 7, 6, "/ / /"); MvWAddStr(bigdeer3, 8, 5, "|/ \\"); MvWAddStr(bigdeer3, 9, 5, "/> \\>"); /* bigdeer4 */ MvWAddCh(bigdeer4, 0, 17, (chtype) '\\'); MvWAddCh(bigdeer4, 0, 18, (chtype) '/'); MvWAddCh(bigdeer4, 0, 20, (chtype) '\\'); MvWAddCh(bigdeer4, 0, 21, (chtype) '/'); MvWAddCh(bigdeer4, 1, 18, (chtype) '\\'); MvWAddCh(bigdeer4, 1, 20, (chtype) '/'); MvWAddCh(bigdeer4, 2, 19, (chtype) '|'); MvWAddCh(bigdeer4, 2, 20, (chtype) '_'); MvWAddCh(bigdeer4, 3, 18, (chtype) '/'); MvWAddCh(bigdeer4, 3, 19, (chtype) '^'); MvWAddCh(bigdeer4, 3, 20, (chtype) '0'); MvWAddCh(bigdeer4, 3, 21, (chtype) '\\'); MvWAddCh(bigdeer4, 4, 17, (chtype) '/'); MvWAddCh(bigdeer4, 4, 18, (chtype) '/'); MvWAddCh(bigdeer4, 4, 19, (chtype) '\\'); MvWAddCh(bigdeer4, 4, 22, (chtype) '\\'); MvWAddStr(bigdeer4, 5, 7, "^~~~~~~~~// ~~U"); MvWAddStr(bigdeer4, 6, 6, "( )______( /"); MvWAddStr(bigdeer4, 7, 5, "(/ \\"); MvWAddStr(bigdeer4, 8, 0, "v___= ----^"); /* lookdeer1 */ MvWAddStr(lookdeer1, 0, 16, "\\/ \\/"); MvWAddStr(lookdeer1, 1, 17, "\\Y/ \\Y/"); MvWAddStr(lookdeer1, 2, 19, "\\=/"); MvWAddStr(lookdeer1, 3, 17, "^\\o o/^"); MvWAddStr(lookdeer1, 4, 17, "//( )"); MvWAddStr(lookdeer1, 5, 7, "^~~~~~~~~// \\O/"); MvWAddStr(lookdeer1, 6, 7, "( \\_____( /"); MvWAddStr(lookdeer1, 7, 8, "( ) /"); MvWAddStr(lookdeer1, 8, 9, "\\\\ /"); MvWAddStr(lookdeer1, 9, 11, "\\>/>"); /* lookdeer2 */ MvWAddStr(lookdeer2, 0, 16, "\\/ \\/"); MvWAddStr(lookdeer2, 1, 17, "\\Y/ \\Y/"); MvWAddStr(lookdeer2, 2, 19, "\\=/"); MvWAddStr(lookdeer2, 3, 17, "^\\o o/^"); MvWAddStr(lookdeer2, 4, 17, "//( )"); MvWAddStr(lookdeer2, 5, 7, "^~~~~~~~~// \\O/"); MvWAddStr(lookdeer2, 6, 7, "(( )____( /"); MvWAddStr(lookdeer2, 7, 7, "( / |"); MvWAddStr(lookdeer2, 8, 8, "\\/ |"); MvWAddStr(lookdeer2, 9, 9, "|> |>"); /* lookdeer3 */ MvWAddStr(lookdeer3, 0, 16, "\\/ \\/"); MvWAddStr(lookdeer3, 1, 17, "\\Y/ \\Y/"); MvWAddStr(lookdeer3, 2, 19, "\\=/"); MvWAddStr(lookdeer3, 3, 17, "^\\o o/^"); MvWAddStr(lookdeer3, 4, 17, "//( )"); MvWAddStr(lookdeer3, 5, 7, "^~~~~~~~~// \\O/"); MvWAddStr(lookdeer3, 6, 6, "( ()_____( /"); MvWAddStr(lookdeer3, 7, 6, "/ / /"); MvWAddStr(lookdeer3, 8, 5, "|/ \\"); MvWAddStr(lookdeer3, 9, 5, "/> \\>"); /* lookdeer4 */ MvWAddStr(lookdeer4, 0, 16, "\\/ \\/"); MvWAddStr(lookdeer4, 1, 17, "\\Y/ \\Y/"); MvWAddStr(lookdeer4, 2, 19, "\\=/"); MvWAddStr(lookdeer4, 3, 17, "^\\o o/^"); MvWAddStr(lookdeer4, 4, 17, "//( )"); MvWAddStr(lookdeer4, 5, 7, "^~~~~~~~~// \\O/"); MvWAddStr(lookdeer4, 6, 6, "( )______( /"); MvWAddStr(lookdeer4, 7, 5, "(/ \\"); MvWAddStr(lookdeer4, 8, 0, "v___= ----^"); /***********************************************/ cbreak(); nodelay(stdscr, TRUE); for (;;) { clear(); werase(treescrn); touchwin(w_del_msg); touchwin(treescrn); werase(treescrn2); touchwin(treescrn2); werase(treescrn8); touchwin(treescrn8); refresh(); look_out(150); boxit(); refresh(); look_out(150); seas(); refresh(); look_out(150); greet(); refresh(); look_out(150); fromwho(); refresh(); look_out(150); tree(); look_out(150); balls(); look_out(150); star(); look_out(150); strng1(); strng2(); strng3(); strng4(); strng5(); /* set up the windows for our blinking trees */ /* **************************************** */ /* treescrn3 */ overlay(treescrn, treescrn3); /*balls */ MvWAddCh(treescrn3, 4, 18, ' '); MvWAddCh(treescrn3, 7, 6, ' '); MvWAddCh(treescrn3, 8, 19, ' '); MvWAddCh(treescrn3, 11, 22, ' '); /*star */ MvWAddCh(treescrn3, 0, 12, '*'); /*strng1 */ MvWAddCh(treescrn3, 3, 11, ' '); /*strng2 */ MvWAddCh(treescrn3, 5, 13, ' '); MvWAddCh(treescrn3, 6, 10, ' '); /*strng3 */ MvWAddCh(treescrn3, 7, 16, ' '); MvWAddCh(treescrn3, 7, 14, ' '); /*strng4 */ MvWAddCh(treescrn3, 10, 13, ' '); MvWAddCh(treescrn3, 10, 10, ' '); MvWAddCh(treescrn3, 11, 8, ' '); /*strng5 */ MvWAddCh(treescrn3, 11, 18, ' '); MvWAddCh(treescrn3, 12, 13, ' '); /* treescrn4 */ overlay(treescrn, treescrn4); /*balls */ MvWAddCh(treescrn4, 3, 9, ' '); MvWAddCh(treescrn4, 4, 16, ' '); MvWAddCh(treescrn4, 7, 6, ' '); MvWAddCh(treescrn4, 8, 19, ' '); MvWAddCh(treescrn4, 11, 2, ' '); MvWAddCh(treescrn4, 12, 23, ' '); /*star */ (void) wstandout(treescrn4); MvWAddCh(treescrn4, 0, 12, '*'); (void) wstandend(treescrn4); /*strng1 */ MvWAddCh(treescrn4, 3, 13, ' '); /*strng2 */ /*strng3 */ MvWAddCh(treescrn4, 7, 15, ' '); MvWAddCh(treescrn4, 8, 11, ' '); /*strng4 */ MvWAddCh(treescrn4, 9, 16, ' '); MvWAddCh(treescrn4, 10, 12, ' '); MvWAddCh(treescrn4, 11, 8, ' '); /*strng5 */ MvWAddCh(treescrn4, 11, 18, ' '); MvWAddCh(treescrn4, 12, 14, ' '); /* treescrn5 */ overlay(treescrn, treescrn5); /*balls */ MvWAddCh(treescrn5, 3, 15, ' '); MvWAddCh(treescrn5, 10, 20, ' '); MvWAddCh(treescrn5, 12, 1, ' '); /*star */ MvWAddCh(treescrn5, 0, 12, '*'); /*strng1 */ MvWAddCh(treescrn5, 3, 11, ' '); /*strng2 */ MvWAddCh(treescrn5, 5, 12, ' '); /*strng3 */ MvWAddCh(treescrn5, 7, 14, ' '); MvWAddCh(treescrn5, 8, 10, ' '); /*strng4 */ MvWAddCh(treescrn5, 9, 15, ' '); MvWAddCh(treescrn5, 10, 11, ' '); MvWAddCh(treescrn5, 11, 7, ' '); /*strng5 */ MvWAddCh(treescrn5, 11, 17, ' '); MvWAddCh(treescrn5, 12, 13, ' '); /* treescrn6 */ overlay(treescrn, treescrn6); /*balls */ MvWAddCh(treescrn6, 6, 7, ' '); MvWAddCh(treescrn6, 7, 18, ' '); MvWAddCh(treescrn6, 10, 4, ' '); MvWAddCh(treescrn6, 11, 23, ' '); /*star */ (void) wstandout(treescrn6); MvWAddCh(treescrn6, 0, 12, '*'); (void) wstandend(treescrn6); /*strng1 */ /*strng2 */ MvWAddCh(treescrn6, 5, 11, ' '); /*strng3 */ MvWAddCh(treescrn6, 7, 13, ' '); MvWAddCh(treescrn6, 8, 9, ' '); /*strng4 */ MvWAddCh(treescrn6, 9, 14, ' '); MvWAddCh(treescrn6, 10, 10, ' '); MvWAddCh(treescrn6, 11, 6, ' '); /*strng5 */ MvWAddCh(treescrn6, 11, 16, ' '); MvWAddCh(treescrn6, 12, 12, ' '); /* treescrn7 */ overlay(treescrn, treescrn7); /*balls */ MvWAddCh(treescrn7, 3, 15, ' '); MvWAddCh(treescrn7, 6, 7, ' '); MvWAddCh(treescrn7, 7, 18, ' '); MvWAddCh(treescrn7, 10, 4, ' '); MvWAddCh(treescrn7, 11, 22, ' '); /*star */ MvWAddCh(treescrn7, 0, 12, '*'); /*strng1 */ MvWAddCh(treescrn7, 3, 12, ' '); /*strng2 */ MvWAddCh(treescrn7, 5, 13, ' '); MvWAddCh(treescrn7, 6, 9, ' '); /*strng3 */ MvWAddCh(treescrn7, 7, 15, ' '); MvWAddCh(treescrn7, 8, 11, ' '); /*strng4 */ MvWAddCh(treescrn7, 9, 16, ' '); MvWAddCh(treescrn7, 10, 12, ' '); MvWAddCh(treescrn7, 11, 8, ' '); /*strng5 */ MvWAddCh(treescrn7, 11, 18, ' '); MvWAddCh(treescrn7, 12, 14, ' '); look_out(150); reindeer(); touchwin(w_holiday); wrefresh(w_holiday); wrefresh(w_del_msg); look_out(500); for (loopy = 0; loopy < 100; loopy++) { blinkit(); } #ifdef NOLOOP done(0); #endif } /*NOTREACHED */ } static int boxit(void) { int x = 0; while (x < 20) { MvAddCh(x, 7, '|'); ++x; } x = 8; while (x < 80) { MvAddCh(19, x, '_'); ++x; } x = 0; while (x < 80) { MvAddCh(22, x, '_'); ++x; } return (0); } static int seas(void) { MvAddCh(4, 1, 'S'); MvAddCh(6, 1, 'E'); MvAddCh(8, 1, 'A'); MvAddCh(10, 1, 'S'); MvAddCh(12, 1, 'O'); MvAddCh(14, 1, 'N'); MvAddCh(16, 1, '`'); MvAddCh(18, 1, 'S'); return (0); } static int greet(void) { MvAddCh(3, 5, 'G'); MvAddCh(5, 5, 'R'); MvAddCh(7, 5, 'E'); MvAddCh(9, 5, 'E'); MvAddCh(11, 5, 'T'); MvAddCh(13, 5, 'I'); MvAddCh(15, 5, 'N'); MvAddCh(17, 5, 'G'); MvAddCh(19, 5, 'S'); return (0); } static int fromwho(void) { MvAddStr(21, 13, FROMWHO); return (0); } static int tree(void) { set_color(treescrn, COLOR_GREEN); MvWAddCh(treescrn, 1, 11, (chtype) '/'); MvWAddCh(treescrn, 2, 11, (chtype) '/'); MvWAddCh(treescrn, 3, 10, (chtype) '/'); MvWAddCh(treescrn, 4, 9, (chtype) '/'); MvWAddCh(treescrn, 5, 9, (chtype) '/'); MvWAddCh(treescrn, 6, 8, (chtype) '/'); MvWAddCh(treescrn, 7, 7, (chtype) '/'); MvWAddCh(treescrn, 8, 6, (chtype) '/'); MvWAddCh(treescrn, 9, 6, (chtype) '/'); MvWAddCh(treescrn, 10, 5, (chtype) '/'); MvWAddCh(treescrn, 11, 3, (chtype) '/'); MvWAddCh(treescrn, 12, 2, (chtype) '/'); MvWAddCh(treescrn, 1, 13, (chtype) '\\'); MvWAddCh(treescrn, 2, 13, (chtype) '\\'); MvWAddCh(treescrn, 3, 14, (chtype) '\\'); MvWAddCh(treescrn, 4, 15, (chtype) '\\'); MvWAddCh(treescrn, 5, 15, (chtype) '\\'); MvWAddCh(treescrn, 6, 16, (chtype) '\\'); MvWAddCh(treescrn, 7, 17, (chtype) '\\'); MvWAddCh(treescrn, 8, 18, (chtype) '\\'); MvWAddCh(treescrn, 9, 18, (chtype) '\\'); MvWAddCh(treescrn, 10, 19, (chtype) '\\'); MvWAddCh(treescrn, 11, 21, (chtype) '\\'); MvWAddCh(treescrn, 12, 22, (chtype) '\\'); MvWAddCh(treescrn, 4, 10, (chtype) '_'); MvWAddCh(treescrn, 4, 14, (chtype) '_'); MvWAddCh(treescrn, 8, 7, (chtype) '_'); MvWAddCh(treescrn, 8, 17, (chtype) '_'); MvWAddStr(treescrn, 13, 0, "//////////// \\\\\\\\\\\\\\\\\\\\\\\\"); MvWAddStr(treescrn, 14, 11, "| |"); MvWAddStr(treescrn, 15, 11, "|_|"); unset_color(treescrn); wrefresh(treescrn); wrefresh(w_del_msg); return (0); } static int balls(void) { overlay(treescrn, treescrn2); set_color(treescrn2, COLOR_BLUE); MvWAddCh(treescrn2, 3, 9, (chtype) '@'); MvWAddCh(treescrn2, 3, 15, (chtype) '@'); MvWAddCh(treescrn2, 4, 8, (chtype) '@'); MvWAddCh(treescrn2, 4, 16, (chtype) '@'); MvWAddCh(treescrn2, 5, 7, (chtype) '@'); MvWAddCh(treescrn2, 5, 17, (chtype) '@'); MvWAddCh(treescrn2, 7, 6, (chtype) '@'); MvWAddCh(treescrn2, 7, 18, (chtype) '@'); MvWAddCh(treescrn2, 8, 5, (chtype) '@'); MvWAddCh(treescrn2, 8, 19, (chtype) '@'); MvWAddCh(treescrn2, 10, 4, (chtype) '@'); MvWAddCh(treescrn2, 10, 20, (chtype) '@'); MvWAddCh(treescrn2, 11, 2, (chtype) '@'); MvWAddCh(treescrn2, 11, 22, (chtype) '@'); MvWAddCh(treescrn2, 12, 1, (chtype) '@'); MvWAddCh(treescrn2, 12, 23, (chtype) '@'); unset_color(treescrn2); wrefresh(treescrn2); wrefresh(w_del_msg); return (0); } static int star(void) { (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_YELLOW); MvWAddCh(treescrn2, 0, 12, (chtype) '*'); (void) wstandend(treescrn2); unset_color(treescrn2); wrefresh(treescrn2); wrefresh(w_del_msg); return (0); } static int strng1(void) { (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); MvWAddCh(treescrn2, 3, 13, (chtype) '\''); MvWAddCh(treescrn2, 3, 12, (chtype) ':'); MvWAddCh(treescrn2, 3, 11, (chtype) '.'); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); wrefresh(treescrn2); wrefresh(w_del_msg); return (0); } static int strng2(void) { (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); MvWAddCh(treescrn2, 5, 14, (chtype) '\''); MvWAddCh(treescrn2, 5, 13, (chtype) ':'); MvWAddCh(treescrn2, 5, 12, (chtype) '.'); MvWAddCh(treescrn2, 5, 11, (chtype) ','); MvWAddCh(treescrn2, 6, 10, (chtype) '\''); MvWAddCh(treescrn2, 6, 9, (chtype) ':'); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); wrefresh(treescrn2); wrefresh(w_del_msg); return (0); } static int strng3(void) { (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); MvWAddCh(treescrn2, 7, 16, (chtype) '\''); MvWAddCh(treescrn2, 7, 15, (chtype) ':'); MvWAddCh(treescrn2, 7, 14, (chtype) '.'); MvWAddCh(treescrn2, 7, 13, (chtype) ','); MvWAddCh(treescrn2, 8, 12, (chtype) '\''); MvWAddCh(treescrn2, 8, 11, (chtype) ':'); MvWAddCh(treescrn2, 8, 10, (chtype) '.'); MvWAddCh(treescrn2, 8, 9, (chtype) ','); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); wrefresh(treescrn2); wrefresh(w_del_msg); return (0); } static int strng4(void) { (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); MvWAddCh(treescrn2, 9, 17, (chtype) '\''); MvWAddCh(treescrn2, 9, 16, (chtype) ':'); MvWAddCh(treescrn2, 9, 15, (chtype) '.'); MvWAddCh(treescrn2, 9, 14, (chtype) ','); MvWAddCh(treescrn2, 10, 13, (chtype) '\''); MvWAddCh(treescrn2, 10, 12, (chtype) ':'); MvWAddCh(treescrn2, 10, 11, (chtype) '.'); MvWAddCh(treescrn2, 10, 10, (chtype) ','); MvWAddCh(treescrn2, 11, 9, (chtype) '\''); MvWAddCh(treescrn2, 11, 8, (chtype) ':'); MvWAddCh(treescrn2, 11, 7, (chtype) '.'); MvWAddCh(treescrn2, 11, 6, (chtype) ','); MvWAddCh(treescrn2, 12, 5, (chtype) '\''); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); wrefresh(treescrn2); wrefresh(w_del_msg); return (0); } static int strng5(void) { (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); MvWAddCh(treescrn2, 11, 19, (chtype) '\''); MvWAddCh(treescrn2, 11, 18, (chtype) ':'); MvWAddCh(treescrn2, 11, 17, (chtype) '.'); MvWAddCh(treescrn2, 11, 16, (chtype) ','); MvWAddCh(treescrn2, 12, 15, (chtype) '\''); MvWAddCh(treescrn2, 12, 14, (chtype) ':'); MvWAddCh(treescrn2, 12, 13, (chtype) '.'); MvWAddCh(treescrn2, 12, 12, (chtype) ','); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); /* save a fully lit tree */ overlay(treescrn2, treescrn); wrefresh(treescrn2); wrefresh(w_del_msg); return (0); } static int blinkit(void) { static int cycle; if (cycle > 4) { cycle = 0; } touchwin(treescrn8); switch (cycle) { case 0: overlay(treescrn3, treescrn8); wrefresh(treescrn8); wrefresh(w_del_msg); break; case 1: overlay(treescrn4, treescrn8); wrefresh(treescrn8); wrefresh(w_del_msg); break; case 2: overlay(treescrn5, treescrn8); wrefresh(treescrn8); wrefresh(w_del_msg); break; case 3: overlay(treescrn6, treescrn8); wrefresh(treescrn8); wrefresh(w_del_msg); break; case 4: overlay(treescrn7, treescrn8); wrefresh(treescrn8); wrefresh(w_del_msg); break; } touchwin(treescrn8); /*ALL ON************************************************** */ overlay(treescrn, treescrn8); wrefresh(treescrn8); wrefresh(w_del_msg); ++cycle; return (0); } static void deer_step(WINDOW *win, int y, int x) { mvwin(win, y, x); wrefresh(win); wrefresh(w_del_msg); look_out(5); } static int reindeer(void) { int looper; y_pos = 0; for (x_pos = 70; x_pos > 62; x_pos--) { if (x_pos < 62) { y_pos = 1; } for (looper = 0; looper < 4; looper++) { MvWAddCh(dotdeer0, y_pos, x_pos, (chtype) '.'); wrefresh(dotdeer0); wrefresh(w_del_msg); werase(dotdeer0); wrefresh(dotdeer0); wrefresh(w_del_msg); look_out(50); } } y_pos = 2; for (; x_pos > 50; x_pos--) { for (looper = 0; looper < 4; looper++) { if (x_pos < 56) { y_pos = 3; MvWAddCh(stardeer0, y_pos, x_pos, (chtype) '*'); wrefresh(stardeer0); wrefresh(w_del_msg); werase(stardeer0); wrefresh(stardeer0); wrefresh(w_del_msg); } else { MvWAddCh(dotdeer0, y_pos, x_pos, (chtype) '*'); wrefresh(dotdeer0); wrefresh(w_del_msg); werase(dotdeer0); wrefresh(dotdeer0); wrefresh(w_del_msg); } } } x_pos = 58; for (y_pos = 2; y_pos < 5; y_pos++) { touchwin(lildeer0); wrefresh(lildeer0); wrefresh(w_del_msg); for (looper = 0; looper < 4; looper++) { deer_step(lildeer3, y_pos, x_pos); deer_step(lildeer2, y_pos, x_pos); deer_step(lildeer1, y_pos, x_pos); deer_step(lildeer2, y_pos, x_pos); deer_step(lildeer3, y_pos, x_pos); touchwin(lildeer0); wrefresh(lildeer0); wrefresh(w_del_msg); x_pos -= 2; } } x_pos = 35; for (y_pos = 5; y_pos < 10; y_pos++) { touchwin(middeer0); wrefresh(middeer0); wrefresh(w_del_msg); for (looper = 0; looper < 2; looper++) { deer_step(middeer3, y_pos, x_pos); deer_step(middeer2, y_pos, x_pos); deer_step(middeer1, y_pos, x_pos); deer_step(middeer2, y_pos, x_pos); deer_step(middeer3, y_pos, x_pos); touchwin(middeer0); wrefresh(middeer0); wrefresh(w_del_msg); x_pos -= 3; } } look_out(300); y_pos = 1; for (x_pos = 8; x_pos < 16; x_pos++) { deer_step(bigdeer4, y_pos, x_pos); deer_step(bigdeer3, y_pos, x_pos); deer_step(bigdeer2, y_pos, x_pos); deer_step(bigdeer1, y_pos, x_pos); deer_step(bigdeer2, y_pos, x_pos); deer_step(bigdeer3, y_pos, x_pos); deer_step(bigdeer4, y_pos, x_pos); deer_step(bigdeer0, y_pos, x_pos); } --x_pos; for (looper = 0; looper < 6; looper++) { deer_step(lookdeer4, y_pos, x_pos); deer_step(lookdeer3, y_pos, x_pos); deer_step(lookdeer2, y_pos, x_pos); deer_step(lookdeer1, y_pos, x_pos); deer_step(lookdeer2, y_pos, x_pos); deer_step(lookdeer3, y_pos, x_pos); deer_step(lookdeer4, y_pos, x_pos); } deer_step(lookdeer0, y_pos, x_pos); for (; y_pos < 10; y_pos++) { for (looper = 0; looper < 2; looper++) { deer_step(bigdeer4, y_pos, x_pos); deer_step(bigdeer3, y_pos, x_pos); deer_step(bigdeer2, y_pos, x_pos); deer_step(bigdeer1, y_pos, x_pos); deer_step(bigdeer2, y_pos, x_pos); deer_step(bigdeer3, y_pos, x_pos); deer_step(bigdeer4, y_pos, x_pos); } deer_step(bigdeer0, y_pos, x_pos); } --y_pos; deer_step(lookdeer3, y_pos, x_pos); return (0); } static void done(int sig GCC_UNUSED) { CATCHALL(done); move(LINES - 1, 0); refresh(); endwin(); curs_set(1); #if NO_LEAKS if (my_pairs != 0) free(my_pairs); #endif ExitProgram(EXIT_SUCCESS); }
Close