diff options
Diffstat (limited to 'libvxi11client/client.c')
-rw-r--r-- | libvxi11client/client.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libvxi11client/client.c b/libvxi11client/client.c index f946547..747947b 100644 --- a/libvxi11client/client.c +++ b/libvxi11client/client.c @@ -6,7 +6,7 @@ static char* geterrorstring(int errorcode) { switch (errorcode) { case 0: - return "no response from server"; + return "invalid state (not connected) or no response from server"; case -8: return "operation not supported"; default: @@ -14,12 +14,18 @@ static char* geterrorstring(int errorcode) { } } -int main() { +int main(int argc, char *argv[]) { + printf("VXI-11 test client\n"); + if (argc != 2) { + printf("usage; %s <host>\n", argv[0]); + exit(1); + } + int err = 0; - if ((err = vxi11_open("192.168.2.250")) > 0) { + if ((err = vxi11_open(argv[1])) > 0) { // write some bytes int byteswritten = vxi11_write(IDENTIFY, sizeof(IDENTIFY)); |