summaryrefslogtreecommitdiffstats
path: root/bin/ed/sub.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-02-02 06:36:49 +0000
committerimp <imp@FreeBSD.org>2002-02-02 06:36:49 +0000
commit3fc8df52e3856eeac730574d5ae122806dd1e1ef (patch)
tree331e1d7f986e20bcd52361067fc4b66cab14b048 /bin/ed/sub.c
parent5203a0a465a65bd5e6e40b6364bb0dbe05feb7cf (diff)
downloadFreeBSD-src-3fc8df52e3856eeac730574d5ae122806dd1e1ef.zip
FreeBSD-src-3fc8df52e3856eeac730574d5ae122806dd1e1ef.tar.gz
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o gc some #ifdef sun ... #endif code Approved by: arch@, new style(9)
Diffstat (limited to 'bin/ed/sub.c')
-rw-r--r--bin/ed/sub.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/bin/ed/sub.c b/bin/ed/sub.c
index 1d53848..b8d215b 100644
--- a/bin/ed/sub.c
+++ b/bin/ed/sub.c
@@ -40,9 +40,7 @@ int rhbufi; /* rhs substitution buffer index */
/* extract_subst_tail: extract substitution tail from the command buffer */
int
-extract_subst_tail(flagp, np)
- int *flagp;
- long *np;
+extract_subst_tail(int *flagp, long *np)
{
char delimiter;
@@ -73,7 +71,7 @@ extract_subst_tail(flagp, np)
/* extract_subst_template: return pointer to copy of substitution template
in the command buffer */
char *
-extract_subst_template()
+extract_subst_template(void)
{
int n = 0;
int i = 0;
@@ -115,10 +113,7 @@ int rbufsz; /* substitute_matching_text buffer size */
/* search_and_replace: for each line in a range, change text matching a pattern
according to a substitution template; return status */
int
-search_and_replace(pat, gflag, kth)
- pattern_t *pat;
- int gflag;
- int kth;
+search_and_replace(pattern_t *pat, int gflag, int kth)
{
undo_t *up;
const char *txt;
@@ -172,11 +167,7 @@ search_and_replace(pat, gflag, kth)
/* substitute_matching_text: replace text matched by a pattern according to
a substitution template; return pointer to the modified text */
int
-substitute_matching_text(pat, lp, gflag, kth)
- pattern_t *pat;
- line_t *lp;
- int gflag;
- int kth;
+substitute_matching_text(pattern_t *pat, line_t *lp, int gflag, int kth)
{
int off = 0;
int changed = 0;
@@ -234,11 +225,7 @@ substitute_matching_text(pat, lp, gflag, kth)
/* apply_subst_template: modify text according to a substitution template;
return offset to end of modified text */
int
-apply_subst_template(boln, rm, off, re_nsub)
- const char *boln;
- regmatch_t *rm;
- int off;
- int re_nsub;
+apply_subst_template(const char *boln, regmatch_t *rm, int off, int re_nsub)
{
int j = 0;
int k = 0;
OpenPOWER on IntegriCloud