summaryrefslogtreecommitdiff
path: root/libvxi11client/client.c
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-09 14:02:09 +0900
committerdaniel <danieruru@gmail.com>2013-01-09 14:02:09 +0900
commitee9413282d02d936185dc88a34bb817a1a273e6d (patch)
tree159f3b558a9da24c4b0166889d11f2833dc72e99 /libvxi11client/client.c
parentc4ef0522de10e86ff7af432066123e59665913c4 (diff)
A few more clean ups
Diffstat (limited to 'libvxi11client/client.c')
-rw-r--r--libvxi11client/client.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libvxi11client/client.c b/libvxi11client/client.c
index 747947b..eb224f2 100644
--- a/libvxi11client/client.c
+++ b/libvxi11client/client.c
@@ -1,5 +1,5 @@
-#include "vxi11.h"
#include <stdio.h>
+#include "libvxi11client.h"
#define IDENTIFY "*IDN?"
@@ -25,17 +25,17 @@ int main(int argc, char *argv[]) {
int err = 0;
- if ((err = vxi11_open(argv[1])) > 0) {
+ if ((err = vxi11_open(argv[1], NULL)) > 0) {
// write some bytes
- int byteswritten = vxi11_write(IDENTIFY, sizeof(IDENTIFY));
+ int byteswritten = vxi11_write(IDENTIFY, sizeof(IDENTIFY), false);
if (byteswritten >= 0)
printf("Wrote %d bytes\n", byteswritten);
else
printf("Error writing data\n");
// read some bytes
- int bytesread = vxi11_read();
+ int bytesread = vxi11_read(NULL, 0, false, false, 0);
if (bytesread >= 0)
printf("Read %d bytes\n", bytesread);
else
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
// docmd
if ((err = vxi11_docmd(0x00)) > 0)
- printf("did command, should fail! %d\n");
+ printf("did command, should fail!\n");
else
printf("Error calling docmd; %s\n", geterrorstring(err));
@@ -101,4 +101,5 @@ int main(int argc, char *argv[]) {
printf("Error opening device; %s\n", geterrorstring(err));
exit(1);
}
+ return 0;
}