sh: Make various functions static.

This commit is contained in:
Jilles Tjoelker 2012-01-01 22:17:12 +00:00
parent f6d3a9b03f
commit 260fc3f4d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229220
10 changed files with 12 additions and 12 deletions

View File

@ -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;

View File

@ -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 *);

View File

@ -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;

View File

@ -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 *);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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 @@ main(int argc, char *argv[])
* loop; it turns on prompting if the shell is interactive.
*/
void
static void
cmdloop(int top)
{
union node *n;

View File

@ -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);

View File

@ -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);