From 746287ec8d416baa514952008375758a96bebc96 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 12 Feb 2016 12:34:24 +0100 Subject: call: Make static what can be made static. But leave remotecommand() to avoid a warning about the function being unused. It currently is unused because its sole caller is commented out. Signed-off-by: Ralf Baechle --- call/call.c | 62 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'call/call.c') diff --git a/call/call.c b/call/call.c index 9e29113..608b3df 100644 --- a/call/call.c +++ b/call/call.c @@ -137,9 +137,9 @@ static scrollbackstruct scrollback[SCROLLBACKSIZE]; static int topscroll, lastscroll, scrolledup, eatchar; static char inbuf[MAX_BUFLEN];static int inbuflen, inbufwid; static char incharbuf[6];static int incharbuflen; -void statline(int mode, char *s); +static void statline(int mode, char *s); -void addscrollline(char *s, int len) +static void addscrollline(char *s, int len) { scrollback[lastscroll].str = malloc(len); memcpy(scrollback[lastscroll].str, s, len); @@ -181,7 +181,7 @@ void addscrollline(char *s, int len) // -int widthchar(char *s, size_t bytes, int xpos) +static int widthchar(char *s, size_t bytes, int xpos) { wchar_t c;int width; char *outbuf=(char *) &c; @@ -197,7 +197,7 @@ int widthchar(char *s, size_t bytes, int xpos) } -int completecharlen(char *s) +static int completecharlen(char *s) { unsigned ut = (unsigned char)s[0];int clen; if (ut <= 0x80)clen = 1; @@ -213,7 +213,7 @@ int completecharlen(char *s) // Must check for COLS while redrawing from history. Or otherwise the text // wraps around and does strange things. -int waddnstrcolcheck(WINDOW *win, char *s, int len, int twidth) +static int waddnstrcolcheck(WINDOW *win, char *s, int len, int twidth) { int n; for (twidth = 0,n=0;nptr, screeny, 0); if (yfrom == lastscroll){ @@ -252,7 +252,7 @@ void updateline(int screeny, int yfrom, t_win *win_in, int mode, t_win *win_out) // Cursor in SLAVE mode while scrolling looks broken. // Cursor in TALK mode is always good, because it's on the bottom window -void checkcursor(int mode) +static void checkcursor(int mode) { int newcursor; if ((mode == SLAVEMODE) && scrolledup)newcursor = 0; @@ -276,7 +276,7 @@ static void restorecursor(int mode, t_win *win_out) } } -void redrawscreen(t_win *win_in, int mode, t_win *win_out) +static void redrawscreen(t_win *win_in, int mode, t_win *win_out) { int y, storedlines; if (lastscroll >= topscroll) storedlines = lastscroll - topscroll; @@ -295,7 +295,7 @@ void redrawscreen(t_win *win_in, int mode, t_win *win_out) checkcursor(mode); } -void scrolltext(t_win *win_in, int lines, int mode, t_win *win_out) +static void scrolltext(t_win *win_in, int lines, int mode, t_win *win_out) { int topline, storedlines; int y; @@ -346,7 +346,7 @@ void scrolltext(t_win *win_in, int lines, int mode, t_win *win_out) } } -void usage(void) +static void usage(void) { fprintf(stderr, "usage: call [-8] [-b l|e] [-d] [-h] [-i] [-m s|e] [-p paclen] [-r] [-R]\n"); fprintf(stderr, " [-s mycall] [-S] [-t] [-T timeout] [-v] [-w window] [-W]\n"); @@ -354,20 +354,20 @@ void usage(void) exit(1); } -WINDOW *win; -const char *key_words[] = { "//", +static WINDOW *win; +static const char *key_words[] = { "//", "#BIN#", " go_7+. ", " stop_7+. ", "\0" }; -const char *rkey_words[] = { +static const char *rkey_words[] = { // actually restricted keywords are very restrictive "\0" }; #define MAXCMDLEN 10 -void convert_cr_lf(char *buf, int len) +static void convert_cr_lf(char *buf, int len) { while (len--) { if (*buf == '\r') @@ -376,7 +376,7 @@ void convert_cr_lf(char *buf, int len) } } -void convert_lf_cr(char *buf, int len) +static void convert_lf_cr(char *buf, int len) { while (len--) { if (*buf == '\n') @@ -385,7 +385,7 @@ void convert_lf_cr(char *buf, int len) } } -void convert_upper_lower(char *buf, int len) +static void convert_upper_lower(char *buf, int len) { while (len--) { *buf = tolower(*buf); @@ -425,7 +425,7 @@ static wchar_t *wunctrlwchar(wchar_t c) // but waddnstr works. // Draw the entire input buffer when adding text. // The fonts that do overstrike fail when written one char at a time. -void drawinbuf(WINDOW *w, wchar_t *string, int bytes, int cur_pos) +static void drawinbuf(WINDOW *w, wchar_t *string, int bytes, int cur_pos) { int n, x, cursorx, xpos, ypos, width; getyx(w, ypos, xpos);// Assume cursor to be at position of current char to draw. @@ -719,12 +719,12 @@ static void cmd_sigwinch(int sig) sigwinchsignal = TRUE; } -void cmd_intr(int sig) +static void cmd_intr(int sig) { interrupted = TRUE; } -void statline(int mode, char *s) +static void statline(int mode, char *s) { static int oldlen = 0; int l, cnt; @@ -1274,7 +1274,7 @@ static void reinit_mode(int mode, wint * wintab, t_win * win_in, t_win * win_out } } -void waddnstrcrcheck(t_win *win_in, char *buf, int bytes, int draw, int mode, t_win *win_out) +static void waddnstrcrcheck(t_win *win_in, char *buf, int bytes, int draw, int mode, t_win *win_out) { int n; for (n=0;n