added shitty makefile and rearranged stuff

This commit is contained in:
scoliono 2021-04-01 22:57:16 -07:00
parent 9c15f41e10
commit b1be992212
5 changed files with 19 additions and 12 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
fem

View File

@ -104,9 +104,9 @@ void* company_refresh(void* arg)
char* tagline = div->children->content; char* tagline = div->children->content;
// clear line // clear line
for (int i = START_COL; i < width - 1; ++i) for (int i = START_COL; i < width - 1; ++i)
mvwprintw(window, START_ROW, i, " "); mvwprintw(window, START_ROW+5, i, " ");
// print the funny reference // print the funny reference
mvwprintw(window, START_ROW, START_COL, "Random reference: %s", tagline); mvwprintw(window, START_ROW+5, START_COL, "%s", tagline);
} }

View File

@ -65,16 +65,13 @@ int main(int argc, const char* argv[])
// setup various status windows // setup various status windows
// the bottom windows will be one row shorter to fit the status line at the end // the bottom windows will be one row shorter to fit the status line at the end
WINDOW* topleft = create_newwin(LINES/2, COLS/2, 0, 0); WINDOW* topleft = create_newwin(LINES/2, COLS, 0, 0);
WINDOW* topright = create_newwin(LINES/2, COLS/2, 0, COLS/2);
WINDOW* botleft = create_newwin(LINES/2 - 1, COLS/2, LINES/2, 0); WINDOW* botleft = create_newwin(LINES/2 - 1, COLS/2, LINES/2, 0);
WINDOW* botright = create_newwin(LINES/2 - 1, COLS/2, LINES/2, COLS/2); WINDOW* botright = create_newwin(LINES/2 - 1, COLS/2, LINES/2, COLS/2);
company_init(topleft, LINES/2, COLS/2); company_init(topleft, LINES/2, COLS);
howfeed_init(topright, LINES/2, COLS/2); howfeed_init(botleft, LINES/2 - 1, COLS/2);
booru_init(botleft, LINES/2 - 1, COLS/2); booru_init(botright, LINES/2 - 1, COLS/2);
mvwprintw(botright, 0, 1, " FemWiki ");
wrefresh(botright);
// start refresh status threads // start refresh status threads
pthread_t booru_th; pthread_t booru_th;
@ -113,7 +110,6 @@ int main(int argc, const char* argv[])
company_destroy(); company_destroy();
destroy_win(topleft); destroy_win(topleft);
destroy_win(topright);
destroy_win(botleft); destroy_win(botleft);
destroy_win(botright); destroy_win(botright);

8
Makefile Normal file
View File

@ -0,0 +1,8 @@
CFLAGS = -std=c99 `curl-config --cflags` `xml2-config --cflags`
LDFLAGS = `curl-config --libs` `xml2-config --libs` -lncurses -lpthread
OUT = fem
all:
gcc -o $(OUT) $(CFLAGS) FemMonitor/*.c $(LDFLAGS)
clean:
rm -f $(OUT)

View File

@ -12,6 +12,8 @@ Best viewed on a wall-mounted 4:3 monitor with a VGA font.
- libxml2.2 - libxml2.2
## Makefile ## Building
no im developing on xcode rn lol If you're on Windows you're fucked.
Use the Makefile to build, you know the drill.