1
1

* cons.saver.c: Make all functions except main() static.

* mfmt.c (omain): Remove, it's unused.
Этот коммит содержится в:
Pavel Roskin 2001-06-07 19:28:03 +00:00
родитель f76fdaf75a
Коммит c4c5f40a87
3 изменённых файлов: 11 добавлений и 43 удалений

Просмотреть файл

@ -1,3 +1,8 @@
2001-06-07 Pavel Roskin <proski@gnu.org>
* cons.saver.c: Make all functions except main() static.
* mfmt.c (omain): Remove, it's unused.
2001-06-06 Pavel Roskin <proski@gnu.org>
* main.c (done_mc) [HAVE_X]: Don't use xterm_flag.

Просмотреть файл

@ -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;

Просмотреть файл

@ -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)
{