/ast/src/lib/libcmd/ |
H A D | cmdinit.c | 32 register char* cp; local 50 if (cp = strrchr(argv[0], '/')) 51 cp++; 53 cp = argv[0]; 54 error_info.id = cp;
|
H A D | head.c | 76 register char* cp; local 122 if (cp = *argv) 126 if (!cp || streq(cp, "-")) 128 cp = "/dev/stdin"; 132 else if (!(fp = sfopen(NiL, cp, "r"))) 134 error(ERROR_system(0), "%s: cannot open", cp); 138 sfprintf(sfstdout, format, cp); 143 error(ERROR_system(0), "%s: read error", cp); 146 } while (cp [all...] |
H A D | revlib.c | 38 register char *cp, *cpold; local 68 cp = buff+n; 73 cpold = cp; 75 cp--; 76 if(cp==buff) 81 while(*--cp != '\n'); 82 if(cp==buff && n!='\n') 84 *cp = n; 85 nleft += cpold-cp; 89 cp [all...] |
H A D | cmd.h | 75 register char* cp; local 78 if (cp = strrchr(argv[0], '/')) 79 cp++; 81 cp = argv[0]; 82 if (pp = strrchr(cp, '_')) 83 cp = pp + 1; 84 error_info.id = cp;
|
H A D | rev.c | 63 register char *ep, *bp, *cp; local 71 while(cp = bp = sfgetr(in,'\n',0)) 84 while (cp < ep) 85 *xp++ = mbchar(cp); 86 cp = bp; 88 cp += mbconv(cp, *--xp); 89 *cp++ = '\n'; 90 if (sfwrite(out, bp, cp - bp) < 0) 101 while(cp 120 register char *cp; local [all...] |
H A D | wc.c | 92 register char *cp; local 151 if (cp = *argv) 156 if (!cp || streq(cp,"-")) 158 else if (!(fp = sfopen(NiL,cp,"r"))) 160 error(ERROR_system(0),"%s: cannot open",cp); 163 if (cp) 172 wc_count(wp, fp, cp); 178 printout(wp,cp,mode); 179 } while (cp [all...] |
H A D | comm.c | 151 register char *cp; local 181 cp = *argv++; 182 if(streq(cp,"-")) 184 else if(!(f1 = sfopen(NiL, cp,"r"))) 185 error(ERROR_system(1),"%s: cannot open",cp); 186 cp = *argv; 187 if(streq(cp,"-")) 189 else if(!(f2 = sfopen(NiL, cp,"r"))) 190 error(ERROR_system(1),"%s: cannot open",cp);
|
H A D | fold.c | 91 register char *cp, *first; local 97 if (!(cp = sfgetr(in,'\n',0))) 99 if (!(cp = sfgetr(in,'\n',-1)) || (n = sfvalue(in)) <= 0) 101 x = cp[--n]; 102 cp[n] = '\n'; 107 sfwrite(out,cp,n); 110 first = cp; 115 while((n=cols[*(unsigned char*)cp++])==0); 116 while((cp-first) > (width-col)) 126 if(cp>firs 174 register char *cp; local [all...] |
H A D | pathchk.c | 105 register char *cp=path, *cpold; local 125 tmp[0] = (*cp=='/'? '/': '.'); 131 if(*cp!='/') 142 cp = cpold + strlen(cpold); 145 if(cp>cpold) 146 while(--cp>cpold && *cp=='/'); 147 *++cp = 0; 152 if(--cp==cpold) 157 while(*cp! [all...] |
/ast/src/cmd/ksh93/bltins/ |
H A D | umask.c | 76 char *cp = mask; local 78 c = strperm(cp,&cp,~flag&0777); 79 if(*cp)
|
/ast/src/lib/libast/astsa/ |
H A D | vmalloc.c | 50 register Vmchunk_t* cp; local 56 while (cp = np) 58 np = cp->next; 59 free(cp);
|
/ast/src/lib/libast/misc/ |
H A D | getenv.c | 58 register const char* cp; local 68 while (cp = *av++) 70 if (cp[0] != c0 || cp[1] != c1) 73 cp++; 74 while (*sp && *sp++ == *cp++); 75 if (*(sp-1) != *(cp-1)) 77 if (*sp == 0 && *cp == '=') 78 return (char*)(cp+1);
|
/ast/src/lib/libast/tm/ |
H A D | tmxtouch.c | 48 Tv_t* cp; local 71 cp = TV_TOUCH_RETAIN; 73 cp = 0; 78 cp = &cv; 80 return tvtouch(path, ap, mp, cp, flags & 1);
|
/ast/src/lib/libast/uwin/ |
H A D | a64l.c | 50 register char *cp; local 55 if(!(cp=strchr(letter,c))) 57 ul |= (cp-letter)<< (6*n); 66 register char *cp = buff; local 69 *cp++ = letter[ul&077]; 72 *cp = 0;
|
H A D | getpass.c | 54 static char *cp, passwd[32]; local 67 if(cp = sfgetr(iop,'\n',1)) 68 strncpy(passwd,cp,sizeof(passwd)-1); 75 return(cp?passwd:0);
|
/ast/src/cmd/mam/ |
H A D | mamtst.c | 45 register struct proc* cp; local 51 for (cp = pp->child; cp; cp = cp->sibling) 52 dumpproc(cp);
|
/ast/src/cmd/3d/ |
H A D | mkdir3d.c | 53 register char* cp; local 88 for (cp = buf; *cp = *sp++; cp++); 124 while (*--cp != '/'); 125 if (cp <= buf) return(-1); 126 *cp = 0; 128 *cp = '/'; 130 *cp = '/'; 133 r = *++cp; [all...] |
H A D | pathnext.c | 34 register char* cp; local 64 cp = sp + vpath->keysize; 65 shift = vpathlen - (cp - sp); 72 if (cp < ep) 73 strcopy(sp + vpathlen + 1, cp + 1); 89 * shift right cp 92 if (cp < ep) 94 for (tmp = ep; tmp > cp; tmp--) 96 strcopy(sp + vpathlen + 1, cp + shift + 1); 105 sp[vpathlen] = cp < e 125 register char* cp; local [all...] |
/ast/src/cmd/builtin/ |
H A D | asa.c | 64 register char *cp; local 69 cp = sfreserve(in,n=reclen, -1); 71 cp = sfgetr(in,'\n',0); 72 if(!cp) 77 while(--n>0 && cp[n]==' '); 78 switch(*cp) 99 sfwrite(out,cp+1,n); 110 register char *cp; local 130 if (cp = *argv) 134 if (!cp || stre [all...] |
/ast/src/lib/libast/sfio/ |
H A D | sfmove.c | 43 reg uchar *cp, *next; local 60 { if(!(cp = (uchar*)sfgetr(fr,rc,0)) ) 64 if(fw && (w = SFWRITE(fw, cp, r)) != r) 185 cp = next+r; 189 else if((w = endb-cp) > 0) 193 memcpy((Void_t*)fr->data,(Void_t*)cp,w); 195 if((w = endb - (cp+w)) > 0)
|
/ast/src/cmd/ksh93/sh/ |
H A D | shcomp.c | 76 char *cp; local 103 if(cp= *argv) 106 in = sh_pathopen(cp); 110 if(cp= *argv) 113 if(!(out = sfopen((Sfio_t*)0,cp,"w"))) 114 errormsg(SH_DICT,ERROR_system(1),"%s: cannot create",cp); 116 chmod(cp,(statb.st_mode&~S_IFMT)|S_IXUSR|S_IXGRP|S_IXOTH); 149 if(t && ((t->tre.tretyp&COMMSK)==TCOM) && (np=t->com.comnamp) && (cp=nv_name(np))) 151 if(strcmp(cp,"exit")==0) 154 if(strcmp(cp,"exe [all...] |
/ast/src/cmd/std/ |
H A D | banner.c | 184 register const char *cp,*dp; local 193 for (n = 0, cp = string; c = ccmapchr(map, *cp++) & 0x07f; dp++) 225 register char *cp; local 251 while(cp = *argv++) 252 banner(cp,delim,width);
|
/ast/src/cmd/dsslib/ip_t/ |
H A D | ireexec.h | 48 IREINT* cp; local 72 for (cp = lp; cp < ep; cp++) 74 if (*cp == ire->group && ire->group) 76 j = *++cp; 77 if (cp < bp) 82 cp += j; 91 n = cp[j++]; 104 if (cp > [all...] |
/ast/src/lib/libast/comp/ |
H A D | wordexp.c | 68 register char *cp=(char*)string; local 86 if(*cp=='#') 88 while(c = *cp++) 97 if(c= *cp) 98 cp++; 104 else if(c=='`' || (c=='$' && *cp=='(')) 112 stakputs(cp-1); 167 if(!(cp = (char*)malloc(sizeof(char*)+c))) 172 ((struct list*)cp)->next = (struct list*)(*av); 173 *av++ = (char*)cp; [all...] |
/ast/src/lib/libast/regex/ |
H A D | regcache.c | 81 register Cache_t* cp; local 158 if (!(cp = matchstate.cache[unused]) && !(cp = matchstate.cache[unused] = newof(0, Cache_t, 1, 0))) 164 if (cp->keep) 166 cp->keep = 0; 167 regfree(&cp->re); 169 if ((i = strlen(pattern) + 1) > cp->size) 171 cp->size = roundof(i, ROUND); 172 if (!(cp->pattern = newof(cp [all...] |