| /openbsd/src/usr.bin/vi/vi/ |
| D | v_increment.c | 56 size_t beg, blen, end, len, nlen, wlen; in v_increment() local 90 for (beg = vp->m_start.cno; beg < len && isspace(p[beg]); ++beg); in v_increment() 91 if (beg >= len) in v_increment() 93 if (beg != vp->m_start.cno) { in v_increment() 94 sp->cno = beg; in v_increment() 109 wlen = len - beg; in v_increment() 110 if (p[beg] == '0' && wlen > 2 && in v_increment() 111 (p[beg + 1] == 'X' || p[beg + 1] == 'x')) { in v_increment() 113 end = beg + 2; in v_increment() 116 ntype = p[beg + 1] == 'X' ? fmt[HEXC] : fmt[HEXL]; in v_increment() [all …]
|
| /openbsd/src/bin/ksh/ |
| D | expand.h | 28 char *end, *beg; /* end, begin of string */ member 39 (xs).beg = alloc((xs).len + X_EXTRA, (xs).areap); \ 40 (xs).end = (xs).beg + (xs).len; \ 41 xp = (xs).beg; \ 58 #define Xfree(xs, xp) afree((xs).beg, (xs).areap) 61 #define Xclose(xs, xp) aresize((xs).beg, ((xp) - (xs).beg), (xs).areap) 63 #define Xstring(xs, xp) ((xs).beg) 66 #define Xlength(xs, xp) ((xp) - (xs).beg) 67 #define Xsize(xs, xp) ((xs).end - (xs).beg) 68 #define Xsavepos(xs, xp) ((xp) - (xs).beg) [all …]
|
| /openbsd/src/gnu/llvm/compiler-rt/lib/asan/ |
| D | asan_poisoning.cpp | 109 ShadowSegmentEndpoint beg(beg_addr); in __asan_poison_memory_region() local 111 if (beg.chunk == end.chunk) { in __asan_poison_memory_region() 112 CHECK_LT(beg.offset, end.offset); in __asan_poison_memory_region() 113 s8 value = beg.value; in __asan_poison_memory_region() 118 if (beg.offset > 0) { in __asan_poison_memory_region() 119 *beg.chunk = Min(value, beg.offset); in __asan_poison_memory_region() 121 *beg.chunk = kAsanUserPoisonedMemoryMagic; in __asan_poison_memory_region() 126 CHECK_LT(beg.chunk, end.chunk); in __asan_poison_memory_region() 127 if (beg.offset > 0) { in __asan_poison_memory_region() 129 if (beg.value == 0) { in __asan_poison_memory_region() [all …]
|
| D | asan_globals.cpp | 60 FastPoisonShadow(g->beg, g->size_with_redzone, value); in PoisonShadowForGlobal() 65 FastPoisonShadow(g.beg + aligned_size, g.size_with_redzone - aligned_size, in PoisonRedZones() 69 g.beg + RoundDownTo(g.size, ASAN_SHADOW_GRANULARITY), in PoisonRedZones() 78 if (addr <= g.beg - kMinimalDistanceFromAnotherGlobal) return false; in IsAddressNearGlobal() 79 if (addr >= g.beg + g.size_with_redzone) return false; in IsAddressNearGlobal() 87 prefix, (void *)&g, (void *)g.beg, g.size, g.size_with_redzone, g.name, in ReportGlobal() 91 Symbolizer::GetOrInit()->SymbolizeData(g.beg, &info); in ReportGlobal() 161 if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) { in CheckODRViolationViaPoisoning() 165 if (g->beg == l->g->beg && in CheckODRViolationViaPoisoning() 202 CHECK(AddrIsInMem(g->beg)); in RegisterGlobal() [all …]
|
| D | asan_descriptions.cpp | 226 uptr var_end = var.beg + var.size; in PrintAccessAndVarIntersection() 231 if (addr >= var.beg) { in PrintAccessAndVarIntersection() 240 if (addr_end > var.beg) in PrintAccessAndVarIntersection() 242 else if (addr >= prev_var_end && addr - prev_var_end >= var.beg - addr_end) in PrintAccessAndVarIntersection() 246 str.append(" [%zd, %zd)", var.beg, var_end); in PrintAccessAndVarIntersection() 281 if (addr < g.beg) { in DescribeAddressRelativeToGlobal() 283 g.beg - addr); in DescribeAddressRelativeToGlobal() 284 } else if (addr + access_size > g.beg + g.size) { in DescribeAddressRelativeToGlobal() 285 if (addr < g.beg + g.size) addr = g.beg + g.size; in DescribeAddressRelativeToGlobal() 287 addr - (g.beg + g.size)); in DescribeAddressRelativeToGlobal() [all …]
|
| /openbsd/src/gnu/llvm/compiler-rt/lib/msan/ |
| D | msan_poisoning.cpp | 48 uptr beg = d & ~3UL; in CopyOrigin() local 50 if (beg < d) { in CopyOrigin() 51 u32 o = GetOriginIfPoisoned((uptr)src, beg + 4 - d); in CopyOrigin() 54 *(u32 *)MEM_TO_ORIGIN(beg) = o; in CopyOrigin() 56 beg += 4; in CopyOrigin() 61 if (end < beg) return; in CopyOrigin() 72 if (beg < end) { in CopyOrigin() 79 u32 *src_end = (u32 *)MEM_TO_ORIGIN(s + (end - beg)); in CopyOrigin() 80 u32 *dst = (u32 *)MEM_TO_ORIGIN(beg); in CopyOrigin() 92 REAL(memcpy)((void *)MEM_TO_ORIGIN(beg), (void *)MEM_TO_ORIGIN(s), in CopyOrigin() [all …]
|
| D | msan_linux.cpp | 37 void ReportMapRange(const char *descr, uptr beg, uptr size) { in ReportMapRange() argument 39 uptr end = beg + size - 1; in ReportMapRange() 40 VPrintf(1, "%s : 0x%zx - 0x%zx\n", descr, beg, end); in ReportMapRange() 44 static bool CheckMemoryRangeAvailability(uptr beg, uptr size) { in CheckMemoryRangeAvailability() argument 46 uptr end = beg + size - 1; in CheckMemoryRangeAvailability() 47 if (!MemoryRangeIsAvailable(beg, end)) { in CheckMemoryRangeAvailability() 48 Printf("FATAL: Memory range 0x%zx - 0x%zx is not available.\n", beg, end); in CheckMemoryRangeAvailability() 55 static bool ProtectMemoryRange(uptr beg, uptr size, const char *name) { in ProtectMemoryRange() argument 57 void *addr = MmapFixedNoAccess(beg, size, name); in ProtectMemoryRange() 58 if (beg == 0 && addr) { in ProtectMemoryRange() [all …]
|
| /openbsd/src/gnu/lib/libstdc++/libstdc++/testsuite/23_containers/ |
| D | deque_operators.cc | 35 iter beg = d.begin(); in test01() local 40 VERIFY( beg == constbeg ); in test01() 43 VERIFY( beg != constend ); in test01() 46 VERIFY( beg < constend ); in test01() 50 VERIFY( constend > beg ); in test01() 53 VERIFY( constbeg >= beg ); in test01() 55 VERIFY( beg <= constbeg ); in test01() 68 iter beg = d.begin(); in test02() local 73 VERIFY( beg - constbeg == 0 ); in test02() 77 VERIFY( constend - beg > 0 ); in test02()
|
| /openbsd/src/lib/libcurses/base/ |
| D | lib_redrawln.c | 48 wredrawln(WINDOW *win, int beg, int num) in NCURSES_EXPORT() 55 T((T_CALLED("wredrawln(%p,%d,%d)"), (void *) win, beg, num)); in NCURSES_EXPORT() 62 if (beg < 0) in NCURSES_EXPORT() 63 beg = 0; in NCURSES_EXPORT() 65 if (touchline(win, beg, num) == ERR) in NCURSES_EXPORT() 68 if (touchline(CurScreen(sp), beg + win->_begy, num) == ERR) in NCURSES_EXPORT() 71 end = beg + num; in NCURSES_EXPORT() 82 for (i = beg; i < end; i++) { in NCURSES_EXPORT()
|
| /openbsd/src/gnu/llvm/compiler-rt/lib/tsan/rtl/ |
| D | tsan_platform_posix.cpp | 82 static bool TryProtectRange(uptr beg, uptr end) { in TryProtectRange() argument 83 CHECK_LE(beg, end); in TryProtectRange() 84 if (beg == end) in TryProtectRange() 86 return beg == (uptr)MmapFixedNoAccess(beg, end - beg); in TryProtectRange() 89 static void ProtectRange(uptr beg, uptr end) { in ProtectRange() argument 90 if (!TryProtectRange(beg, end)) { in ProtectRange() 91 Printf("FATAL: ThreadSanitizer can not protect [%zx,%zx]\n", beg, end); in ProtectRange()
|
| /openbsd/src/gnu/usr.bin/binutils-2.17/gprof/ |
| D | search_list.c | 31 const char *beg, *colon; in search_list_append() local 37 beg = colon + 1; in search_list_append() 38 colon = strchr (beg, PATH_SEP_CHAR); in search_list_append() 41 len = colon - beg; in search_list_append() 43 len = strlen (beg); in search_list_append() 46 memcpy (new_el->path, beg, len); in search_list_append()
|
| /openbsd/src/gnu/usr.bin/binutils/gprof/ |
| D | search_list.c | 33 const char *beg, *colon; local 39 beg = colon + 1; 40 colon = strchr (beg, PATH_SEP_CHAR); 43 len = colon - beg; 45 len = strlen (beg); 48 memcpy (new_el->path, beg, len);
|
| /openbsd/src/gnu/usr.bin/perl/os2/ |
| D | dl_os2.c | 83 const char *beg, *dot; in dlopen() local 123 for (beg = dot = path + strlen(path); in dlopen() 124 beg > path && !memCHRs(":/\\", *(beg-1)); in dlopen() 125 beg--) in dlopen() 126 if (*beg == '.') in dlopen() 127 dot = beg; in dlopen() 128 if (dot - beg > 8) { in dlopen() 129 int n = beg+8-path; in dlopen()
|
| /openbsd/src/gnu/llvm/compiler-rt/lib/dfsan/ |
| D | dfsan.cpp | 248 uptr beg = OriginAlignDown(d); in CopyOrigin() local 250 if (beg < d) { in CopyOrigin() 251 ChainAndWriteOriginIfTainted((uptr)src, beg + kOriginAlign - d, beg, stack); in CopyOrigin() 252 beg += kOriginAlign; in CopyOrigin() 257 if (end < beg) in CopyOrigin() 265 if (beg >= end) in CopyOrigin() 272 dfsan_origin *src_end = origin_for((void *)(src_a + (end - beg))); in CopyOrigin() 273 dfsan_origin *dst_o = origin_for((void *)beg); in CopyOrigin() 300 uptr beg = OriginAlignDown(d); in ReverseCopyOrigin() local 302 if (beg + kOriginAlign < end) { in ReverseCopyOrigin() [all …]
|
| /openbsd/src/gnu/gcc/gcc/config/ |
| D | svr3.h | 144 func_ptr *p, *beg = alloca (0); \ 145 for (p = beg; *p; p++) \ 147 while (p != beg) \ 156 func_ptr *p, *beg = alloca (0); \ 157 for (p = beg; *p; ) \
|
| /openbsd/src/gnu/usr.bin/perl/t/op/ |
| D | time.t | 19 $beg = time; 21 while (($now = time) == $beg) { sleep 1 } 23 ok($now > $beg && $now - $beg < 10, 'very basic time test'); 30 last if time - $beg > 20; 35 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($beg); 59 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($beg); 61 ($sec,$min,$hour2,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($beg); 66 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($beg);
|
| /openbsd/src/gnu/usr.bin/gcc/gcc/config/ |
| D | svr3.h | 211 func_ptr *p, *beg = alloca (0); \ 212 for (p = beg; *p; p++) \ 214 while (p != beg) \ 223 func_ptr *p, *beg = alloca (0); \ 224 for (p = beg; *p; ) \
|
| /openbsd/src/gnu/llvm/compiler-rt/lib/sanitizer_common/ |
| D | sanitizer_common_libcdep.cpp | 158 void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name, in ReserveShadowMemoryRange() argument 160 CHECK_EQ((beg % GetMmapGranularity()), 0); in ReserveShadowMemoryRange() 162 uptr size = end - beg + 1; in ReserveShadowMemoryRange() 164 if (madvise_shadow ? !MmapFixedSuperNoReserve(beg, size, name) in ReserveShadowMemoryRange() 165 : !MmapFixedNoReserve(beg, size, name)) { in ReserveShadowMemoryRange() 173 DontDumpShadowMemory(beg, size); in ReserveShadowMemoryRange()
|
| D | sanitizer_allocator_secondary.h | 230 uptr beg = 0, end = n - 1; in GetBlockBeginFastLocked() local 233 while (end - beg >= 2) { in GetBlockBeginFastLocked() 234 uptr mid = (beg + end) / 2; // Invariant: mid >= beg + 1 in GetBlockBeginFastLocked() 238 beg = mid; // chunks[mid] may still be what we want. in GetBlockBeginFastLocked() 241 if (beg < end) { in GetBlockBeginFastLocked() 242 CHECK_EQ(beg + 1, end); in GetBlockBeginFastLocked() 245 beg = end; in GetBlockBeginFastLocked() 248 const Header *h = AddressSpaceView::Load(chunks[beg]); in GetBlockBeginFastLocked() 249 Header *h_ptr = chunks[beg]; in GetBlockBeginFastLocked()
|
| D | sanitizer_allocator_primary64.h | 266 uptr beg = chunk_idx * size; in GetBlockBegin() local 267 uptr next_beg = beg + size; in GetBlockBegin() 270 return reinterpret_cast<void*>(reg_beg + beg); in GetBlockBegin() 709 bool MapWithCallback(uptr beg, uptr size, const char *name) { in MapWithCallback() argument 711 return beg >= NonConstSpaceBeg && in MapWithCallback() 712 beg + size <= NonConstSpaceBeg + kSpaceSize; in MapWithCallback() 713 uptr mapped = address_range.Map(beg, size, name); in MapWithCallback() 716 CHECK_EQ(beg, mapped); in MapWithCallback() 717 MapUnmapCallback().OnMap(beg, size); in MapWithCallback() 721 void MapWithCallbackOrDie(uptr beg, uptr size, const char *name) { in MapWithCallbackOrDie() argument [all …]
|
| D | sanitizer_allocator_primary32.h | 146 void UnmapWithCallback(uptr beg, uptr size) { in UnmapWithCallback() argument 147 MapUnmapCallback().OnUnmap(beg, size); in UnmapWithCallback() 148 UnmapOrDie(reinterpret_cast<void *>(beg), size); in UnmapWithCallback() 160 uptr beg = ComputeRegionBeg(mem); in GetMetaData() local 162 u32 offset = mem - beg; in GetMetaData() 164 uptr meta = (beg + kRegionSize) - (n + 1) * kMetadataSize; in GetMetaData() 209 uptr beg = ComputeRegionBeg(mem); in GetBlockBegin() local 211 u32 offset = mem - beg; in GetBlockBegin() 213 uptr res = beg + (n * (u32)size); in GetBlockBegin()
|
| /openbsd/src/usr.bin/mail/ |
| D | list.c | 113 int tok, beg, mc, star, other, valdot, colmod, colresult; in markall() local 126 beg = 0; in markall() 137 if (beg != 0) { in markall() 140 for (i = beg; i <= lexnumber; i++) in markall() 143 beg = 0; in markall() 146 beg = lexnumber; in markall() 147 if (check(beg, f)) in markall() 152 mark(beg); in markall() 153 beg = 0; in markall() 158 if (beg != 0) { in markall() [all …]
|
| /openbsd/src/sbin/scan_ffs/ |
| D | scan_ffs.c | 73 ufsscan(int fd, daddr_t beg, daddr_t end, int flags) in ufsscan() argument 84 for (blk = beg; blk <= ((end<0)?blk:end); blk += (SBCOUNT*SBSIZE/512)){ in ufsscan() 143 daddr_t beg = 0, end = -1; in main() local 152 beg = strtonum(optarg, 0, LLONG_MAX, &errstr); in main() 187 return (ufsscan(fd, beg, end, flags)); in main()
|
| /openbsd/src/gnu/llvm/compiler-rt/lib/asan/tests/ |
| D | asan_interface_test.cpp | 329 for (size_t beg = 0; beg < size + rz; beg++) { in TEST() local 330 for (size_t end = beg; end < size + rz; end++) { in TEST() 331 void *first_poisoned = __asan_region_is_poisoned(p + beg, end - beg); in TEST() 332 if (beg == end) { in TEST() 334 } else if (beg < size && end <= size) { in TEST() 336 } else if (beg >= size) { in TEST() 337 EXPECT_EQ(p + beg, first_poisoned); in TEST()
|
| /openbsd/src/gnu/llvm/compiler-rt/lib/sanitizer_common/tests/ |
| D | sanitizer_libc_test.cpp | 47 for (size_t beg = 0; beg < size; beg++) { in TEST() local 48 for (size_t end = beg; end < size; end++) { in TEST() 50 if (beg <= pos && pos < end) in TEST() 51 EXPECT_FALSE(__sanitizer::mem_is_zero(x + beg, end - beg)); in TEST() 53 EXPECT_TRUE(__sanitizer::mem_is_zero(x + beg, end - beg)); in TEST()
|