Lines Matching defs:ptr2
163 ptr2 = glob_ptr2 + align2;
167 Character *ptr, *ptr1, *ptr2;
197 memset(state.ptr2, '\2', state.MAX_LEN);
198 state.ptr2[state.MAX_LEN - 1] = '\0';
199 memcpy(state.ptr, state.ptr2, 2 * state.MAX_LEN);
207 EXPECT_TRUE(strcat(state.ptr2, state.ptr1) == state.ptr2);
208 EXPECT_TRUE(memcmp(state.ptr, state.ptr2, 2 * state.MAX_LEN) == 0);
421 memset(state.ptr2, 'n', state.MAX_LEN);
423 state.ptr2[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]) {
438 state.ptr2[pos + 1] = '\0';
443 actual = strcmp(state.ptr1, state.ptr2);
464 memset(state.ptr2, '\1', state.MAX_LEN);
465 state.ptr2[state.MAX_LEN - 1] = '\0';
471 ASSERT_TRUE(strcpy(state.ptr2, state.ptr1) == state.ptr2);
473 (memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0));
485 memset(state.ptr2, '\2', state.MAX_LEN + state.len[i]);
486 state.ptr2[state.MAX_LEN - 1] = '\0';
487 memcpy(state.ptr, state.ptr2, state.MAX_LEN + state.len[i]);
499 strlcat(state.ptr2, state.ptr1, state.MAX_LEN + state.len[i]);
501 ASSERT_TRUE(memcmp(state.ptr, state.ptr2, state.MAX_LEN + state.len[i]) == 0);
525 memset(state.ptr2, random() & 255, state.MAX_LEN);
526 memcpy(state.ptr + state.MAX_LEN, state.ptr2, state.MAX_LEN);
535 ASSERT_EQ(strlcpy(state.ptr2, state.ptr1, state.MAX_LEN), strlen(state.ptr1));
537 (memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0));
548 memset(state.ptr2, '\2', state.MAX_LEN);
549 state.ptr2[state.MAX_LEN - 1] = '\0';
550 memcpy(state.ptr, state.ptr2, 2 * state.MAX_LEN);
562 ASSERT_TRUE(strncat(state.ptr2, state.ptr1, actual) == state.ptr2);
563 ASSERT_EQ(memcmp(state.ptr, state.ptr2, 2 * state.MAX_LEN), 0);
575 memset(state.ptr2, 'n', state.MAX_LEN);
577 state.ptr2[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]) {
592 state.ptr2[pos + 1] = '\0';
597 actual = strncmp(state.ptr1, state.ptr2, state.len[i]);
614 memset(state.ptr2, '\1', state.MAX_LEN);
626 ASSERT_TRUE(strncpy(state.ptr2, state.ptr1, state.MAX_LEN) == state.ptr2);
628 memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0);
719 memset(state.ptr2, c1, state.MAX_LEN);
722 state.ptr2[pos] = c2;
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);
747 std::fill(state.ptr2, state.ptr2 + state.MAX_LEN, c1);
750 state.ptr2[pos] = c2;
753 int actual = __memcmp16(state.ptr1, state.ptr2, (size_t) state.MAX_LEN);
772 wmemset(state.ptr2, c1, state.MAX_LEN);
775 state.ptr2[pos] = c2;
778 int actual = wmemcmp(state.ptr1, state.ptr2, (size_t) state.MAX_LEN);
797 memset(state.ptr2, rand, state.len[i]);
798 memset(state.ptr2 + state.len[i], ~rand, state.MAX_LEN - state.len[i]);
799 memset(state.ptr2 + pos, '\0', 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));
815 memcpy(state.ptr2, state.ptr1, state.MAX_LEN);
822 ASSERT_TRUE(memset(state.ptr2 + pos, ch, state.len[i]) == state.ptr2 + pos);
824 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, state.MAX_LEN));
840 memcpy(state.ptr2, state.ptr1, 2 * state.MAX_LEN);
844 ASSERT_TRUE(memmove(state.ptr2 + pos, state.ptr2, state.len[i]) == state.ptr2 + pos);
845 ASSERT_EQ(0, memcmp(state.ptr2, state.ptr1, 2 * state.MAX_LEN));
858 memcpy(state.ptr2, state.ptr1, 2 * state.MAX_LEN);
861 memcpy(state.ptr2 + start, state.ptr1, state.len[i]);
864 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, 2 * state.MAX_LEN));
879 memcpy(state.ptr2, state.ptr1, start);
880 memset(state.ptr2 + start, '\0', end - start);
881 memcpy(state.ptr2 + end, state.ptr1 + end, state.MAX_LEN - end);
885 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, state.MAX_LEN));