diff options
author | Eric Andersen <andersen@codepoet.org> | 2005-04-16 19:39:00 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2005-04-16 19:39:00 +0000 |
commit | 14f5c8d764ab7429367feb407ab86191054e6a8a (patch) | |
tree | 2aa792b8a9d8f7af365c456f19f34a963236c26d /editors | |
parent | a77b4f39708306d44058d7ca1683f448f51c5fce (diff) | |
download | busybox-w32-14f5c8d764ab7429367feb407ab86191054e6a8a.tar.gz busybox-w32-14f5c8d764ab7429367feb407ab86191054e6a8a.tar.bz2 busybox-w32-14f5c8d764ab7429367feb407ab86191054e6a8a.zip |
Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/editors/sed.c b/editors/sed.c index db364e3ee..7950b9303 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -116,18 +116,18 @@ typedef struct sed_cmd_s { | |||
116 | /* globals */ | 116 | /* globals */ |
117 | /* options */ | 117 | /* options */ |
118 | static int be_quiet, in_place, regex_type; | 118 | static int be_quiet, in_place, regex_type; |
119 | FILE *nonstdout; | 119 | static FILE *nonstdout; |
120 | char *outname,*hold_space; | 120 | static char *outname,*hold_space; |
121 | 121 | ||
122 | /* List of input files */ | 122 | /* List of input files */ |
123 | int input_file_count,current_input_file; | 123 | static int input_file_count,current_input_file; |
124 | FILE **input_file_list; | 124 | static FILE **input_file_list; |
125 | 125 | ||
126 | static const char bad_format_in_subst[] = | 126 | static const char bad_format_in_subst[] = |
127 | "bad format in substitution expression"; | 127 | "bad format in substitution expression"; |
128 | const char *const semicolon_whitespace = "; \n\r\t\v"; | 128 | static const char *const semicolon_whitespace = "; \n\r\t\v"; |
129 | 129 | ||
130 | regmatch_t regmatch[10]; | 130 | static regmatch_t regmatch[10]; |
131 | static regex_t *previous_regex_ptr; | 131 | static regex_t *previous_regex_ptr; |
132 | 132 | ||
133 | /* linked list of sed commands */ | 133 | /* linked list of sed commands */ |
@@ -135,11 +135,11 @@ static sed_cmd_t sed_cmd_head; | |||
135 | static sed_cmd_t *sed_cmd_tail = &sed_cmd_head; | 135 | static sed_cmd_t *sed_cmd_tail = &sed_cmd_head; |
136 | 136 | ||
137 | /* Linked list of append lines */ | 137 | /* Linked list of append lines */ |
138 | struct append_list { | 138 | static struct append_list { |
139 | char *string; | 139 | char *string; |
140 | struct append_list *next; | 140 | struct append_list *next; |
141 | }; | 141 | }; |
142 | struct append_list *append_head=NULL, *append_tail=NULL; | 142 | static struct append_list *append_head=NULL, *append_tail=NULL; |
143 | 143 | ||
144 | #ifdef CONFIG_FEATURE_CLEAN_UP | 144 | #ifdef CONFIG_FEATURE_CLEAN_UP |
145 | static void free_and_close_stuff(void) | 145 | static void free_and_close_stuff(void) |
@@ -482,7 +482,7 @@ static char *parse_cmd_args(sed_cmd_t *sed_cmd, char *cmdstr) | |||
482 | 482 | ||
483 | /* Parse address+command sets, skipping comment lines. */ | 483 | /* Parse address+command sets, skipping comment lines. */ |
484 | 484 | ||
485 | void add_cmd(char *cmdstr) | 485 | static void add_cmd(char *cmdstr) |
486 | { | 486 | { |
487 | static char *add_cmd_line=NULL; | 487 | static char *add_cmd_line=NULL; |
488 | sed_cmd_t *sed_cmd; | 488 | sed_cmd_t *sed_cmd; |
@@ -576,7 +576,7 @@ void add_cmd(char *cmdstr) | |||
576 | 576 | ||
577 | /* Append to a string, reallocating memory as necessary. */ | 577 | /* Append to a string, reallocating memory as necessary. */ |
578 | 578 | ||
579 | struct pipeline { | 579 | static struct pipeline { |
580 | char *buf; /* Space to hold string */ | 580 | char *buf; /* Space to hold string */ |
581 | int idx; /* Space used */ | 581 | int idx; /* Space used */ |
582 | int len; /* Space allocated */ | 582 | int len; /* Space allocated */ |
@@ -584,7 +584,7 @@ struct pipeline { | |||
584 | 584 | ||
585 | #define PIPE_GROW 64 | 585 | #define PIPE_GROW 64 |
586 | 586 | ||
587 | void pipe_putc(char c) | 587 | static void pipe_putc(char c) |
588 | { | 588 | { |
589 | if(pipeline.idx==pipeline.len) { | 589 | if(pipeline.idx==pipeline.len) { |
590 | pipeline.buf = xrealloc(pipeline.buf, pipeline.len + PIPE_GROW); | 590 | pipeline.buf = xrealloc(pipeline.buf, pipeline.len + PIPE_GROW); |
@@ -729,7 +729,7 @@ static void flush_append(void) | |||
729 | append_head=append_tail=NULL; | 729 | append_head=append_tail=NULL; |
730 | } | 730 | } |
731 | 731 | ||
732 | void add_input_file(FILE *file) | 732 | static void add_input_file(FILE *file) |
733 | { | 733 | { |
734 | input_file_list=xrealloc(input_file_list,(input_file_count+1)*sizeof(FILE *)); | 734 | input_file_list=xrealloc(input_file_list,(input_file_count+1)*sizeof(FILE *)); |
735 | input_file_list[input_file_count++]=file; | 735 | input_file_list[input_file_count++]=file; |