summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed/defs.h
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2009-05-25 06:45:33 +0000
committerbrian <brian@FreeBSD.org>2009-05-25 06:45:33 +0000
commitd2e1d02aee4f88f94d6a339f0bea9c50a8021d9d (patch)
tree58c15e354139e133c3610f654c7ea9a645df5a89 /usr.bin/sed/defs.h
parent94f304cdb00fc25cb6b7e8d5b0d6e292aae7e244 (diff)
downloadFreeBSD-src-d2e1d02aee4f88f94d6a339f0bea9c50a8021d9d.zip
FreeBSD-src-d2e1d02aee4f88f94d6a339f0bea9c50a8021d9d.tar.gz
Implement "addr1,+N" ranges - not dissimilar to grep's -A switch.
PR: 134856 Submitted by: Jeremie Le Hen - jeremie at le-hen dot org
Diffstat (limited to 'usr.bin/sed/defs.h')
-rw-r--r--usr.bin/sed/defs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/sed/defs.h b/usr.bin/sed/defs.h
index 895e719..d4f434e 100644
--- a/usr.bin/sed/defs.h
+++ b/usr.bin/sed/defs.h
@@ -38,8 +38,9 @@
* Types of address specifications
*/
enum e_atype {
- AT_RE, /* Line that match RE */
+ AT_RE = 1, /* Line that match RE */
AT_LINE, /* Specific line */
+ AT_RELLINE, /* Relative line */
AT_LAST, /* Last line */
};
@@ -91,6 +92,7 @@ struct s_tr {
struct s_command {
struct s_command *next; /* Pointer to next command */
struct s_addr *a1, *a2; /* Start and end address */
+ u_long startline; /* Start line number or zero */
char *t; /* Text for : a c i r w */
union {
struct s_command *c; /* Command(s) for b t { */
@@ -100,7 +102,6 @@ struct s_command {
} u;
char code; /* Command code */
u_int nonsel:1; /* True if ! */
- u_int inrange:1; /* True if in range */
};
/*
OpenPOWER on IntegriCloud