summaryrefslogtreecommitdiff
path: root/libvxi11client/libvxi11client.c
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-23 13:17:52 +0900
committerdaniel <danieruru@gmail.com>2013-01-23 13:17:52 +0900
commitc53ea096ab5a656f93ad2aed8d50f5dd346f91c3 (patch)
tree5dbd48863285fe0a6f6f19fbd4b916d6ce7b4cde /libvxi11client/libvxi11client.c
parent63f018d9d0a4b1ae11f9adb6f5bd3c9315b00130 (diff)
Update docs, add the "global" functions to the export list, add the reason from read to the stuff that gets returned.
Diffstat (limited to 'libvxi11client/libvxi11client.c')
-rw-r--r--libvxi11client/libvxi11client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c
index 2c6f3a8..ebd71ee 100644
--- a/libvxi11client/libvxi11client.c
+++ b/libvxi11client/libvxi11client.c
@@ -200,7 +200,7 @@ int vxi11_write(VXI11Context* context, char* data, int len, bool waitlock, bool
*/
int vxi11_read(VXI11Context* context, char* buffer, unsigned int bufferlen, bool waitlock, bool termchrset,
- char termchr) {
+ char termchr, unsigned int* reason) {
if (context->clnt == NULL)
return 0;
@@ -215,6 +215,8 @@ int vxi11_read(VXI11Context* context, char* buffer, unsigned int bufferlen, bool
#endif
if (buffer != NULL)
strncpy(buffer, resp->data.data_val, (bufferlen < resp->data.data_len ? bufferlen : resp->data.data_len));
+ if (reason != NULL)
+ *reason = resp->reason;
#ifdef DEBUG
else
printf("Supplied buffer is null!\n");