From b1be9922129df059866b1b51952648e932d09d36 Mon Sep 17 00:00:00 2001 From: scoliono Date: Thu, 1 Apr 2021 22:57:16 -0700 Subject: [PATCH] added shitty makefile and rearranged stuff --- .gitignore | 1 + FemMonitor/company.c | 4 ++-- FemMonitor/main.c | 12 ++++-------- Makefile | 8 ++++++++ README.md | 6 ++++-- 5 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0b22a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +fem diff --git a/FemMonitor/company.c b/FemMonitor/company.c index 0d1000a..3d0e71e 100644 --- a/FemMonitor/company.c +++ b/FemMonitor/company.c @@ -104,9 +104,9 @@ void* company_refresh(void* arg) char* tagline = div->children->content; // clear line for (int i = START_COL; i < width - 1; ++i) - mvwprintw(window, START_ROW, i, " "); + mvwprintw(window, START_ROW+5, i, " "); // print the funny reference - mvwprintw(window, START_ROW, START_COL, "Random reference: %s", tagline); + mvwprintw(window, START_ROW+5, START_COL, "%s", tagline); } diff --git a/FemMonitor/main.c b/FemMonitor/main.c index 6c10c69..6772c80 100644 --- a/FemMonitor/main.c +++ b/FemMonitor/main.c @@ -65,16 +65,13 @@ int main(int argc, const char* argv[]) // setup various status windows // 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* topright = create_newwin(LINES/2, COLS/2, 0, COLS/2); + WINDOW* topleft = create_newwin(LINES/2, COLS, 0, 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); - company_init(topleft, LINES/2, COLS/2); - howfeed_init(topright, LINES/2, COLS/2); - booru_init(botleft, LINES/2 - 1, COLS/2); - mvwprintw(botright, 0, 1, " FemWiki "); - wrefresh(botright); + company_init(topleft, LINES/2, COLS); + howfeed_init(botleft, LINES/2 - 1, COLS/2); + booru_init(botright, LINES/2 - 1, COLS/2); // start refresh status threads pthread_t booru_th; @@ -113,7 +110,6 @@ int main(int argc, const char* argv[]) company_destroy(); destroy_win(topleft); - destroy_win(topright); destroy_win(botleft); destroy_win(botright); diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..51b1a80 --- /dev/null +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index df7fdfd..ebfec59 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Best viewed on a wall-mounted 4:3 monitor with a VGA font. - 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.