Changeset 650 for trunk/src/tcl
- Timestamp:
- Mar 29, 2007 8:57:18 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tcl/src/RpEncodeTclInterface.cc
r649 r650 13 13 */ 14 14 #include <tcl.h> 15 #include <ctype.h>16 15 #include "RpBuffer.h" 17 16 #include "RpEncodeTclInterface.h" … … 45 44 { 46 45 int index = 0; 47 int err = 0;48 46 49 47 for (index = 0; index < size; index++) { 50 err = isascii(buf[index]); 51 if (err == 0) { 52 return index; 53 } 48 if (((buf[index] >= '\000') && (buf[index] <= '\010')) || 49 ((buf[index] >= '\013') && (buf[index] <= '\014')) || 50 ((buf[index] >= '\016') && (buf[index] <= '\037')) || 51 ((buf[index] >= '\177') && (buf[index] <= '\377')) ) { 52 // data is binary 53 return index+1; 54 } 55 54 56 } 55 57 return 0; … … 246 248 buf = Rappture::Buffer(option,optionLen); 247 249 248 /*249 if (base64 == 0) {250 if (isbinary(buf.bytes(),buf.size()) != 0) {251 // data is binary, make sure it is base64 encoded252 base64 = 1;253 }254 }255 */256 257 250 buf.encode(compress,base64); 258 251 result = Tcl_GetObjResult(interp);
Note: See TracChangeset
for help on using the changeset viewer.