[commit: ghc] master: unlit: mark local functions as 'static' (f1f5837)
git at git.haskell.org
git at git.haskell.org
Sun Feb 7 15:00:24 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f1f583799af4e1d14c9c1e95605b30ea5a71c76d/ghc
>---------------------------------------------------------------
commit f1f583799af4e1d14c9c1e95605b30ea5a71c76d
Author: Sergei Trofimovich <siarheit at google.com>
Date: Sun Feb 7 09:10:54 2016 +0000
unlit: mark local functions as 'static'
Found by uselex.rb:
complain: [R]: exported from: ./utils/unlit/dist/build/unlit.o
egetc: [R]: exported from: ./utils/unlit/dist/build/unlit.o
myputc: [R]: exported from: ./utils/unlit/dist/build/unlit.o
readline: [R]: exported from: ./utils/unlit/dist/build/unlit.o
unlit: [R]: exported from: ./utils/unlit/dist/build/unlit.o
writeerror: [R]: exported from: ./utils/unlit/dist/build/unlit.o
Signed-off-by: Sergei Trofimovich <siarheit at google.com>
>---------------------------------------------------------------
f1f583799af4e1d14c9c1e95605b30ea5a71c76d
utils/unlit/unlit.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/utils/unlit/unlit.c b/utils/unlit/unlit.c
index 4ae64d3..c0e3b98 100644
--- a/utils/unlit/unlit.c
+++ b/utils/unlit/unlit.c
@@ -91,7 +91,7 @@ static char *ofilename = NULL;
* if noisy is not set.
*/
-void complain(char *file, int lin, char *what)
+static void complain(char *file, int lin, char *what)
{
if (noisy) {
if (file)
@@ -101,7 +101,7 @@ void complain(char *file, int lin, char *what)
}
}
-void writeerror(void)
+static void writeerror(void)
{
if (!strcmp(ofilename,"-")) {
fprintf(stderr, CANNOTWRITESTDOUT);
@@ -111,7 +111,7 @@ void writeerror(void)
exit(1);
}
-void myputc(char c, FILE *ostream)
+static void myputc(char c, FILE *ostream)
{
if (putc(c,ostream) == EOF) {
writeerror();
@@ -121,8 +121,7 @@ void myputc(char c, FILE *ostream)
#define TABPOS 8
/* As getc, but does TAB expansion */
-int
-egetc(FILE *istream)
+static int egetc(FILE *istream)
{
static int spleft = 0;
static int linepos = 0;
@@ -171,7 +170,7 @@ egetc(FILE *istream)
* stream.
*/
-line readline(FILE *istream, FILE *ostream) {
+static line readline(FILE *istream, FILE *ostream) {
int c, c1;
char buf[100];
int i;
@@ -246,7 +245,7 @@ line readline(FILE *istream, FILE *ostream) {
* - there should be at least one DEFN line in a script.
*/
-void unlit(char *file, FILE *istream, FILE *ostream)
+static void unlit(char *file, FILE *istream, FILE *ostream)
{
line last, this=START;
int linesread=0;
More information about the ghc-commits
mailing list