/freebsd/usr.bin/fold/ |
H A D | fold.c | 146 int col, i, indx, space; in fold() local 149 col = indx = 0; in fold() 152 wprintf(L"%.*ls\n", indx, buf); in fold() 153 col = indx = 0; in fold() 158 i = indx; in fold() 166 wmemmove(buf, buf + space, indx - space); in fold() 167 indx -= space; in fold() 169 for (i = 0; i < indx; i++) in fold() 172 wprintf(L"%.*ls\n", indx, buf); in fold() 173 col = indx = 0; in fold() [all …]
|
/freebsd/bin/pax/ |
H A D | tables.c | 127 u_int indx; in chk_lnk() local 140 indx = ((unsigned)arcn->sb.st_ino) % L_TAB_SZ; in chk_lnk() 141 if ((pt = ltab[indx]) != NULL) { in chk_lnk() 145 ppt = &(ltab[indx]); in chk_lnk() 191 pt->fow = ltab[indx]; in chk_lnk() 192 ltab[indx] = pt; in chk_lnk() 214 u_int indx; in purg_lnk() local 228 indx = ((unsigned)arcn->sb.st_ino) % L_TAB_SZ; in purg_lnk() 229 if ((pt = ltab[indx]) == NULL) in purg_lnk() 236 ppt = &(ltab[indx]); in purg_lnk() [all …]
|
H A D | sel_subs.c | 101 u_int indx; in usr_add() local 138 indx = ((unsigned)uid) % USR_TB_SZ; in usr_add() 139 if ((pt = usrtb[indx]) != NULL) { in usr_add() 152 pt->fow = usrtb[indx]; in usr_add() 153 usrtb[indx] = pt; in usr_add() 198 u_int indx; in grp_add() local 235 indx = ((unsigned)gid) % GRP_TB_SZ; in grp_add() 236 if ((pt = grptb[indx]) != NULL) { in grp_add() 249 pt->fow = grptb[indx]; in grp_add() 250 grptb[indx] = pt; in grp_add()
|
/freebsd/tools/test/stress2/misc/ |
H A D | write.sh | 117 test(int indx, int num) 128 if ((buf = malloc(t[indx].blocksize)) == NULL) 130 snprintf(file, sizeof(file), "file.%06d.%06d", indx, num); 134 setproctitle("test(%d) num %d, n %d", indx, num, n); 139 for (i = 0; i < t[indx].blocks; i++) { 140 if (t[indx].sequential == 0) 144 if ((r = write(fd, buf, t[indx].blocksize)) != 145 t[indx].blocksize) { 149 usleep(rnd(t[indx].mindelay, t[indx].maxdelay)); 157 fprintf(stderr, "test(%d), %d Timed out\n", indx, num);
|
H A D | mmap28.sh | 76 size_t indx, left, len; 112 if (read(rfd, &indx, sizeof(indx)) != sizeof(indx)) 114 val = p[indx % len];
|
/freebsd/usr.bin/systat/ |
H A D | systat.h | 66 #define NVAL(indx) namelist[(indx)].n_value argument 67 #define NPTR(indx) (void *)NVAL((indx)) argument 68 #define NREAD(indx, buf, len) kvm_ckread(NPTR((indx)), (buf), (len)) argument
|
/freebsd/usr.bin/sort/ |
H A D | file.c | 297 size_t indx = l->count; in sort_list_add() local 299 if ((l->list == NULL) || (indx >= l->size)) { in sort_list_add() 308 l->list[indx] = sort_list_item_alloc(); in sort_list_add() 309 sort_list_item_set(l->list[indx], str); in sort_list_add() 310 l->memsize += sort_list_item_size(l->list[indx]); in sort_list_add() 853 file_header_heap_swim(struct file_header **fh, size_t indx) in file_header_heap_swim() argument 856 if (indx > 0) { in file_header_heap_swim() 859 parent_index = (indx - 1) >> 1; in file_header_heap_swim() 861 if (file_header_cmp(fh[indx], fh[parent_index]) < 0) { in file_header_heap_swim() 863 file_header_swap(fh, indx, parent_index); in file_header_heap_swim() [all …]
|
/freebsd/contrib/dialog/ |
H A D | inputstr.c | 527 const int *indx = dlg_index_wchars(string); in dlg_edit_string() local 528 int offset = dlg_find_index(indx, limit, *chr_offset); in dlg_edit_string() 555 *chr_offset = indx[offset - 1]; in dlg_edit_string() 559 *chr_offset = indx[offset + 1]; in dlg_edit_string() 567 *chr_offset = indx[limit]; in dlg_edit_string() 571 int gap = indx[offset] - indx[offset - 1]; in dlg_edit_string() 572 *chr_offset = indx[offset - 1]; in dlg_edit_string() 588 ? (indx[offset + 1] - indx[offset]) in dlg_edit_string() 591 for (i = indx[offset]; in dlg_edit_string() 597 string[indx[offset - 1]] = '\0'; in dlg_edit_string() [all …]
|
H A D | buttons.c | 143 const int *indx = dlg_index_wchars(label); in get_hotkeys() local 148 int first = indx[i]; in get_hotkeys() 151 int last = indx[i + 1]; in get_hotkeys() 181 const int *indx = dlg_index_wchars(label); in print_button() local 198 int first = indx[i]; in print_button() 199 int last = indx[i + 1]; in print_button()
|
H A D | textbox.c | 420 const int *indx = dlg_index_wchars(line); in print_line() local 436 (void) waddnstr(obj->text, line + indx[first], indx[last] - indx[first]); in print_line() 519 const int *indx; in get_search_term() local 546 indx = dlg_index_wchars(caption); in get_search_term() 548 (void) waddnstr(widget, caption + indx[0], indx[limit] - indx[0]); in get_search_term()
|
/freebsd/lib/libutil/ |
H A D | login_cap.c | 105 size_t indx = 0; in strcspn_quote() local 114 for (indx = 0; str[indx] != 0; indx++) { in strcspn_quote() 115 if (quote && str[indx] == quote) { in strcspn_quote() 122 (str[indx] == '\'' || str[indx] == '"')) { in strcspn_quote() 123 quote = str[indx]; in strcspn_quote() 127 strchr(exclude, str[indx]) != NULL) in strcspn_quote() 128 return indx; in strcspn_quote() 130 return indx; in strcspn_quote() 159 size_t indx; in remove_quotes() local 160 indx = strcspn(str, quote_chars); in remove_quotes() [all …]
|
/freebsd/sys/opencrypto/ |
H A D | cbc_mac.c | 159 for (size_t indx = 0; indx < AES_CBC_MAC_HASH_LEN; indx++) in AES_CBC_MAC_Final() local 160 buf[indx] = ctx->block[indx] ^ s0[indx]; in AES_CBC_MAC_Final()
|
/freebsd/lib/libc/db/btree/ |
H A D | btree.h | 126 #define GETBINTERNAL(pg, indx) \ argument 127 ((BINTERNAL *)((char *)(pg) + (pg)->linp[indx])) 153 #define GETRINTERNAL(pg, indx) \ argument 154 ((RINTERNAL *)((char *)(pg) + (pg)->linp[indx])) 176 #define GETBLEAF(pg, indx) \ argument 177 ((BLEAF *)((char *)(pg) + (pg)->linp[indx])) 208 #define GETRLEAF(pg, indx) \ argument 209 ((RLEAF *)((char *)(pg) + (pg)->linp[indx]))
|
/freebsd/usr.sbin/makefs/ffs/ |
H A D | ffs_alloc.c | 149 ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx, int32_t *bap) in ffs_blkpref_ufs1() argument 156 if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) { in ffs_blkpref_ufs1() 165 if (indx == 0 || bap[indx - 1] == 0) in ffs_blkpref_ufs1() 170 ufs_rw32(bap[indx - 1], UFS_FSNEEDSWAP(fs)) + 1); in ffs_blkpref_ufs1() 184 return ufs_rw32(bap[indx - 1], UFS_FSNEEDSWAP(fs)) + fs->fs_frag; in ffs_blkpref_ufs1() 188 ffs_blkpref_ufs2(struct inode *ip, daddr_t lbn, int indx, int64_t *bap) in ffs_blkpref_ufs2() argument 195 if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) { in ffs_blkpref_ufs2() 204 if (indx == 0 || bap[indx - 1] == 0) in ffs_blkpref_ufs2() 209 ufs_rw64(bap[indx - 1], UFS_FSNEEDSWAP(fs)) + 1); in ffs_blkpref_ufs2() 225 return ufs_rw64(bap[indx - 1], UFS_FSNEEDSWAP(fs)) + fs->fs_frag; in ffs_blkpref_ufs2()
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_ppmd8.c | 19 #define I2U(indx) (p->Indx2Units[indx]) argument 117 static void InsertNode(CPpmd8 *p, void *node, unsigned indx) in InsertNode() argument 120 ((CPpmd8_Node *)node)->Next = (CPpmd8_Node_Ref)p->FreeList[indx]; in InsertNode() 121 ((CPpmd8_Node *)node)->NU = I2U(indx); in InsertNode() 122 p->FreeList[indx] = REF(node); in InsertNode() 123 p->Stamps[indx]++; in InsertNode() 126 static void *RemoveNode(CPpmd8 *p, unsigned indx) in RemoveNode() argument 128 CPpmd8_Node *node = NODE((CPpmd8_Node_Ref)p->FreeList[indx]); in RemoveNode() 129 p->FreeList[indx] = node->Next; in RemoveNode() 130 p->Stamps[indx]--; in RemoveNode() [all …]
|
H A D | archive_ppmd7.c | 34 #define I2U(indx) (p->Indx2Units[indx]) argument 152 static void InsertNode(CPpmd7 *p, void *node, unsigned indx) in InsertNode() argument 154 *((CPpmd_Void_Ref *)node) = p->FreeList[indx]; in InsertNode() 155 p->FreeList[indx] = REF(node); in InsertNode() 158 static void *RemoveNode(CPpmd7 *p, unsigned indx) in RemoveNode() argument 160 CPpmd_Void_Ref *node = (CPpmd_Void_Ref *)Ppmd7_GetPtr(p, p->FreeList[indx]); in RemoveNode() 161 p->FreeList[indx] = *node; in RemoveNode() 249 static void *AllocUnitsRare(CPpmd7 *p, unsigned indx) in AllocUnitsRare() argument 256 if (p->FreeList[indx] != 0) in AllocUnitsRare() 257 return RemoveNode(p, indx); in AllocUnitsRare() [all …]
|
/freebsd/sys/kern/ |
H A D | kern_malloc.c | 640 int indx; variable 661 indx = kmemsize[size >> KMEM_ZSHIFT]; 662 zone = kmemzones[indx].kz_zone[mtp_get_subzone(mtp)]; 671 malloc_type_zone_allocated(mtp, va == NULL ? 0 : size, indx); 694 int indx; in malloc_domain() local 701 indx = kmemsize[size >> KMEM_ZSHIFT]; in malloc_domain() 702 zone = kmemzones[indx].kz_zone[mtp_get_subzone(mtp)]; in malloc_domain() 706 *indxp = indx; in malloc_domain() 717 int indx; in malloc_domainset() local 736 va = malloc_domain(&size, &indx, mtp, domain, flags); in malloc_domainset() [all …]
|
H A D | kern_sysctl.c | 367 int indx; in sysctl_search_oid() local 370 indx = 0; in sysctl_search_oid() 375 nodes[indx] = RB_MIN(sysctl_oid_list, &sysctl__children); in sysctl_search_oid() 377 if (nodes[indx] == needle) in sysctl_search_oid() 378 return (indx + 1); in sysctl_search_oid() 380 if (nodes[indx] == NULL) { in sysctl_search_oid() 382 if (indx-- == 0) { in sysctl_search_oid() 386 } else if ((nodes[indx]->oid_kind & CTLTYPE) == CTLTYPE_NODE) { in sysctl_search_oid() 388 if (++indx == CTL_MAXNAME) { in sysctl_search_oid() 393 nodes[indx] = RB_MIN(sysctl_oid_list, in sysctl_search_oid() [all …]
|
/freebsd/sys/riscv/riscv/ |
H A D | machdep.c | 140 int indx; in cpu_startup() local 143 for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { in cpu_startup() 146 size = phys_avail[indx + 1] - phys_avail[indx]; in cpu_startup() 149 (uintmax_t)phys_avail[indx], in cpu_startup() 150 (uintmax_t)phys_avail[indx + 1] - 1, in cpu_startup()
|
/freebsd/usr.bin/procstat/ |
H A D | procstat_rlimit.c | 73 humanize_rlimit(int indx, rlim_t limit) in humanize_rlimit() argument 82 rlimit_param[indx].suffix, HN_AUTOSCALE | HN_GETSCALE, HN_DECIMAL); in humanize_rlimit() 84 rlimit_param[indx].suffix, HN_AUTOSCALE, HN_DECIMAL); in humanize_rlimit()
|
/freebsd/sys/dev/bnxt/bnxt_re/ |
H A D | qplib_res.h | 503 u32 indx, u64 *pg) in bnxt_qplib_get_qe() argument 507 pg_num = (indx / hwq->qe_ppg); in bnxt_qplib_get_qe() 508 pg_idx = (indx % hwq->qe_ppg); in bnxt_qplib_get_qe() 650 #define BNXT_QPLIB_INIT_DBHDR(xid, type, indx, toggle) \ argument 652 (type) | BNXT_QPLIB_DBR_VALID) << 32) | (indx) | \ 693 u32 indx; in bnxt_qplib_ring_db() local 700 indx = ((info->hwq->cons & DBC_DBC_INDEX_MASK) | in bnxt_qplib_ring_db() 704 key = BNXT_QPLIB_INIT_DBHDR(info->xid, type, indx, toggle); in bnxt_qplib_ring_db() 712 u32 indx; in bnxt_qplib_ring_prod_db() local 714 indx = (((info->hwq->prod / info->max_slot) & DBC_DBC_INDEX_MASK) | in bnxt_qplib_ring_prod_db() [all …]
|
H A D | main.c | 302 int indx; in bnxt_re_dettach_irq() local 305 for (indx = 0; indx < rdev->nqr.max_init; indx++) { in bnxt_re_dettach_irq() 306 nq = &rdev->nqr.nq[indx]; in bnxt_re_dettach_irq() 1248 int indx; in bnxt_re_stop_irq() local 1260 for (indx = 0; indx < rdev->nqr.max_init; indx++) { in bnxt_re_stop_irq() 1261 nq = &rdev->nqr.nq[indx]; in bnxt_re_stop_irq() 1278 int indx, rc, vec; in bnxt_re_start_irq() local 1305 for (indx = 0; indx < rdev->nqr.num_msix; indx++) in bnxt_re_start_irq() 1306 rdev->nqr.msix_entries[indx].vector = ent[indx].vector; in bnxt_re_start_irq() 1317 for (indx = 0 ; indx < rdev->nqr.max_init; indx++) { in bnxt_re_start_irq() [all …]
|
/freebsd/sys/powerpc/powerpc/ |
H A D | machdep.c | 213 int indx; in cpu_startup() local 216 for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { in cpu_startup() 218 phys_avail[indx + 1] - phys_avail[indx]; in cpu_startup() 225 (uintmax_t)phys_avail[indx], in cpu_startup() 226 (uintmax_t)phys_avail[indx + 1] - 1, in cpu_startup()
|
/freebsd/sbin/camcontrol/ |
H A D | modeedit.c | 1008 size_t indx, len; in modepage_dump() local 1033 for (indx = 0; indx < len; indx++) { in modepage_dump() 1034 printf("%02x%c",mode_pars[indx], in modepage_dump() 1035 (((indx + 1) % 8) == 0) ? '\n' : ' '); in modepage_dump() 1045 size_t indx, len; in modepage_dump_desc() local 1064 for (indx = 0; indx < len; indx++) { in modepage_dump_desc() 1065 printf("%02x%c", desc[indx], in modepage_dump_desc() 1066 (((indx + 1) % 8) == 0) ? '\n' : ' '); in modepage_dump_desc()
|
/freebsd/sys/crypto/aesni/ |
H A D | aesni_ccm.c | 77 int indx = sizeof(*block) - 1; in append_int() local 80 while (indx > (sizeof(*block) - offset)) { in append_int() 81 bp[indx] = value & 0xff; in append_int() 82 indx--; in append_int()
|