Date: Sun, 1 Jan 2012 22:17:12 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r229220 - head/bin/sh Message-ID: <201201012217.q01MHCpN033556@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun Jan 1 22:17:12 2012 New Revision: 229220 URL: http://svn.freebsd.org/changeset/base/229220 Log: sh: Make various functions static. Modified: head/bin/sh/exec.c head/bin/sh/exec.h head/bin/sh/expand.c head/bin/sh/expand.h head/bin/sh/histedit.c head/bin/sh/input.c head/bin/sh/input.h head/bin/sh/main.c head/bin/sh/main.h head/bin/sh/myhistedit.h Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/exec.c Sun Jan 1 22:17:12 2012 (r229220) @@ -100,6 +100,7 @@ static void tryexec(char *, char **, cha 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; Modified: head/bin/sh/exec.h ============================================================================== --- head/bin/sh/exec.h Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/exec.h Sun Jan 1 22:17:12 2012 (r229220) @@ -70,7 +70,6 @@ void find_command(const char *, struct c 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 *); Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/expand.c Sun Jan 1 22:17:12 2012 (r229220) @@ -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 c * 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; Modified: head/bin/sh/expand.h ============================================================================== --- head/bin/sh/expand.h Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/expand.h Sun Jan 1 22:17:12 2012 (r229220) @@ -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 *); Modified: head/bin/sh/histedit.c ============================================================================== --- head/bin/sh/histedit.c Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/histedit.c Sun Jan 1 22:17:12 2012 (r229220) @@ -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 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; Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/input.c Sun Jan 1 22:17:12 2012 (r229220) @@ -106,6 +106,7 @@ EditLine *el; /* cookie for editline p 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; Modified: head/bin/sh/input.h ============================================================================== --- head/bin/sh/input.h Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/input.h Sun Jan 1 22:17:12 2012 (r229220) @@ -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); Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/main.c Sun Jan 1 22:17:12 2012 (r229220) @@ -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 befo * loop; it turns on prompting if the shell is interactive. */ -void +static void cmdloop(int top) { union node *n; Modified: head/bin/sh/main.h ============================================================================== --- head/bin/sh/main.h Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/main.h Sun Jan 1 22:17:12 2012 (r229220) @@ -38,4 +38,3 @@ extern int rootshell; /* true if we aren extern struct jmploc main_handler; /* top level exception handler */ void readcmdfile(const char *); -void cmdloop(int); Modified: head/bin/sh/myhistedit.h ============================================================================== --- head/bin/sh/myhistedit.h Sun Jan 1 22:15:38 2012 (r229219) +++ head/bin/sh/myhistedit.h Sun Jan 1 22:17:12 2012 (r229220) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201012217.q01MHCpN033556>