summaryrefslogtreecommitdiff
path: root/libvxi11client/client.c
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-10 17:29:54 +0900
committerdaniel <danieruru@gmail.com>2013-01-10 17:29:54 +0900
commit54329a7c7f740171d1594c6c6195277c2924f31f (patch)
tree8089149ac2898a8224b69135028c50ca79969b2e /libvxi11client/client.c
parenta7f61f8769d7c704e409e511687d450608c220d1 (diff)
Interrupt channel work
Diffstat (limited to 'libvxi11client/client.c')
-rw-r--r--libvxi11client/client.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/libvxi11client/client.c b/libvxi11client/client.c
index 2d050aa..9656e4d 100644
--- a/libvxi11client/client.c
+++ b/libvxi11client/client.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#include "libvxi11client.h"
#define IDENTIFY "*IDN?"
@@ -124,13 +125,18 @@ int main(int argc, char *argv[]) {
printf("\n");
// create interrupt channel
- err = vxi11_create_intr_chan();
-
- // destroy interrupt channel
- if ((err = vxi11_destroy_intr_chan()) > 0)
- printf("destroyed interrupt channel\n");
+ printf("-- Testing interrupt channel --\n");
+ if ((err = vxi11_create_intr_chan() > 0)) {
+ printf("Created interrupt channel\n");
+ // destroy interrupt channel
+ if ((err = vxi11_destroy_intr_chan()) > 0)
+ printf("Destroyed interrupt channel\n");
+ else
+ printf("Error destroying interrupt channel; %s\n", geterrorstring(err));
+ }
else
- printf("Error destroying interrupt channel; %s\n", geterrorstring(err));
+ printf("Error creating interrupt channel; %s\n", geterrorstring(err));
+ printf("\n");
// docmd
if ((err = vxi11_docmd(0x00, false)) > 0)