feat: banner

This commit is contained in:
gbrochar 2024-09-04 13:25:11 +02:00
parent 18358ce36c
commit 839f1395a3
2 changed files with 33 additions and 0 deletions

21
assets/woody.ans Normal file
View File

@ -0,0 +1,21 @@
                   ..*************..***.                                       
               .***************,***.**.   *.                                   
           *****************.*****,****      .                                 
       .   .****************.***.      .       .                               
        .********************.***          ./.  //                             
      .***************************          /.// .###                       ...
    .******************************. //.//   .../.##.                 .(##//.  
   .******..  .************(##########(.../.  ##############...,..####.//.     
  ,**.                   #######...,.##.####(######################..          
 ..                      .#######.,,,,,,,.#####################.               
                           .(########,,,,,,,,,,,.#......,                      
                                 ..##.#.#####..#.                              
                                       .##.###.                                
 _ _ _____ _____ ____ _ _
( \/\/ )( _ )( _ )( _ \( \/ )
) ( )(_)( )(_)( )(_) )\ /
(__/\__)(_____)(_____)(____/ (__)
 _ _ _____ _____ ____ ____ __ ___ _ _ ____ ____
( \/\/ )( _ )( _ )( _ \( _ \ /__\ / __)( )/ )( ___)( _ \
) ( )(_)( )(_)( )(_) ))___//(__)\( (__ ) ( )__) ) /
(__/\__)(_____)(_____)(____/(__) (__)(__)\___)(_)\_)(____)(_)\_)

View File

@ -1,6 +1,18 @@
#include "woody.h" #include "woody.h"
void banner(void) {
int fd = open("assets/woody.ans", O_RDONLY);
if (fd == -1) {
ft_printf("warning: can't open banner file\n");
return;
}
char buffer[13149];
read(fd, buffer, 13149);
write(1, buffer, 13149);
}
int main(int ac, char **av) { int main(int ac, char **av) {
banner();
if (ac == 2) { if (ac == 2) {
return woody_woodpacker(av[1]); return woody_woodpacker(av[1]);
} else { } else {