提交 c7bdb6a3 编写于 作者: R Richard Levitte

Reformat to fit OpenSSL source code standards

Reviewed-by: NAndy Polyakov <appro@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 0d0723e8
......@@ -2388,25 +2388,20 @@ int s_client_main(int argc, char **argv)
/* OPENSSL_SYS_MSDOS includes OPENSSL_SYS_WINDOWS */
#if defined(OPENSSL_SYS_MSDOS)
else if (has_stdin_waiting())
#elif defined(OPENSSL_SYS_VMS)
else if (FD_ISSET(stdin_sock, &readfds))
#else
#if defined(OPENSSL_SYS_VMS)
else if (FD_ISSET(stdin_sock,&readfds))
#else
else if (FD_ISSET(fileno(stdin),&readfds))
#endif
else if (FD_ISSET(fileno(stdin), &readfds))
#endif
{
if (crlf) {
int j, lf_num;
#if defined(OPENSSL_SYS_VMS)
i = recv(stdin_sock, cbuf, BUFSIZZ / 2, 0);
#else
i = raw_read_stdin(cbuf, BUFSIZZ / 2);
#if defined(OPENSSL_SYS_VMS)
i = recv(stdin_sock, cbuf, BUFSIZZ/2, 0);
#else
i = raw_read_stdin(cbuf, BUFSIZZ/2);
#endif
#endif
lf_num = 0;
/* both loops are skipped when i <= 0 */
......@@ -2422,13 +2417,12 @@ int s_client_main(int argc, char **argv)
}
}
assert(lf_num == 0);
} else
{
#if defined(OPENSSL_SYS_VMS)
} else {
#if defined(OPENSSL_SYS_VMS)
i = recv(stdin_sock, cbuf, BUFSIZZ, 0);
#else
#else
i = raw_read_stdin(cbuf, BUFSIZZ);
#endif
#endif
}
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
if (i == 0)
......
......@@ -2121,9 +2121,9 @@ static int sv_body(int s, int stype, unsigned char *context)
if (stdin_sock > s)
width = stdin_sock + 1;
else
width=s+1;
width = s + 1;
#else
width=s+1;
width = s + 1;
#endif
for (;;) {
int read_from_terminal;
......@@ -2136,11 +2136,11 @@ static int sv_body(int s, int stype, unsigned char *context)
if (!read_from_sslcon) {
FD_ZERO(&readfds);
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
# if defined(OPENSSL_SYS_VMS)
openssl_fdset(stdin_sock,&readfds);
# else
openssl_fdset(stdin),&readfds);
#endif
# if defined(OPENSSL_SYS_VMS)
openssl_fdset(stdin_sock, &readfds);
# else
openssl_fdset(fileno(stdin), &readfds);
# endif
#endif
openssl_fdset(s, &readfds);
/*
......@@ -2180,11 +2180,11 @@ static int sv_body(int s, int stype, unsigned char *context)
if (i <= 0)
continue;
#if defined(OPENSSL_SYS_VMS)
if (FD_ISSET(stdin_sock,&readfds))
#else
if (FD_ISSET(fileno(stdin),&readfds))
#endif
# if defined(OPENSSL_SYS_VMS)
if (FD_ISSET(stdin_sock, &readfds))
# else
if (FD_ISSET(fileno(stdin), &readfds))
# endif
read_from_terminal = 1;
#endif
if (FD_ISSET(s, &readfds))
......@@ -2194,11 +2194,11 @@ static int sv_body(int s, int stype, unsigned char *context)
if (s_crlf) {
int j, lf_num;
#if defined(OPENSSL_SYS_VMS)
i=recv(stdin_sock, buf, bufsize/2, 0);
#else
i = raw_read_stdin(buf, bufsize / 2)
#endif
#if defined(OPENSSL_SYS_VMS)
i=recv(stdin_sock, buf, bufsize / 2, 0);
#else
i = raw_read_stdin(buf, bufsize / 2);
#endif
lf_num = 0;
/* both loops are skipped when i <= 0 */
for (j = 0; j < i; j++)
......@@ -2213,12 +2213,13 @@ static int sv_body(int s, int stype, unsigned char *context)
}
}
assert(lf_num == 0);
} else
} else {
#if defined(OPENSSL_SYS_VMS)
i=recv(stdin_sock,buf,bufsize, 0);
i = recv(stdin_sock, buf, bufsize, 0);
#else
i = raw_read_stdin(buf, bufsize);
#endif
}
if (!s_quiet && !s_brief) {
if ((i <= 0) || (buf[0] == 'Q')) {
BIO_printf(bio_s_out, "DONE\n");
......
此差异已折叠。
......@@ -8,19 +8,19 @@
*/
#ifndef TERM_SOCK_H
#define TERM_SOCK_H
# define TERM_SOCK_H
/*
** Terminal Socket Function Codes
*/
#define TERM_SOCK_CREATE 1
#define TERM_SOCK_DELETE 2
# define TERM_SOCK_CREATE 1
# define TERM_SOCK_DELETE 2
/*
** Terminal Socket Status Codes
*/
#define TERM_SOCK_FAILURE 0
#define TERM_SOCK_SUCCESS 1
# define TERM_SOCK_FAILURE 0
# define TERM_SOCK_SUCCESS 1
/*
** Terminal Socket Prototype
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册