Mark local functions as static

This helps to catch unused functions like the former mosh_read_line,
allows the compiler to make better inlining decisions, and reduces the
binary size a bit.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2014-04-23 16:31:27 -04:00
committed by John Hood
parent a52b095f50
commit cd2ae36f36
7 changed files with 88 additions and 88 deletions
+6 -6
View File
@@ -63,9 +63,9 @@
const size_t buf_size = 1024;
void emulate_terminal( int fd );
int copy( int src, int dest );
int vt_parser( int fd, Parser::UTF8Parser *parser );
static void emulate_terminal( int fd );
static int copy( int src, int dest );
static int vt_parser( int fd, Parser::UTF8Parser *parser );
int main( int argc __attribute__((unused)),
char *argv[] __attribute__((unused)),
@@ -135,7 +135,7 @@ int main( int argc __attribute__((unused)),
return 0;
}
void emulate_terminal( int fd )
static void emulate_terminal( int fd )
{
Parser::UTF8Parser parser;
@@ -166,7 +166,7 @@ void emulate_terminal( int fd )
}
}
int copy( int src, int dest )
static int copy( int src, int dest )
{
char buf[ buf_size ];
@@ -181,7 +181,7 @@ int copy( int src, int dest )
return swrite( dest, buf, bytes_read );
}
int vt_parser( int fd, Parser::UTF8Parser *parser )
static int vt_parser( int fd, Parser::UTF8Parser *parser )
{
char buf[ buf_size ];