home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume26
/
banners-1.1
/
part01
/
banner-05
/
leb.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-11
|
4KB
|
228 lines
/* leb : Large English Banner
*
* Who the heck wrote original Pascal version?
*
* C version by Han, Yun-Su
* 880505 KAIST undergraduate Dept of Life Science
*/
#include <stdio.h>
main(argc, argv)
int argc;
char **argv;
{
char line[256];
if (argc < 2) {
fprintf(stderr, "&:^)\n");
exit(1);
}
getline(line, argc, argv);
lowerline(line);
putline(line);
}
getline(s, n, v)
char *s;
int n;
char *v[];
{
int i, j;
strcpy(s, "");
for (i = 1; i < n; i++, s++) {
for (j = 0; v[i][j] != '\0'; j++, s++)
*s = v[i][j];
*s = ' ';
}
s--;
*s = '\0';
}
lowerline(s)
char *s;
{
char *p;
for (p = s; *p != '\0'; p++)
if (*p >= 'A' && *p <= 'Z')
*p = *p - 'A' + 'a';
}
#define Height 6 /* Height of 3D Font */
#define Blank " "
putline(s)
char *s;
{
static char *data[] = {
" __ ",
" / \\ ",
" / \\ ",
" / /\\ \\ ",
" / ____ \\ ",
"/__/ \\__\\ ",
" ______ ",
"| __ \\ ",
"| |__| | ",
"| __ < ",
"| |__| | ",
"|______/ ",
" _____ ",
" / ____| ",
"| | ",
"| | ",
"| |____ ",
" \\_____| ",
" ______ ",
"| ___ \\ ",
"| | | | ",
"| | | | ",
"| |___| | ",
"|______/ ",
" _______ ",
"| _____| ",
"| |___ ",
"| ___| ",
"| |_____ ",
"|_______| ",
" _______ ",
"| _____| ",
"| |___ ",
"| ___| ",
"| | ",
"|_| ",
" ______ ",
" / _____| ",
"| | ___ ",
"| | |_ | ",
"| |____| | ",
" \\______/ ",
" _ _ ",
"| | | | ",
"| |___| | ",
"| ___ | ",
"| | | | ",
"|_| |_| ",
" _ ",
"| | ",
"| | ",
"| | ",
"| | ",
"|_| ",
" _ ",
" | | ",
" | | ",
" _ | | ",
"| |_| | ",
" \\___/ ",
" _ __ ",
"| | / / ",
"| |/ / ",
"| < ",
"| |\\ \\ ",
"|_| \\_\\ ",
" _ ",
"| | ",
"| | ",
"| | ",
"| |____ ",
"|______| ",
" ___ ___ ",
"| \\ / | ",
"| |\\ \\/ /| | ",
"| | \\__/ | | ",
"| | | | ",
"|_| |_| ",
" __ _ ",
"| \\ | | ",
"| \\ | | ",
"| |\\ \\| | ",
"| | \\ | ",
"|_| \\__| ",
" ______ ",
" / ____ \\ ",
"| | | | ",
"| | | | ",
"| |____| | ",
" \\______/ ",
" _____ ",
"| __ \\ ",
"| |__| | ",
"| ___/ ",
"| | ",
"|_| ",
" ______ ",
" / ____ \\ ",
"| | | | ",
"| | | | ",
"| |___| | ",
" \\________| ",
" _____ ",
"| __ \\ ",
"| |__| | ",
"| _ / ",
"| | \\ \\ ",
"|_| \\_\\ ",
" _____ ",
" / ____| ",
"| |____ ",
" \\____ \\ ",
" ____| | ",
" |_____/ ",
" _________ ",
"|___ ___| ",
" | | ",
" | | ",
" | | ",
" |_| ",
" _ _ ",
"| | | | ",
"| | | | ",
"| | | | ",
"| |___| | ",
" \\_____/ ",
"__ __ ",
"\\ \\ / / ",
" \\ \\ / / ",
" \\ \\ / / ",
" \\ \\/ / ",
" \\__/ ",
"__ __ ",
"\\ \\ / / ",
" \\ \\ / / ",
" \\ \\ /\\ / / ",
" \\ \\/ \\/ / ",
" \\__/\\__/ ",
"__ __ ",
"\\ \\ / / ",
" \\ \\/ / ",
" > < ",
" / /\\ \\ ",
"/_/ \\_\\ ",
"__ __ ",
"\\ \\ / / ",
" \\ \\_/ / ",
" \\ / ",
" | | ",
" |_| ",
" _______ ",
"|____ / ",
" / / ",
" / / ",
" / /___ ",
" /______| ",
};
int i;
char *p;
for (i = 0; i < Height; i++) {
for (p = s; *p != '\0'; p++)
if (*p < 'a' || *p > 'z')
printf(Blank);
else
printf("%s", data[(*p - 'a') * Height + i]);
printf("\n");
}
}