Home | History | Annotate | Download | only in sed

Lines Matching refs:cur_cmd

845   struct sed_cmd *cur_cmd;
848 for (cur_cmd = vec->v, n = vec->v_length; n--; cur_cmd++)
849 if (cur_cmd->a1
850 && cur_cmd->a1->addr_type == ADDR_IS_NUM
851 && cur_cmd->a1->addr_number == 0)
852 cur_cmd->range_state = RANGE_ACTIVE;
854 cur_cmd->range_state = RANGE_INACTIVE;
1346 struct sed_cmd *cur_cmd = program->v;
1352 switch (cur_cmd->cmd)
1366 shrink_program(vec, cur_cmd)
1368 struct sed_cmd *cur_cmd;
1375 for (p=v; p < cur_cmd; ++p)
1397 struct sed_cmd *cur_cmd;
1400 cur_cmd = vec->v;
1402 while (cur_cmd < end_cmd)
1404 if (match_address_p(cur_cmd, input) != cur_cmd->addr_bang)
1406 switch (cur_cmd->cmd)
1411 aq->text = cur_cmd->x.cmd_txt.text;
1412 aq->textlen = cur_cmd->x.cmd_txt.text_length;
1418 cur_cmd = vec->v + cur_cmd->x.jump_index;
1428 if (cur_cmd->range_state != RANGE_ACTIVE)
1429 output_line(cur_cmd->x.cmd_txt.text,
1430 cur_cmd->x.cmd_txt.text_length - 1, true,
1450 cur_cmd = vec->v;
1457 int cmd_length = cur_cmd->x.cmd_txt.text_length;
1467 cur_cmd->x.cmd_txt.text[cmd_length - 1] = 0;
1468 pipe_fp = popen(cur_cmd->x.cmd_txt.text, "r");
1542 output_line(cur_cmd->x.cmd_txt.text,
1543 cur_cmd->x.cmd_txt.text_length - 1,
1548 do_list(cur_cmd->x.int_arg == -1
1550 : cur_cmd->x.int_arg);
1556 cur_cmd->x.int_arg == -1
1558 : cur_cmd->x.int_arg,
1601 return cur_cmd->x.int_arg == -1 ? 0 : cur_cmd->x.int_arg;
1604 if (cur_cmd->x.fname)
1607 aq->fname = cur_cmd->x.fname;
1612 if (cur_cmd->x.fp && !feof (cur_cmd->x.fp))
1619 result = ck_getline (&text, &buflen, cur_cmd->x.fp);
1631 do_subst(cur_cmd->x.cmd_subst);
1638 cur_cmd = vec->v + cur_cmd->x.jump_index;
1646 cur_cmd = vec->v + cur_cmd->x.jump_index;
1654 if (cur_cmd->x.fp)
1656 line.chomped, cur_cmd->x.outf);
1660 if (cur_cmd->x.fp)
1664 p ? true : line.chomped, cur_cmd->x.outf);
1694 trans = cur_cmd->x.translatemb;
1748 *p = cur_cmd->x.translate[*p];
1765 panic("INTERNAL ERROR: Bad cmd %c", cur_cmd->cmd);
1785 if (cur_cmd->a1->addr_type == ADDR_IS_NUM
1786 && (cur_cmd->a2
1787 ? cur_cmd->range_state == RANGE_CLOSED
1788 : cur_cmd->a1->addr_number < input->line_number))
1791 cur_cmd->addr_bang = !cur_cmd->addr_bang;
1792 cur_cmd->a1->addr_type = ADDR_IS_NULL;
1793 if (cur_cmd->a2)
1794 cur_cmd->a2->addr_type = ADDR_IS_NULL;
1797 if (cur_cmd->addr_bang)
1799 if (cur_cmd->cmd == 'b' || cur_cmd->cmd == 't'
1800 || cur_cmd->cmd == 'T' || cur_cmd->cmd == '}')
1803 cur_cmd->cmd = '#'; /* replace with no-op */
1805 cur_cmd = shrink_program(vec, cur_cmd);
1806 if (!cur_cmd && no_default_output)
1809 if (!cur_cmd)
1810 cur_cmd = end_cmd;
1818 ++cur_cmd;