diff options
author | Brian Somers <brian@FreeBSD.org> | 2009-05-25 06:45:33 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2009-05-25 06:45:33 +0000 |
commit | f879e8d923c1e491ef4446719df747367e06f3d5 (patch) | |
tree | 58c15e354139e133c3610f654c7ea9a645df5a89 /usr.bin/sed/defs.h | |
parent | e6e23ffecb19a2cd490a0fd8bfcd670a07767d34 (diff) | |
download | src-f879e8d923c1e491ef4446719df747367e06f3d5.tar.gz src-f879e8d923c1e491ef4446719df747367e06f3d5.zip |
Implement "addr1,+N" ranges - not dissimilar to grep's -A switch.
PR: 134856
Submitted by: Jeremie Le Hen - jeremie at le-hen dot org
Notes
Notes:
svn path=/head/; revision=192732
Diffstat (limited to 'usr.bin/sed/defs.h')
-rw-r--r-- | usr.bin/sed/defs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/sed/defs.h b/usr.bin/sed/defs.h index 895e719d47b0..d4f434ee84eb 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 */ }; /* |