Compare commits
2 commits
da8e51f661
...
efbb098ed9
Author | SHA1 | Date | |
---|---|---|---|
efbb098ed9 | |||
d59a25a096 |
6 changed files with 44 additions and 2 deletions
11
README.md
11
README.md
|
@ -1,5 +1,14 @@
|
|||
|
||||
# Pride! for the tty
|
||||
|
||||
A C utility to display flags in 256-color terminals.
|
||||
A utility to display pride flags in 8- or 256- color terminals.
|
||||
|
||||
This is a C version of my [pride](https://git.vwolfe.io/valerie/pride) utility,
|
||||
focused on compatibility.
|
||||
|
||||
## Goals
|
||||
|
||||
- Compatible: Runs, compiles, and correctly displays on almost anything.
|
||||
- Low-dependency: Only uses the standard library.
|
||||
- Small: Low compiled binary size.
|
||||
|
||||
|
|
10
basic.c
10
basic.c
|
@ -31,6 +31,16 @@ void bisexual_8() {
|
|||
);
|
||||
}
|
||||
|
||||
void gay_8() {
|
||||
printf(
|
||||
CYAN STRIPE
|
||||
L_CYAN STRIPE
|
||||
WHITE STRIPE
|
||||
L_BLUE STRIPE
|
||||
BLUE STRIPE
|
||||
);
|
||||
}
|
||||
|
||||
void lesbian_8() {
|
||||
printf(
|
||||
RED STRIPE
|
||||
|
|
1
basic.h
1
basic.h
|
@ -22,6 +22,7 @@
|
|||
void rainbow_8();
|
||||
void aroace_8();
|
||||
void bisexual_8();
|
||||
void gay_8();
|
||||
void lesbian_8();
|
||||
void nonbinary_8();
|
||||
void pansexual_8();
|
||||
|
|
12
full.c
12
full.c
|
@ -33,6 +33,18 @@ void bisexual_256() {
|
|||
);
|
||||
}
|
||||
|
||||
void gay_256() {
|
||||
printf(
|
||||
COLOR(29) STRIPE
|
||||
COLOR(49) STRIPE
|
||||
COLOR(123) STRIPE
|
||||
COLOR(255) STRIPE
|
||||
COLOR(75) STRIPE
|
||||
COLOR(63) STRIPE
|
||||
COLOR(56) STRIPE
|
||||
);
|
||||
}
|
||||
|
||||
void lesbian_256() {
|
||||
printf(
|
||||
COLOR(202) STRIPE
|
||||
|
|
1
full.h
1
full.h
|
@ -5,6 +5,7 @@
|
|||
void rainbow_256();
|
||||
void aroace_256();
|
||||
void bisexual_256();
|
||||
void gay_256();
|
||||
void lesbian_256();
|
||||
void nonbinary_256();
|
||||
void pansexual_256();
|
||||
|
|
11
main.c
11
main.c
|
@ -13,6 +13,7 @@
|
|||
#define RAINBOW "rainbow"
|
||||
#define AROACE "aroace"
|
||||
#define BISEXUAL "bisexual"
|
||||
#define GAY "gay"
|
||||
#define LESBIAN "lesbian"
|
||||
#define NONBINARY "nonbinary"
|
||||
#define PANSEXUAL "pansexual"
|
||||
|
@ -33,6 +34,7 @@ void help() {
|
|||
"flag names:\n"
|
||||
INDENT AROACE "\n"
|
||||
INDENT BISEXUAL "\n"
|
||||
INDENT GAY "\n"
|
||||
INDENT LESBIAN "\n"
|
||||
INDENT NONBINARY "\n"
|
||||
INDENT PANSEXUAL "\n"
|
||||
|
@ -74,11 +76,18 @@ int main(int argc, char **argv) {
|
|||
|
||||
else if(strcmp(flag, BISEXUAL) == 0) { // - BISEXUAL -
|
||||
if(color_mode)
|
||||
aroace_256();
|
||||
bisexual_256();
|
||||
else
|
||||
bisexual_8();
|
||||
}
|
||||
|
||||
else if(strcmp(flag, GAY) == 0) { // - GAY -
|
||||
if(color_mode)
|
||||
gay_256();
|
||||
else
|
||||
gay_8();
|
||||
}
|
||||
|
||||
else if(strcmp(flag, LESBIAN) == 0) { // - LESBIAN -
|
||||
if(color_mode)
|
||||
lesbian_256();
|
||||
|
|
Loading…
Reference in a new issue