/freebsd/contrib/nvi/vi/ |
H A D | v_increment.c | 54 size_t beg, blen, end, len, nlen, wlen; in v_increment() local 89 for (beg = vp->m_start.cno; beg < len && ISSPACE(p[beg]); ++beg); in v_increment() 90 if (beg >= len) in v_increment() 92 if (beg != vp->m_start.cno) { in v_increment() 93 sp->cno = beg; in v_increment() 108 wlen = len - beg; in v_increment() 109 if (p[beg] == '0' && wlen > 2 && in v_increment() 110 (p[beg + 1] == 'X' || p[beg + 1] == 'x')) { in v_increment() 112 end = beg + 2; in v_increment() 115 ntype = p[beg + 1] == 'X' ? fmt[HEXC] : fmt[HEXL]; in v_increment() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/msan/ |
H A 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 …]
|
H A D | msan_linux.cpp | 42 void ReportMapRange(const char *descr, uptr beg, uptr size) { in ReportMapRange() argument 44 uptr end = beg + size - 1; in ReportMapRange() 45 VPrintf(1, "%s : %p-%p\n", descr, (void *)beg, (void *)end); in ReportMapRange() 49 static bool CheckMemoryRangeAvailability(uptr beg, uptr size, bool verbose) { in CheckMemoryRangeAvailability() argument 51 uptr end = beg + size - 1; in CheckMemoryRangeAvailability() 52 if (!MemoryRangeIsAvailable(beg, end)) { in CheckMemoryRangeAvailability() 55 (void *)beg, (void *)end); in CheckMemoryRangeAvailability() 62 static bool ProtectMemoryRange(uptr beg, uptr size, const char *name) { in ProtectMemoryRange() argument 64 void *addr = MmapFixedNoAccess(beg, size, name); in ProtectMemoryRange() 65 if (beg == 0 && addr) { in ProtectMemoryRange() [all …]
|
/freebsd/contrib/ncurses/ncurses/base/ |
H A D | lib_redrawln.c | 46 wredrawln(WINDOW *win, int beg, int num) in NCURSES_EXPORT() 53 T((T_CALLED("wredrawln(%p,%d,%d)"), (void *) win, beg, num)); in NCURSES_EXPORT() 60 if (beg < 0) in NCURSES_EXPORT() 61 beg = 0; in NCURSES_EXPORT() 63 if (touchline(win, beg, num) == ERR) in NCURSES_EXPORT() 66 if (touchline(CurScreen(sp), beg + win->_begy, num) == ERR) in NCURSES_EXPORT() 69 end = beg + num; in NCURSES_EXPORT() 80 for (i = beg; i < end; i++) { in NCURSES_EXPORT()
|
/freebsd/crypto/heimdal/appl/push/ |
H A D | push.c | 315 char *beg, *p; in doit() local 336 beg = in_buf; in doit() 339 && (p = strstr(beg, "\r\n")) != NULL) { in doit() 341 char *copy = beg; in doit() 351 if (beg[0] == '.' && beg[1] == '\r' && beg[2] == '\n') { in doit() 362 rem -= p - beg + 2; in doit() 363 beg = p + 2; in doit() 365 char *copy = beg; in doit() 366 if (beg[0] == '.') { in doit() 367 if (beg[1] == '\r' && beg[2] == '\n') { in doit() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A 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()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/ |
H A D | asan_globals.cpp | 59 FastPoisonShadow(g->beg, g->size_with_redzone, value); in PoisonShadowForGlobal() 64 FastPoisonShadow(g.beg + aligned_size, g.size_with_redzone - aligned_size, in PoisonRedZones() 68 g.beg + RoundDownTo(g.size, ASAN_SHADOW_GRANULARITY), in PoisonRedZones() 77 if (addr <= g.beg - kMinimalDistanceFromAnotherGlobal) return false; in IsAddressNearGlobal() 78 if (addr >= g.beg + g.size_with_redzone) return false; in IsAddressNearGlobal() 84 bool symbolized = Symbolizer::GetOrInit()->SymbolizeData(g.beg, &info); in ReportGlobal() 89 prefix, (void *)&g, (void *)g.beg, g.size, g.size_with_redzone, g.name, in ReportGlobal() 165 if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) { in CheckODRViolationViaPoisoning() 169 if (g->beg == l->g->beg && in CheckODRViolationViaPoisoning() 206 CHECK(AddrIsInMem(g->beg)); in RegisterGlobal() [all …]
|
H A 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.AppendF(" [%zd, %zd)", var.beg, var_end); in PrintAccessAndVarIntersection() 281 if (addr < g.beg) { in DescribeAddressRelativeToGlobal() 282 str.AppendF("%p is located %zd bytes before", (void *)addr, g.beg - addr); in DescribeAddressRelativeToGlobal() 283 } else if (addr + access_size > g.beg + g.size) { in DescribeAddressRelativeToGlobal() 284 if (addr < g.beg + g.size) addr = g.beg + g.size; in DescribeAddressRelativeToGlobal() 286 addr - (g.beg + g.size)); in DescribeAddressRelativeToGlobal() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/ |
H A D | dfsan.cpp | 250 uptr beg = OriginAlignDown(d); in CopyOrigin() local 252 if (beg < d) { in CopyOrigin() 253 ChainAndWriteOriginIfTainted((uptr)src, beg + kOriginAlign - d, beg, stack); in CopyOrigin() 254 beg += kOriginAlign; in CopyOrigin() 259 if (end < beg) in CopyOrigin() 267 if (beg >= end) in CopyOrigin() 274 dfsan_origin *src_end = origin_for((void *)(src_a + (end - beg))); in CopyOrigin() 275 dfsan_origin *dst_o = origin_for((void *)beg); in CopyOrigin() 302 uptr beg = OriginAlignDown(d); in ReverseCopyOrigin() local 304 if (beg + kOriginAlign < end) { in ReverseCopyOrigin() [all …]
|
H A D | dfsan_allocator.cpp | 187 void *beg = allocator.GetBlockBegin(p); in AllocationBegin() local 188 if (!beg) in AllocationBegin() 190 Metadata *b = (Metadata *)allocator.GetMetaData(beg); in AllocationBegin() 195 return (const void *)beg; in AllocationBegin() 201 const void *beg = allocator.GetBlockBegin(p); in AllocationSize() local 202 if (beg != p) in AllocationSize()
|
/freebsd/lib/libc/gen/ |
H A D | timezone.c | 54 char *beg, in __timezone_compat() local 57 if ( (beg = getenv("TZNAME")) ) { /* set in environment */ in __timezone_compat() 58 if ((end = strchr(beg, ','))) { /* "PST,PDT" */ in __timezone_compat() 62 (void)strncpy(czone,beg,sizeof(czone) - 1); in __timezone_compat() 67 return(beg); in __timezone_compat()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_common_libcdep.cpp | 162 void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name, in ReserveShadowMemoryRange() argument 164 CHECK_EQ((beg % GetMmapGranularity()), 0); in ReserveShadowMemoryRange() 166 uptr size = end - beg + 1; in ReserveShadowMemoryRange() 168 if (madvise_shadow ? !MmapFixedSuperNoReserve(beg, size, name) in ReserveShadowMemoryRange() 169 : !MmapFixedNoReserve(beg, size, name)) { in ReserveShadowMemoryRange() 177 DontDumpShadowMemory(beg, size); in ReserveShadowMemoryRange()
|
H A 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()
|
H A 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() 711 bool MapWithCallback(uptr beg, uptr size, const char *name) { in MapWithCallback() argument 713 return beg >= NonConstSpaceBeg && in MapWithCallback() 714 beg + size <= NonConstSpaceBeg + kSpaceSize; in MapWithCallback() 715 uptr mapped = address_range.Map(beg, size, name); in MapWithCallback() 718 CHECK_EQ(beg, mapped); in MapWithCallback() 719 MapUnmapCallback().OnMap(beg, size); in MapWithCallback() 723 void MapWithCallbackOrDie(uptr beg, uptr size, const char *name) { in MapWithCallbackOrDie() argument [all …]
|
H A 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()
|
H A D | sanitizer_coverage_libcdep_new.cpp | 192 static void Cov8bitCountersInit(char* beg, char* end) { in Cov8bitCountersInit() argument 193 counters_beg = beg; in Cov8bitCountersInit() 198 static void CovPcsInit(const uptr* beg, const uptr* end) { in CovPcsInit() argument 199 pcs_beg = beg; in CovPcsInit() 278 SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_pcs_init, const uptr* beg, in SANITIZER_INTERFACE_WEAK_DEF() argument 280 __sancov::SingletonCounterCoverage::CovPcsInit(beg, end); in SANITIZER_INTERFACE_WEAK_DEF()
|
H A D | sanitizer_libignore.cpp | 84 ignored_code_ranges_[idx].begin = range.beg; in OnLibraryLoaded() 106 if (IsPcInstrumented(range.beg) && IsPcInstrumented(range.end - 1)) in OnLibraryLoaded() 109 (void *)range.beg, (void *)range.end, mod.full_name()); in OnLibraryLoaded() 113 instrumented_code_ranges_[idx].begin = range.beg; in OnLibraryLoaded()
|
H A D | sanitizer_file.cpp | 216 const char *beg = path; in FindPathToBinary() local 218 const char *end = internal_strchrnul(beg, kPathSeparator); in FindPathToBinary() 219 uptr prefix_len = end - beg; in FindPathToBinary() 221 internal_memcpy(buffer.data(), beg, prefix_len); in FindPathToBinary() 229 beg = end + 1; in FindPathToBinary()
|
/freebsd/usr.bin/mail/ |
H A D | list.c | 112 int tok, beg, mc, star, other, valdot, colmod, colresult; in markall() local 125 beg = 0; in markall() 136 if (beg != 0) { in markall() 139 for (i = beg; i <= lexnumber; i++) in markall() 142 beg = 0; in markall() 145 beg = lexnumber; in markall() 146 if (check(beg, f)) in markall() 151 mark(beg); in markall() 152 beg = 0; in markall() 157 if (beg != 0) { in markall() [all …]
|
/freebsd/sys/dev/netmap/ |
H A D | netmap_monitor.c | 593 u_int beg, end, i; in netmap_zmon_parent_sync() local 607 beg = kring->nr_hwtail + 1; in netmap_zmon_parent_sync() 613 beg = kring->nr_hwcur; in netmap_zmon_parent_sync() 617 rel_slots = end - beg; in netmap_zmon_parent_sync() 645 beg += (rel_slots - free_slots); in netmap_zmon_parent_sync() 648 if (unlikely(beg >= kring->nkr_num_slots)) in netmap_zmon_parent_sync() 649 beg -= kring->nkr_num_slots; in netmap_zmon_parent_sync() 653 struct netmap_slot *s = &ring->slot[beg]; in netmap_zmon_parent_sync() 660 nm_prdis(5, "beg %d buf_idx %d", beg, tmp); in netmap_zmon_parent_sync() 669 beg = nm_next(beg, lim); in netmap_zmon_parent_sync() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/ |
H A D | hwasan_interceptors.cpp | 200 uptr beg = reinterpret_cast<uptr>(res); in mmap_interceptor() local 201 DCHECK(IsAligned(beg, GetPageSize())); in mmap_interceptor() 202 if (!MemIsApp(beg) || !MemIsApp(beg + rounded_length - 1)) { in mmap_interceptor() 209 __hwasan::TagMemoryAligned(beg, rounded_length, 0); in mmap_interceptor() 219 uptr beg = reinterpret_cast<uptr>(addr); in munmap_interceptor() local 220 if (length && IsAligned(beg, GetPageSize())) { in munmap_interceptor() 223 if (!MemIsApp(beg) || !MemIsApp(beg + rounded_length - 1)) { in munmap_interceptor() 227 __hwasan::TagMemoryAligned(beg, rounded_length, 0); in munmap_interceptor()
|
/freebsd/usr.sbin/pmcstudy/ |
H A D | eval_expr.c | 208 walk_back_and_insert_paren(struct expression **beg, struct expression *frm) in walk_back_and_insert_paren() argument 222 if (at == *beg) { in walk_back_and_insert_paren() 227 *beg = ex; in walk_back_and_insert_paren() 254 if (at == *beg) { in walk_back_and_insert_paren() 315 add_precendence(struct expression **beg, struct expression *start, struct expression *end) in add_precendence() argument 338 walk_back_and_insert_paren(beg, at); in add_precendence() 350 set_math_precidence(struct expression **beg, struct expression *exp, struct expression **stopped) in set_math_precidence() argument 369 add_precendence(beg, start, end); in set_math_precidence() 374 set_math_precidence(beg, at->next, &end); in set_math_precidence() 387 add_precendence(beg, start, NULL); in set_math_precidence()
|
/freebsd/usr.bin/split/ |
H A D | split.c | 354 char beg, end; in newfile() local 373 beg = '0'; in newfile() 377 beg = 'a'; in newfile() 380 pattlen = end - beg + 1; in newfile() 400 fpnt[1] = beg; in newfile() 428 fpnt[i] = tfnum % pattlen + beg; in newfile()
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/ |
H A D | DWARFAttribute.cpp | 22 collection::const_iterator beg = m_infos.begin(); in FindAttributeIndex() 24 for (pos = beg; pos != end; ++pos) { in FindAttributeIndex() 26 return std::distance(beg, pos); in FindAttributeIndex() 21 collection::const_iterator beg = m_infos.begin(); FindAttributeIndex() local
|
/freebsd/lib/libfetch/ |
H A D | ftp.c | 272 const char *beg, *end; in ftp_cwd() local 308 for (beg = file + i; beg < end && *beg == '/'; ++beg, ++i) in ftp_cwd() 312 if (beg >= end) in ftp_cwd() 316 e = ftp_cmd(conn, "CWD %.*s", (int)(end - beg), beg); in ftp_cwd() 322 for (beg = file + i; beg < end; beg = file + i + 1) { in ftp_cwd() 323 while (*beg == '/') in ftp_cwd() 324 ++beg, ++i; in ftp_cwd() 327 e = ftp_cmd(conn, "CWD %.*s", file + i - beg, beg); in ftp_cwd()
|