From f33a2a6dbd5dd5c6a2943260c0e7f4e0cde21843 Mon Sep 17 00:00:00 2001 From: Dane MacFadden Date: Tue, 5 Aug 2025 14:31:01 -0600 Subject: [PATCH] update Makefile and fix minor bugs --- Makefile | 2 +- main.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0d8259b..460025d 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CFLAGS = -g CPPFLAGS = -Wall -Wextra -pedantic -std=gnu90 chatty: main.o liblist.a - $(CC) $(CFLAGS) -L. -o chatty main.o -llist -lpthread + $(CC) $(CFLAGS) -L. -o chatty main.o -llist -lpthread -lncurses main.o: main.c $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c -o main.o main.c diff --git a/main.c b/main.c index ceb0506..e32616a 100644 --- a/main.c +++ b/main.c @@ -88,7 +88,8 @@ void *receiver(void *arg) { bytes = recv(confd, buf, 128, 0); if (bytes != -1) { - printf("\nReceived: %s\n", buf); + mvprintw(row - 3, 10, ("Message: %s", buf)); + refresh(); } else if (bytes == 0) { pthread_exit("connection closed");