summaryrefslogtreecommitdiff
path: root/libvxi11client
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-29 01:41:48 +0900
committerdaniel <danieruru@gmail.com>2013-01-29 01:41:48 +0900
commitc314cad726a05269c7c7e21200175ee3a79d2ae3 (patch)
treeec9689ef81876a66e676db427f05955780f50b4c /libvxi11client
parent24ba66e6acd0d6603e1259fb2e0cd78dd6e54361 (diff)
update some comments
Diffstat (limited to 'libvxi11client')
-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;