Compare commits

..

No commits in common. "c44114e3aef6e86dbb58663f75a3d5442c141ddb" and "a878659475083fe0877741a2722605daa38ba3df" have entirely different histories.

7 changed files with 19 additions and 128 deletions

21
basic.c
View file

@ -16,17 +16,6 @@ void rainbow_8() {
draw(6, colors); draw(6, colors);
} }
void aromantic_8() {
color colors [] = {
GREEN,
L_GREEN,
WHITE,
GRAY,
BLACK
};
draw(5, colors);
}
void aroace_8() { void aroace_8() {
color colors [] = { color colors [] = {
YELLOW, YELLOW,
@ -38,16 +27,6 @@ void aroace_8() {
draw(5, colors); draw(5, colors);
} }
void asexual_8() {
color colors [] = {
BLACK,
GRAY,
WHITE,
MAGENTA
};
draw(4, colors);
}
void bigender_8() { void bigender_8() {
color colors [] = { color colors [] = {
L_RED, L_RED,

View file

@ -18,9 +18,7 @@
#define WHITE 15 #define WHITE 15
void rainbow_8(); void rainbow_8();
void aromantic_8();
void aroace_8(); void aroace_8();
void asexual_8();
void bigender_8(); void bigender_8();
void bisexual_8(); void bisexual_8();
void gay_8(); void gay_8();

21
full.c
View file

@ -16,17 +16,6 @@ void rainbow_256() {
draw(6, colors); draw(6, colors);
} }
void aromantic_256() {
color colors [] = {
40, // green
83, // light green
255, // white
249, // gray
16 // black
};
draw(5, colors);
}
void aroace_256() { void aroace_256() {
color colors [] = { color colors [] = {
172, // orange 172, // orange
@ -38,16 +27,6 @@ void aroace_256() {
draw(5, colors); draw(5, colors);
} }
void asexual_256() {
color colors [] = {
16, // black
249, // gray
255, // white
90 // purple
};
draw(4, colors);
}
void bigender_256() { void bigender_256() {
color colors [] = { color colors [] = {
204, // pink 204, // pink

2
full.h
View file

@ -3,9 +3,7 @@
#include "draw.h" #include "draw.h"
void rainbow_256(); void rainbow_256();
void aromantic_256();
void aroace_256(); void aroace_256();
void asexual_256();
void bigender_256(); void bigender_256();
void bisexual_256(); void bisexual_256();
void gay_256(); void gay_256();

View file

@ -1,4 +1,4 @@
build: build:
gcc -s main.c draw.c basic.c full.c -o pride-c gcc main.c draw.c basic.c full.c -o pride-c

58
main.c
View file

@ -5,7 +5,6 @@
#include "draw.h" #include "draw.h"
#include "basic.h" #include "basic.h"
#include "full.h" #include "full.h"
#include "name.h"
#define VERSION "0.0.1" #define VERSION "0.0.1"
@ -24,9 +23,7 @@ void help() {
"usage: pride [name]\n\n" "usage: pride [name]\n\n"
"flag names:\n" "flag names:\n"
" aromantic\n"
" aroace\n" " aroace\n"
" asexual\n"
" bigender\n" " bigender\n"
" bisexual\n" " bisexual\n"
" gay\n" " gay\n"
@ -71,91 +68,72 @@ int main(int argc, char **argv) {
unsigned long flag_hash = djb_hash(flag); unsigned long flag_hash = djb_hash(flag);
#ifdef DEBUG_HASH
printf("[ %lu ]\n\n", flag_hash);
return 0;
#endif
char *output; char *output;
switch(flag_hash) { switch(flag_hash) {
// - RAINBOW - // - RAINBOW -
case RAINBOW: case 229480993726103lu: // 'rainbow'
case EMPTY: case 5381lu: // (empty)
if(color_mode) rainbow_256(); if(color_mode) rainbow_256();
else rainbow_8(); else rainbow_8();
break; break;
// - AROMANTIC -
case AROMANTIC:
case ARO:
if(color_mode) aromantic_256();
else aromantic_8();
break;
// - ARO/ACE - // - ARO/ACE -
case AROACE: case 6953324567312lu: // 'aroace'
case ARO_ACE: case 22945708850429lu: // 'aro-ace'
if(color_mode) aroace_256(); if(color_mode) aroace_256();
else aroace_8(); else aroace_8();
break; break;
// - ASEXUAL -
case ASEXUAL:
case ACE:
if(color_mode) asexual_256();
else asexual_8();
break;
// - BIGENDER - // - BIGENDER -
case BIGENDER: case 7572201141092229lu: // 'bigender'
if(color_mode) bigender_256(); if(color_mode) bigender_256();
else bigender_8(); else bigender_8();
break; break;
// - BISEXUAL - // - BISEXUAL -
case BISEXUAL: case 7572201611094690lu: // 'bisexual'
case BI: // 'bi' case 5863248lu: // 'bi'
if(color_mode) bisexual_256(); if(color_mode) bisexual_256();
else bisexual_8(); else bisexual_8();
break; break;
// - GAY - // - GAY -
case GAY: case 193492486lu: // 'gay'
case MLM: case 193499371lu: // 'mlm'
if(color_mode) gay_256(); if(color_mode) gay_256();
else gay_8(); else gay_8();
break; break;
// - GENDERFLUID - // - GENDERFLUID -
case GENDERFLUID: case 13875257415654095150lu: // 'genderfluid'
if(color_mode) genderfluid_256(); if(color_mode) genderfluid_256();
else genderfluid_8(); else genderfluid_8();
break; break;
// - LESBIAN - // - LESBIAN -
case LESBIAN: case 229473412894979lu: // 'lesbian'
case WLW: case 193510271lu: // 'wlw'
if(color_mode) lesbian_256(); if(color_mode) lesbian_256();
else lesbian_8(); else lesbian_8();
break; break;
// - NONBINARY - // - NONBINARY -
case NONBINARY: case 249899779187415445lu: // 'nonbinary'
case NB: case 5863637lu: // 'nb'
if(color_mode) nonbinary_256(); if(color_mode) nonbinary_256();
else nonbinary_8(); else nonbinary_8();
break; break;
// - PANSEXUAL - // - PANSEXUAL -
case PANSEXUAL: case 249901996007388822lu: // 'pansexual'
case PAN: case 193502276lu: // 'pan'
if(color_mode) pansexual_256(); if(color_mode) pansexual_256();
else pansexual_8(); else pansexual_8();
break; break;
// - TRANSGENDER - // - TRANSGENDER -
case TRANSGENDER: case 13895753452281080578lu: // 'transgender'
case TRANS: case 210729322765lu: // 'trans'
if(color_mode) transgender_256(); if(color_mode) transgender_256();
else transgender_8(); else transgender_8();
break; break;

41
name.h
View file

@ -1,41 +0,0 @@
#define RAINBOW 229480993726103lu
#define EMPTY 5381lu
#define AROMANTIC 249881625443197539lu
#define ARO 193486503lu
#define AROACE 6953324567312lu
#define ARO_ACE 229459708850429lu
#define ASEXUAL 229459738843608lu
#define ACE 193485998lu
#define BIGENDER 7572201141092229lu
#define BISEXUAL 7572201611094690lu
#define BI 5863248lu
#define GAY 193492486lu
#define MLM 193499371lu
#define GENDERFLUID 13875257415654095150lu
#define LESBIAN 229473412894979lu
#define WLW 193510271lu
#define NONBINARY 249899779187415445lu
#define NB 5863637lu
#define PANSEXUAL 249901996007388822lu
#define PAN 193502276lu
#define TRANSGENDER 13895753452281080578lu
#define TRANS 210729322765lu