#ifdef HAVE_WIN32
#include <windows.h>
+#include "../lib/winapi.h"
#define isatty(fd) (fd==0)
-DWORD g_platform_id = VER_PLATFORM_WIN32_WINDOWS;
#endif
/* Exported variables */
signal(SIGTTIN, got_sigtin);
signal(SIGTTOU, got_sigtout);
trapctlc();
+#else
+ InitWinAPIWrapper();
#endif
+
if (argc) {
usage();
input_line(sock->msg, len);
break;
}
+#endif
+#ifdef HAVE_WIN32 /* use special console for input on win32 */
+ if (input == stdin) {
+ if (win32_cgets(sock->msg, len) == NULL) {
+ return -1;
+ }
+ }
+ else
#endif
if (fgets(sock->msg, len, input) == NULL) {
return -1;
+
}
break;
}
fputs(buf, output);
}
#else
+
fputs(buf, output);
fflush(output);
if (tee) {