diff options
author | dscho <dscho> | 2004-12-01 23:06:56 +0000 |
---|---|---|
committer | dscho <dscho> | 2004-12-01 23:06:56 +0000 |
commit | 658b65ad0cc2045bf2c930c8ef2a2853a07ba6ee (patch) | |
tree | 51a7b1f153204de2c3bc423411d8f5b2f566c4f6 /libvncclient/vncviewer.c | |
parent | 7d3b1c9762b5f2878e9783677677cb2b3aa10e7e (diff) | |
download | libtdevnc-658b65ad0cc2045bf2c930c8ef2a2853a07ba6ee.tar.gz libtdevnc-658b65ad0cc2045bf2c930c8ef2a2853a07ba6ee.zip |
support MinGW32!
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r-- | libvncclient/vncviewer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c index 2a11970..c97b234 100644 --- a/libvncclient/vncviewer.c +++ b/libvncclient/vncviewer.c @@ -37,9 +37,18 @@ static void DummyRect(rfbClient* client, int x, int y, int w, int h) { static char* NoPassword(rfbClient* client) { return strdup(""); } + +#ifndef __MINGW32__ #include <stdio.h> #include <termios.h> +#endif + static char* ReadPassword(rfbClient* client) { +#ifdef __MINGW32__ + /* FIXME */ + rfbClientErr("ReadPassword on MinGW32 NOT IMPLEMENTED\n"); + return NoPassword(client); +#else int i; char* p=malloc(9); struct termios save,noecho; @@ -61,6 +70,7 @@ static char* ReadPassword(rfbClient* client) { } tcsetattr(fileno(stdin),TCSAFLUSH,&save); return p; +#endif } static rfbBool MallocFrameBuffer(rfbClient* client) { if(client->frameBuffer) @@ -196,7 +206,8 @@ rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) { char* colon=strchr(argv[i],':'); if(colon) { - client->serverHost=strndup(argv[i],(int)(colon-argv[i])); + client->serverHost=strdup(argv[i]); + client->serverHost[(int)(colon-argv[i])]='\0'; client->serverPort=atoi(colon+1); } else { client->serverHost=strdup(argv[i]); |