Newsgroups: comp.parallel.pvm From: csaldanh@mae.carleton.ca (Chris Saldanha) Subject: pvm_pkbyte and NULL Organization: Carleton University, Ottawa, Canada Date: 31 Mar 1998 16:11:12 GMT Message-ID: <6fr4j0$ehm$1@bertrand.ccs.carleton.ca> OK, it took me a while to see what was happening, but I figured it out. I am using pvm_pkbyte() to send an array of char's. The char's are not a string, but rather an array of bits being stored in a char. So, some of the chars in the array may be zero. pvm_pkbyte truncates the data at the first 0-byte, which the documentation does not describe, instead of sending the number of bytes I asked for, which I think seems wrong for that operation. If I wanted NULL-termination, I would have used pvm_pkstr(). This appears in 3.3.10 (on NeXTSTEP) and 3.3.11 (on Linux), all in C. Is this really the intended behaviour of pkbyte? If so, what is the proper way of handling an array of bytes which contains internal 0-chars. Since my arrays are variably sized, I'm going to have to have an awful loop which encodes piles of single-character strings, or I'll have to cast the array of char to an array of short int, so that it won't do this. --Chris Chris Saldanha | Computers are useless. Carleton University (Comp. Sci) | They can only give you answers. csaldanh@mae.carleton.ca (NeXT/MIME) | http://www.mae.carleton.ca/~csaldanh | -Pablo Picasso