Manoj Ampalam c2cd860261 Readying fork for upstream PR (#92)
- Removed unwanted differentiated code in Windows fork
- Added readpassphrase implementation
- Updates to pester unittests
2017-03-16 10:29:26 -07:00

59 lines
993 B
C

/*
* Windows version of sshpty* routines in sshpty.c
*/
#include <Windows.h>
#include "..\..\..\sshpty.h"
/*
* Windows versions of pty_*. Some of them are NO-OPs and should go
* away when pty logic is refactored and abstracted out
*
*/
int
pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
{
/*
* Simple console screen implementation in Win32 to give a
* Unix like pty for interactive sessions
*/
*ttyfd = 0;
*ptyfd = 0;
strlcpy(namebuf, "console", namebuflen);
return 1;
}
void
pty_release(const char *tty) {
/* NO-OP */
}
void
pty_make_controlling_tty(int *ttyfd, const char *tty) {
/* NO-OP */
}
void
pty_change_window_size(int ptyfd, u_int row, u_int col,
u_int xpixel, u_int ypixel) {
COORD coord;
coord.X = col;
coord.Y = 9999;
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void
pty_setowner(struct passwd *pw, const char *tty) {
/* NO-OP */
}
void
disconnect_controlling_tty(void) {
/* NO-OP */
}