diff --git a/Makefile b/Makefile index b6fa4f3..b36357d 100644 --- a/Makefile +++ b/Makefile @@ -15,16 +15,16 @@ else endif endif -ccast: $(OBJS) $(CON_OBJS) - $(CC) $(OBJS) $(CON_OBJS) $(LFLAGS) -o ccast +nchat: $(OBJS) $(CON_OBJS) + $(CC) $(OBJS) $(CON_OBJS) $(LFLAGS) -o nchat -xcast: $(OBJS) $(X11_OBJS) - $(CC) $(OBJS) $(X11_OBJS) $(LFLAGS) $(X11_LFLAGS) -o xcast +xnchat: $(OBJS) $(X11_OBJS) + $(CC) $(OBJS) $(X11_OBJS) $(LFLAGS) $(X11_LFLAGS) -o xnchat -all: bcast ccast xcast +all: nchat xnchat clean: - rm -f $(OBJS) $(CON_OBJS) $(X11_OBJS) ccast xcast + rm -f $(OBJS) $(CON_OBJS) $(X11_OBJS) nchat xnchat net.o: net.c net.h macros.h $(CC) $(CFLAGS) -c net.c diff --git a/README b/README index a2abaf8..1444a98 100644 --- a/README +++ b/README @@ -1,18 +1,18 @@ ---- info ---- -Bcast is a decentralized and LAN-based communication program that is focused on minimalism, efficiency, and, to some degree, modularity. It supports the following network communication methods: +noirchat/nchat is a decentralized and LAN-based communication program that is focused on minimalism, efficiency, and, to some degree, modularity. It supports the following network communication methods: UDP broadcasting, for chat-style and "broad" communication *INCOMPLETE* UDP multicast, for finer control and higher efficiency than broadcasting *INCOMPLETE* UDP peer-to-peer, for non-TCP based direct comms *INCOMPLETE* TCP sockets, for direct peer-to-peer communication -In comparison to most communication programs geared towards decentralization, bcast attempts to separate the user interface from the networking code as much as is possible. This enables multiple frontends to easily be developed for almost any platform. +In comparison to most communication programs geared towards decentralization, noirchat attempts to separate the user interface from the networking code as much as is possible. This enables multiple frontends to easily be developed for almost any platform. -Even further, bcast provides peer-to-peer or peer-to-group encryption via a trusted network/shared password scheme - in the case of a direct peer-to-peer comm, following the initial handshaking procedure encrypted with the trusted key, a new, temporary key is agreed upon and used for future communication between those peers. +Even further, noirchat provides peer-to-peer or peer-to-group encryption via a trusted network/shared password scheme - in the case of a direct peer-to-peer comm, following the initial handshaking procedure encrypted with the trusted key, a new, temporary key is agreed upon and used for future communication between those peers. ---- compiling ---- -At the moment bcast compiles into the following binaries: +At the moment noirchat compiles into the following binaries: ccast: primary client Fully-supported terminal client, relies on nothing more than an ANSI-compliant terminal interface - colors optional diff --git a/con/console.c b/con/console.c index 1b30b6d..1145f77 100644 --- a/con/console.c +++ b/con/console.c @@ -1,8 +1,7 @@ #include "console.h" int initInterface() { - setAttribute(GREEN); - setAttribute(DIM); +// setAttribute(DIM); printf("%s", START_MESSAGE); clearAttributes(); @@ -185,12 +184,18 @@ void setAttribute(const int attribute) { case MAGENTA: fputs("\033[35m", stdout); break; + case BLACK: + fputs("\033[30m", stdout); + break; case UNDERSCORE: fputs("\033[4m", stdout); break; case DIM: fputs("\033[2m", stdout); break; + case BG_WHITE: + fputs("\033[47m", stdout); + break; } } diff --git a/con/console.h b/con/console.h index 61cd630..48f0347 100644 --- a/con/console.h +++ b/con/console.h @@ -17,6 +17,8 @@ #define YELLOW 33 #define CYAN 34 #define MAGENTA 35 +#define BLACK 30 +#define BG_WHITE 47 #define UNDERSCORE 4 #define DIM 2 diff --git a/macros.h b/macros.h index 17d369e..84a5894 100644 --- a/macros.h +++ b/macros.h @@ -1,7 +1,7 @@ #ifndef MACROS_H #define MACROS_H -#define START_MESSAGE " ______ _______ _______ _______ _______\n |_____] | |_____| |______ | \n |_____] |_____ | | ______| |\n\n" +#define START_MESSAGE " _) | | |\\ |\\\n \\ _ \\ | _|_| \\ _` | _| =- - =\n_| _|\\___/_|_|\\__|_| _|\\__,_|\\__| -.--`\n" /* strings, foo' */ #define QUIT_COMMAND "quit" diff --git a/x11/x11.c b/x11/x11.c index 6b92d19..94bd2b1 100644 --- a/x11/x11.c +++ b/x11/x11.c @@ -14,8 +14,8 @@ void drawLogo() { XDrawArc(display, window, gc, -26, -24, 72, 48, (260*64), (90*64)); XDrawArc(display, window, gc, -28, -26, 76, 52, (260*64), (90*64)); XDrawArc(display, window, gc, -32, -30, 80, 56, (260*64), (90*64)); - XDrawString(display, window, gc, 4, 13, "bcast", 5); - XDrawString(display, window, gc, 4, 13, "bcast", 5); + XDrawString(display, window, gc, 4, 13, "noirchat", 5); + XDrawString(display, window, gc, 4, 13, "noirchat", 5); } int initInterface() { @@ -31,7 +31,7 @@ int initInterface() { window = XCreateSimpleWindow(display, RootWindow(display, 0), 1, 1, 240, 320, 0, white, black); //window = XCreateSimpleWindow(display, RootWindow(display, 0), 1, 1, 256, 256, 0, BlackPixel (display, 0), BlackPixel(display, 0)); - XSetStandardProperties(display, window, "bcast", "bcast", None, NULL, 0, NULL); + XSetStandardProperties(display, window, "noirchat", "noirchat", None, NULL, 0, NULL); XMapWindow(display, window); gc = XCreateGC(display, window, 0, 0);