Inital commit

This commit is contained in:
Matt Arnold 2022-02-27 19:30:04 -05:00
commit ed29e5bc84
4 changed files with 110 additions and 0 deletions

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
CC=gcc
CFLAGS=-Wall -Werror
all:
$(CC) $(CFLAGS) -o intro2 intro2.c
$(CC) $(CFLAGS) -o intro intro.c
clean:
rm intro
rm intro2

25
banner.txt Normal file
View File

@ -0,0 +1,25 @@
**Piusbird Presents**
mmmmmmm # mmm m""
# # mm mmm # mmm m m mmm mm#mm
# #" # #" # # #" "# "m m" #" "# #
# # # #"""" # # # #m# # # #
# # # "#mm" "mmm" "#m#" "# "#m#" #
m"
""
m "
# mmm m mm m m m m
# # #" # # # #m#
# # # # # # m#m
#mmmmm mm#mm # # "mm"# m" "m
/\_/\
((@v@))
():::()
VV-VV

32
intro.c Normal file
View File

@ -0,0 +1,32 @@
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#define RATE 50 // 2400 baud
int main(int argc, char **argv)
{
printf("%s", "\033[2J"); /* Clears the screen */
// char buffer[255];
//char *b = buffer;
//size_t bufsize = 255;
int count = 0;
char ch;
FILE *fp;
if (argc < 2) {
fprintf(stderr, "%s\n", "No input file");
return 1;
}
fp = fopen(argv[1], "r");
while (!feof(fp)) {
if ( count == RATE) {
sleep(1);
count = 0;
}
ch = getc(fp);
putchar(ch);
count++;
}
return 0;
}

43
intro2.c Normal file
View File

@ -0,0 +1,43 @@
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#define RATE 50 // 2400 baud
int main(int argc, char **argv)
{
printf("%s", "\033[2J"); /* Clears the screen */
// char buffer[255];
//char *b = buffer;
//size_t bufsize = 255;
int count = 0;
char ch;
FILE *fp;
if (argc < 2) {
fprintf(stderr, "%s\n", "No input file");
return 1;
}
fp = fopen(argv[1], "r");
while (!feof(fp)) {
if ( count == RATE) {
sleep(1);
count = 0;
}
int cols = 0;
ch = getc(fp);
printf("%s", "\033[1C");
cols++;
if (cols == 80) {
cols = 0;
printf("%s", "\033[1B");
}
if (ch == '\n') {
printf("%s", "\033[1E");
}
putchar(ch);
count++;
}
return 0;
}