/ast/src/lib/libcmd/ |
H A D | fmt.c | 81 register char* cp = fp->outbuf; local 91 while (*cp++ == ' ') 96 cp = &fp->outbuf[TABSZ*n]; 98 *--cp = '\t'; 101 cp = fp->outbuf; 104 sfputr(fp->out, cp, '\n'); 105 else if (*cp) 108 if (*cp != '[') 110 if (*cp == ' ') 111 cp 139 register char* cp; local 237 char* cp; local 568 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...] |
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 | 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 | 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 | wclib.c | 165 register unsigned char* cp; local 187 cp = buff = endbuff = 0; 190 if (cp >= endbuff || (n = mb2wc(x, cp, endbuff-cp)) < 0) 192 if ((o = endbuff-cp) < sizeof(side)) 197 memcpy(side, cp, o); 202 cp = side + o; 213 memcpy(cp, buff, c); 215 cp [all...] |
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 | cut.c | 137 register char* cp = str; local 140 if (!(cut = (Cut_t*)stakalloc(sizeof(Cut_t) + strlen(cp) * sizeof(int)))) 162 switch(c = *cp++) 166 while(*cp==' ' || *cp=='\t') 167 cp++; 367 register unsigned char *cp; local 383 cp = bp; 384 ep = cp + --c; 385 if((lastchar = cp[ 571 register char* cp = 0; 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/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;
|
/ast/src/cmd/ksh93/edit/ |
H A D | hexpand.c | 47 #define DONE() {flag |= HIST_ERROR; cp = 0; stakseek(0); goto done;} 67 char *cp,del; 81 cp = (char*) s + 1; 85 if(*cp == del || *cp == '\n' || *cp == '\0') 100 if(*cp != del) 103 else if(*cp == '\\') 105 if(*(cp+1) == del) /* quote delimiter */ 108 cp [all...] |
/ast/src/cmd/std/ |
H A D | unexpand.c | 103 register const char *cp=arg; local 106 while(c= *cp++) 115 cp=arg; 116 while((c= *cp) && c==' ' || c=='\t' || c==',') 117 cp++; 120 tablist[n] = strtol(cp,(char**)&arg,10)-1; 121 if(cp==arg) 122 error(ERROR_exit(1),"%c - invalid character in tablist",*cp); 135 register char *cp, *first, *buff; local 146 while(buff = cp 277 register char *cp; local [all...] |
H A D | split.c | 201 char* cp = (char*)arg; local 206 if (op = getop(prev, 0, 1, *cp == '/' ? OP_SEARCH : OP_SKIP, 1)) 208 if (n = regcomp(op->re, cp, REG_DELIMITED|REG_NOSUB)) 213 cp += op->re->re_npat; 214 if (*cp) 216 op->size = strtoll(cp, &ep, 10); 218 error(ERROR_exit(1), "%s: invalid offset", cp); 238 char* cp; local 251 cp = (char*)(fp + 1); 254 strcpy(fp->format = cp, prefi 301 register char* cp = fp->last; local 325 register char* cp = fp->suffix; local 342 register char* cp; local 373 register char* cp; local 488 char* cp; local [all...] |
/ast/src/cmd/ksh93/sh/ |
H A D | string.c | 183 register const char *cp; local 188 if(*(cp=oldsp) == 0) 196 while(*sp && (savesp==sp || *sp != *cp)) 210 for(;*cp;cp++) 212 if(*cp != *sp++) 215 if(*cp==0) 219 cp = oldsp; 298 register const char *cp = string; local 301 if(!cp) 334 register const char *cp = string, *op; local 465 register const char *cp = string; local 669 register const char *cp=string; local 704 register unsigned char *cp = (unsigned char*)str; local [all...] |
H A D | expand.c | 50 # define argbegin argnxt.cp 101 register char *sp, *cp, *cp2; local 145 cp=nv_getval(sh_scoped(shp,FIGNORENOD)); 151 cp=nv_getval(sh_scoped(shp,GLOBIGNORENOD)); 153 if(cp) 159 stakputs(cp); 160 for(cp=stakptr(off); *cp; cp++) 161 if(*cp 224 register char *cp; local 271 register char *cp; local [all...] |
/ast/src/cmd/cs/ |
H A D | dbm.c | 127 register Con_t* cp; local 132 cp = state->con + fd; 133 cp->db = 0; 134 cp->scan = 0; 148 register Con_t* cp; local 160 cp = state->con + fd; 170 if (!cp->db) goto notopen; 171 if (!--cp->db->ref) dbm_close(cp->db->dbm); 172 cp [all...] |
/ast/src/lib/libast/regex/ |
H A D | regclass.c | 187 register Ctype_t* cp; local 200 for (cp = ctypes; cp; cp = cp->next) 201 if (n == cp->size && strneq(s, cp->name, n)) 205 for (cp = ctype; cp < &ctype[elementsof(ctype)]; cp 260 register Ctype_t* cp; local [all...] |
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...] |
/ast/src/cmd/3d/ |
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...] |
H A D | syscall3d.c | 214 register Systrace_t* cp; local 224 for (cp = sys_trace; cp < &sys_trace[elementsof(sys_trace)]; cp++) 225 if (!(cp->func = (Sysfunc_t)dlsym(dll, cp->name)) && (*cp->name != '_' || !(cp->func = (Sysfunc_t)dlsym(dll, cp->name + 1)) || !*cp 243 register Systrace_t* cp; local 305 register Systrace_t* cp; local [all...] |
/ast/src/lib/libast/misc/ |
H A D | translate.c | 162 register Catalog_t* cp; local 172 if (!(cp = newof(0, Catalog_t, 1, strlen(s)))) 174 strcpy(cp->name, s); 175 if (!dtinsert(state.catalogs, cp)) 177 free(cp); 180 cp->cat = NOCAT; 201 if (cp->messages = dtopen(&state.message_disc, Dtset)) 207 if (((s = catgets(d, set = AST_MESSAGE_SET, n, state.null)) && *s || (s = catgets(d, set = 1, n, state.null)) && *s) && entry(cp->messages, set, n, s)) 214 dtclose(cp->messages); 215 cp 233 Catalog_t* cp; local 301 Catalog_t* cp; local [all...] |
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/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/cmd/ksh93/bltins/ |
H A D | whence.c | 137 register const char *cp; local 152 cp = 0; 169 && (cp=nv_getval(np))) 179 sfputr(sfstdout,sh_fmtq(cp),'\n'); 182 cp = 0; 192 cp = ""; 196 cp = sh_translate(is_ufunction); 200 cp = sh_translate(is_spcbuiltin); 202 cp = sh_translate(is_builtin); 205 cp [all...] |