diff --git a/src/ChangeLog b/src/ChangeLog index 8e9b728c3..70764e096 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-06-07 Pavel Roskin + + * cons.saver.c: Make all functions except main() static. + * mfmt.c (omain): Remove, it's unused. + 2001-06-06 Pavel Roskin * main.c (done_mc) [HAVE_X]: Don't use xterm_flag. diff --git a/src/cons.saver.c b/src/cons.saver.c index 735d6da5b..1d5e5c25f 100644 --- a/src/cons.saver.c +++ b/src/cons.saver.c @@ -94,7 +94,7 @@ static void tty_getsize () } } -inline void tty_cursormove(int y, int x) +static inline void tty_cursormove(int y, int x) { char buffer [128]; @@ -103,7 +103,7 @@ inline void tty_cursormove(int y, int x) dwrite (console_fd, buffer); } -int check_file (char *filename, int check_console, char **msg) +static int check_file (char *filename, int check_console, char **msg) { int fd; struct stat stat_buf; @@ -160,7 +160,7 @@ int check_file (char *filename, int check_console, char **msg) /* Because the name of the tty is supplied by the user and this can be a setuid program a lot of checks has to done to avoid creating a security hole */ -char *detect_console (void) +static char *detect_console (void) { char *msg; int xlen; @@ -198,7 +198,7 @@ char *detect_console (void) return NULL; } -void save_console (void) +static void save_console (void) { int i; @@ -249,7 +249,7 @@ void save_console (void) } } -void restore_console (void) +static void restore_console (void) { if (!console_flag) return; @@ -274,7 +274,7 @@ void restore_console (void) } } -void send_contents () +static void send_contents () { unsigned char begin_line=0, end_line=0; int index, x, y; diff --git a/src/mfmt.c b/src/mfmt.c index ac7e363a4..a0a8db224 100644 --- a/src/mfmt.c +++ b/src/mfmt.c @@ -15,43 +15,6 @@ enum states { seen_m }; -void -omain (void) -{ - enum states state = header; - int prev = 0; - int c; - - while ((c = getchar ()) != EOF){ - if (c != '\n'){ - switch (state){ - case header: - putchar ('_'); - putchar ('\b'); - break; - - case definition: - putchar (c); - putchar ('\b'); - break; - default: - break; /* inhibit compiler warnings */ - } - } - putchar (c); - if ((state != plain) && c == ':') - state = definition; - - if (c == '\n' && prev == '\n') - state = plain; - - if (state == definition && c == '\n') - state = header; - - prev = c; - } -} - int main (void) {