Lines Matching refs:cp
361 static void out_pattern(Sfio_t *iop, register const char *cp, int n)
366 switch(c= *cp)
377 if (!(c = *++cp))
388 while(*cp++);
391 static void out_string(Sfio_t *iop, register const char *cp, int c, int quoted)
396 cp = sh_fmtq(cp);
397 if(iop==stkstd && cp==stkptr(stkstd,n))
403 sfputr(iop,cp,c);
472 const char *cp = "+=( ";
487 cp+=1, n-=1;
490 sfwrite(iop,cp,n);
495 while(cp = *argv++)
498 out_pattern(iop, cp,' ');
500 out_string(iop, cp,' ',n?0: (flags&(ARG_RAW|ARG_NOGLOB))||*argv);
506 np->nvalue.cp = stkfreeze(stkp,1);
518 np->nvalue.cp = 0;
609 char *cp;
610 while(cp = *++argv)
612 if(*cp=='+')
614 if(*cp!='-' || cp[1]=='-')
616 if(strchr(++cp,c))
618 if(*cp=='h' && cp[1]==0 && *++argv==0)
640 char *sp=0,*cp;
645 cp = nv_name(nq);
666 nv_putval(SH_NAMENOD, cp, NV_NOFREE);
886 char *cp=0, **com=0, *comn;
947 np = nv_bfsearch(com0, shp->bltin_tree, &nq, &cp);
964 char **argv, *cp;
965 for(argv=com+1; cp= *argv; argv++)
967 if(cp && *cp && *cp!='-')
1013 np = nv_bfsearch(com0, root, &nq, &cp);
1015 if(shp->namespace && !nq && !cp)
1159 if((np=nv_search(com0,shp->track_tree,0)) && !nv_isattr(np,NV_NOALIAS) && np->nvalue.cp)
2023 char *cp, *trap, *nullptr = 0;
2055 cp = *args;
2058 while(cp && shp->st.execbrk==0)
2084 if(*(cp=val) == 0)
2089 while(type = *cp++)
2097 cp = "";
2099 cp = args[type];
2106 nv_putval(np,cp,0);
2114 av[3] = cp;
2131 if((cp=nv_getval(sh_scoped(shp,REPLYNOD))) && *cp==0)
2135 cp = *++args;
2459 register char *cp = strrchr(fname,'.');
2476 if(cp)
2492 np->nvalue.cp = Empty;
2518 if(cp || shp->prefix)
2523 cp = shp->prefix;
2525 npv = nv_open(cp,shp->var_tree,NV_NOASSIGN|NV_NOARRAY|NV_VARNAME);
2526 shp->prefix = cp;
2527 cp = fname;
2531 sfwrite(stkp,fname,cp++-fname);
2536 sfprintf(stkp,"%s.%s%c",nv_name(npv),cp,0);
2550 cp = nv_setdisc(npv,cp,np,(Namfun_t*)npv);
2551 if(!cp)
2824 register char *cp;
2832 if(!(cp=nv_getval(sh_scoped(shp,PS4NOD))))
2833 cp = "+ ";
2837 cp = sh_mactry(shp,cp);
2840 if(*cp)
2841 sfputr(sfstderr,cp,-1);
2847 if(*(cp=argv[0])=='[' && (!cp[1] || !cp[2]&&cp[1]=='['))
2849 sfputr(sfstderr,cp,*++argv?' ':nl);
2852 while(cp = *argv++)
2854 if(bracket==0 || *argv || *cp!=']')
2855 cp = sh_fmtq(cp);
2856 if(decl && shp->prefix && cp!=argv0 && *cp!='-')
2858 if(*cp=='.' && cp[1]==0)
2859 cp = shp->prefix;
2863 sfputr(sfstderr,cp,*argv?' ':nl);
3070 register char *cp;
3073 if((cp = nv_getval(np)) && (mp = nv_search(nv_name(np), shp->var_tree, NV_ADD|HASH_NOSCOPE)) && nv_isnull(mp))
3074 nv_putval(mp, cp, 0);
3477 char *arglist[2], *envlist[2], devfd[12], *cp;
3522 cp = devfd+8;
3524 *cp++ = '0' + (fd/10);
3525 *cp++ = '0' + fd%10;
3526 *cp = 0;
3739 if((np=nv_search(path,shp->track_tree,0)) && !nv_isattr(np,NV_NOALIAS) && np->nvalue.cp)