From 6cae6269c513dc2b62ce3bb1ceaeedb43167fd0b Mon Sep 17 00:00:00 2001 From: Valerie Date: Wed, 20 Mar 2024 09:42:02 -0400 Subject: [PATCH] initial commit --- README.md | 5 ++++ main.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 README.md create mode 100644 main.c diff --git a/README.md b/README.md new file mode 100644 index 0000000..1ce874b --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ + +# Pride! for the tty + +A C utility to display flags in 8-color terminals. + diff --git a/main.c b/main.c new file mode 100644 index 0000000..be4b0ed --- /dev/null +++ b/main.c @@ -0,0 +1,69 @@ +#include +#include + +#define RESET "\x1b[0m" + +#define BLACK "\x1b[30m" +#define RED "\x1b[31m" +#define GREEN "\x1b[32m" +#define YELLOW "\x1b[33m" +#define BLUE "\x1b[34m" +#define MAGENTA "\x1b[35m" +#define CYAN "\x1b[36m" +#define GRAY "\x1b[37m" + +#define GREY "\x1b[90m" +#define L_RED "\x1b[91m" +#define LIME "\x1b[92m" +#define L_YELLOW "\x1b[93m" +#define L_BLUE "\x1b[94m" +#define PINK "\x1b[95m" +#define L_CYAN "\x1b[96m" +#define WHITE "\x1b[97m" + +#define STRIPE "██████████████████\n" + +void rainbow() { + +} + +int main(int argc, char **argv) { + char *flag; + if(argc > 1) { flag = argv[1]; } + else { flag = "rainbow"; } + + if(strcmp(flag, "rainbow") == 0) { + printf(RED STRIPE); + printf(L_RED STRIPE); + printf(YELLOW STRIPE); + printf(GREEN STRIPE); + printf(BLUE STRIPE); + printf(MAGENTA STRIPE); + } + + else if(strcmp(flag, "lesbian") == 0) { + printf(RED STRIPE); + printf(L_RED STRIPE); + printf(WHITE STRIPE); + printf(PINK STRIPE); + printf(MAGENTA STRIPE); + } + + else if(strcmp(flag, "nb") == 0) { + printf(L_YELLOW STRIPE); + printf(WHITE STRIPE); + printf(L_BLUE STRIPE); + printf(BLACK STRIPE); + } + + else if(strcmp(flag, "trans") == 0) { + printf(L_CYAN STRIPE); + printf(PINK STRIPE); + printf(WHITE STRIPE); + printf(PINK STRIPE); + printf(L_CYAN STRIPE); + } + + printf(RESET); +} +