Commit e2cdd5fc authored by Deucе's avatar Deucе 👌🏾
Browse files

There doesn't seem to be a way to get Uncrustify to put commas at

the start of wrapped function call continuation lines, but at the
end of struct initializers/enums/etc lines.  I think the least bad
is commas at the end, especially now that it's got the happy
four-space indent for continuations.

I may play with this more later, but this seems to be good for now,
we'll see how it works out in actual use.
parent 4b3652dd
Pipeline #3512 passed with stage
in 5 minutes and 19 seconds
This diff is collapsed.
......@@ -26,53 +26,84 @@
#define MAX_SYSPASS_LEN 128
enum {
USER_BBSLIST,
USER_BBSLIST
,
SYSTEM_BBSLIST
};
enum {
BBSLIST_SELECT,
BBSLIST_SELECT
,
BBSLIST_EDIT
};
enum {
SCREEN_MODE_CURRENT,
SCREEN_MODE_80X25,
SCREEN_MODE_LCD80X25,
SCREEN_MODE_80X28,
SCREEN_MODE_80X30,
SCREEN_MODE_80X43,
SCREEN_MODE_80X50,
SCREEN_MODE_80X60,
SCREEN_MODE_132X37,
SCREEN_MODE_132x52,
SCREEN_MODE_132X25,
SCREEN_MODE_132X28,
SCREEN_MODE_132X30,
SCREEN_MODE_132X34,
SCREEN_MODE_132X43,
SCREEN_MODE_132X50,
SCREEN_MODE_132X60,
SCREEN_MODE_C64,
SCREEN_MODE_C128_40,
SCREEN_MODE_C128_80,
SCREEN_MODE_ATARI,
SCREEN_MODE_ATARI_XEP80,
SCREEN_MODE_CUSTOM,
SCREEN_MODE_EGA_80X25,
SCREEN_MODE_VGA_80X25,
SCREEN_MODE_CURRENT
,
SCREEN_MODE_80X25
,
SCREEN_MODE_LCD80X25
,
SCREEN_MODE_80X28
,
SCREEN_MODE_80X30
,
SCREEN_MODE_80X43
,
SCREEN_MODE_80X50
,
SCREEN_MODE_80X60
,
SCREEN_MODE_132X37
,
SCREEN_MODE_132x52
,
SCREEN_MODE_132X25
,
SCREEN_MODE_132X28
,
SCREEN_MODE_132X30
,
SCREEN_MODE_132X34
,
SCREEN_MODE_132X43
,
SCREEN_MODE_132X50
,
SCREEN_MODE_132X60
,
SCREEN_MODE_C64
,
SCREEN_MODE_C128_40
,
SCREEN_MODE_C128_80
,
SCREEN_MODE_ATARI
,
SCREEN_MODE_ATARI_XEP80
,
SCREEN_MODE_CUSTOM
,
SCREEN_MODE_EGA_80X25
,
SCREEN_MODE_VGA_80X25
,
SCREEN_MODE_TERMINATOR
};
enum {
ADDRESS_FAMILY_UNSPEC,
ADDRESS_FAMILY_INET,
ADDRESS_FAMILY_UNSPEC
,
ADDRESS_FAMILY_INET
,
ADDRESS_FAMILY_INET6
};
enum {
RIP_VERSION_NONE,
RIP_VERSION_1,
RIP_VERSION_NONE
,
RIP_VERSION_1
,
RIP_VERSION_3
};
......
......@@ -48,12 +48,12 @@
struct conn_api conn_api;
char *conn_types_enum[] = {
"Unknown", "RLogin", "RLoginReversed", "Telnet", "Raw", "SSH", "SSHNA", "Modem", "Serial", "NoRTS", "Shell"
, "MBBSGhost", "TelnetS", NULL
"Unknown", "RLogin", "RLoginReversed", "Telnet", "Raw", "SSH", "SSHNA", "Modem", "Serial", "NoRTS", "Shell",
"MBBSGhost", "TelnetS", NULL
};
char *conn_types[] = {
"Unknown", "RLogin", "RLogin Reversed", "Telnet", "Raw", "SSH", "SSH (no auth)", "Modem", "Serial"
, "3-wire (No RTS)", "Shell", "MBBS GHost", "TelnetS", NULL
"Unknown", "RLogin", "RLogin Reversed", "Telnet", "Raw", "SSH", "SSH (no auth)", "Modem", "Serial",
"3-wire (No RTS)", "Shell", "MBBS GHost", "TelnetS", NULL
};
short unsigned int conn_ports[] = {0, 513, 513, 23, 0, 22, 22, 0, 0, 0, 65535, 992, 0};
......@@ -457,11 +457,16 @@ conn_close(void)
}
enum failure_reason {
FAILURE_WHAT_FAILURE,
FAILURE_RESOLVE,
FAILURE_CANT_CREATE,
FAILURE_CONNECT_ERROR,
FAILURE_ABORTED,
FAILURE_WHAT_FAILURE
,
FAILURE_RESOLVE
,
FAILURE_CANT_CREATE
,
FAILURE_CONNECT_ERROR
,
FAILURE_ABORTED
,
FAILURE_DISCONNECTED
};
......@@ -597,15 +602,15 @@ connected:
break;
case FAILURE_CANT_CREATE:
sprintf(str, "Cannot create socket (%d)!", ERROR_VALUE);
uifcmsg(str
, "`Unable to create socket`\n\n"
uifcmsg(str,
"`Unable to create socket`\n\n"
"Your system is either dangerously low on resources, or there\n"
"is a problem with your TCP/IP stack.");
break;
case FAILURE_CONNECT_ERROR:
sprintf(str, "Connect error (%d)!", ERROR_VALUE);
uifcmsg(str
, "`The connect call returned an error`\n\n"
uifcmsg(str,
"`The connect call returned an error`\n\n"
"The call to connect() returned an unexpected error code.");
break;
case FAILURE_ABORTED:
......@@ -614,8 +619,8 @@ connected:
break;
case FAILURE_DISCONNECTED:
sprintf(str, "Connect error (%d)!", ERROR_VALUE);
uifcmsg(str
, "`SyncTERM failed to connect`\n\n"
uifcmsg(str,
"`SyncTERM failed to connect`\n\n"
"After connect() succeeded, the socket was in a disconnected state.");
break;
}
......
......@@ -16,19 +16,32 @@ extern char *conn_types_enum[];
extern short unsigned int conn_ports[];
enum {
CONN_TYPE_UNKNOWN,
CONN_TYPE_RLOGIN,
CONN_TYPE_RLOGIN_REVERSED,
CONN_TYPE_TELNET,
CONN_TYPE_RAW,
CONN_TYPE_SSH,
CONN_TYPE_SSHNA,
CONN_TYPE_MODEM,
CONN_TYPE_SERIAL,
CONN_TYPE_SERIAL_NORTS,
CONN_TYPE_SHELL,
CONN_TYPE_MBBS_GHOST,
CONN_TYPE_TELNETS,
CONN_TYPE_UNKNOWN
,
CONN_TYPE_RLOGIN
,
CONN_TYPE_RLOGIN_REVERSED
,
CONN_TYPE_TELNET
,
CONN_TYPE_RAW
,
CONN_TYPE_SSH
,
CONN_TYPE_SSHNA
,
CONN_TYPE_MODEM
,
CONN_TYPE_SERIAL
,
CONN_TYPE_SERIAL_NORTS
,
CONN_TYPE_SHELL
,
CONN_TYPE_MBBS_GHOST
,
CONN_TYPE_TELNETS
,
CONN_TYPE_TERMINATOR
};
......
......@@ -123,9 +123,9 @@
#endif
#if defined(__QNX__) || defined(__solaris__) || defined(__NetBSD__) || defined(__HAIKU__)
static cc_t ttydefchars[NCCS] = {
CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT
, CERASE2, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT
, CDISCARD, CMIN, CTIME, CSTATUS
CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
CERASE2, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
CDISCARD, CMIN, CTIME, CSTATUS
#ifndef __solaris__
, _POSIX_VDISABLE
#endif
......@@ -176,11 +176,11 @@ login_tty(int fd)
#ifdef NEEDS_DAEMON
/*
* **************************************************************************
* Daemonizes the process
***************************************************************************
*/
/****************************************************************************/
/* Daemonizes the process */
/****************************************************************************/
int
daemon(int nochdir, int noclose)
{
......@@ -248,11 +248,11 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct win
if (name)
strcpy(name, line);
if (termp)
(void)tcsetattr(slave
, TCSAFLUSH, termp);
(void)tcsetattr(slave,
TCSAFLUSH, termp);
if (winp)
(void)ioctl(slave, TIOCSWINSZ
, (char *)winp);
(void)ioctl(slave, TIOCSWINSZ,
(char *)winp);
return 0;
}
(void)close(master);
......@@ -459,8 +459,7 @@ pty_connect(struct bbslist *bbs)
":sc=\\E[s:se=\\E[m:sf=\\E[S:so=\\E[0;1;7m:sr=\\E[T:st=\\E[H"
":ta=^I:up=\\E[A:ve=\\E[?25h:vi=\\E[?25l:vs=\\E[?25h:"
,
ws.ws_col
,
ws.ws_col,
ws.ws_row
,
cio_api.options
......
......@@ -21,7 +21,9 @@ extern int telnet_log_level;
/*****************************************************************************/
// Escapes Telnet IACs in 'inbuf' by doubling the IAC char
// 'result' may point to either inbuf (if there were no IACs) or outbuf
// Returns the final byte count of the result
/*****************************************************************************/
......@@ -99,8 +101,8 @@ telnet_tx_parse_cb(const void *buf, size_t len, size_t *olen)
void *ret = malloc(len * 2);
void *parsed;
*olen = st_telnet_expand(buf, len, ret, len * 2
, telnet_local_option[TELNET_BINARY_TX] != TELNET_DO, (BYTE **)&parsed);
*olen = st_telnet_expand(buf, len, ret, len * 2,
telnet_local_option[TELNET_BINARY_TX] != TELNET_DO, (BYTE **)&parsed);
if (parsed != ret)
memcpy(ret, parsed, *olen);
......
......@@ -254,14 +254,14 @@ font_management(void)
opts[0][0] = 0;
opt[0] = opts[0];
}
i = uifc.list(WIN_SAV | WIN_INS | WIN_INSACT | WIN_DEL | WIN_XTR | WIN_ACT
, 0
, 0
, 0
, &cur
, &bar
, "Font Management"
, opt);
i = uifc.list(WIN_SAV | WIN_INS | WIN_INSACT | WIN_DEL | WIN_XTR | WIN_ACT,
0,
0,
0,
&cur,
&bar,
"Font Management",
opt);
if (i == -1) {
check_exit(false);
save_font_files(fonts);
......@@ -279,8 +279,8 @@ font_management(void)
FREE_AND_NULL(fonts[cur].path8x8);
FREE_AND_NULL(fonts[cur].path8x14);
FREE_AND_NULL(fonts[cur].path8x16);
memmove(&(fonts[cur]), &(fonts[cur + 1])
, sizeof(struct font_files) * (count - cur));
memmove(&(fonts[cur]), &(fonts[cur + 1]),
sizeof(struct font_files) * (count - cur));
count--;
}
break;
......@@ -319,14 +319,14 @@ font_management(void)
sprintf(opts[2], "8x14 %.50s", fonts[cur].path8x14 ? fonts[cur].path8x14 : "<undefined>");
sprintf(opts[3], "8x16 %.50s", fonts[cur].path8x16 ? fonts[cur].path8x16 : "<undefined>");
opts[4][0] = 0;
i = uifc.list(WIN_SAV | WIN_ACT | WIN_INS | WIN_INSACT | WIN_DEL | WIN_RHT | WIN_BOT
, 0
, 0
, 0
, &fcur
, &fbar
, "Font Details"
, opt);
i = uifc.list(WIN_SAV | WIN_ACT | WIN_INS | WIN_INSACT | WIN_DEL | WIN_RHT | WIN_BOT,
0,
0,
0,
&fcur,
&fbar,
"Font Details",
opt);
if (i == -1) {
check_exit(false);
break;
......
......@@ -58,8 +58,8 @@ viewscroll(void)
top = 1;
if (top > cterm->backpos)
top = cterm->backpos;
vmem_puttext(term.x - 1, term.y - 1, term.x + term.width - 2, term.y + term.height - 2
, scrollback + (term.width * top));
vmem_puttext(term.x - 1, term.y - 1, term.x + term.width - 2, term.y + term.height - 2,
scrollback + (term.width * top));
cputs("Scrollback");
gotoxy(cterm->width - 9, 1);
cputs("Scrollback");
......@@ -146,23 +146,23 @@ int
syncmenu(struct bbslist *bbs, int *speed)
{
char *opts[] = {
"Scrollback ("ALT_KEY_NAMEP "-B)"
, "Disconnect (Ctrl-Q)"
, "Send Login ("ALT_KEY_NAMEP "-L)"
, "Upload ("ALT_KEY_NAMEP "-U)"
, "Download ("ALT_KEY_NAMEP "-D)"
, "Change Output Rate (" ALT_KEY_NAMEP "-Up/" ALT_KEY_NAMEP "-Down)"
, "Change Log Level"
, "Capture Control ("ALT_KEY_NAMEP "-C)"
, "ANSI Music Control ("ALT_KEY_NAMEP "-M)"
, "Font Setup ("ALT_KEY_NAMEP "-F)"
, "Toggle Doorway Mode"
"Scrollback ("ALT_KEY_NAMEP "-B)",
"Disconnect (Ctrl-Q)",
"Send Login ("ALT_KEY_NAMEP "-L)",
"Upload ("ALT_KEY_NAMEP "-U)",
"Download ("ALT_KEY_NAMEP "-D)",
"Change Output Rate (" ALT_KEY_NAMEP "-Up/" ALT_KEY_NAMEP "-Down)",
"Change Log Level",
"Capture Control ("ALT_KEY_NAMEP "-C)",
"ANSI Music Control ("ALT_KEY_NAMEP "-M)",
"Font Setup ("ALT_KEY_NAMEP "-F)",
"Toggle Doorway Mode"
#ifndef WITHOUT_OOII
, "Toggle Operation Overkill ][ Mode"
#endif
, "Exit ("ALT_KEY_NAMEP "-X)"
, "Edit Dialing Directory ("ALT_KEY_NAMEP "-E)"
, ""
, "Exit ("ALT_KEY_NAMEP "-X)",
"Edit Dialing Directory ("ALT_KEY_NAMEP "-E)",
""
};
int opt = 0;
int i, j;
......@@ -233,8 +233,8 @@ syncmenu(struct bbslist *bbs, int *speed)
case 5: /* Output rate */
if ((bbs->conn_type == CONN_TYPE_MODEM) || (bbs->conn_type == CONN_TYPE_SERIAL)
|| (bbs->conn_type == CONN_TYPE_SERIAL_NORTS)) {
uifcmsg("Not supported for this connection type"
, "Cannot change the display rate for Modem/Serial connections.");
uifcmsg("Not supported for this connection type",
"Cannot change the display rate for Modem/Serial connections.");
}
else if (speed != NULL) {
j = get_rate_num(*speed);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -168,12 +168,12 @@ rlogin_connect(struct bbslist *bbs)
if (ret < 1)
return -1;
sprintf(sbuf, "MBBS: %s %d '%s' %d %s\r\n"
, (bbs->ghost_program[0]) ? bbs->ghost_program : bbs->password /* Program name */
, 2 /* GHost protocol version */
, bbs->user /* User's full name */
, 999 /* Time remaining */
, "GR" /* GR = ANSI, NG = ASCII */
sprintf(sbuf, "MBBS: %s %d '%s' %d %s\r\n",
(bbs->ghost_program[0]) ? bbs->ghost_program : bbs->password, /* Program name */
2, /* GHost protocol version */
bbs->user, /* User's full name */
999, /* Time remaining */
"GR" /* GR = ANSI, NG = ASCII */
);
sendsocket(rlogin_sock, sbuf, strlen(sbuf));
......
......@@ -12,33 +12,33 @@
#endif
struct crypt_funcs {
int (*PopData)(C_IN CRYPT_HANDLE envelope, C_OUT void C_PTR buffer
, C_IN int length, C_OUT int C_PTR bytesCopied);
int (*PushData)(C_IN CRYPT_HANDLE envelope, C_IN void C_PTR buffer
, C_IN int length, C_OUT int C_PTR bytesCopied);
int (*PopData)(C_IN CRYPT_HANDLE envelope, C_OUT void C_PTR buffer,
C_IN int length, C_OUT int C_PTR bytesCopied);
int (*PushData)(C_IN CRYPT_HANDLE envelope, C_IN void C_PTR buffer,
C_IN int length, C_OUT int C_PTR bytesCopied);
int (*FlushData)(C_IN CRYPT_HANDLE envelope);
int (*Init)(void);
int (*End)(void);
int (*CreateSession)(C_OUT CRYPT_SESSION C_PTR session
, C_IN CRYPT_USER cryptUser
, C_IN CRYPT_SESSION_TYPE formatType);
int (*GetAttribute)(C_IN CRYPT_HANDLE cryptHandle
, C_IN CRYPT_ATTRIBUTE_TYPE attributeType
, C_OUT int C_PTR value);
int (*GetAttributeString)(C_IN CRYPT_HANDLE cryptHandle
, C_IN CRYPT_ATTRIBUTE_TYPE attributeType
, C_OUT void C_PTR value
, C_OUT int C_PTR valueLength);
int (*SetAttribute)(C_IN CRYPT_HANDLE cryptHandle
, C_IN CRYPT_ATTRIBUTE_TYPE attributeType
, C_IN int value);
int (*SetAttributeString)(C_IN CRYPT_HANDLE cryptHandle
, C_IN CRYPT_ATTRIBUTE_TYPE attributeType
, C_IN void C_PTR value, C_IN int valueLength);
int (*CreateSession)(C_OUT CRYPT_SESSION C_PTR session,
C_IN CRYPT_USER cryptUser,
C_IN CRYPT_SESSION_TYPE formatType);
int (*GetAttribute)(C_IN CRYPT_HANDLE cryptHandle,
C_IN CRYPT_ATTRIBUTE_TYPE attributeType,
C_OUT int C_PTR value);
int (*GetAttributeString)(C_IN CRYPT_HANDLE cryptHandle,
C_IN CRYPT_ATTRIBUTE_TYPE attributeType,
C_OUT void C_PTR value,
C_OUT int C_PTR valueLength);
int (*SetAttribute)(C_IN CRYPT_HANDLE cryptHandle,
C_IN CRYPT_ATTRIBUTE_TYPE attributeType,
C_IN int value);
int (*SetAttributeString)(C_IN CRYPT_HANDLE cryptHandle,
C_IN CRYPT_ATTRIBUTE_TYPE attributeType,
C_IN void C_PTR value, C_IN int valueLength);
int (*DestroySession)(C_IN CRYPT_SESSION session);
int (*AddRandom)(C_IN void C_PTR randomData, C_IN int randomDataLength);
int (*DeleteAttribute)(C_IN CRYPT_HANDLE cryptHandle
, C_IN CRYPT_ATTRIBUTE_TYPE attributeType);
int (*DeleteAttribute)(C_IN CRYPT_HANDLE cryptHandle,
C_IN CRYPT_ATTRIBUTE_TYPE attributeType);
};
#endif // ifndef WITHOUT_CRYPTLIB
......
......@@ -176,8 +176,8 @@ static const struct {
unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
unsigned char pixel_data[64 * 64 * 4 + 1];
} syncterm_icon = {
64, 64, 4
, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
64, 64, 4,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
......@@ -744,71 +744,71 @@ char *output_types[] = {
" (SDL, Console, ANSI)"
#endif
#ifdef __unix__
, "Curses"
, "Curses on cp437 Device"
, "Curses using US-ASCII"
, "Curses",
"Curses on cp437 Device",
"Curses using US-ASCII"
#endif
, "ANSI"
#if defined(__unix__) && !defined(NO_X)
, "X11"
#endif
#ifdef _WIN32
, "Win32 Console"
, "Win32 Console Fullscreen"
, "Win32 Console",
"Win32 Console Fullscreen"
#endif
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
, "SDL"
, "SDL Fullscreen"
, "SDL",
"SDL Fullscreen"
#endif
, NULL
};
int output_map[] = {
CIOLIB_MODE_AUTO
#ifdef __unix__
, CIOLIB_MODE_CURSES
, CIOLIB_MODE_CURSES_IBM
, CIOLIB_MODE_CURSES_ASCII
, CIOLIB_MODE_CURSES,
CIOLIB_MODE_CURSES_IBM,
CIOLIB_MODE_CURSES_ASCII
#endif
, CIOLIB_MODE_ANSI
#if defined(__unix__) && !defined(NO_X)
, CIOLIB_MODE_X
#endif
#ifdef _WIN32
, CIOLIB_MODE_CONIO
, CIOLIB_MODE_CONIO_FULLSCREEN
, CIOLIB_MODE_CONIO,
CIOLIB_MODE_CONIO_FULLSCREEN
#endif
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
, CIOLIB_MODE_SDL
, CIOLIB_MODE_SDL_FULLSCREEN
, CIOLIB_MODE_SDL,
CIOLIB_MODE_SDL_FULLSCREEN
#endif
, 0
};
char *output_descrs[] = {
"Autodetect"
, "Curses"
, "Curses on cp437 Device"
, "Curses using US-ASCII"
, "ANSI"
, "X11"
, "Win32 Console"
, "Win32 Console Fullscreen"
, "SDL"
, "SDL Fullscreen"
, NULL
"Autodetect",
"Curses",
"Curses on cp437 Device",
"Curses using US-ASCII",
"ANSI",
"X11",
"Win32 Console",
"Win32 Console Fullscreen",
"SDL",
"SDL Fullscreen",
NULL
};
char *output_enum[] = {
"Autodetect"
, "Curses"
, "Curses437"
, "CursesAscii"
, "ANSI"
, "X11"
, "WinConsole"