Re-indent everything with indent-2.2.13

This commit is contained in:
Kim Woelders
2024-03-06 17:20:31 +01:00
parent 797ccf08c8
commit 2c090f3721
6 changed files with 27 additions and 27 deletions
+9 -9
View File
@@ -38,7 +38,7 @@ static const unsigned char tn_opt[256] = {
};
static void _telnet_handle_req(tn_ctx_t * tcc, int cmd, int opt)
static void _telnet_handle_req(tn_ctx_t *tcc, int cmd, int opt)
{
char buf[3];
@@ -67,7 +67,7 @@ static void _telnet_handle_req(tn_ctx_t * tcc, int cmd, int opt)
tcc->srv_tx(tcc->cctx, buf, 3);
}
static void _telnet_handle_resp(tn_ctx_t * tcc, int cmd, int opt)
static void _telnet_handle_resp(tn_ctx_t *tcc, int cmd, int opt)
{
if (opt == TNO_CPCO)
{
@@ -76,7 +76,7 @@ static void _telnet_handle_resp(tn_ctx_t * tcc, int cmd, int opt)
}
}
void telnet_set_opt(tn_ctx_t * tcc, int opt, int prm, const void *val, int len)
void telnet_set_opt(tn_ctx_t *tcc, int opt, int prm, const void *val, int len)
{
unsigned char buf[128], *pu = buf;
const unsigned char *pv;
@@ -106,7 +106,7 @@ void telnet_set_opt(tn_ctx_t * tcc, int opt, int prm, const void *val, int len)
tcc->srv_tx(tcc->cctx, buf, len);
}
static void _telnet_handle_opt(tn_ctx_t * tcc, int opt,
static void _telnet_handle_opt(tn_ctx_t *tcc, int opt,
unsigned char *pu, int nd)
{
switch (opt)
@@ -120,7 +120,7 @@ static void _telnet_handle_opt(tn_ctx_t * tcc, int opt,
}
}
int telnet_rx(tn_ctx_t * tcc, char *buf, int *plen)
int telnet_rx(tn_ctx_t *tcc, char *buf, int *plen)
{
char *s, *p;
unsigned char *pu;
@@ -233,7 +233,7 @@ int telnet_rx(tn_ctx_t * tcc, char *buf, int *plen)
return 0;
}
int telnet_tx(tn_ctx_t * tcc, const char *buf, int len)
int telnet_tx(tn_ctx_t *tcc, const char *buf, int len)
{
const char *s, *p;
int rem, nd;
@@ -263,7 +263,7 @@ int telnet_tx(tn_ctx_t * tcc, const char *buf, int len)
return 0;
}
int telnet_open(tn_ctx_t * tcc, int mode)
int telnet_open(tn_ctx_t *tcc, int mode)
{
time_t t = time(NULL);;
char buf[3];
@@ -293,8 +293,8 @@ int telnet_open(tn_ctx_t * tcc, int mode)
}
}
tn_ctx_t *telnet_ctx_init(void *cctx, srv_tx_f * ftx,
srv_rx_f * frx, srv_ms_f * fms)
tn_ctx_t *telnet_ctx_init(void *cctx, srv_tx_f *ftx,
srv_rx_f *frx, srv_ms_f *fms)
{
tn_ctx_t *tcc;
+3 -3
View File
@@ -7,7 +7,7 @@
#include "telnet.h"
#include "telnet_param.h"
void telnet_rfc2217_handle_opt(tn_ctx_t * tcc, int opt,
void telnet_rfc2217_handle_opt(tn_ctx_t *tcc, int opt,
unsigned char *pu, int nd)
{
unsigned int sub;
@@ -32,7 +32,7 @@ void telnet_rfc2217_handle_opt(tn_ctx_t * tcc, int opt,
}
}
void telnet_rfc2217_cfg(tn_ctx_t * tcc, int cmd, const void *val, int nd)
void telnet_rfc2217_cfg(tn_ctx_t *tcc, int cmd, const void *val, int nd)
{
if (!tcc->mode_rfc2217)
return;
@@ -40,7 +40,7 @@ void telnet_rfc2217_cfg(tn_ctx_t * tcc, int cmd, const void *val, int nd)
telnet_set_opt(tcc, TNO_CPCO, cmd, val, nd);
}
void telnet_rfc2217_ctl(tn_ctx_t * tcc, unsigned int val)
void telnet_rfc2217_ctl(tn_ctx_t *tcc, unsigned int val)
{
unsigned char byte = val;
+4 -4
View File
@@ -150,7 +150,7 @@ static void _fd_close(int fd)
close(fd);
}
static void _notify(ttynvt_t * tty)
static void _notify(ttynvt_t *tty)
{
pthread_mutex_lock(&tty->poll_lock);
if (tty->ph)
@@ -162,7 +162,7 @@ static void _notify(ttynvt_t * tty)
pthread_mutex_unlock(&tty->poll_lock);
}
static void _update_notify(ttynvt_t * tty, struct fuse_pollhandle *ph)
static void _update_notify(ttynvt_t *tty, struct fuse_pollhandle *ph)
{
pthread_mutex_lock(&tty->poll_lock);
struct fuse_pollhandle *tmp_ph = tty->ph;
@@ -173,7 +173,7 @@ static void _update_notify(ttynvt_t * tty, struct fuse_pollhandle *ph)
fuse_pollhandle_destroy(tmp_ph);
}
static int _net_read_check_exit(ttynvt_t * tty)
static int _net_read_check_exit(ttynvt_t *tty)
{
if ((tty->tio.c_cflag & CLOCAL) == 0 &&
(tty->smcr_last & TIOCM_CD) != 0 && (tty->smcr & TIOCM_CD) == 0)
@@ -397,7 +397,7 @@ static ttynvt_t *_ttynvt_ctx_create(void)
return tty;
}
static void _ttynvt_ctx_destroy(ttynvt_t * tty)
static void _ttynvt_ctx_destroy(ttynvt_t *tty)
{
if (tty)
free(tty->tn);