Changeset 725 for trunk/src/core
- Timestamp:
- May 10, 2007, 8:00:44 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/RpEncode.cc
r675 r725 33 33 isbinary(const char* buf, int size) 34 34 { 35 int index = 0; 36 37 if (size == -1) { 35 if (size < 0) { 38 36 size = strlen(buf); 39 37 } 40 38 41 for (index = 0; index < size; index++) { 42 if (((buf[index] >= '\000') && (buf[index] <= '\010')) || 43 ((buf[index] >= '\013') && (buf[index] <= '\014')) || 44 ((buf[index] >= '\016') && (buf[index] <= '\037')) || 45 ((buf[index] >= '\177') && (buf[index] <= '\377')) ) { 39 for (int index = 0; index < size; index++) { 40 int c = *buf++; 41 if (((c >= '\000') && (c <= '\010')) || 42 ((c >= '\013') && (c <= '\014')) || 43 ((c >= '\016') && (c <= '\037')) || 44 ((c >= '\177') && (c <= '\377')) ) { 46 45 // data is binary 47 46 return index+1; 48 47 } 49 50 48 } 51 49 return 0;
Note: See TracChangeset
for help on using the changeset viewer.