summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2012-01-01 22:17:12 +0000
committerjilles <jilles@FreeBSD.org>2012-01-01 22:17:12 +0000
commit8152f4c1927b535528fef82bc9449a9ffcfbfae5 (patch)
treec9bf6a1be78ff3a781bf9a2df71ecff91e72ee4f /bin/sh
parentbbd60abdf3ff8bb1ab2fbb59c1a4df2ee213f69e (diff)
downloadFreeBSD-src-8152f4c1927b535528fef82bc9449a9ffcfbfae5.zip
FreeBSD-src-8152f4c1927b535528fef82bc9449a9ffcfbfae5.tar.gz
sh: Make various functions static.
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/exec.c3
-rw-r--r--bin/sh/exec.h1
-rw-r--r--bin/sh/expand.c3
-rw-r--r--bin/sh/expand.h1
-rw-r--r--bin/sh/histedit.c6
-rw-r--r--bin/sh/input.c3
-rw-r--r--bin/sh/input.h1
-rw-r--r--bin/sh/main.c3
-rw-r--r--bin/sh/main.h1
-rw-r--r--bin/sh/myhistedit.h2
10 files changed, 12 insertions, 12 deletions
diff --git a/bin/sh/exec.c b/bin/sh/exec.c
index 044fc30..468f940 100644
--- a/bin/sh/exec.c
+++ b/bin/sh/exec.c
@@ -100,6 +100,7 @@ static void tryexec(char *, char **, char **);
static void printentry(struct tblentry *, int);
static struct tblentry *cmdlookup(const char *, int);
static void delete_cmd_entry(void);
+static void addcmdentry(const char *, struct cmdentry *);
@@ -593,7 +594,7 @@ delete_cmd_entry(void)
* the same name.
*/
-void
+static void
addcmdentry(const char *name, struct cmdentry *entry)
{
struct tblentry *cmdp;
diff --git a/bin/sh/exec.h b/bin/sh/exec.h
index 31f11c0..0948421 100644
--- a/bin/sh/exec.h
+++ b/bin/sh/exec.h
@@ -70,7 +70,6 @@ void find_command(const char *, struct cmdentry *, int, const char *);
int find_builtin(const char *, int *);
void hashcd(void);
void changepath(const char *);
-void addcmdentry(const char *, struct cmdentry *);
void defun(const char *, union node *);
int unsetfunc(const char *);
int typecmd_impl(int, char **, int, const char *);
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index 197be7e..d43cc35 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -113,6 +113,7 @@ static void expmeta(char *, char *);
static void addfname(char *);
static struct strlist *expsort(struct strlist *);
static struct strlist *msort(struct strlist *, int);
+static int patmatch(const char *, const char *, int);
static char *cvtnum(int, char *);
static int collate_range_cmp(wchar_t, wchar_t);
@@ -1441,7 +1442,7 @@ match_charclass(const char *p, wchar_t chr, const char **end)
* Returns true if the pattern matches the string.
*/
-int
+static int
patmatch(const char *pattern, const char *string, int squoted)
{
const char *p, *q, *end;
diff --git a/bin/sh/expand.h b/bin/sh/expand.h
index 5029552..8114e2b 100644
--- a/bin/sh/expand.h
+++ b/bin/sh/expand.h
@@ -60,6 +60,5 @@ union node;
void expandhere(union node *, int);
void expandarg(union node *, struct arglist *, int);
void expari(int);
-int patmatch(const char *, const char *, int);
void rmescapes(char *);
int casematch(union node *, const char *);
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c
index 4619baf..e29bcab 100644
--- a/bin/sh/histedit.c
+++ b/bin/sh/histedit.c
@@ -70,6 +70,8 @@ int displayhist;
static FILE *el_in, *el_out, *el_err;
static char *fc_replace(const char *, char *, char *);
+static int not_fcnumber(const char *);
+static int str_to_event(const char *, int);
/*
* Set history and editing status. Called whenever the status may
@@ -425,7 +427,7 @@ fc_replace(const char *s, char *p, char *r)
return (dest);
}
-int
+static int
not_fcnumber(const char *s)
{
if (s == NULL)
@@ -435,7 +437,7 @@ not_fcnumber(const char *s)
return (!is_number(s));
}
-int
+static int
str_to_event(const char *str, int last)
{
HistEvent he;
diff --git a/bin/sh/input.c b/bin/sh/input.c
index c8b1a45..671bbdf 100644
--- a/bin/sh/input.c
+++ b/bin/sh/input.c
@@ -106,6 +106,7 @@ EditLine *el; /* cookie for editline package */
static void pushfile(void);
static int preadfd(void);
+static void popstring(void);
#ifdef mkinit
INCLUDE "input.h"
@@ -372,7 +373,7 @@ pushstring(char *s, int len, void *ap)
INTON;
}
-void
+static void
popstring(void)
{
struct strpush *sp = parsefile->strpush;
diff --git a/bin/sh/input.h b/bin/sh/input.h
index abbb2ce..92aba45 100644
--- a/bin/sh/input.h
+++ b/bin/sh/input.h
@@ -53,7 +53,6 @@ int preadbuffer(void);
int preadateof(void);
void pungetc(void);
void pushstring(char *, int, void *);
-void popstring(void);
void setinputfile(const char *, int);
void setinputfd(int, int);
void setinputstring(char *, int);
diff --git a/bin/sh/main.c b/bin/sh/main.c
index e6c8a20..5eb12e0 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -79,6 +79,7 @@ int rootshell;
struct jmploc main_handler;
int localeisutf8, initial_localeisutf8;
+static void cmdloop(int);
static void read_profile(char *);
static char *find_dot_file(char *);
@@ -184,7 +185,7 @@ state4: /* XXX ??? - why isn't this before the "if" statement */
* loop; it turns on prompting if the shell is interactive.
*/
-void
+static void
cmdloop(int top)
{
union node *n;
diff --git a/bin/sh/main.h b/bin/sh/main.h
index 6d4cc4a..3c48e33 100644
--- a/bin/sh/main.h
+++ b/bin/sh/main.h
@@ -38,4 +38,3 @@ extern int rootshell; /* true if we aren't a child of the main shell */
extern struct jmploc main_handler; /* top level exception handler */
void readcmdfile(const char *);
-void cmdloop(int);
diff --git a/bin/sh/myhistedit.h b/bin/sh/myhistedit.h
index 9a649ec..e31276d 100644
--- a/bin/sh/myhistedit.h
+++ b/bin/sh/myhistedit.h
@@ -39,6 +39,4 @@ extern int displayhist;
void histedit(void);
void sethistsize(const char *);
void setterm(const char *);
-int not_fcnumber(const char *);
-int str_to_event(const char *, int);
OpenPOWER on IntegriCloud