kernel: restore setting KTS_NONE
[minix.git] / commands / banner / banner.c
blob99719e6f4116aa709fbf77a8847208e0a86af88a
1 /* banner - print a banner Author: Brian Wallis */
3 /*****************************************************************
5 * SYSVbanner.c
7 * This is a PD version of the SYS V banner program (at least I think
8 * it is compatible to SYS V) which I wrote to use with the clock
9 * program written by:
10 ** DCF, Inc.
11 ** 14623 North 49th Place
12 ** Scottsdale, AZ 85254
13 * and published in the net comp.sources.misc newsgroup in early July
14 * since the BSD banner program works quite differently.
16 * There is no copyright or responsibility accepted for the use
17 * of this software.
19 * Brian Wallis, brw@jim.odr.oz, 4 July 1988
21 *****************************************************************/
23 #include <string.h>
24 #include <stdio.h>
26 int main(int argc, char **argv);
28 char *glyphs[] = {
29 " @@@ @@ @@ @ @ @@@@@ @@ @@@ ",
30 " @@@ @@ @@ @ @ @ @ @@@ @ @ @ @@@ ",
31 " @@@ @ @ @@@@@@@@ @ @@ @ @@ @ ",
32 " @ @ @ @@@@@ @ @@@ @ ",
33 " @@@@@@@ @ @ @ @ @ @ ",
34 " @@@ @ @ @ @ @ @ @@ @ @ ",
35 " @@@ @ @ @@@@@ @ @@ @@@@ @ ",
37 " @@ @@ @",
38 " @ @ @ @ @ @ ",
39 " @ @ @ @ @ @ ",
40 " @ @ @@@@@@@ @@@@@ @@@ @@@@@ @ ",
41 " @ @ @ @ @ @@@ @ ",
42 " @ @ @ @ @ @ @@@ @ ",
43 " @@ @@ @ @@@ @ ",
45 " @@@ @ @@@@@ @@@@@ @ @@@@@@@ @@@@@ @@@@@@@",
46 " @ @ @@ @ @@ @@ @ @ @ @@ @ ",
47 "@ @ @ @ @ @ @@ @ @ @ @ ",
48 "@ @ @ @ @@@@@ @@@@@ @@@@@@@ @@@@@ @@@@@@ @ ",
49 "@ @ @ @ @ @ @ @@ @ @ ",
50 " @ @ @ @ @ @ @ @ @@ @ @ ",
51 " @@@ @@@@@ @@@@@@@ @@@@@ @ @@@@@ @@@@@ @ ",
53 " @@@@@ @@@@@ @@@ @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",
88 " @ @ @ @ @ @ ",
89 " @ @ @ @ @ @ @ ",
90 " @ @ @ @ @ @ @ ",
91 "@ @ @ @@@@@@@ @@@@@ @ @@@@@ @@@@@@@",
93 " @@@ ",
94 " @@@ @@ @@@@@ @@@@ @@@@@ @@@@@@ @@@@@@ @@@@ ",
95 " @ @ @ @ @ @ @ @ @ @ @ @ @",
96 " @ @ @ @@@@@ @ @ @ @@@@@ @@@@@ @ ",
97 " @@@@@@ @ @ @ @ @ @ @ @ @@@",
98 " @ @ @ @ @ @ @ @ @ @ @ @",
99 " @ @ @@@@@ @@@@ @@@@@ @@@@@@ @ @@@@ ",
101 " ",
102 " @ @ @ @ @ @ @ @ @ @ @ @@@@ ",
103 " @ @ @ @ @ @ @ @@ @@ @@ @ @ @",
104 " @@@@@@ @ @ @@@@ @ @ @@ @ @ @ @ @ @",
105 " @ @ @ @ @ @ @ @ @ @ @ @ @ @",
106 " @ @ @ @ @ @ @ @ @ @ @ @@ @ @",
107 " @ @ @ @@@@ @ @ @@@@@@ @ @ @ @ @@@@ ",
109 " ",
110 " @@@@@ @@@@ @@@@@ @@@@ @@@@@ @ @ @ @ @ @",
111 " @ @ @ @ @ @ @ @ @ @ @ @ @ @",
112 " @ @ @ @ @ @ @@@@ @ @ @ @ @ @ @",
113 " @@@@@ @ @ @ @@@@@ @ @ @ @ @ @ @ @@ @",
114 " @ @ @ @ @ @ @ @ @ @ @ @ @@ @@",
115 " @ @@@ @ @ @ @@@@ @ @@@@ @@ @ @",
117 " @@@ @ @@@ @@ @ @ @ @",
118 " @ @ @ @ @@@@@@ @ @ @ @ @ @ @ @ @ ",
119 " @ @ @ @ @ @ @ @ @@ @ @ @ @",
120 " @@ @ @ @@ @@ @ @ @ ",
121 " @@ @ @ @ @ @ @ @ @ @",
122 " @ @ @ @ @ @ @ @ @ @ ",
123 " @ @ @ @@@@@@ @@@ @ @@@ @ @ @ @"
126 int main(argc, argv)
127 int argc;
128 char *argv[];
130 int a, b, c, len, ind;
131 char line[80];
133 for (argv++; --argc; argv++) {
134 len = strlen(*argv);
135 if (len > 10) len = 10;
136 for (a = 0; a < 7; a++) {
137 for (b = 0; b < len; b++) {
138 if ((ind = (*argv)[b] - ' ') < 0) ind = 0;
139 for (c = 0; c < 7; c++) {
140 line[b * 8 + c] = glyphs[(ind / 8 * 7) + a][(ind % 8 * 7) + c] == '@' ? ind + ' ' : ' ';
142 line[b * 8 + 7] = ' ';
144 for (b = len * 8 - 1; b >= 0; b--) {
145 if (line[b] != ' ') break;
146 line[b] = '\0';
148 printf("%s\n", line);
150 printf("\n");
152 return(0);