From 839f1395a3a1ecb3e6926fd00c376b15ca62cde2 Mon Sep 17 00:00:00 2001 From: gbrochar Date: Wed, 4 Sep 2024 13:25:11 +0200 Subject: [PATCH] feat: banner --- assets/woody.ans | 21 +++++++++++++++++++++ src/main.c | 12 ++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 assets/woody.ans diff --git a/assets/woody.ans b/assets/woody.ans new file mode 100644 index 0000000..2ea29ab --- /dev/null +++ b/assets/woody.ans @@ -0,0 +1,21 @@ +                   ..*************..***.                                        +               .***************,***.**.   *.                                    +           *****************.*****,****      .                                  +       .   .****************.***.      .       .                                +        .********************.***          ./.  //                              +      .***************************          /.// .###                       ... +    .******************************. //.//   .../.##.                 .(##//.   +   .******..  .************(##########(.../.  ##############...,..####.//.      +  ,**.                   #######...,.##.####(######################..           + ..                      .#######.,,,,,,,.#####################.                +                           .(########,,,,,,,,,,,.#......,                       +                                 ..##.#.#####..#.                               +                                       .##.###.                                 + _ _ _____ _____ ____ _ _ + ( \/\/ )( _ )( _ )( _ \( \/ ) + ) ( )(_)( )(_)( )(_) )\ / + (__/\__)(_____)(_____)(____/ (__) + _ _ _____ _____ ____ ____ __ ___ _ _ ____ ____ + ( \/\/ )( _ )( _ )( _ \( _ \ /__\ / __)( )/ )( ___)( _ \ + ) ( )(_)( )(_)( )(_) ))___//(__)\( (__ ) ( )__) ) / + (__/\__)(_____)(_____)(____/(__) (__)(__)\___)(_)\_)(____)(_)\_) diff --git a/src/main.c b/src/main.c index d95d228..d2ad045 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,18 @@ #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) { + banner(); if (ac == 2) { return woody_woodpacker(av[1]); } else {