Compare commits

...

3 Commits

Author SHA1 Message Date
37d8b7fd0f delete empty file net.h 2026-03-09 12:57:43 -05:00
e68d98a669 update files to match new max column width 100 2026-03-09 12:57:24 -05:00
ce5d66f712 update ColumnLimit 2026-03-09 12:55:21 -05:00
7 changed files with 14 additions and 12 deletions

View File

@@ -3,7 +3,7 @@
"UseTab": "Always", "UseTab": "Always",
"IndentWidth": 8, "IndentWidth": 8,
"TabWidth": 8, "TabWidth": 8,
"ColumnLimit": 120, "ColumnLimit": 100,
"LineEnding": "LF", "LineEnding": "LF",
"RemoveBracesLLVM": true, "RemoveBracesLLVM": true,
"AlwaysBreakAfterReturnType": "AllDefinitions", "AlwaysBreakAfterReturnType": "AllDefinitions",

View File

@@ -3,7 +3,7 @@
"UseTab": "Always", "UseTab": "Always",
"IndentWidth": 8, "IndentWidth": 8,
"TabWidth": 8, "TabWidth": 8,
"ColumnLimit": 120, "ColumnLimit": 100,
"LineEnding": "LF", "LineEnding": "LF",
"RemoveBracesLLVM": true, "RemoveBracesLLVM": true,
"AlwaysBreakAfterReturnType": "AllDefinitions", "AlwaysBreakAfterReturnType": "AllDefinitions",

View File

@@ -48,4 +48,3 @@ file_disp(std::string p, int lnstart, int lncount)
refresh(); refresh();
return 0; return 0;
} }

View File

@@ -4,7 +4,6 @@
#include "chat.h" #include "chat.h"
int int
count_lines(std::string p) count_lines(std::string p)
{ {
@@ -40,4 +39,3 @@ log_append(std::string p, std::string ln)
return 0; return 0;
} }

View File

@@ -58,11 +58,13 @@ main(int argc, char *argv[])
switch (mode) { switch (mode) {
case CLIENT_MODE: case CLIENT_MODE:
log_append(log_path, "CLIENT MODE"); log_append(log_path, "CLIENT MODE");
client_start(listen_ip_address, listen_port, &socket_descriptor_client, log_path, &client_wait_thread); client_start(listen_ip_address, listen_port, &socket_descriptor_client, log_path,
&client_wait_thread);
break; break;
case SERVER_MODE: case SERVER_MODE:
log_append(log_path, "SERVER MODE"); log_append(log_path, "SERVER MODE");
err = server_start(listen_port, &socket_descriptor_server, log_path, &client_wait_thread, &time_start); err = server_start(listen_port, &socket_descriptor_server, log_path,
&client_wait_thread, &time_start);
if (err) if (err)
goto panic_no_server_sock; goto panic_no_server_sock;
break; break;
@@ -93,10 +95,12 @@ main(int argc, char *argv[])
switch (mode) { switch (mode) {
case CLIENT_MODE: case CLIENT_MODE:
client_stop(&time_start, &time_end, &socket_descriptor_client, &bytes_read, &bytes_written); client_stop(&time_start, &time_end, &socket_descriptor_client, &bytes_read,
&bytes_written);
break; break;
case SERVER_MODE: case SERVER_MODE:
server_stop(&time_start, &time_end, &socket_descriptor_server, &bytes_read, &bytes_written); server_stop(&time_start, &time_end, &socket_descriptor_server, &bytes_read,
&bytes_written);
break; break;
default: default:
goto panic_no_mode; goto panic_no_mode;
@@ -117,7 +121,7 @@ panic_no_mode:
panic_no_server_sock: panic_no_server_sock:
big_panic_msg(); big_panic_msg();
fprintf(stderr, "Fatal: Could not establish server socket!\n"); fprintf(stderr, "Fatal: Could not establish server socket!\n");
return 1; return 1;
} }
@@ -132,7 +136,7 @@ big_panic_msg(void)
{ {
if (!isendwin()) if (!isendwin())
endwin(); endwin();
fprintf(stderr, "-----FATAL ERROR, THIS SHOULD NEVER HAPPEN-----\n"); fprintf(stderr, "-----FATAL ERROR, THIS SHOULD NEVER HAPPEN-----\n");
usleep(400 * 1000); usleep(400 * 1000);
fprintf(stderr, "You may ask yourself... how do I work this?\n"); fprintf(stderr, "You may ask yourself... how do I work this?\n");

View File

@@ -32,7 +32,8 @@ typedef struct __wserver_args_t {
std::string log; std::string log;
} wserver_args_t; } wserver_args_t;
/* client_start(listen_ip, listen_port, &socket_descriptor_client, log_path, &client_wait_thread); */ /* client_start(listen_ip, listen_port, &socket_descriptor_client, log_path, &client_wait_thread);
*/
void void
client_start(std::string ip, int port, int *sock, std::string log, pthread_t *thr) client_start(std::string ip, int port, int *sock, std::string log, pthread_t *thr)
{ {

View File