summaryrefslogtreecommitdiff
path: root/libvxi11client/libvxi11client.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 20:07:06 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 20:07:06 -0500
commit85efa1743156178ba9de21d05ea6d2117b0a327e (patch)
tree286f9a2f96ae5428e5f187d27aa20ecc14f4663a /libvxi11client/libvxi11client.c
parent655057d072b0327fbaef82b06c756fda0e06395d (diff)
parent27c33a2f42363b28f3ec7e5179fcba51cf3c3e7b (diff)
Merge branch 'vxi' of ulmo:Instrument into vxi
Diffstat (limited to 'libvxi11client/libvxi11client.c')
-rw-r--r--libvxi11client/libvxi11client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c
index 219a17f..7b23c43 100644
--- a/libvxi11client/libvxi11client.c
+++ b/libvxi11client/libvxi11client.c
@@ -153,7 +153,8 @@ int vxi11_open(VXI11Context* context, char* address, char* device) {
/**
* read the status byte of the connected server
- * returns -1
+ * returns the status byte or'ed with 0x100 on success
+ * so that you can tell a zero status byte from an error
*/
int vxi11_readstatusbyte(VXI11Context* context, bool waitforlock) {
@@ -234,6 +235,7 @@ int vxi11_read(VXI11Context* context, char* buffer, unsigned int bufferlen, bool
/**
* call docmd with the specified command
+ * datainlen will be calculated with strlen if less than 0
*/
int vxi11_docmd(VXI11Context* context, char* datain, int datainlen, char* dataout, int outbufferlen, int* dataoutlen,
@@ -247,8 +249,8 @@ int vxi11_docmd(VXI11Context* context, char* datain, int datainlen, char* dataou
if (datain == NULL)
datainlen = 0;
- else if (datainlen == -1)
- datainlen = strlen(datain);
+ else if (datainlen < 0)
+ datainlen = strlen(datain) + 1;
params.data_in.data_in_len = datainlen;
params.data_in.data_in_val = datain;