Commits (1)
  • Deucе's avatar
    There doesn't seem to be a way to get Uncrustify to put commas at · e2cdd5fc
    Deucе authored
    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.
    e2cdd5fc
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"
, "WinConsoleFullscreen"
, "SDL"
, "SDLFullscreen"
, NULL
"Autodetect",
"Curses",
"Curses437",
"CursesAscii",
"ANSI",
"X11",
"WinConsole",
"WinConsoleFullscreen",
"SDL",
"SDLFullscreen",
NULL
};
bool
......@@ -958,8 +958,8 @@ get_new_OSX_filename(char *fn, int fnlen, int type, int shared)
switch (type) {
case SYNCTERM_PATH_INI:
case SYNCTERM_PATH_LIST:
if (FSFindFolder(shared ? kLocalDomain : kUserDomain, kPreferencesFolderType, kCreateFolder
, &ref) != noErr)
if (FSFindFolder(shared ? kLocalDomain : kUserDomain, kPreferencesFolderType, kCreateFolder,
&ref) != noErr)
return NULL;
if (FSRefMakePath(&ref, (unsigned char *)fn, fnlen) != noErr)
return NULL;
......@@ -974,8 +974,8 @@ get_new_OSX_filename(char *fn, int fnlen, int type, int shared)
case SYNCTERM_DEFAULT_TRANSFER_PATH:
/* I'd love to use the "right" setting here, but don't know how */
if (FSFindFolder(shared ? kLocalDomain : kUserDomain, kDownloadsFolderType, kCreateFolder
, &ref) != noErr)
if (FSFindFolder(shared ? kLocalDomain : kUserDomain, kDownloadsFolderType, kCreateFolder,
&ref) != noErr)
return NULL;
if (FSRefMakePath(&ref, (unsigned char *)fn, fnlen) != noErr)
return NULL;
......@@ -986,8 +986,8 @@ get_new_OSX_filename(char *fn, int fnlen, int type, int shared)
}
return fn;
case SYNCTERM_PATH_CACHE:
if (FSFindFolder(shared ? kLocalDomain : kUserDomain, kCachedDataFolderType, kCreateFolder
, &ref) != noErr)
if (FSFindFolder(shared ? kLocalDomain : kUserDomain, kCachedDataFolderType, kCreateFolder,
&ref) != noErr)
return NULL;
if (FSRefMakePath(&ref, (unsigned char *)fn, fnlen) != noErr)
return NULL;
......@@ -1069,8 +1069,8 @@ get_syncterm_filename(char *fn, int fnlen, int type, bool shared)
break;
case SYNCTERM_DEFAULT_TRANSFER_PATH:
if (shared) {
if (GKFP(&FOLDERID_PublicDownloads, KF_FLAG_CREATE, NULL
, &path) == S_OK)
if (GKFP(&FOLDERID_PublicDownloads, KF_FLAG_CREATE, NULL,
&path) == S_OK)
we_got_this = true;
}
else {
......@@ -1100,8 +1100,8 @@ get_syncterm_filename(char *fn, int fnlen, int type, bool shared)
if (!we_got_this) {
#ifdef CSIDL_FLAG_CREATE
if (type == SYNCTERM_DEFAULT_TRANSFER_PATH) {
switch (SHGetFolderPath(NULL, CSIDL_PERSONAL | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT
, fn)) {
switch (SHGetFolderPath(NULL, CSIDL_PERSONAL | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT,
fn)) {
case E_FAIL:
case E_INVALIDARG:
getcwd(fn, fnlen);
......@@ -1116,8 +1116,8 @@ get_syncterm_filename(char *fn, int fnlen, int type, bool shared)
MKDIR(fn);
return fn;
}
switch (SHGetFolderPath(NULL, (shared ? CSIDL_COMMON_APPDATA : CSIDL_APPDATA) | CSIDL_FLAG_CREATE, NULL
, SHGFP_TYPE_CURRENT, fn)) {
switch (SHGetFolderPath(NULL, (shared ? CSIDL_COMMON_APPDATA : CSIDL_APPDATA) | CSIDL_FLAG_CREATE, NULL,
SHGFP_TYPE_CURRENT, fn)) {
case E_FAIL:
case E_INVALIDARG:
strcpy(fn, ".");
......@@ -1298,14 +1298,16 @@ load_settings(struct syncterm_settings *set)
set->startup_mode = iniReadEnum(inifile, "SyncTERM", "ScreenMode", screen_modes_enum, set->startup_mode);
set->output_mode = iniReadEnum(inifile, "SyncTERM", "OutputMode", output_enum, CIOLIB_MODE_AUTO);
set->backlines = iniReadInteger(inifile, "SyncTERM", "ScrollBackLines", 2000);
set->xfer_success_keypress_timeout = iniReadInteger(inifile
, "SyncTERM"
, "TransferSuccessKeypressTimeout"
, /* seconds: */ 0);
set->xfer_failure_keypress_timeout = iniReadInteger(inifile
, "SyncTERM"
, "TransferFailureKeypressTimeout"
, /* seconds: */ 60);
set->xfer_success_keypress_timeout = iniReadInteger(inifile,
"SyncTERM",
"TransferSuccessKeypressTimeout",
/* seconds: */ 0);
set->xfer_failure_keypress_timeout = iniReadInteger(inifile,
"SyncTERM",
"TransferFailureKeypressTimeout",
/* seconds: */ 60);
set->custom_cols = iniReadInteger(inifile, "SyncTERM", "CustomCols", 80);
set->custom_rows = iniReadInteger(inifile, "SyncTERM", "CustomRows", 25);
set->custom_fontheight = iniReadInteger(inifile, "SyncTERM", "CustomFontHeight", 16);
......@@ -1729,8 +1731,8 @@ main(int argc, char **argv)
#if 0
#ifdef ALPHA
init_uifc(true, true);
uifc.showbuf(WIN_SAV | WIN_MID | WIN_HLP, 0, 0, 76, uifc.scrn_len - 2, "WARNING: ALPHA VERSION"
, "This is an ~`ALPHA`~ version\n"
uifc.showbuf(WIN_SAV | WIN_MID | WIN_HLP, 0, 0, 76, uifc.scrn_len - 2, "WARNING: ALPHA VERSION",
"This is an ~`ALPHA`~ version\n"
"\n"
"It has both known and unknown issues and is not believed to be suitable\n"
"for use. By using it, you are agreeing to be free QA to find and report bugs.\n"
......@@ -1744,8 +1746,8 @@ main(int argc, char **argv)
"This message will appear every time you start this program. Please\n"
"consider running the latest release from:\n"
"`https://sourceforge.net/projects/syncterm/files/latest/download`\n"
"if you want a terminal that works."
, NULL, NULL);
"if you want a terminal that works.",
NULL, NULL);
uifcbail();
#endif /* ifdef ALPHA */
#endif /* if 0 */
......@@ -1822,12 +1824,12 @@ main(int argc, char **argv)
if ((listfile = fopen(settings.list_path, "r")) != NULL) {
inifile = iniReadFile(listfile);
fclose(listfile);
iniSetDateTime(&inifile
, bbs->name
, "LastConnected"
, true
, bbs->connected
, &ini_style);
iniSetDateTime(&inifile,
bbs->name,
"LastConnected",
true,
bbs->connected,
&ini_style);
iniSetInteger(&inifile, bbs->name, "TotalCalls", bbs->calls, &ini_style);
if ((listfile = fopen(settings.list_path, "w")) != NULL) {
iniWriteFile(listfile, inifile);
......@@ -1882,8 +1884,8 @@ main(int argc, char **argv)
init_uifc(true, true);
i = 1;
if (!bbs->hidepopups) {
switch (uifc.list(WIN_MID | WIN_SAV, 0, 0, 0, &i, NULL
, "Save this directory entry?", YesNo)) {
switch (uifc.list(WIN_MID | WIN_SAV, 0, 0, 0, &i, NULL,
"Save this directory entry?", YesNo)) {
case 0: /* Yes */
edit_list(NULL, bbs, settings.list_path, false);
add_bbs(settings.list_path, bbs);
......
......@@ -13,9 +13,12 @@
#endif
enum {
SYNCTERM_PATH_INI,
SYNCTERM_PATH_LIST,
SYNCTERM_DEFAULT_TRANSFER_PATH,
SYNCTERM_PATH_INI
,
SYNCTERM_PATH_LIST
,
SYNCTERM_DEFAULT_TRANSFER_PATH
,
SYNCTERM_PATH_CACHE
};
......
......@@ -59,14 +59,14 @@ send_telnet_cmd(uchar cmd, uchar opt)
char buf[16];
if (cmd < TELNET_WILL) {
lprintf(LOG_INFO, "TX: %s"
, telnet_cmd_desc(cmd));
lprintf(LOG_INFO, "TX: %s",
telnet_cmd_desc(cmd));
sprintf(buf, "%c%c", TELNET_IAC, cmd);
putcom(buf, 2);
}
else {
lprintf(LOG_INFO, "TX: %s %s"
, telnet_cmd_desc(cmd), telnet_opt_desc(opt));
lprintf(LOG_INFO, "TX: %s %s",
telnet_cmd_desc(cmd), telnet_opt_desc(opt));
sprintf(buf, "%c%c%c", TELNET_IAC, cmd, opt);
putcom(buf, 3);
}
......@@ -159,11 +159,11 @@ telnet_interpret(BYTE *inbuf, size_t inlen, BYTE *outbuf, size_t *outlen)
if ((option == TELNET_TERM_TYPE) && (telnet_cmd[3] == TELNET_TERM_SEND)) {
char buf[32];
const char *emu = get_emulation_str(conn_api.emulation);
int len = sprintf(buf, "%c%c%c%c%s%c%c"
, TELNET_IAC, TELNET_SB
, TELNET_TERM_TYPE, TELNET_TERM_IS
, emu
, TELNET_IAC, TELNET_SE);
int len = sprintf(buf, "%c%c%c%c%s%c%c",
TELNET_IAC, TELNET_SB,
TELNET_TERM_TYPE, TELNET_TERM_IS,
emu,
TELNET_IAC, TELNET_SE);
lprintf(LOG_INFO, "TX: Terminal Type is %s", emu);
putcom(buf, len);
......@@ -176,8 +176,8 @@ telnet_interpret(BYTE *inbuf, size_t inlen, BYTE *outbuf, size_t *outlen)
telnet_cmdlen = 0;
}
else if (telnet_cmdlen >= 3) { /* telnet option negotiation */
lprintf(LOG_INFO, "RX: %s %s"
, telnet_cmd_desc(command), telnet_opt_desc(option));
lprintf(LOG_INFO, "RX: %s %s",
telnet_cmd_desc(command), telnet_opt_desc(option));
if ((command == TELNET_DO) || (command == TELNET_DONT)) { /* local options */
if (telnet_local_option[option] != command) {
......@@ -193,8 +193,8 @@ telnet_interpret(BYTE *inbuf, size_t inlen, BYTE *outbuf, size_t *outlen)
default: /* unsupported local options
*/
if (command == TELNET_DO) /* NAK */
send_telnet_cmd(telnet_opt_nak(command)
, option);
send_telnet_cmd(telnet_opt_nak(command),
option);
break;
}
}
......@@ -213,8 +213,8 @@ telnet_interpret(BYTE *inbuf, size_t inlen, BYTE *outbuf, size_t *outlen)
buf[6] = rows & 0xff;
buf[7] = TELNET_IAC;
buf[8] = TELNET_SE;
lprintf(LOG_INFO, "TX: Window Size is %u x %u"
, cols, rows);
lprintf(LOG_INFO, "TX: Window Size is %u x %u",
cols, rows);
putcom((char *)buf, 9);
}
}
......@@ -232,8 +232,8 @@ telnet_interpret(BYTE *inbuf, size_t inlen, BYTE *outbuf, size_t *outlen)
default: /* unsupported remote
* options */
if (command == TELNET_WILL) /* NAK */
send_telnet_cmd(telnet_opt_nak(command)
, option);
send_telnet_cmd(telnet_opt_nak(command),
option);
break;
}
}
......
This diff is collapsed.