Move map variables to tty to keep them all in one spot

This commit is contained in:
Braden Young 2023-04-14 15:00:03 -07:00
parent 5651c1c5d7
commit afc9e3be5b
4 changed files with 7 additions and 7 deletions

View file

@ -33,6 +33,7 @@
#include "socket.h" #include "socket.h"
#include "options.h" #include "options.h"
#include "print.h" #include "print.h"
#include "tty.h"
#define MAX_SOCKET_CLIENTS 16 #define MAX_SOCKET_CLIENTS 16
#define SOCKET_PORT_DEFAULT 3333 #define SOCKET_PORT_DEFAULT 3333
@ -41,9 +42,6 @@ static int sockfd;
static int clientfds[MAX_SOCKET_CLIENTS]; static int clientfds[MAX_SOCKET_CLIENTS];
static int socket_family = AF_UNSPEC; static int socket_family = AF_UNSPEC;
static int port_number = SOCKET_PORT_DEFAULT; static int port_number = SOCKET_PORT_DEFAULT;
bool map_i_nl_cr = false;
bool map_i_cr_nl = false;
bool map_ign_cr = false;
static const char *socket_filename(void) static const char *socket_filename(void)
{ {

View file

@ -25,10 +25,6 @@
#include <stdbool.h> #include <stdbool.h>
#include <sys/select.h> #include <sys/select.h>
extern bool map_i_nl_cr;
extern bool map_i_cr_nl;
extern bool map_ign_cr;
void socket_configure(void); void socket_configure(void);
void socket_write(char input_char); void socket_write(char input_char);
int socket_add_fds(fd_set *fds, bool connected); int socket_add_fds(fd_set *fds, bool connected);

View file

@ -129,6 +129,9 @@ const char random_array[] =
}; };
bool interactive_mode = true; bool interactive_mode = true;
bool map_i_nl_cr = false;
bool map_i_cr_nl = false;
bool map_ign_cr = false;
static struct termios tio, tio_old, stdout_new, stdout_old, stdin_new, stdin_old; static struct termios tio, tio_old, stdout_new, stdout_old, stdin_new, stdin_old;
static unsigned long rx_total = 0, tx_total = 0; static unsigned long rx_total = 0, tx_total = 0;

View file

@ -24,6 +24,9 @@
#include <stdbool.h> #include <stdbool.h>
extern bool interactive_mode; extern bool interactive_mode;
extern bool map_i_nl_cr;
extern bool map_i_cr_nl;
extern bool map_ign_cr;
void stdout_configure(void); void stdout_configure(void);
void stdin_configure(void); void stdin_configure(void);