Lines Matching refs:idx
158 int idx; /* Space used */ member
277 int idx = 0; in index_of_next_unescaped_regexp_delim() local
285 for (; (ch = str[idx]) != '\0'; idx++) { in index_of_next_unescaped_regexp_delim()
288 && !(bracket == idx - 1 || (bracket == idx - 2 && str[idx - 1] == '^')) in index_of_next_unescaped_regexp_delim()
297 bracket = idx; in index_of_next_unescaped_regexp_delim()
299 return idx; in index_of_next_unescaped_regexp_delim()
313 int idx = 0; in parse_regex_delim() local
322 idx = index_of_next_unescaped_regexp_delim(delimiter, cmdstr_ptr); in parse_regex_delim()
323 *match = copy_parsing_escapes(cmdstr_ptr, idx); in parse_regex_delim()
326 cmdstr_ptr += idx + 1; in parse_regex_delim()
327 idx = index_of_next_unescaped_regexp_delim(- (int)delimiter, cmdstr_ptr); in parse_regex_delim()
328 *replace = copy_parsing_escapes(cmdstr_ptr, idx); in parse_regex_delim()
330 return ((cmdstr_ptr - cmdstr) + idx); in parse_regex_delim()
399 int idx; in parse_subst_cmd() local
407 idx = parse_regex_delim(substr, &match, &sed_cmd->string); in parse_subst_cmd()
417 dbg("s flags:'%s'", substr + idx + 1); in parse_subst_cmd()
418 while (substr[++idx]) { in parse_subst_cmd()
419 dbg("s flag:'%c'", substr[idx]); in parse_subst_cmd()
421 if (isdigit(substr[idx])) { in parse_subst_cmd()
424 const char *pos = substr + idx; in parse_subst_cmd()
426 sed_cmd->which_match = (unsigned)strtol(substr+idx, (char**) &pos, 10); in parse_subst_cmd()
427 idx = pos - substr - 1; in parse_subst_cmd()
432 if (isspace(substr[idx])) in parse_subst_cmd()
435 switch (substr[idx]) { in parse_subst_cmd()
448 idx += parse_file_cmd(/*sed_cmd,*/ substr+idx+1, &fname); in parse_subst_cmd()
462 idx += strlen(substr + idx); // same in parse_subst_cmd()
469 dbg("s bad flags:'%s'", substr + idx); in parse_subst_cmd()
484 return idx; in parse_subst_cmd()
523 unsigned idx; in parse_cmd_args() local
527 idx = strchrnul(cmd_letters, sed_cmd->cmd) - cmd_letters; in parse_cmd_args()
530 if (idx == IDX_s) { in parse_cmd_args()
534 else if (idx <= IDX_c) { /* a,i,c */ in parse_cmd_args()
537 if (idx < IDX_c) { /* a,i */ in parse_cmd_args()
557 else if (idx <= IDX_w) { /* r,w */ in parse_cmd_args()
558 if (idx < IDX_w) { /* r */ in parse_cmd_args()
569 else if (idx <= IDX_T) { /* :,b,t,T */ in parse_cmd_args()
580 else if (idx == IDX_y) { in parse_cmd_args()
600 else if (idx >= IDX_nul) { /* not d,D,g,G,h,H,l,n,N,p,P,q,x,=,{,} */ in parse_cmd_args()
666 int idx; in add_cmd() local
681 idx = strtol(cmdstr+1, &end, 10); in add_cmd()
682 sed_cmd->end_line = -2 - idx; in add_cmd()
685 idx = get_address(cmdstr, &sed_cmd->end_line, &sed_cmd->end_match); in add_cmd()
686 cmdstr += idx; in add_cmd()
687 idx--; /* if 0, trigger error check below */ in add_cmd()
689 if (idx < 0) in add_cmd()
734 if (G.pipeline.idx == G.pipeline.len) { in pipe_putc()
739 G.pipeline.buf[G.pipeline.idx++] = c; in pipe_putc()
808 G.pipeline.idx = 0; in do_subst_command()