update Makefile and fix minor bugs

This commit is contained in:
2025-08-05 14:31:01 -06:00
parent 2fd3f1c81f
commit f33a2a6dbd
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ CFLAGS = -g
CPPFLAGS = -Wall -Wextra -pedantic -std=gnu90 CPPFLAGS = -Wall -Wextra -pedantic -std=gnu90
chatty: main.o liblist.a 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 main.o: main.c
$(CC) $(CFLAGS) $(CPPFLAGS) -I. -c -o main.o main.c $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c -o main.o main.c
+2 -1
View File
@@ -88,7 +88,8 @@ void *receiver(void *arg) {
bytes = recv(confd, buf, 128, 0); bytes = recv(confd, buf, 128, 0);
if (bytes != -1) { if (bytes != -1) {
printf("\nReceived: %s\n", buf); mvprintw(row - 3, 10, ("Message: %s", buf));
refresh();
} }
else if (bytes == 0) { else if (bytes == 0) {
pthread_exit("connection closed"); pthread_exit("connection closed");