Switch to C++ versions of standard C headers
This commit is contained in:
committed by
Alex Chernyakhovsky
parent
19ad493dcb
commit
cf542739cc
@@ -30,8 +30,8 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <cstdlib>
|
||||||
#include <stdlib.h>
|
#include <cstring>
|
||||||
|
|
||||||
#include "src/util/fatal_assert.h"
|
#include "src/util/fatal_assert.h"
|
||||||
#include "src/crypto/base64.h"
|
#include "src/crypto/base64.h"
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
|
|
||||||
bool base64_decode( const char *b64, const size_t b64_len,
|
bool base64_decode( const char *b64, const size_t b64_len,
|
||||||
uint8_t *raw, size_t *raw_len );
|
uint8_t *raw, size_t *raw_len );
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
/* Use our fallback implementation, which is correct for any endianness. */
|
/* Use our fallback implementation, which is correct for any endianness. */
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
|
|
||||||
/* Make sure they aren't macros */
|
/* Make sure they aren't macros */
|
||||||
#undef htobe64
|
#undef htobe64
|
||||||
|
|||||||
@@ -30,14 +30,15 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <cassert>
|
||||||
#include <stdio.h>
|
#include <cerrno>
|
||||||
#include <errno.h>
|
#include <cstdio>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#include <assert.h>
|
#include <cstring>
|
||||||
#include <sys/resource.h>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#include <sys/resource.h>
|
||||||
|
|
||||||
#include "src/crypto/byteorder.h"
|
#include "src/crypto/byteorder.h"
|
||||||
#include "src/crypto/crypto.h"
|
#include "src/crypto/crypto.h"
|
||||||
#include "src/crypto/base64.h"
|
#include "src/crypto/base64.h"
|
||||||
|
|||||||
+5
-4
@@ -34,11 +34,12 @@
|
|||||||
#define CRYPTO_HPP
|
#define CRYPTO_HPP
|
||||||
|
|
||||||
#include "src/crypto/ae.h"
|
#include "src/crypto/ae.h"
|
||||||
#include <string>
|
|
||||||
#include <string.h>
|
#include <cstdint>
|
||||||
#include <stdint.h>
|
#include <cstdlib>
|
||||||
#include <stdlib.h>
|
#include <cstring>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
long int myatoi( const char *str );
|
long int myatoi( const char *str );
|
||||||
|
|||||||
@@ -87,8 +87,8 @@
|
|||||||
#include "src/crypto/ae.h"
|
#include "src/crypto/ae.h"
|
||||||
#include "src/crypto/crypto.h"
|
#include "src/crypto/crypto.h"
|
||||||
#include "src/util/fatal_assert.h"
|
#include "src/util/fatal_assert.h"
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#if defined(HAVE_STRINGS_H)
|
#if defined(HAVE_STRINGS_H)
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-2
@@ -33,9 +33,9 @@
|
|||||||
#ifndef PRNG_HPP
|
#ifndef PRNG_HPP
|
||||||
#define PRNG_HPP
|
#define PRNG_HPP
|
||||||
|
|
||||||
#include <string>
|
#include <cstdint>
|
||||||
#include <stdint.h>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "src/crypto/crypto.h"
|
#include "src/crypto/crypto.h"
|
||||||
|
|
||||||
|
|||||||
+12
-11
@@ -32,19 +32,20 @@
|
|||||||
|
|
||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <cerrno>
|
||||||
#include <locale.h>
|
#include <climits>
|
||||||
#include <string.h>
|
#include <clocale>
|
||||||
#include <unistd.h>
|
#include <csignal>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
#include <ctime>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
#include <pwd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <pwd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <exception>
|
|
||||||
|
|
||||||
#if HAVE_PTY_H
|
#if HAVE_PTY_H
|
||||||
#include <pty.h>
|
#include <pty.h>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,11 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include "src/statesync/user.h"
|
#include "src/statesync/user.h"
|
||||||
#include "src/util/fatal_assert.h"
|
#include "src/util/fatal_assert.h"
|
||||||
#include "src/util/pty_compat.h"
|
#include "src/util/pty_compat.h"
|
||||||
|
|||||||
+11
-10
@@ -32,18 +32,19 @@
|
|||||||
|
|
||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <cassert>
|
||||||
#include <stdio.h>
|
#include <cerrno>
|
||||||
#include <stdlib.h>
|
#include <clocale>
|
||||||
#include <signal.h>
|
#include <csignal>
|
||||||
#include <errno.h>
|
#include <cstdio>
|
||||||
#include <string.h>
|
#include <cstdlib>
|
||||||
#include <locale.h>
|
#include <cstring>
|
||||||
#include <wchar.h>
|
#include <cwchar>
|
||||||
#include <assert.h>
|
#include <cwctype>
|
||||||
#include <wctype.h>
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#if HAVE_PTY_H
|
#if HAVE_PTY_H
|
||||||
#include <pty.h>
|
#include <pty.h>
|
||||||
|
|||||||
+16
-15
@@ -32,25 +32,26 @@
|
|||||||
|
|
||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <cassert>
|
||||||
#include <stdio.h>
|
#include <cerrno>
|
||||||
#include <stdlib.h>
|
#include <clocale>
|
||||||
#include <signal.h>
|
#include <csignal>
|
||||||
#include <errno.h>
|
#include <cstdio>
|
||||||
#include <string.h>
|
#include <cstdlib>
|
||||||
#include <locale.h>
|
#include <cstring>
|
||||||
#include <wchar.h>
|
#include <cwchar>
|
||||||
#include <assert.h>
|
#include <cwctype>
|
||||||
#include <wctype.h>
|
#include <exception>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <pwd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
|
||||||
#include <termios.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <exception>
|
#include <sys/types.h>
|
||||||
|
#include <termios.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#if HAVE_PTY_H
|
#if HAVE_PTY_H
|
||||||
#include <pty.h>
|
#include <pty.h>
|
||||||
|
|||||||
@@ -33,7 +33,8 @@
|
|||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
#include "src/include/version.h"
|
#include "src/include/version.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "stmclient.h"
|
#include "stmclient.h"
|
||||||
|
|||||||
+19
-18
@@ -33,33 +33,34 @@
|
|||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
#include "src/include/version.h"
|
#include "src/include/version.h"
|
||||||
|
|
||||||
#include <err.h>
|
#include <cerrno>
|
||||||
#include <errno.h>
|
#include <clocale>
|
||||||
#include <locale.h>
|
#include <csignal>
|
||||||
#include <string.h>
|
#include <cstdio>
|
||||||
#include <strings.h>
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
#include <ctime>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <typeinfo>
|
||||||
|
|
||||||
|
#include <err.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <strings.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <typeinfo>
|
|
||||||
#include <signal.h>
|
|
||||||
#ifdef HAVE_UTEMPTER
|
#ifdef HAVE_UTEMPTER
|
||||||
#include <utempter.h>
|
#include <utempter.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYSLOG
|
#ifdef HAVE_SYSLOG
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_UTMPX_H
|
#ifdef HAVE_UTMPX_H
|
||||||
#include <utmpx.h>
|
#include <utmpx.h>
|
||||||
|
|||||||
@@ -32,18 +32,19 @@
|
|||||||
|
|
||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
|
|
||||||
|
#include <cerrno>
|
||||||
|
#include <clocale>
|
||||||
|
#include <csignal>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
#include <ctime>
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <errno.h>
|
#include <pwd.h>
|
||||||
#include <locale.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <pwd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#if HAVE_PTY_H
|
#if HAVE_PTY_H
|
||||||
#include <pty.h>
|
#include <pty.h>
|
||||||
|
|||||||
@@ -33,11 +33,12 @@
|
|||||||
#ifndef STM_CLIENT_HPP
|
#ifndef STM_CLIENT_HPP
|
||||||
#define STM_CLIENT_HPP
|
#define STM_CLIENT_HPP
|
||||||
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <termios.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <termios.h>
|
||||||
|
|
||||||
#include "src/statesync/completeterminal.h"
|
#include "src/statesync/completeterminal.h"
|
||||||
#include "src/network/networktransport.h"
|
#include "src/network/networktransport.h"
|
||||||
#include "src/statesync/user.h"
|
#include "src/statesync/user.h"
|
||||||
|
|||||||
@@ -31,10 +31,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <wchar.h>
|
#include <climits>
|
||||||
|
#include <cwchar>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#include "src/frontend/terminaloverlay.h"
|
#include "src/frontend/terminaloverlay.h"
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,8 @@
|
|||||||
#include "src/network/transportsender.h"
|
#include "src/network/transportsender.h"
|
||||||
#include "src/terminal/parser.h"
|
#include "src/terminal/parser.h"
|
||||||
|
|
||||||
|
#include <climits>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
namespace Overlay {
|
namespace Overlay {
|
||||||
using namespace Terminal;
|
using namespace Terminal;
|
||||||
|
|||||||
@@ -32,6 +32,10 @@
|
|||||||
|
|
||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
#include <cerrno>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#ifdef HAVE_SYS_UIO_H
|
#ifdef HAVE_SYS_UIO_H
|
||||||
@@ -39,9 +43,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "src/util/dos_assert.h"
|
#include "src/util/dos_assert.h"
|
||||||
|
|||||||
@@ -33,16 +33,17 @@
|
|||||||
#ifndef NETWORK_HPP
|
#ifndef NETWORK_HPP
|
||||||
#define NETWORK_HPP
|
#define NETWORK_HPP
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <cassert>
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <exception>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <string>
|
|
||||||
#include <math.h>
|
|
||||||
#include <vector>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <exception>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "src/crypto/crypto.h"
|
#include "src/crypto/crypto.h"
|
||||||
|
|
||||||
|
|||||||
@@ -33,17 +33,16 @@
|
|||||||
#ifndef NETWORK_TRANSPORT_HPP
|
#ifndef NETWORK_TRANSPORT_HPP
|
||||||
#define NETWORK_TRANSPORT_HPP
|
#define NETWORK_TRANSPORT_HPP
|
||||||
|
|
||||||
#include <string>
|
#include <csignal>
|
||||||
#include <signal.h>
|
#include <ctime>
|
||||||
#include <time.h>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "src/network/network.h"
|
#include "src/network/network.h"
|
||||||
#include "src/network/transportsender.h"
|
#include "src/network/transportsender.h"
|
||||||
#include "transportfragment.h"
|
#include "transportfragment.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Network {
|
namespace Network {
|
||||||
template <class MyState, class RemoteState>
|
template <class MyState, class RemoteState>
|
||||||
class Transport
|
class Transport
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
|
|
||||||
#include "src/crypto/byteorder.h"
|
#include "src/crypto/byteorder.h"
|
||||||
#include "transportfragment.h"
|
#include "transportfragment.h"
|
||||||
|
|||||||
@@ -33,9 +33,9 @@
|
|||||||
#ifndef TRANSPORT_FRAGMENT_HPP
|
#ifndef TRANSPORT_FRAGMENT_HPP
|
||||||
#define TRANSPORT_FRAGMENT_HPP
|
#define TRANSPORT_FRAGMENT_HPP
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "src/protobufs/transportinstruction.pb.h"
|
#include "src/protobufs/transportinstruction.pb.h"
|
||||||
|
|
||||||
|
|||||||
@@ -34,16 +34,15 @@
|
|||||||
#define TRANSPORT_SENDER_IMPL_HPP
|
#define TRANSPORT_SENDER_IMPL_HPP
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <climits>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <ctime>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include "src/network/transportsender.h"
|
#include "src/network/transportsender.h"
|
||||||
#include "transportfragment.h"
|
#include "transportfragment.h"
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
using namespace Network;
|
using namespace Network;
|
||||||
|
|
||||||
template <class MyState>
|
template <class MyState>
|
||||||
|
|||||||
@@ -30,12 +30,11 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "src/statesync/completeterminal.h"
|
#include <climits>
|
||||||
#include "src/util/fatal_assert.h"
|
|
||||||
|
|
||||||
#include "src/protobufs/hostinput.pb.h"
|
#include "src/protobufs/hostinput.pb.h"
|
||||||
|
#include "src/statesync/completeterminal.h"
|
||||||
#include <limits.h>
|
#include "src/util/fatal_assert.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace Parser;
|
using namespace Parser;
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
#ifndef COMPLETE_TERMINAL_HPP
|
#ifndef COMPLETE_TERMINAL_HPP
|
||||||
#define COMPLETE_TERMINAL_HPP
|
#define COMPLETE_TERMINAL_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "src/terminal/parser.h"
|
#include "src/terminal/parser.h"
|
||||||
#include "src/terminal/terminal.h"
|
#include "src/terminal/terminal.h"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
#include "src/statesync/user.h"
|
#include "src/statesync/user.h"
|
||||||
|
|||||||
@@ -33,10 +33,10 @@
|
|||||||
#ifndef USER_HPP
|
#ifndef USER_HPP
|
||||||
#define USER_HPP
|
#define USER_HPP
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "src/terminal/parseraction.h"
|
#include "src/terminal/parseraction.h"
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,11 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
|
#include <cerrno>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cwchar>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <errno.h>
|
|
||||||
#include <wchar.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "src/terminal/parser.h"
|
#include "src/terminal/parser.h"
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@
|
|||||||
/* Based on Paul Williams's parser,
|
/* Based on Paul Williams's parser,
|
||||||
http://www.vt100.net/emu/dec_ansi_parser */
|
http://www.vt100.net/emu/dec_ansi_parser */
|
||||||
|
|
||||||
#include <wchar.h>
|
#include <cstring>
|
||||||
#include <string.h>
|
#include <cwchar>
|
||||||
|
|
||||||
#include "parsertransition.h"
|
#include "parsertransition.h"
|
||||||
#include "src/terminal/parseraction.h"
|
#include "src/terminal/parseraction.h"
|
||||||
|
|||||||
@@ -30,8 +30,8 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <wctype.h>
|
#include <cwctype>
|
||||||
|
|
||||||
#include "src/terminal/parseraction.h"
|
#include "src/terminal/parseraction.h"
|
||||||
#include "src/terminal/terminal.h"
|
#include "src/terminal/terminal.h"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#ifndef PARSERTRANSITION_HPP
|
#ifndef PARSERTRANSITION_HPP
|
||||||
#define PARSERTRANSITION_HPP
|
#define PARSERTRANSITION_HPP
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include "src/terminal/parseraction.h"
|
#include "src/terminal/parseraction.h"
|
||||||
|
|
||||||
|
|||||||
@@ -30,12 +30,13 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <string.h>
|
#include <cstdlib>
|
||||||
#include <stdlib.h>
|
#include <cstring>
|
||||||
#include <unistd.h>
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "src/terminal/terminal.h"
|
#include "src/terminal/terminal.h"
|
||||||
|
|
||||||
using namespace Terminal;
|
using namespace Terminal;
|
||||||
|
|||||||
@@ -33,10 +33,10 @@
|
|||||||
#ifndef TERMINAL_CPP
|
#ifndef TERMINAL_CPP
|
||||||
#define TERMINAL_CPP
|
#define TERMINAL_CPP
|
||||||
|
|
||||||
#include <wchar.h>
|
#include <cstdio>
|
||||||
#include <stdio.h>
|
#include <cwchar>
|
||||||
#include <vector>
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "src/terminal/parseraction.h"
|
#include "src/terminal/parseraction.h"
|
||||||
#include "src/terminal/terminalframebuffer.h"
|
#include "src/terminal/terminalframebuffer.h"
|
||||||
|
|||||||
@@ -30,11 +30,11 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cassert>
|
||||||
#include <assert.h>
|
#include <cerrno>
|
||||||
#include <string.h>
|
#include <cstdio>
|
||||||
#include <errno.h>
|
#include <cstdlib>
|
||||||
#include <stdlib.h>
|
#include <cstring>
|
||||||
|
|
||||||
#include "terminaldispatcher.h"
|
#include "terminaldispatcher.h"
|
||||||
#include "src/terminal/parseraction.h"
|
#include "src/terminal/parseraction.h"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
|
|
||||||
#include "terminaldisplay.h"
|
#include "terminaldisplay.h"
|
||||||
#include "src/terminal/terminalframebuffer.h"
|
#include "src/terminal/terminalframebuffer.h"
|
||||||
|
|||||||
@@ -57,8 +57,8 @@
|
|||||||
#else
|
#else
|
||||||
# error "SysV or X/Open-compatible Curses header file required"
|
# error "SysV or X/Open-compatible Curses header file required"
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
|
|
||||||
using namespace Terminal;
|
using namespace Terminal;
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include "src/terminal/terminalframebuffer.h"
|
#include "src/terminal/terminalframebuffer.h"
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,9 @@
|
|||||||
#ifndef TERMINALFB_HPP
|
#ifndef TERMINALFB_HPP
|
||||||
#define TERMINALFB_HPP
|
#define TERMINALFB_HPP
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <limits.h>
|
#include <climits>
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|||||||
@@ -30,10 +30,11 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstdio>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdio.h>
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "terminaldispatcher.h"
|
#include "terminaldispatcher.h"
|
||||||
#include "src/terminal/terminalframebuffer.h"
|
#include "src/terminal/terminalframebuffer.h"
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
|
|
||||||
#include "terminaluserinput.h"
|
#include "terminaluserinput.h"
|
||||||
|
|
||||||
using namespace Terminal;
|
using namespace Terminal;
|
||||||
|
|||||||
+3
-3
@@ -37,9 +37,9 @@
|
|||||||
client and server. It does not particularly test any code written for
|
client and server. It does not particularly test any code written for
|
||||||
the Mosh project. */
|
the Mosh project. */
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include "src/crypto/base64.h"
|
#include "src/crypto/base64.h"
|
||||||
#include "base64_vector.h"
|
#include "base64_vector.h"
|
||||||
|
|||||||
@@ -34,10 +34,10 @@
|
|||||||
messages, interspersed with some random bad ciphertexts which we need to
|
messages, interspersed with some random bad ciphertexts which we need to
|
||||||
reject. */
|
reject. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
|
|
||||||
#define __STDC_FORMAT_MACROS
|
#define __STDC_FORMAT_MACROS
|
||||||
#include <inttypes.h>
|
#include <cinttypes>
|
||||||
|
|
||||||
#include "src/crypto/crypto.h"
|
#include "src/crypto/crypto.h"
|
||||||
#include "src/crypto/prng.h"
|
#include "src/crypto/prng.h"
|
||||||
|
|||||||
+6
-5
@@ -32,13 +32,14 @@
|
|||||||
|
|
||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
|
|
||||||
|
#include <cerrno>
|
||||||
|
#include <csignal>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
|
|
||||||
#include "src/util/locale_utils.h"
|
#include "src/util/locale_utils.h"
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,9 @@
|
|||||||
client and server. It does not particularly test any code written for
|
client and server. It does not particularly test any code written for
|
||||||
the Mosh project. */
|
the Mosh project. */
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
#include <string.h>
|
#include <cstdlib>
|
||||||
#include <stdlib.h>
|
#include <cstring>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "src/crypto/ae.h"
|
#include "src/crypto/ae.h"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
|
|
||||||
#include "test_utils.h"
|
#include "test_utils.h"
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
#ifndef DOS_ASSERT_HPP
|
#ifndef DOS_ASSERT_HPP
|
||||||
#define DOS_ASSERT_HPP
|
#define DOS_ASSERT_HPP
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include "src/crypto/crypto.h"
|
#include "src/crypto/crypto.h"
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
#ifndef FATAL_ASSERT_HPP
|
#ifndef FATAL_ASSERT_HPP
|
||||||
#define FATAL_ASSERT_HPP
|
#define FATAL_ASSERT_HPP
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
static void fatal_error( const char *expression, const char *file, int line, const char *function )
|
static void fatal_error( const char *expression, const char *file, int line, const char *function )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,11 +32,11 @@
|
|||||||
|
|
||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <cerrno>
|
||||||
#include <stdlib.h>
|
#include <clocale>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <locale.h>
|
#include <cstdlib>
|
||||||
#include <errno.h>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#if HAVE_LANGINFO_H
|
#if HAVE_LANGINFO_H
|
||||||
|
|||||||
@@ -33,14 +33,15 @@
|
|||||||
#include "src/include/config.h"
|
#include "src/include/config.h"
|
||||||
|
|
||||||
#if !defined(HAVE_FORKPTY) || !defined(HAVE_CFMAKERAW)
|
#if !defined(HAVE_FORKPTY) || !defined(HAVE_CFMAKERAW)
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/stropts.h>
|
#include <sys/stropts.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "src/util/pty_compat.h"
|
#include "src/util/pty_compat.h"
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -33,11 +33,12 @@
|
|||||||
#ifndef SELECT_HPP
|
#ifndef SELECT_HPP
|
||||||
#define SELECT_HPP
|
#define SELECT_HPP
|
||||||
|
|
||||||
#include <string.h>
|
#include <cassert>
|
||||||
#include <errno.h>
|
#include <cerrno>
|
||||||
#include <signal.h>
|
#include <csignal>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "src/util/fatal_assert.h"
|
#include "src/util/fatal_assert.h"
|
||||||
#include "src/util/timestamp.h"
|
#include "src/util/timestamp.h"
|
||||||
|
|||||||
+3
-2
@@ -30,9 +30,10 @@
|
|||||||
also delete it here.
|
also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "src/util/swrite.h"
|
#include "src/util/swrite.h"
|
||||||
|
|
||||||
|
|||||||
@@ -34,10 +34,10 @@
|
|||||||
|
|
||||||
#include "src/util/timestamp.h"
|
#include "src/util/timestamp.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <cerrno>
|
||||||
|
|
||||||
#if HAVE_CLOCK_GETTIME
|
#if HAVE_CLOCK_GETTIME
|
||||||
#include <time.h>
|
#include <ctime>
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_MACH_ABSOLUTE_TIME
|
#if HAVE_MACH_ABSOLUTE_TIME
|
||||||
#include <mach/error.h>
|
#include <mach/error.h>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#if HAVE_GETTIMEOFDAY
|
#if HAVE_GETTIMEOFDAY
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// On Apple systems CLOCK_MONOTONIC is unfortunately able to go
|
// On Apple systems CLOCK_MONOTONIC is unfortunately able to go
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#ifndef TIMESTAMP_HPP
|
#ifndef TIMESTAMP_HPP
|
||||||
#define TIMESTAMP_HPP
|
#define TIMESTAMP_HPP
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
|
|
||||||
void freeze_timestamp( void );
|
void freeze_timestamp( void );
|
||||||
uint64_t frozen_timestamp( void );
|
uint64_t frozen_timestamp( void );
|
||||||
|
|||||||
Reference in New Issue
Block a user