home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 19 Printer
/
19-Printer.zip
/
BANNERP.ZIP
/
BANNER.C
next >
Wrap
C/C++ Source or Header
|
1989-06-13
|
7KB
|
162 lines
/* banner - print a banner Author: Brian Wallis */
/*****************************************************************
$Header: c:/usr/msc/os2/wrk/RCS/banner.c 1.61 89/06/13 20:02:44 RCA Exp $
$Log: banner.c $
* Revision 1.61 89/06/13 20:02:44 RCA
* Test of RCS branch.
*
* Revision 1.6 89/06/13 14:08:13 RCA
* Fixed RCSDIR problem
*
* Revision 1.5 89/06/13 13:53:34 RCA
* Fixed case of Header and Log keywords.
*
*****************************************************************/
#include <stdio.h>
#include <string.h>
char *glyphs[] = {
" @@@ @@@ @@@ @ @ @@@@@ @@@ @ @@ @@@ ",
" @@@ @@@ @@@ @ @ @ @ @@ @ @ @ @ @@@ ",
" @@@ @ @ @@@@@@@@ @ @@@ @ @@ @ ",
" @ @ @ @@@@@ @ @@@ @ ",
" @@@@@@@ @ @ @ @@@@ @ @ ",
" @@@ @ @ @ @ @ @ @ @@ @ ",
" @@@ @ @ @@@@@ @ @@@ @@@@ @ ",
" @@ @@ @",
" @ @ @ @ @ @ ",
" @ @ @ @ @ @ ",
" @ @ @@@ @@@ @@@@@ @@@ @@@@@ @ ",
" @ @ @ @ @ @@@ @@@ @ ",
" @ @ @ @ @ @ @@@ @ ",
" @@ @@ @ @@@ @ ",
" @@@ @ @@@@@ @@@@@ @ @@@@@@@ @@@@@ @@@@@@@",
" @ @ @@ @ @@ @@ @ @ @ @@ @ ",
"@ @ @ @ @ @ @@ @ @ @ @ ",
"@ @ @ @ @@@@@ @@@@@ @@@@@@@ @@@@@ @@@@@@ @ ",
"@ @ @ @ @ @ @ @@ @ @ ",
" @ @ @ @ @ @ @ @ @@ @ @ ",
" @@@ @@@@@ @@@@@@@ @@@@@ @ @@@@@ @@@@@ @ ",
" @@@@@ @@@@@ @ @@@ @ @ @@@@@ ",
"@ @@ @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@@ @@@@@@@",
" @@@ ",
" @@@ @@ @@@@@ @@@@ @@@@@ @@@@@@ @@@@@@ @@@@ ",
" @ @ @ @ @ @ @ @ @ @ @ @ @",
" @ @ @ @@@@@ @ @ @ @@@@@ @@@@@ @ ",
" @@@@@@ @ @ @ @ @ @ @ @ @@@",
" @ @ @ @ @ @ @ @ @ @ @ @",
" @ @ @@@@@ @@@@ @@@@@ @@@@@@ @ @@@@ ",
" ",
" @ @ @ @ @ @ @ @ @ @ @ @@@@ ",
" @ @ @ @ @ @ @ @@ @@ @@ @ @ @",
" @@@@@@ @ @ @@@@ @ @ @@ @ @ @ @ @ @",
" @ @ @ @ @ @ @ @ @ @ @ @ @ @",
" @ @ @ @ @ @ @ @ @ @ @ @@ @ @",
" @ @ @ @@@@ @ @ @@@@@@ @ @ @ @ @@@@ ",
" ",
" @@@@@ @@@@ @@@@@ @@@@ @@@@@ @ @ @ @ @ @",
" @ @ @ @ @ @ @ @ @ @ @ @ @ @",
" @ @ @ @ @ @ @@@@ @ @ @ @ @ @ @",
" @@@@@ @ @ @ @@@@@ @ @ @ @ @ @ @ @@ @",
" @ @ @ @ @ @ @ @ @ @ @ @ @@ @@",
" @ @@@ @ @ @ @@@@ @ @@@@ @@ @ @",
" @@@ @ @@@ @@ @ @ @ @",
" @ @ @ @ @@@@@@ @ @ @ @ @ @ @ @ @ ",
" @ @ @ @ @ @ @ @ @@ @ @ @ @",
" @@ @ @ @@ @@ @ @ @ ",
" @@ @ @ @ @ @ @ @ @ @",
" @ @ @ @ @ @ @ @ @ @ ",
" @ @ @ @@@@@@ @@@ @ @@@ @ @ @ @"};
void main(int argc,char **argv)
{
int a,b,c,len,ind;
char line[80];
char *rv, *au, *dt;
rv = "$Revision: 1.61 $";
au = "$Author: RCA $";
dt = "$Date: 89/06/13 20:02:44 $";
if(argc == 1) {
printf("█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█\n");
printf("█ BANNER %s █\n", rv );
printf("█ %s %s █\n", au, dt );
printf("█ █\n");
printf("█ BANNER prints large letters to standard █\n");
printf("█ output. Redirect to PRN to make a header █\n");
printf("█ for your printouts. █\n");
printf("█ █\n");
printf("█ Credits: from a version by B. Wallis █\n");
printf("█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█\n");
}
for(argv++;--argc;argv++){
len=strlen(*argv);
if(len>10)
len=10;
for(a=0;a<7;a++){
for(b=0;b<len;b++){
if((ind=(*argv)[b]-' ')<0)
ind=0;
for(c=0;c<7;c++){
line[b*8+c] = glyphs[(ind/8*7)+a][(ind%8*7)+c];
}
line[b*8+7] = ' ';
}
for(b=len*8-1;b>=0;b--){
if(line[b]!=' ')
break;
line[b]='\0';
}
printf("%s\n", line);
}
printf("\n");
}
}