Lines Matching refs:cur_cmd
840 struct sed_cmd *cur_cmd; local
843 for (cur_cmd = vec->v, n = vec->v_length; n--; cur_cmd++)
844 if (cur_cmd->a1
845 && cur_cmd->a1->addr_type == ADDR_IS_NUM
846 && cur_cmd->a1->addr_number == 0)
847 cur_cmd->range_state = RANGE_ACTIVE;
849 cur_cmd->range_state = RANGE_INACTIVE;
1339 struct sed_cmd *cur_cmd = program->v; local
1345 switch (cur_cmd->cmd)
1359 shrink_program(vec, cur_cmd) in shrink_program() argument
1361 struct sed_cmd *cur_cmd;
1368 for (p=v; p < cur_cmd; ++p)
1390 struct sed_cmd *cur_cmd; local
1393 cur_cmd = vec->v;
1395 while (cur_cmd < end_cmd)
1397 if (match_address_p(cur_cmd, input) != cur_cmd->addr_bang)
1399 switch (cur_cmd->cmd)
1404 aq->text = cur_cmd->x.cmd_txt.text;
1405 aq->textlen = cur_cmd->x.cmd_txt.text_length;
1411 cur_cmd = vec->v + cur_cmd->x.jump_index;
1421 if (cur_cmd->range_state != RANGE_ACTIVE)
1422 output_line(cur_cmd->x.cmd_txt.text,
1423 cur_cmd->x.cmd_txt.text_length - 1, true,
1443 cur_cmd = vec->v;
1450 int cmd_length = cur_cmd->x.cmd_txt.text_length;
1460 cur_cmd->x.cmd_txt.text[cmd_length - 1] = 0;
1461 pipe_fp = popen(cur_cmd->x.cmd_txt.text, "r");
1535 output_line(cur_cmd->x.cmd_txt.text,
1536 cur_cmd->x.cmd_txt.text_length - 1,
1541 do_list(cur_cmd->x.int_arg == -1
1543 : cur_cmd->x.int_arg);
1549 cur_cmd->x.int_arg == -1
1551 : cur_cmd->x.int_arg,
1594 return cur_cmd->x.int_arg == -1 ? 0 : cur_cmd->x.int_arg;
1597 if (cur_cmd->x.fname)
1600 aq->fname = cur_cmd->x.fname;
1605 if (cur_cmd->x.fp && !feof (cur_cmd->x.fp))
1612 result = ck_getline (&text, &buflen, cur_cmd->x.fp);
1624 do_subst(cur_cmd->x.cmd_subst);
1631 cur_cmd = vec->v + cur_cmd->x.jump_index;
1639 cur_cmd = vec->v + cur_cmd->x.jump_index;
1647 if (cur_cmd->x.fp)
1649 line.chomped, cur_cmd->x.outf);
1653 if (cur_cmd->x.fp)
1657 p ? true : line.chomped, cur_cmd->x.outf);
1687 trans = cur_cmd->x.translatemb;
1741 *p = cur_cmd->x.translate[*p];
1758 panic("INTERNAL ERROR: Bad cmd %c", cur_cmd->cmd);
1778 if (cur_cmd->a1->addr_type == ADDR_IS_NUM
1779 && (cur_cmd->a2
1780 ? cur_cmd->range_state == RANGE_CLOSED
1781 : cur_cmd->a1->addr_number < input->line_number))
1784 cur_cmd->addr_bang = !cur_cmd->addr_bang;
1785 cur_cmd->a1->addr_type = ADDR_IS_NULL;
1786 if (cur_cmd->a2)
1787 cur_cmd->a2->addr_type = ADDR_IS_NULL;
1790 if (cur_cmd->addr_bang)
1792 if (cur_cmd->cmd == 'b' || cur_cmd->cmd == 't'
1793 || cur_cmd->cmd == 'T' || cur_cmd->cmd == '}')
1796 cur_cmd->cmd = '#'; /* replace with no-op */
1798 cur_cmd = shrink_program(vec, cur_cmd);
1799 if (!cur_cmd && no_default_output)
1802 if (!cur_cmd)
1803 cur_cmd = end_cmd;
1811 ++cur_cmd;