make prototpyes match functions, and declare things static as needed

This commit is contained in:
Warner Losh 2003-04-06 08:30:25 +00:00
parent fadfe1d425
commit 229c00175c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113163
9 changed files with 29 additions and 21 deletions

View File

@ -60,6 +60,7 @@ static int connected = 0;
static jmp_buf timeoutbuf, intbuf;
static int coursync(), cour_connect(), cour_swallow();
void cour_nap();
static void cour_write(int fd, char *cp, int n);
void cour_disconnect(void);

View File

@ -52,6 +52,7 @@ static char rcsid[] = "$OpenBSD: df.c,v 1.5 2001/10/24 18:38:58 millert Exp $";
static jmp_buf Sjbuf;
static void timeout();
static void df_disconnect(void);
int
df02_dialer(num, acu)
@ -123,8 +124,8 @@ df_dialer(num, acu, df03)
return (c == 'A');
}
void
df_disconnect()
static void
df_disconnect(void)
{
write(FD, "\001", 1);
sleep(1);

View File

@ -74,6 +74,8 @@ static char rcsid[] = "$OpenBSD: hayes.c,v 1.8 2001/10/24 18:38:58 millert Exp $
#define min(a,b) ((a < b) ? a : b)
static void error_rep(char c);
static void goodbye(void);
static void sigALRM();
static int timeout = 0;
static jmp_buf timeoutbuf;
@ -252,8 +254,8 @@ error_rep(c)
/*
* set modem back to normal verbose status codes.
*/
void
goodbye()
static void
goodbye(void)
{
int len;
char c;

View File

@ -61,6 +61,7 @@ static int connected = 0;
static jmp_buf timeoutbuf, intbuf;
static int t3000_sync(), t3000_connect(), t3000_swallow();
static void t3000_nap();
static int t3000_write(int fd, char *cp, int n);
int
t3000_dialer(num, acu)

View File

@ -95,6 +95,7 @@ getfl(c)
return;
}
transfer(buf, sfd, value(EOFREAD));
return;
}
/*
@ -202,7 +203,7 @@ transfer(buf, fd, eofchars)
* send remote input to local process via pipe
*/
void
pipefile()
pipefile(char c)
{
int cpid, pdes[2];
char buf[256];
@ -473,7 +474,7 @@ timeout()
* Identical to consh() except for where stdout goes.
*/
void
pipeout(c)
pipeout(char c)
{
char buf[256];
int cpid, status, p;
@ -525,7 +526,7 @@ pipeout(c)
* 2 <-> local tty out
*/
void
consh(c)
consh(char c)
{
char buf[256];
int cpid, status, p;
@ -575,7 +576,7 @@ consh(c)
* Escape to local shell
*/
void
shell()
shell(char c)
{
int shpid, status;
char *cp;
@ -633,7 +634,7 @@ setscript()
* local portion of tip
*/
void
chdirectory()
chdirectory(char c)
{
char dirname[PATH_MAX];
char *cp = dirname;
@ -665,7 +666,7 @@ tipabort(msg)
}
void
finish()
finish(char c)
{
char *dismsg;
@ -745,7 +746,7 @@ prtime(s, a)
}
void
variable()
variable(char c)
{
char buf[256];
@ -789,7 +790,7 @@ variable()
}
void
listvariables()
listvariables(char c)
{
value_t *p;
char *buf;
@ -853,7 +854,7 @@ tandem(option)
* Send a break.
*/
void
genbrk()
genbrk(char c)
{
ioctl(FD, TIOCSBRK, NULL);

View File

@ -46,10 +46,6 @@ static char rcsid[] = "$OpenBSD: cmdtab.c,v 1.3 2001/09/09 17:58:41 millert Exp
#include "tip.h"
extern int shell(), getfl(), sendfile(), chdirectory();
extern int finish(), help(), pipefile(), pipeout(), consh(), variable();
extern int cu_take(), cu_put(), dollar(), genbrk(), suspend(), listvariables();
esctable_t etable[] = {
{ '!', NORM, "shell", shell },
{ '<', NORM, "receive file from remote host", getfl },

View File

@ -81,6 +81,7 @@ main(argc, argv)
char *system = NOSTR;
int i;
char *p;
const char *p2;
char sbuf[12];
gid = getgid();
@ -198,8 +199,8 @@ main(argc, argv)
*/
if (HW)
ttysetup(i);
if ((p = connect())) {
printf("\07%s\n[EOT]\n", p);
if ((p2 = connect())) {
printf("\07%s\n[EOT]\n", p2);
daemon_uid();
(void)uu_unlock(uucplock);
exit(1);

View File

@ -173,7 +173,7 @@ typedef
char e_char; /* char to match on */
char e_flags; /* experimental, priviledged */
const char *e_help; /* help string */
int (*e_func)(char); /* command */
void (*e_func)(char); /* command */
}
esctable_t;
@ -330,3 +330,8 @@ void t3000_abort(void);
int v831_dialer(char *, char *);
void v831_disconnect(void);
void v831_abort(void);
void shell(char c), getfl(char c), sendfile(char c), chdirectory(char c);
void finish(char c), help(char c), pipefile(char c), pipeout(char c);
void consh(char c), variable(char c), cu_take(char c), cu_put(char c);
void dollar(char c), genbrk(char c), suspend(char c), listvariables(char c);

View File

@ -218,7 +218,7 @@ vprint(p)
value_t *p;
{
char *cp;
extern char *interp(), *ctrl();
extern char *interp();
if (col > 0 && col < MIDDLE)
while (col++ < MIDDLE)