aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-04-16 19:39:00 +0000
committerEric Andersen <andersen@codepoet.org>2005-04-16 19:39:00 +0000
commit14f5c8d764ab7429367feb407ab86191054e6a8a (patch)
tree2aa792b8a9d8f7af365c456f19f34a963236c26d /editors
parenta77b4f39708306d44058d7ca1683f448f51c5fce (diff)
downloadbusybox-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.c24
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 */
118static int be_quiet, in_place, regex_type; 118static int be_quiet, in_place, regex_type;
119FILE *nonstdout; 119static FILE *nonstdout;
120char *outname,*hold_space; 120static char *outname,*hold_space;
121 121
122/* List of input files */ 122/* List of input files */
123int input_file_count,current_input_file; 123static int input_file_count,current_input_file;
124FILE **input_file_list; 124static FILE **input_file_list;
125 125
126static const char bad_format_in_subst[] = 126static const char bad_format_in_subst[] =
127 "bad format in substitution expression"; 127 "bad format in substitution expression";
128const char *const semicolon_whitespace = "; \n\r\t\v"; 128static const char *const semicolon_whitespace = "; \n\r\t\v";
129 129
130regmatch_t regmatch[10]; 130static regmatch_t regmatch[10];
131static regex_t *previous_regex_ptr; 131static 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;
135static sed_cmd_t *sed_cmd_tail = &sed_cmd_head; 135static sed_cmd_t *sed_cmd_tail = &sed_cmd_head;
136 136
137/* Linked list of append lines */ 137/* Linked list of append lines */
138struct append_list { 138static struct append_list {
139 char *string; 139 char *string;
140 struct append_list *next; 140 struct append_list *next;
141}; 141};
142struct append_list *append_head=NULL, *append_tail=NULL; 142static struct append_list *append_head=NULL, *append_tail=NULL;
143 143
144#ifdef CONFIG_FEATURE_CLEAN_UP 144#ifdef CONFIG_FEATURE_CLEAN_UP
145static void free_and_close_stuff(void) 145static 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
485void add_cmd(char *cmdstr) 485static 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
579struct pipeline { 579static 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
587void pipe_putc(char c) 587static 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
732void add_input_file(FILE *file) 732static 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;