Lines Matching full:ptr1
162 ptr1 = glob_ptr1 + align1;
167 Character *ptr, *ptr1, *ptr2;
201 memset(state.ptr1, random() & 255, state.len[i]);
202 state.ptr1[random() % state.len[i]] = '\0';
203 state.ptr1[state.len[i] - 1] = '\0';
205 strcpy(state.ptr + state.MAX_LEN - 1, state.ptr1);
207 EXPECT_TRUE(strcat(state.ptr2, state.ptr1) == state.ptr2);
390 memset(state.ptr1, ~seek_char, state.len[i]);
392 memset(state.ptr1, '\1', state.len[i]);
394 state.ptr1[state.len[i] - 1] = '\0';
400 expected = state.ptr1 + state.len[i] - 1;
405 state.ptr1[pos] = seek_char;
406 expected = state.ptr1 + pos;
409 ASSERT_TRUE(strchr(state.ptr1, seek_char) == expected);
420 memset(state.ptr1, 'v', state.MAX_LEN);
422 state.ptr1[state.len[i] - 1] = '\0';
429 memcpy(state.ptr1, state.ptr2, state.len[i]);
431 actual = strcmp(state.ptr1, state.ptr2);
433 memcpy(state.ptr1, state.ptr2, pos);
434 if (state.ptr1[pos] > state.ptr2[pos]) {
436 } else if (state.ptr1[pos] == state.ptr2[pos]) {
437 state.ptr1[pos + 1] = '\0';
443 actual = strcmp(state.ptr1, state.ptr2);
458 memset(state.ptr1, '\2', pos);
459 state.ptr1[pos] = '\0';
460 state.ptr1[state.MAX_LEN - 1] = '\0';
462 memcpy(state.ptr, state.ptr1, state.MAX_LEN);
468 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1);
471 ASSERT_TRUE(strcpy(state.ptr2, state.ptr1) == state.ptr2);
472 ASSERT_FALSE((memcmp(state.ptr1, state.ptr, state.MAX_LEN)) != 0 ||
490 memset(state.ptr1, '\3', pos);
491 state.ptr1[pos] = '\0';
493 memcpy(state.ptr + state.MAX_LEN - 1, state.ptr1, pos + 1);
495 memcpy(state.ptr + state.MAX_LEN - 1, state.ptr1, state.len[i]);
499 strlcat(state.ptr2, state.ptr1, state.MAX_LEN + state.len[i]);
517 memset(state.ptr1, rand, state.MAX_LEN);
521 state.ptr1[pos] = '\0';
523 memcpy(state.ptr, state.ptr1, state.MAX_LEN);
529 memcpy(state.ptr + state.MAX_LEN, state.ptr1, state.MAX_LEN);
532 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1);
535 ASSERT_EQ(strlcpy(state.ptr2, state.ptr1, state.MAX_LEN), strlen(state.ptr1));
536 ASSERT_FALSE((memcmp(state.ptr1, state.ptr, state.MAX_LEN) != 0) ||
552 memset(state.ptr1, random() & 255, state.len[i]);
553 state.ptr1[random() % state.len[i]] = '\0';
554 state.ptr1[state.len[i] - 1] = '\0';
556 size_t pos = strlen(state.ptr1);
559 strncpy(state.ptr + state.MAX_LEN - 1, state.ptr1, std::min(actual, pos));
562 ASSERT_TRUE(strncat(state.ptr2, state.ptr1, actual) == state.ptr2);
574 memset(state.ptr1, 'v', state.MAX_LEN);
576 state.ptr1[state.len[i] - 1] = '\0';
583 memcpy(state.ptr1, state.ptr2, state.len[i]);
585 actual = strncmp(state.ptr1, state.ptr2, state.len[i]);
587 memcpy(state.ptr1, state.ptr2, pos);
588 if (state.ptr1[pos] > state.ptr2[pos]) {
590 } else if (state.ptr1[pos] == state.ptr2[pos]) {
591 state.ptr1[pos + 1] = '\0';
597 actual = strncmp(state.ptr1, state.ptr2, state.len[i]);
610 memset(state.ptr1, random() & 255, state.MAX_LEN);
611 state.ptr1[random () % state.MAX_LEN] = '\0';
612 memcpy(state.ptr, state.ptr1, state.MAX_LEN);
617 if (memchr(state.ptr1, 0, state.MAX_LEN)) {
618 pos = strlen(state.ptr1);
624 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1);
626 ASSERT_TRUE(strncpy(state.ptr2, state.ptr1, state.MAX_LEN) == state.ptr2);
627 ASSERT_FALSE(memcmp(state.ptr1, state.ptr, state.MAX_LEN) != 0 ||
640 memset(state.ptr1, ~seek_char, state.len[i]);
642 memset(state.ptr1, '\1', state.len[i]);
644 state.ptr1[state.len[i] - 1] = '\0';
650 expected = state.ptr1 + state.len[i] - 1;
655 state.ptr1[pos] = seek_char;
656 expected = state.ptr1 + pos;
659 ASSERT_TRUE(strrchr(state.ptr1, seek_char) == expected);
671 memset(state.ptr1, ~seek_char, state.len[i]);
678 state.ptr1[pos] = seek_char;
679 expected = state.ptr1 + pos;
682 ASSERT_TRUE(memchr(state.ptr1, seek_char, state.len[i]) == expected);
694 memset(state.ptr1, ~seek_char, state.len[i]);
701 state.ptr1[pos] = seek_char;
702 expected = state.ptr1 + pos;
705 ASSERT_TRUE(memrchr(state.ptr1, seek_char, state.len[i]) == expected);
718 memset(state.ptr1, c1, state.MAX_LEN);
725 int actual = memcmp(state.ptr1, state.ptr2, state.MAX_LEN);
733 extern "C" int __memcmp16(const unsigned short *ptr1, const unsigned short *ptr2, size_t n);
746 std::fill(state.ptr1, state.ptr1 + state.MAX_LEN, c1);
753 int actual = __memcmp16(state.ptr1, state.ptr2, (size_t) state.MAX_LEN);
771 wmemset(state.ptr1, c1, state.MAX_LEN);
778 int actual = wmemcmp(state.ptr1, state.ptr2, (size_t) state.MAX_LEN);
794 memset(state.ptr1, rand, state.len[i]);
795 memset(state.ptr1 + state.len[i], ~rand, state.MAX_LEN - state.len[i]);
801 ASSERT_FALSE(memcpy(state.ptr2 + pos, state.ptr1 + pos, state.len[i]) != state.ptr2 + pos);
802 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, state.MAX_LEN));
814 memset(state.ptr1, ~ch, state.MAX_LEN);
815 memcpy(state.ptr2, state.ptr1, state.MAX_LEN);
819 state.ptr1[k] = ch;
824 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, state.MAX_LEN));
835 memset(state.ptr1, random() & 255, 2 * state.MAX_LEN);
839 memset(state.ptr1, random() & 255, state.len[i]);
840 memcpy(state.ptr2, state.ptr1, 2 * state.MAX_LEN);
841 memcpy(state.ptr, state.ptr1, state.len[i]);
842 memcpy(state.ptr1 + pos, state.ptr, state.len[i]);
845 ASSERT_EQ(0, memcmp(state.ptr2, state.ptr1, 2 * state.MAX_LEN));
856 memset(state.ptr1, random() & 255, state.MAX_LEN);
857 memset(state.ptr1 + state.MAX_LEN, random() & 255, state.MAX_LEN);
858 memcpy(state.ptr2, state.ptr1, 2 * state.MAX_LEN);
861 memcpy(state.ptr2 + start, state.ptr1, state.len[i]);
863 bcopy(state.ptr1, state.ptr1 + start, state.len[i]);
864 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, 2 * state.MAX_LEN));
874 memset(state.ptr1, random() & 255, state.MAX_LEN);
879 memcpy(state.ptr2, state.ptr1, start);
881 memcpy(state.ptr2 + end, state.ptr1 + end, state.MAX_LEN - end);
883 bzero(state.ptr1 + start, end - start);
885 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, state.MAX_LEN));