/freebsd/contrib/one-true-awk/ |
H A D | tran.c | 80 FS = &fsloc->sval; in syminit() 82 RS = &rsloc->sval; in syminit() 84 OFS = &ofsloc->sval; in syminit() 86 ORS = &orsloc->sval; in syminit() 87 OFMT = &setsymtab("OFMT", "%.6g", 0.0, STR|DONTFREE, symtab)->sval; in syminit() 88 CONVFMT = &setsymtab("CONVFMT", "%.6g", 0.0, STR|DONTFREE, symtab)->sval; in syminit() 89 FILENAME = &setsymtab("FILENAME", "", 0.0, STR|DONTFREE, symtab)->sval; in syminit() 91 NF = &nfloc->fval; in syminit() 93 NR = &nrloc->fval; in syminit() 95 FNR = &fnrloc->fval; in syminit() [all …]
|
/freebsd/contrib/nvi/vi/ |
H A D | v_itxt.c | 1 /*- 43 * routines re-log the cursor to make this work correctly. Historic vi tried 59 * v_iA -- [count]A 65 v_iA(SCR *sp, VICMD *vp) in v_iA() argument 69 if (!db_get(sp, vp->m_start.lno, 0, NULL, &len)) in v_iA() 70 sp->cno = len == 0 ? 0 : len - 1; in v_iA() 74 return (v_ia(sp, vp)); in v_iA() 78 * v_ia -- [count]a 85 v_ia(SCR *sp, VICMD *vp) in v_ia() argument 90 CHAR_T *p; in v_ia() local [all …]
|
H A D | v_paragraph.c | 1 /*- 27 if (len == 0 || v_isempty(p, len)) { \ 28 if (!--cnt) \ 34 * Historic documentation (USD:15-11, 4.2) said that formfeed \ 39 if (p[0] == '\014') { \ 40 if (!--cnt) \ 42 if (pstate == P_INTEXT && !--cnt) \ 46 if (p[0] != '.' || len < 2) \ 48 for (lp = VIP(sp)->ps; *lp != '\0'; lp += 2) \ 49 if (lp[0] == p[1] && \ [all …]
|
H A D | v_ch.c | 1 /*- 28 * v_chrepeat -- [count]; 34 v_chrepeat(SCR *sp, VICMD *vp) in v_chrepeat() argument 36 vp->character = VIP(sp)->lastckey; in v_chrepeat() 38 switch (VIP(sp)->csearchdir) { in v_chrepeat() 43 return (v_chF(sp, vp)); in v_chrepeat() 45 return (v_chf(sp, vp)); in v_chrepeat() 47 return (v_chT(sp, vp)); in v_chrepeat() 49 return (v_cht(sp, vp)); in v_chrepeat() 57 * v_chrrepeat -- [count], [all …]
|
H A D | v_section.c | 1 /*- 37 * The historic vi documentation (USD:15-10) claimed: 49 * v_sectionf -- [count]]] 61 v_sectionf(SCR *sp, VICMD *vp) in v_sectionf() argument 65 CHAR_T *p; in v_sectionf() local 74 * If the starting cursor position is at or before any non-blank in v_sectionf() 80 if (ISMOTION(vp)) { in v_sectionf() 81 if (vp->m_start.cno == 0) in v_sectionf() 82 F_SET(vp, VM_LMODE); in v_sectionf() 84 vp->m_stop = vp->m_start; in v_sectionf() [all …]
|
H A D | v_put.c | 1 /*- 26 * v_Put -- [buffer]P 32 v_Put(SCR *sp, VICMD *vp) in v_Put() argument 36 if (F_ISSET(vp, VC_ISDOT)) in v_Put() 37 inc_buf(sp, vp); in v_Put() 41 * Historic vi did not support a count with the 'p' and 'P' in v_Put() 44 for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt--;) { in v_Put() 46 F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, in v_Put() 47 &vp->m_start, &vp->m_final, 0)) in v_Put() 49 vp->m_start = vp->m_final; in v_Put() [all …]
|
H A D | v_match.c | 1 /*- 27 * v_match -- % 33 v_match(SCR *sp, VICMD *vp) in v_match() argument 39 CHAR_T *p; in v_match() local 49 match_chars = VIP(sp)->mcs; in v_match() 59 if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { in v_match() 64 for (off = vp->m_start.cno;; ++off) { in v_match() 69 startc = p[off]; in v_match() 72 cnt = cp - match_chars; in v_match() 79 cs.cs_lno = vp->m_start.lno; in v_match() [all …]
|
H A D | v_ulcase.c | 1 /*- 30 * v_ulcase -- [count]~ 36 * auto-repeat through a paragraph. 46 v_ulcase(SCR *sp, VICMD *vp) in v_ulcase() argument 51 CHAR_T *p; in v_ulcase() local 53 lno = vp->m_start.lno; in v_ulcase() 54 cno = vp->m_start.cno; in v_ulcase() 56 for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt > 0; cno = 0) { in v_ulcase() 58 if (db_get(sp, lno, 0, &p, &len)) { in v_ulcase() 63 --lno; in v_ulcase() [all …]
|
H A D | v_search.c | 1 /*- 31 * v_srch -- [count]?RE[? offset] 37 v_searchb(SCR *sp, VICMD *vp) in v_searchb() argument 39 return (v_exaddr(sp, vp, BACKWARD)); in v_searchb() 43 * v_searchf -- [count]/RE[/ offset] 49 v_searchf(SCR *sp, VICMD *vp) in v_searchf() argument 51 return (v_exaddr(sp, vp, FORWARD)); in v_searchf() 55 * v_exaddr -- 59 v_exaddr(SCR *sp, VICMD *vp, dir_t dir) in v_exaddr() argument 78 if (F_ISSET(vp, VC_ISDOT)) in v_exaddr() [all …]
|
H A D | v_replace.c | 1 /*- 28 * v_replace -- [count]r<char> 42 v_replace(SCR *sp, VICMD *vp) in v_replace() argument 51 CHAR_T *p; in v_replace() local 66 if (db_get(sp, vp->m_start.lno, DBG_FATAL, &p, &len)) in v_replace() 83 cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; in v_replace() 84 vp->m_stop.lno = vp->m_start.lno; in v_replace() 85 vp->m_stop.cno = vp->m_start.cno + cnt - 1; in v_replace() 86 if (vp->m_stop.cno > len - 1) { in v_replace() 87 v_eol(sp, &vp->m_start); in v_replace() [all …]
|
H A D | v_increment.c | 1 /*- 43 * v_increment -- [count]#[#+-] 49 v_increment(SCR *sp, VICMD *vp) in v_increment() argument 57 CHAR_T *bp, *p, *t; in v_increment() local 60 if (vp->character == '#') in v_increment() 61 vp->character = '+'; in v_increment() 62 if (vp->character != '+' && vp->character != '-') { in v_increment() 63 v_emsg(sp, vp->kp->usage, VIM_USAGE); in v_increment() 68 if (F_ISSET(vp, VC_C1SET)) { in v_increment() 69 if (vp->count > LONG_MAX) { in v_increment() [all …]
|
/freebsd/contrib/tcsh/ |
H A D | sh.set.c | 4 /*- 61 update_vars(Char *vp) in update_vars() argument 63 if (eq(vp, STRpath)) { in update_vars() 64 struct varent *p = adrof(STRpath); in update_vars() local 65 if (p == NULL) in update_vars() 68 exportpath(p->vec); in update_vars() 72 else if (eq(vp, STRnoclobber)) { in update_vars() 73 struct varent *p = adrof(STRnoclobber); in update_vars() local 74 if (p == NULL) in update_vars() 77 no_clobber = set_noclobber(p->vec); in update_vars() [all …]
|
/freebsd/bin/sh/ |
H A D | var.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 155 struct var *vp; in initvar() local 159 for (ip = varinit ; (vp = ip->var) != NULL ; ip++) { in initvar() 160 if (find_var(ip->text, &vpp, &vp->name_len) != NULL) in initvar() 162 vp->next = *vpp; in initvar() 163 *vpp = vp; in initvar() 164 vp->text = __DECONST(char *, ip->text); in initvar() 165 vp->flags = ip->flags | VSTRFIXED | VTEXTFIXED; in initvar() 166 vp->func = ip->func; in initvar() [all …]
|
/freebsd/sys/fs/devfs/ |
H A D | devfs_vnops.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2000-2004 5 * Poul-Henning Kamp. All rights reserved. 6 * Copyright (c) 1989, 1992-1993, 1995 10 * Jan-Simon Pendry. 80 static MALLOC_DEFINE(M_CDEVPDATA, "DEVFSP", "Metainfo for cdev-fp data"); 106 if (tsp->tv_sec != ts) { in devfs_timestamp() 107 tsp->tv_sec = ts; in devfs_timestamp() 108 tsp->tv_nsec = 0; in devfs_timestamp() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
H A D | VPIntrinsics.def | 1 //===-- IR/VPIntrinsics.def - Describes llvm.vp.* Intrinsics -*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===// 20 // Register a VP intrinsic and begin its property scope. 21 // All VP intrinsic scopes are top level, ie it is illegal to place a 22 // BEGIN_REGISTER_VP_INTRINSIC within a VP intrinsic scope. 23 // \p VPID The VP intrinsic id. 24 // \p MASKPOS The mask operand position. 25 // \p EVLPOS The explicit vector length operand position. [all …]
|
/freebsd/sys/kern/ |
H A D | vfs_subr.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 109 static void delmntque(struct vnode *vp); 113 static int vtryrecycle(struct vnode *vp, bool isvnlru); 116 static void vn_seqc_write_end_free(struct vnode *vp); 119 static void vdropl_recycle(struct vnode *vp); 120 static void vdrop_recycle(struct vnode *vp); 125 static int v_inval_buf_range_locked(struct vnode *vp, struct bufobj *bo, 180 * sub-cache consisting mostly of such files. The system balances the size 181 * of this sub-cache with its complement to try to prevent either from [all …]
|
/freebsd/sys/fs/p9fs/ |
H A D | p9fs_vnops.c | 2 * Copyright (c) 2017-2020 Juniper Networks, Inc. 27 /* This file contains VFS file ops for the 9P protocol. 62 #define ISGID 0002000 /* Set-gid. */ 63 #define ISUID 0004000 /* Set-uid. */ 76 p9fs_itimes(struct vnode *vp) in p9fs_itimes() argument 82 node = P9FS_VTON(vp); in p9fs_itimes() 83 inode = &node->inode; in p9fs_itimes() 86 inode->i_mtime = ts.tv_sec; in p9fs_itimes() 99 struct vnode *vp; in p9fs_cleanup() local 105 vp = P9FS_NTOV(np); in p9fs_cleanup() [all …]
|
/freebsd/sys/fs/tarfs/ |
H A D | tarfs_vnops.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 5 * Copyright (c) 2022-2023 Klara, Inc. 50 struct vnode *vp; in tarfs_open() local 52 vp = ap->a_vp; in tarfs_open() 53 MPASS(VOP_ISLOCKED(vp)); in tarfs_open() 54 tnp = VP_TO_TARFS_NODE(vp); in tarfs_open() 56 TARFS_DPF(VNODE, "%s(%p=%s, %o)\n", __func__, in tarfs_open() 57 tnp, tnp->name, ap->a_mode); in tarfs_open() 59 if (vp->v_type != VREG && vp->v_type != VDIR) in tarfs_open() [all …]
|
/freebsd/sys/fs/nfsserver/ |
H A D | nfs_nfsdserv.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 41 * - these routines generally have 3 phases 42 * 1 - break down and validate rpc request in mbuf list 43 * 2 - do the vnode ops for the request, usually by calling a nfsvno_XXX() 45 * 3 - build the rpc reply in an mbuf list 78 "Enable Linux style NFSv4.2 server (non-RFC compliant)"); 119 NFSACL_T *aclp, NFSPROC_T *p, struct nfsexstuff *exp, char *pathcp, 125 NFSPROC_T *p, struct nfsexstuff *exp); 132 vnode_t vp, struct nfsexstuff *exp) in nfsrvd_access() argument [all …]
|
H A D | nfs_nfsdport.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 92 static pid_t nfsd_master_pid = (pid_t)-1; 206 if (error != 0 || req->newptr == NULL) in sysctl_dsdirsize() 232 if (error != 0 || req->newptr == NULL) in sysctl_srvmaxio() 244 if ((newsrvmaxio & (newsrvmaxio - 1)) != 0) { in sysctl_srvmaxio() 271 tval += MCLBYTES - 1; /* Round up divide. */ in sysctl_srvmaxio() 303 if (error != 0 || req->newptr == NULL) in sysctl_dolocallocks() 307 if (jailed(curthread->td_ucred)) in sysctl_dolocallocks() 335 struct vnode *nh_vp; /* vp to match (unreferenced pointer) */ [all …]
|
/freebsd/sys/fs/smbfs/ |
H A D | smbfs_node.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2000-2001 Boris Popov 56 extern struct vop_vector smbfs_vnodeops; /* XXX -> .h file */ 74 bcopy(name, cp, nmlen - 1); in smbfs_name_alloc() 75 cp[nmlen - 1] = 0; in smbfs_name_alloc() 87 smbfs_vnode_cmp(struct vnode *vp, void *_sc) in smbfs_vnode_cmp() argument 92 np = (struct smbnode *) vp->v_data; in smbfs_vnode_cmp() 94 if (np->n_parent != sc->n_parent || np->n_nmlen != sc->n_nmlen || in smbfs_vnode_cmp() 95 bcmp(sc->n_name, np->n_name, sc->n_nmlen) != 0) in smbfs_vnode_cmp() [all …]
|
/freebsd/sys/vm/ |
H A D | vnode_pager.c | 1 /*- 2 * SPDX-License-Identifier: BSD-4-Clause 50 * greatly re-simplify the vnode_pager. 87 static int vnode_pager_addr(struct vnode *vp, vm_ooffset_t address, 150 vnode_create_vobject_any(struct vnode *vp, off_t isize, struct thread *td) in vnode_create_vobject_any() argument 156 object = vp->v_object; in vnode_create_vobject_any() 161 if (vn_getsize_locked(vp, &size, td->td_ucred) != 0) in vnode_create_vobject_any() 167 object = vnode_pager_alloc(vp, size, 0, 0, td->td_ucred); in vnode_create_vobject_any() 170 * that the object is associated with the vp. We still have in vnode_create_vobject_any() 175 last = refcount_release(&object->ref_count); in vnode_create_vobject_any() [all …]
|
/freebsd/bin/expr/ |
H A D | expr.y | 2 /*- 86 %left <val> '+' '-' 108 | expr '-' expr { $$ = op_minus($1, $3); } 120 struct val *vp; variable 122 vp = (struct val *)malloc(sizeof(*vp)); 123 if (vp == NULL) 126 vp->type = integer; 127 vp->u.i = i; 128 return (vp); 134 struct val *vp; in make_str() local [all …]
|
/freebsd/lib/libprocstat/ |
H A D | common_kvm.c | 1 /*- 2 * SPDX-License-Identifier: BSD-4-Clause 88 ufs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) in ufs_filestat() argument 93 if (!kvm_read_all(kd, (unsigned long)VTOI(vp), &inode, sizeof(inode))) { in ufs_filestat() 94 warnx("can't read inode at %p", (void *)VTOI(vp)); in ufs_filestat() 98 warnx("can't read ufsmount at %p", (void *)inode.i_ump); in ufs_filestat() 106 vn->vn_fsid = dev2udev(kd, um.um_dev); in ufs_filestat() 107 vn->vn_fileid = inode.i_number; in ufs_filestat() 108 vn->vn_mode = (mode_t)inode.i_mode; in ufs_filestat() 109 vn->vn_size = inode.i_size; in ufs_filestat() [all …]
|
/freebsd/sys/fs/nullfs/ |
H A D | null_vfsops.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 8 * Jan-Simon Pendry. 89 NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); in nullfs_mount() 91 if (mp->mnt_flag & MNT_ROOTFS) in nullfs_mount() 95 * Update is a no-op in nullfs_mount() 97 if (mp->mnt_flag & MNT_UPDATE) { in nullfs_mount() 101 if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) in nullfs_mount() 110 error = vfs_getopt(mp->mnt_optnew, "from", (void **)&target, &len); in nullfs_mount() 112 error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len); in nullfs_mount() [all …]
|