svn commit: r231790 - stable/9/bin/sh

Jilles Tjoelker jilles at FreeBSD.org
Wed Feb 15 22:45:58 UTC 2012


Author: jilles
Date: Wed Feb 15 22:45:57 2012
New Revision: 231790
URL: http://svn.freebsd.org/changeset/base/231790

Log:
  MFC r229220: sh: Make various functions static.

Modified:
  stable/9/bin/sh/exec.c
  stable/9/bin/sh/exec.h
  stable/9/bin/sh/expand.c
  stable/9/bin/sh/expand.h
  stable/9/bin/sh/histedit.c
  stable/9/bin/sh/input.c
  stable/9/bin/sh/input.h
  stable/9/bin/sh/main.c
  stable/9/bin/sh/main.h
  stable/9/bin/sh/myhistedit.h
Directory Properties:
  stable/9/bin/sh/   (props changed)

Modified: stable/9/bin/sh/exec.c
==============================================================================
--- stable/9/bin/sh/exec.c	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/exec.c	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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: stable/9/bin/sh/exec.h
==============================================================================
--- stable/9/bin/sh/exec.h	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/exec.h	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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: stable/9/bin/sh/expand.c
==============================================================================
--- stable/9/bin/sh/expand.c	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/expand.c	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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);
 
@@ -1435,7 +1436,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: stable/9/bin/sh/expand.h
==============================================================================
--- stable/9/bin/sh/expand.h	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/expand.h	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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: stable/9/bin/sh/histedit.c
==============================================================================
--- stable/9/bin/sh/histedit.c	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/histedit.c	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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: stable/9/bin/sh/input.c
==============================================================================
--- stable/9/bin/sh/input.c	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/input.c	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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: stable/9/bin/sh/input.h
==============================================================================
--- stable/9/bin/sh/input.h	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/input.h	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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: stable/9/bin/sh/main.c
==============================================================================
--- stable/9/bin/sh/main.c	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/main.c	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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: stable/9/bin/sh/main.h
==============================================================================
--- stable/9/bin/sh/main.h	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/main.h	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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: stable/9/bin/sh/myhistedit.h
==============================================================================
--- stable/9/bin/sh/myhistedit.h	Wed Feb 15 22:35:30 2012	(r231789)
+++ stable/9/bin/sh/myhistedit.h	Wed Feb 15 22:45:57 2012	(r231790)
@@ -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);
 


More information about the svn-src-stable-9 mailing list