summaryrefslogtreecommitdiff
path: root/editors/sed.c
diff options
context:
space:
mode:
authorEric Andersen2005-04-16 19:39:00 +0000
committerEric Andersen2005-04-16 19:39:00 +0000
commit14f5c8d764ab7429367feb407ab86191054e6a8a (patch)
tree2aa792b8a9d8f7af365c456f19f34a963236c26d /editors/sed.c
parenta77b4f39708306d44058d7ca1683f448f51c5fce (diff)
downloadbusybox-14f5c8d764ab7429367feb407ab86191054e6a8a.zip
busybox-14f5c8d764ab7429367feb407ab86191054e6a8a.tar.gz
Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
Diffstat (limited to 'editors/sed.c')
-rw-r--r--editors/sed.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/editors/sed.c b/editors/sed.c
index db364e3..7950b93 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -116,18 +116,18 @@ typedef struct sed_cmd_s {
/* globals */
/* options */
static int be_quiet, in_place, regex_type;
-FILE *nonstdout;
-char *outname,*hold_space;
+static FILE *nonstdout;
+static char *outname,*hold_space;
/* List of input files */
-int input_file_count,current_input_file;
-FILE **input_file_list;
+static int input_file_count,current_input_file;
+static FILE **input_file_list;
static const char bad_format_in_subst[] =
"bad format in substitution expression";
-const char *const semicolon_whitespace = "; \n\r\t\v";
+static const char *const semicolon_whitespace = "; \n\r\t\v";
-regmatch_t regmatch[10];
+static regmatch_t regmatch[10];
static regex_t *previous_regex_ptr;
/* linked list of sed commands */
@@ -135,11 +135,11 @@ static sed_cmd_t sed_cmd_head;
static sed_cmd_t *sed_cmd_tail = &sed_cmd_head;
/* Linked list of append lines */
-struct append_list {
+static struct append_list {
char *string;
struct append_list *next;
};
-struct append_list *append_head=NULL, *append_tail=NULL;
+static struct append_list *append_head=NULL, *append_tail=NULL;
#ifdef CONFIG_FEATURE_CLEAN_UP
static void free_and_close_stuff(void)
@@ -482,7 +482,7 @@ static char *parse_cmd_args(sed_cmd_t *sed_cmd, char *cmdstr)
/* Parse address+command sets, skipping comment lines. */
-void add_cmd(char *cmdstr)
+static void add_cmd(char *cmdstr)
{
static char *add_cmd_line=NULL;
sed_cmd_t *sed_cmd;
@@ -576,7 +576,7 @@ void add_cmd(char *cmdstr)
/* Append to a string, reallocating memory as necessary. */
-struct pipeline {
+static struct pipeline {
char *buf; /* Space to hold string */
int idx; /* Space used */
int len; /* Space allocated */
@@ -584,7 +584,7 @@ struct pipeline {
#define PIPE_GROW 64
-void pipe_putc(char c)
+static void pipe_putc(char c)
{
if(pipeline.idx==pipeline.len) {
pipeline.buf = xrealloc(pipeline.buf, pipeline.len + PIPE_GROW);
@@ -729,7 +729,7 @@ static void flush_append(void)
append_head=append_tail=NULL;
}
-void add_input_file(FILE *file)
+static void add_input_file(FILE *file)
{
input_file_list=xrealloc(input_file_list,(input_file_count+1)*sizeof(FILE *));
input_file_list[input_file_count++]=file;