From f29d3519ce073ec30f99754d93304324f7f26d65 Mon Sep 17 00:00:00 2001 From: Deposite Pirate Date: Sun, 16 Sep 2018 18:47:05 +0200 Subject: Initial commit. --- base/bin/slackwareutils/sysvbanner.c | 151 +++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 base/bin/slackwareutils/sysvbanner.c (limited to 'base/bin/slackwareutils/sysvbanner.c') diff --git a/base/bin/slackwareutils/sysvbanner.c b/base/bin/slackwareutils/sysvbanner.c new file mode 100644 index 0000000..e0ec6c3 --- /dev/null +++ b/base/bin/slackwareutils/sysvbanner.c @@ -0,0 +1,151 @@ +/***************************************************************** + * + * SYSVbanner.c + * + * This is a PD version of the SYS V banner program (at least I think + * it is compatible to SYS V) which I wrote to use with the clock + * program written by: + ** DCF, Inc. + ** 14623 North 49th Place + ** Scottsdale, AZ 85254 + * and published in the net comp.sources.misc newsgroup in early July + * since the BSD banner program works quite differently. + * + * There is no copyright or responsibility accepted for the use + * of this software. + * + * Brian Wallis, brw@jim.odr.oz, 4 July 1988 + * + *****************************************************************/ + +#include +#include +#include + +char *glyphs[] = { +" ### ### ### # # ##### ### # ## ### ", +" ### ### ### # # # # ## # # # # ### ", +" ### # # ######## # ### # ## # ", +" # # # ##### # ### # ", +" ####### # # # #### # # ", +" ### # # # # # # # ## # ", +" ### # # ##### # ### #### # ", + +" ## ## #", +" # # # # # # ", +" # # # # # # ", +" # # ####### ##### ### ##### # ", +" # # # # # ### ### # ", +" # # # # # # ### # ", +" ## ## # ### # ", + +" ### # ##### ##### # ####### ##### #######", +" # # ## # ## ## # # # ## # ", +"# # # # # ## # # # # ", +"# # # ##### ##### # # ###### ###### # ", +"# # # # ######## ## # # ", +" # # # # # # # # ## # # ", +" ### ##### ####### ##### # ##### ##### # ", + +" ##### ##### # ### # # ##### ", +"# ## # ### ### # # # #", +"# ## # # # ##### # #", +" ##### ###### ### # # ## ", +"# # # # ### # ##### # # ", +"# ## # ### # # # ", +" ##### ##### # # # # # ", + +" ##### # ###### ##### ###### ############## ##### ", +"# # # # # ## ## ## # # #", +"# ### # # # # ## # ## # # ", +"# # # ## ####### # # ###### ##### # ####", +"# #### ######## ## # ## # # #", +"# # ## ## ## ## # # #", +" ##### # ####### ##### ###### ######## ##### ", + +"# # ### ## # # # ## ########", +"# # # ## # # ## #### ## #", +"# # # ## # # # # # ## # ## #", +"####### # #### # # # ## # ## #", +"# # # # ## # # # ## # ## #", +"# # # # ## # # # ## ### #", +"# # ### ##### # # ######## ## ########", + +"###### ##### ###### ##### ######## ## ## #", +"# ## ## ## # # # ## ## # #", +"# ## ## ## # # ## ## # #", +"###### # ####### ##### # # ## ## # #", +"# # # ## # # # # # # # # # #", +"# # # # # # # # # # # # # # #", +"# #### ## # ##### # ##### # ## ## ", + +"# ## ######## ##### # ##### # ", +" # # # # # # # # # # ", +" # # # # # # # # # # ", +" # # # # # # ", +" # # # # # # # ", +" # # # # # # # ", +"# # # ####### ##### # ##### #######", + +" ### ", +" ### ## ##### #### ##### ###### ###### #### ", +" # # # # # # # # # # # # #", +" # # # ##### # # # ##### ##### # ", +" ###### # # # # # # # # ###", +" # # # # # # # # # # # #", +" # # ##### #### ##### ###### # #### ", + +" ", +" # # # # # # # # # # # #### ", +" # # # # # # # ## ## ## # # #", +" ###### # # #### # # ## # # # # # #", +" # # # # # # # # # # # # # #", +" # # # # # # # # # # # ## # #", +" # # # #### # # ###### # # # # #### ", + +" ", +" ##### #### ##### #### ##### # # # # # #", +" # # # # # # # # # # # # # #", +" # # # # # # #### # # # # # # #", +" ##### # # # ##### # # # # # # # ## #", +" # # # # # # # # # # # # ## ##", +" # ### # # # #### # #### ## # #", + +" ### # ### ## # # # #", +" # # # # ###### # # # # # # # # # ", +" # # # # # # # # ## # # # #", +" ## # # ## ## # # # ", +" ## # # # # # # # # #", +" # # # # # # # # # # ", +" # # # ###### ### # ### # # # #"}; + + +int main(int argc, char *argv[]) +{ + int a,b,c,len,ind; + char line[80]; + + for(argv++;--argc;argv++){ + len=strlen(*argv); + if(len>10) + len=10; + for(a=0;a<7;a++){ + for(b=0;b 95) + 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'; + } + puts(line); + } + puts(""); + } + exit(0); +} -- cgit v1.2.3-70-g09d2