• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/transmission/transmission-2.73/libtransmission/

Lines Matching refs:source

6  * This source code is provided as is by Unicode, Inc. No claims are
31 source sequences, enhanced error detection, added casts
66 const UTF32* source = *sourceStart;
68 while (source < sourceEnd) {
73 ch = *source++;
78 --source; /* return to the illegal value itself */
96 --source; /* Back up source pointer! */
104 *sourceStart = source;
115 const UTF16* source = *sourceStart;
118 while (source < sourceEnd) {
119 const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */
120 ch = *source++;
123 /* If the 16 bits following the high surrogate are in the source buffer... */
124 if (source < sourceEnd) {
125 ch2 = *source;
130 ++source;
132 --source; /* return to the illegal value itself */
137 --source; /* return to the high surrogate */
144 --source; /* return to the illegal value itself */
150 source = oldSource; /* Back up source pointer! */
155 *sourceStart = source;
219 const UTF16* source = *sourceStart;
221 while (source < sourceEnd) {
226 const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */
227 ch = *source++;
230 /* If the 16 bits following the high surrogate are in the source buffer... */
231 if (source < sourceEnd) {
232 UTF32 ch2 = *source;
237 ++source;
239 --source; /* return to the illegal value itself */
244 --source; /* return to the high surrogate */
251 --source; /* return to the illegal value itself */
267 source = oldSource; /* Back up source pointer! */
278 *sourceStart = source;
289 * length = trailingBytesForUTF8[*source]+1;
296 static Boolean isLegalUTF8(const UTF8 *source, int length) {
298 const UTF8 *srcptr = source+length;
306 switch (*source) {
315 case 1: if (*source >= 0x80 && *source < 0xC2) return false;
317 if (*source > 0xF4) return false;
328 Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) {
330 if (source == sourceEnd) {
334 length = trailingBytesForUTF8[*source]+1;
335 if (source+length > sourceEnd) {
338 if (!isLegalUTF8(source, length)) {
341 source += length;
342 if (source >= sourceEnd) {
355 const UTF8* source = (const UTF8*) str;
364 sourceEnd = source + ((max_len < 0) ? strlen(str) : (size_t)max_len);
366 if( source == sourceEnd )
369 *end = (const char*) source;
375 const int length = trailingBytesForUTF8[*source] + 1;
376 if (source + length > sourceEnd) {
378 *end = (const char*) source;
381 if (!isLegalUTF8(source, length)) {
383 *end = (const char*) source;
386 source += length;
387 if (source >= sourceEnd) {
389 *end = (const char*) source;
404 const UTF8* source = *sourceStart;
406 while (source < sourceEnd) {
408 unsigned short extraBytesToRead = trailingBytesForUTF8[*source];
409 if (source + extraBytesToRead >= sourceEnd) {
413 if (! isLegalUTF8(source, extraBytesToRead+1)) {
421 case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */
422 case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */
423 case 3: ch += *source++; ch <<= 6;
424 case 2: ch += *source++; ch <<= 6;
425 case 1: ch += *source++; ch <<= 6;
426 case 0: ch += *source++;
431 source -= (extraBytesToRead+1); /* Back up source pointer! */
438 source -= (extraBytesToRead+1); /* return to the illegal value itself */
450 source -= (extraBytesToRead+1); /* return to the start */
458 source -= (extraBytesToRead+1); /* Back up source pointer! */
466 *sourceStart = source;
477 const UTF32* source = *sourceStart;
479 while (source < sourceEnd) {
484 ch = *source++;
488 --source; /* return to the illegal value itself */
508 --source; /* Back up source pointer! */
519 *sourceStart = source;
530 const UTF8* source = *sourceStart;
532 while (source < sourceEnd) {
534 unsigned short extraBytesToRead = trailingBytesForUTF8[*source];
535 if (source + extraBytesToRead >= sourceEnd) {
539 if (! isLegalUTF8(source, extraBytesToRead+1)) {
547 case 5: ch += *source++; ch <<= 6;
548 case 4: ch += *source++; ch <<= 6;
549 case 3: ch += *source++; ch <<= 6;
550 case 2: ch += *source++; ch <<= 6;
551 case 1: ch += *source++; ch <<= 6;
552 case 0: ch += *source++;
557 source -= (extraBytesToRead+1); /* Back up the source pointer! */
567 source -= (extraBytesToRead+1); /* return to the illegal value itself */
581 *sourceStart = source;
595 ch += *source++;