/* * rajesh.h * ***************************************************************************** * * Miscellaneous functions in C * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ***************************************************************************** * * Author : Rajesh _ThE gReAt * Built on : Some day in 2k * Last Modified on : Friday, February 08, 2002, 3:54:00 PM * * Known errors : none * ***************************************************************************** * DISCLAIMER: ***************************************************************************** * * Programmers may incorporate any or all code into their programs, * giving proper credit within the source. Publication of the * source routines is permitted so long as proper credit is given * to Rajesh _ThE gReAt. * * Copyright (C) 2002, 2003 by Rajesh _ThE gReAt. You may use this program, or * code or tables extracted from it, as desired without restriction. * I can not and will not be held responsible for any damage caused from * the use of this software. * * Read license.txt from http://www.rajeshgoli.com/license.txt * or http://www.rajeshgoli.com/license.htm * before using / distributing / or any sort of use of my source * Also read my disclaimer http://www.rajeshgoli.com/disclaimer.htm * * YOU AGREE TO BE BOUND BY MY DISCLAIMER AND LICENSE BY IN ANY WAY * USING THIS FILE . * ***************************************************************************** * This source works with Turbo C 2.0 and Turbo C++ 3.0 and above. ***************************************************************************** * Rajesh _ThE gReAt is a synonym of Rajesh Goli * Source freely distributable *****************************************************************************/ #ifndef __STDIO_H #include #endif /* for clrscr() */ #ifndef __CONIO_H #include #endif /* for delay() */ #ifndef __DOS_H #include #endif void print_rajesh (void); void rotate (int ); int repeat (void); /* Prints my name and essentially calls rotate */ void print_rajesh(void) { clrscr(); printf("\nThis program made by :"); printf("\n\n\n\n\n\007"); printf(",##########. ,####. ,####.\n"); printf(":#############. `####; :####.\n"); printf(":#####. :#####. :####.\n"); printf(":#############; `#########. ,####. ,#######. ,########. :###########.\n"); printf(":############; :####. :####. ,###. :###. ,####. :#. :###########.\n"); printf(":##########. :#########. :####.,####. :####.`##########. :####. :####.\n"); printf(":###########. ,############. :####.:###########; `#########.:####. :####.\n"); printf(":############. :#####. :####. :####.`#####. :#####;:####. :####.\n"); printf(":#####. `###### ############. :####. `#########. ,#########; :####. :####.\n"); printf("`#####; `######; `##########; :####. `#####; `#######; `####; `####;\n"); printf(" #####"); printf("\n\n\n\tRajesh _ThE gReAt in 2k + 2.....\n\n\n\t\t\tHit any key to continue....."); for(;!kbhit();) { printf("\b\\"); delay(150); printf("\b|"); delay(150); printf("\b/"); delay(150); printf("\b-"); delay(150); } printf("\b "); } /* Rotate illusion using '-' '\' '|' '/' num = delay in milliseconds b/w each move */ void rotate(int num) { for(;!kbhit();) { printf("\b\\"); delay(num); printf("\b|"); delay(num); printf("\b/"); delay(num); printf("\b-"); delay(num); } printf("\b "); } /* Displays [yn] and gets option */ int repeat(void) { char resp[3]; printf("[yn] : "); gets(resp); if(resp[0] == 'y' || resp[0] == 'Y') return 1; else return 0; }