diff options
Diffstat (limited to 'libvxi11client/perlbits/Client.xs')
-rw-r--r-- | libvxi11client/perlbits/Client.xs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/libvxi11client/perlbits/Client.xs b/libvxi11client/perlbits/Client.xs index d471fda..b09ee0a 100644 --- a/libvxi11client/perlbits/Client.xs +++ b/libvxi11client/perlbits/Client.xs @@ -136,14 +136,22 @@ vxi_read(context, OUTLIST bytesread, OUTLIST buffer, bufferlen, waitlock, termch buffer = malloc(bufferlen + 1); bytesread = vxi11_read(context, buffer, bufferlen, waitlock, termchrset, termchr, reason); -int -vxi_readstatusbyte(context, waitforlock) +void +vxi_readstatusbyte(context, waitforlock, OUTLIST error, OUTLIST statusbyte) VXI11::Client context bool waitforlock - CODE: - RETVAL = vxi11_readstatusbyte(context, waitforlock); - OUTPUT: - RETVAL + int* error + int* statusbyte + CODE: + int ret = vxi11_readstatusbyte(context, waitforlock); + if(ret > 0){ + *statusbyte = ret & 0xff; + *error = 0; + } + else { + *statusbyte = 0; + *error = ret; + } int vxi_remote(context, waitforlock) |