summaryrefslogtreecommitdiffstats
path: root/call
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-01-31 11:32:49 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-01-31 11:32:49 +0100
commit1de0ea4abd7153c6fcdbdbac6048a1e46f673fc2 (patch)
treec81a8d6c58fcee19cead9cce8122ec35342428b1 /call
parentaa1bfde879f3c5885199d7bb4720efaabff67d8c (diff)
Sort out variable and function declarations.
- Make static what can be made static. - Add declaration where they were missing. - Don't define variables in headers. - Move declaations to the proper locations. - Pick up declarations from the proper headers. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'call')
-rw-r--r--call/call.c34
-rw-r--r--call/crc.c2
-rw-r--r--call/dostime.c4
3 files changed, 23 insertions, 17 deletions
diff --git a/call/call.c b/call/call.c
index 7e96663..022f6a3 100644
--- a/call/call.c
+++ b/call/call.c
@@ -92,12 +92,12 @@ volatile int interrupted = FALSE;
static int sigwinchsignal;
int paclen;
int fd;
-int curson = 1;
+static int curson = 1;
-int wait_for_remote_disconnect = FALSE;
+static int wait_for_remote_disconnect = FALSE;
static struct timespec inactivity_timeout;
-int inactivity_timeout_is_set = FALSE;
-int remote_commands_enabled = TRUE;
+static int inactivity_timeout_is_set = FALSE;
+static int remote_commands_enabled = TRUE;
#define GP_FILENAME_SIZE 255
typedef struct {
@@ -817,7 +817,7 @@ static void cmd_intr(int sig)
interrupted = TRUE;
}
-WINDOW *opnstatw(int mode, wint * wintab, char *s, int lines, int cols)
+static WINDOW *opnstatw(int mode, wint * wintab, char *s, int lines, int cols)
{
WINDOW *win;
@@ -835,7 +835,7 @@ WINDOW *opnstatw(int mode, wint * wintab, char *s, int lines, int cols)
return win;
}
-void wrdstatw(WINDOW * win, char s[])
+static void wrdstatw(WINDOW * win, char s[])
{
int y;
@@ -850,7 +850,7 @@ void wrdstatw(WINDOW * win, char s[])
wrefresh(win);
}
-void dupdstatw(WINDOW * win, char *s, int add)
+static void dupdstatw(WINDOW * win, char *s, int add)
{
static char infostr[80];
static int y, x;
@@ -898,7 +898,7 @@ void dupdstatw(WINDOW * win, char *s, int add)
oldlen = strlen(s);
}
-int start_ab_download(int mode, WINDOW ** swin, wint * wintab,
+static int start_ab_download(int mode, WINDOW ** swin, wint * wintab,
char parms[], int parmsbytes, char buf[], int bytes,
t_gp * gp, char *address[])
{
@@ -1069,8 +1069,8 @@ int start_ab_download(int mode, WINDOW ** swin, wint * wintab,
return 0;
}
-int ab_down(int mode, WINDOW * swin, wint * wintab, char buf[], int *bytes,
- t_gp * gp)
+static int ab_down(int mode, WINDOW * swin, wint * wintab, char buf[],
+ int *bytes, t_gp * gp)
{
unsigned long extrach = 0;
char s[80];
@@ -1153,7 +1153,7 @@ int ab_down(int mode, WINDOW * swin, wint * wintab, char buf[], int *bytes,
return 0;
}
-int start_screen(char *call[])
+static int start_screen(char *call[])
{
int cnt;
char idString[12];
@@ -1186,7 +1186,7 @@ int start_screen(char *call[])
return 0;
}
-int start_slave_mode(wint * wintab, t_win * win_in, t_win * win_out)
+static int start_slave_mode(wint * wintab, t_win * win_in, t_win * win_out)
{
win_in->max_y = LINES - 2;
win_in->max_x = COLS;
@@ -1208,7 +1208,7 @@ int start_slave_mode(wint * wintab, t_win * win_in, t_win * win_out)
return 0;
}
-int start_talk_mode(wint * wintab, t_win * win_in, t_win * win_out)
+static int start_talk_mode(wint * wintab, t_win * win_in, t_win * win_out)
{
int cnt;
WINDOW *win;
@@ -1248,8 +1248,8 @@ int start_talk_mode(wint * wintab, t_win * win_in, t_win * win_out)
return 0;
}
-int change_mode(int oldmode, int newmode, wint * wintab, t_win * win_in,
- t_win * win_out, char *call[])
+static int change_mode(int oldmode, int newmode, wint * wintab,
+ t_win * win_in, t_win * win_out, char *call[])
{
switch (oldmode) {
case RAWMODE:
@@ -1762,7 +1762,8 @@ static int readoutg(t_win * win_out, wint * wintab, menuitem * top, char buf[],
return 0;
}
-void remotecommand(char buf[], int bytes)
+#if 0
+static void remotecommand(char buf[], int bytes)
{
int firstchar;
if (bytes == 0)
@@ -1785,6 +1786,7 @@ void remotecommand(char buf[], int bytes)
write(fd, "Unknown command\r", 16);
}
}
+#endif
static int compstr(const char st1[], char st2[], int maxbytes)
{
diff --git a/call/crc.c b/call/crc.c
index 1e74027..ba17f1c 100644
--- a/call/crc.c
+++ b/call/crc.c
@@ -7,6 +7,8 @@
updated: Mark Wahl DL4YBG 94/01/17
*/
+#include "crc.h"
+
static int crcbit[8] = {
0x9188, 0x48c4, 0x2462, 0x1231, 0x8108, 0x4084, 0x2042, 0x1021
};
diff --git a/call/dostime.c b/call/dostime.c
index 4eb34c9..6e6e173 100644
--- a/call/dostime.c
+++ b/call/dostime.c
@@ -3,6 +3,8 @@
#include <stdlib.h>
#include <stdio.h>
+#include "call.h"
+
/* MS-DOS time/date conversion routines derived from: */
@@ -21,7 +23,7 @@ static int day_n[] =
/* Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). */
-int date_dos2unix(unsigned short time, unsigned short date)
+static int date_dos2unix(unsigned short time, unsigned short date)
{
int month, year, secs;