diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 1998-04-28 22:13:33 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 1998-04-28 22:13:33 +0000 |
commit | e0a2bdb7580789c975aa1d917942aa148ba05b27 (patch) | |
tree | c2f7dde8a9d6cef1aabc1183b8fd4cf0ff2699e7 | |
parent | 6b0fc1fefba70fb596defe3e4b4bbea50899e48d (diff) |
NetBSD-based -Wall cleanup
-rw-r--r-- | usr.bin/talk/ctl.c | 16 | ||||
-rw-r--r-- | usr.bin/talk/ctl_transact.c | 19 | ||||
-rw-r--r-- | usr.bin/talk/display.c | 9 | ||||
-rw-r--r-- | usr.bin/talk/get_addrs.c | 11 | ||||
-rw-r--r-- | usr.bin/talk/get_names.c | 23 | ||||
-rw-r--r-- | usr.bin/talk/init_disp.c | 19 | ||||
-rw-r--r-- | usr.bin/talk/invite.c | 24 | ||||
-rw-r--r-- | usr.bin/talk/io.c | 29 | ||||
-rw-r--r-- | usr.bin/talk/look_up.c | 15 | ||||
-rw-r--r-- | usr.bin/talk/msgs.c | 11 | ||||
-rw-r--r-- | usr.bin/talk/talk.c | 5 | ||||
-rw-r--r-- | usr.bin/talk/talk.h | 34 |
12 files changed, 123 insertions, 92 deletions
diff --git a/usr.bin/talk/ctl.c b/usr.bin/talk/ctl.c index fcfb2c2a0d9..dda08855694 100644 --- a/usr.bin/talk/ctl.c +++ b/usr.bin/talk/ctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ctl.c,v 1.2 1996/06/26 05:40:20 deraadt Exp $ */ +/* $OpenBSD: ctl.c,v 1.3 1998/04/28 22:13:20 pjanzen Exp $ */ /* $NetBSD: ctl.c,v 1.3 1994/12/09 02:14:10 jtc Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ctl.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: ctl.c,v 1.2 1996/06/26 05:40:20 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ctl.c,v 1.3 1998/04/28 22:13:20 pjanzen Exp $"; #endif /* not lint */ /* @@ -47,11 +47,8 @@ static char rcsid[] = "$OpenBSD: ctl.c,v 1.2 1996/06/26 05:40:20 deraadt Exp $"; * the progress */ -#include <sys/types.h> -#include <sys/socket.h> -#include <protocols/talkd.h> -#include <netinet/in.h> #include "talk.h" +#include <arpa/inet.h> #include "talk_ctl.h" struct sockaddr_in daemon_addr = { sizeof(daemon_addr), AF_INET }; @@ -70,6 +67,7 @@ int invitation_waiting = 0; CTL_MSG msg; +void open_sockt() { int length; @@ -87,6 +85,7 @@ open_sockt() } /* open the ctl socket */ +void open_ctl() { int length; @@ -106,13 +105,14 @@ open_ctl() } /* print_addr is a debug print routine */ +void print_addr(addr) struct sockaddr_in addr; { int i; - printf("addr = %x, port = %o, family = %o zero = ", - addr.sin_addr, addr.sin_port, addr.sin_family); + printf("addr = %s, port = %o, family = %o zero = ", + inet_ntoa(addr.sin_addr), addr.sin_port, addr.sin_family); for (i = 0; i<8;i++) printf("%o ", (int)addr.sin_zero[i]); putchar('\n'); diff --git a/usr.bin/talk/ctl_transact.c b/usr.bin/talk/ctl_transact.c index 6648b461d43..a2dc4607fb5 100644 --- a/usr.bin/talk/ctl_transact.c +++ b/usr.bin/talk/ctl_transact.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ctl_transact.c,v 1.3 1996/06/26 05:40:20 deraadt Exp $ */ +/* $OpenBSD: ctl_transact.c,v 1.4 1998/04/28 22:13:21 pjanzen Exp $ */ /* $NetBSD: ctl_transact.c,v 1.3 1994/12/09 02:14:12 jtc Exp $ */ /* @@ -38,37 +38,38 @@ #if 0 static char sccsid[] = "@(#)ctl_transact.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: ctl_transact.c,v 1.3 1996/06/26 05:40:20 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ctl_transact.c,v 1.4 1998/04/28 22:13:21 pjanzen Exp $"; #endif /* not lint */ -#include <sys/types.h> -#include <sys/socket.h> +#include "talk.h" #include <sys/time.h> -#include <netinet/in.h> -#include <protocols/talkd.h> #include <errno.h> +#include <unistd.h> #include "talk_ctl.h" #define CTL_WAIT 2 /* time to wait for a response, in seconds */ /* * SOCKDGRAM is unreliable, so we must repeat messages if we have - * not recieved an acknowledgement within a reasonable amount + * not received an acknowledgement within a reasonable amount * of time */ +void ctl_transact(target, msg, type, rp) struct in_addr target; CTL_MSG msg; int type; CTL_RESPONSE *rp; { - int read_mask, ctl_mask, nready, cc; + fd_set read_mask, ctl_mask; + int nready, cc; struct timeval wait; msg.type = type; daemon_addr.sin_addr = target; daemon_addr.sin_port = daemon_port; - ctl_mask = 1 << ctl_sockt; + FD_ZERO(&ctl_mask); + FD_SET(ctl_sockt, &ctl_mask); /* * Keep sending the message until a response of diff --git a/usr.bin/talk/display.c b/usr.bin/talk/display.c index f0af194d45a..52318e5e4bb 100644 --- a/usr.bin/talk/display.c +++ b/usr.bin/talk/display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: display.c,v 1.4 1997/11/30 20:30:50 deraadt Exp $ */ +/* $OpenBSD: display.c,v 1.5 1998/04/28 22:13:22 pjanzen Exp $ */ /* $NetBSD: display.c,v 1.3 1994/12/09 02:14:13 jtc Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)display.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: display.c,v 1.4 1997/11/30 20:30:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: display.c,v 1.5 1998/04/28 22:13:22 pjanzen Exp $"; #endif /* not lint */ /* @@ -58,6 +58,7 @@ int curses_initialized = 0; * max HAS to be a function, it is called with * a argument of the form --foo at least once. */ +int max(a,b) int a, b; { @@ -69,6 +70,7 @@ max(a,b) * Display some text on somebody's window, processing some control * characters while we are at it. */ +void display(win, text, size) register xwin_t *win; register char *text; @@ -159,8 +161,10 @@ display(win, text, size) /* * Read the character at the indicated position in win */ +int readwin(win, line, col) WINDOW *win; + int line, col; { int oldline, oldcol; register int c; @@ -176,6 +180,7 @@ readwin(win, line, col) * Scroll a window, blanking out the line following the current line * so that the current position is obvious */ +void xscroll(win, flag) register xwin_t *win; int flag; diff --git a/usr.bin/talk/get_addrs.c b/usr.bin/talk/get_addrs.c index 1167cb12df2..e21eedcdc78 100644 --- a/usr.bin/talk/get_addrs.c +++ b/usr.bin/talk/get_addrs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: get_addrs.c,v 1.2 1996/06/26 05:40:21 deraadt Exp $ */ +/* $OpenBSD: get_addrs.c,v 1.3 1998/04/28 22:13:23 pjanzen Exp $ */ /* $NetBSD: get_addrs.c,v 1.3 1994/12/09 02:14:14 jtc Exp $ */ /* @@ -38,17 +38,16 @@ #if 0 static char sccsid[] = "@(#)get_addrs.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: get_addrs.c,v 1.2 1996/06/26 05:40:21 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: get_addrs.c,v 1.3 1998/04/28 22:13:23 pjanzen Exp $"; #endif /* not lint */ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <protocols/talkd.h> +#include "talk.h" #include <netdb.h> #include <stdio.h> +#include <unistd.h> #include "talk_ctl.h" +void get_addrs(my_machine_name, his_machine_name) char *my_machine_name, *his_machine_name; { diff --git a/usr.bin/talk/get_names.c b/usr.bin/talk/get_names.c index b0b05c4cfcb..ed9188515a3 100644 --- a/usr.bin/talk/get_names.c +++ b/usr.bin/talk/get_names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: get_names.c,v 1.4 1997/02/01 19:38:26 jkatz Exp $ */ +/* $OpenBSD: get_names.c,v 1.5 1998/04/28 22:13:25 pjanzen Exp $ */ /* $NetBSD: get_names.c,v 1.4 1994/12/09 02:14:16 jtc Exp $ */ /* @@ -38,23 +38,20 @@ #if 0 static char sccsid[] = "@(#)get_names.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: get_names.c,v 1.4 1997/02/01 19:38:26 jkatz Exp $"; +static char rcsid[] = "$OpenBSD: get_names.c,v 1.5 1998/04/28 22:13:25 pjanzen Exp $"; #endif /* not lint */ +#include "talk.h" #include <sys/param.h> -#include <sys/socket.h> -#include <protocols/talkd.h> #include <pwd.h> -#include <string.h> -#include "talk.h" +#include <unistd.h> -char *getlogin(); -char *ttyname(); extern CTL_MSG msg; /* * Determine the local and remote user, tty, and machines */ +void get_names(argc, argv) int argc; char *argv[]; @@ -62,11 +59,11 @@ get_names(argc, argv) char hostname[MAXHOSTNAMELEN]; char *his_name, *my_name; char *my_machine_name, *his_machine_name; - char *my_tty, *his_tty; + char *his_tty; register char *cp; char *names; - if (argc < 2 ) { + if ((argc < 2 ) || ('@' == argv[1][0])) { printf("Usage: talk user [ttyname]\n"); printf(" talk user@hostname [ttyname]\n"); exit(-1); @@ -76,12 +73,6 @@ get_names(argc, argv) exit(-1); } - if ('@' == argv[1][0]) { - printf("Usage: talk user [ttyname]\n"); - printf(" talk user@hostname [ttyname]\n"); - exit(-1); - } - if ((my_name = getlogin()) == NULL) { struct passwd *pw; diff --git a/usr.bin/talk/init_disp.c b/usr.bin/talk/init_disp.c index f10f2a3a546..99414a34537 100644 --- a/usr.bin/talk/init_disp.c +++ b/usr.bin/talk/init_disp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_disp.c,v 1.3 1996/06/26 05:40:22 deraadt Exp $ */ +/* $OpenBSD: init_disp.c,v 1.4 1998/04/28 22:13:26 pjanzen Exp $ */ /* $NetBSD: init_disp.c,v 1.6 1994/12/09 02:14:17 jtc Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)init_disp.c 8.2 (Berkeley) 2/16/94"; #endif -static char rcsid[] = "$OpenBSD: init_disp.c,v 1.3 1996/06/26 05:40:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: init_disp.c,v 1.4 1998/04/28 22:13:26 pjanzen Exp $"; #endif /* not lint */ /* @@ -46,21 +46,21 @@ static char rcsid[] = "$OpenBSD: init_disp.c,v 1.3 1996/06/26 05:40:22 deraadt E * as well as the signal handling routines. */ +#include "talk.h" #include <sys/ioctl.h> #include <sys/ioctl_compat.h> - -#include <termios.h> -#include <signal.h> #include <err.h> -#include "talk.h" +#include <signal.h> +#include <termios.h> +#include <unistd.h> /* * Set up curses, catch the appropriate signals, * and build the various windows. */ +void init_display() { - void sig_sent(); struct sigvec sigv; if (initscr() == NULL) @@ -105,6 +105,7 @@ init_display() * the first three characters each talk transmits after * connection are the three edit characters. */ +void set_edit_chars() { char buf[3]; @@ -133,7 +134,8 @@ set_edit_chars() } void -sig_sent() +sig_sent(dummy) + int dummy; { message("Connection closing. Exiting"); @@ -143,6 +145,7 @@ sig_sent() /* * All done talking...hang up the phone and reset terminal thingy's */ +void quit() { diff --git a/usr.bin/talk/invite.c b/usr.bin/talk/invite.c index b57f1f1c970..4f3a4a77ad9 100644 --- a/usr.bin/talk/invite.c +++ b/usr.bin/talk/invite.c @@ -1,4 +1,4 @@ -/* $OpenBSD: invite.c,v 1.4 1998/04/27 15:45:49 pjanzen Exp $ */ +/* $OpenBSD: invite.c,v 1.5 1998/04/28 22:13:27 pjanzen Exp $ */ /* $NetBSD: invite.c,v 1.3 1994/12/09 02:14:18 jtc Exp $ */ /* @@ -38,20 +38,18 @@ #if 0 static char sccsid[] = "@(#)invite.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: invite.c,v 1.4 1998/04/27 15:45:49 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: invite.c,v 1.5 1998/04/28 22:13:27 pjanzen Exp $"; #endif /* not lint */ -#include <sys/types.h> -#include <sys/socket.h> +#include "talk.h" +#include <arpa/inet.h> #include <sys/time.h> #include <signal.h> -#include <netinet/in.h> #include <netdb.h> -#include <protocols/talkd.h> #include <errno.h> #include <setjmp.h> +#include <unistd.h> #include "talk_ctl.h" -#include "talk.h" #define STRING_LENGTH 158 @@ -68,12 +66,12 @@ static char rcsid[] = "$OpenBSD: invite.c,v 1.4 1998/04/27 15:45:49 pjanzen Exp * invitations. */ int local_id, remote_id; -void re_invite(); jmp_buf invitebuf; +void invite_remote() { - int nfd, read_mask, template, new_sockt; + int new_sockt; struct itimerval itimer; CTL_RESPONSE response; struct sockaddr rp; @@ -150,9 +148,9 @@ invite_remote() * Routine called on interupt to re-invite the callee */ void -re_invite() +re_invite(dummy) + int dummy; { - message("Ringing your party again"); /* force a re-announce */ msg.id_num = htonl(remote_id + 1); @@ -171,11 +169,12 @@ static char *answers[] = { "Target machine indicates protocol botch (addr)",/* BADADDR */ "Target machine indicates protocol botch (ctl_addr)",/* BADCTLADDR */ }; -#define NANSWERS (sizeof (answers) / sizeof (answers[0])) +#define NANSWERS (sizeof (answers) / sizeof (answers[0])) /* * Transmit the invitation and process the response */ +void announce_invite() { CTL_RESPONSE response; @@ -196,6 +195,7 @@ announce_invite() /* * Tell the daemon to remove your invitation */ +void send_delete() { diff --git a/usr.bin/talk/io.c b/usr.bin/talk/io.c index e1ddb6ec4bd..8438b80e98a 100644 --- a/usr.bin/talk/io.c +++ b/usr.bin/talk/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.4 1998/04/27 15:45:50 pjanzen Exp $ */ +/* $OpenBSD: io.c,v 1.5 1998/04/28 22:13:28 pjanzen Exp $ */ /* $NetBSD: io.c,v 1.4 1994/12/09 02:14:20 jtc Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: io.c,v 1.4 1998/04/27 15:45:50 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: io.c,v 1.5 1998/04/28 22:13:28 pjanzen Exp $"; #endif /* not lint */ /* @@ -47,24 +47,23 @@ static char rcsid[] = "$OpenBSD: io.c,v 1.4 1998/04/27 15:45:50 pjanzen Exp $"; * ctl.c */ +#include "talk.h" #include <sys/ioctl.h> #include <sys/time.h> #include <stdio.h> #include <errno.h> -#include <string.h> -#include "talk.h" +#include <unistd.h> #define A_LONG_TIME 10000000 -#define STDIN_MASK (1<<fileno(stdin)) /* the bit mask for standard - input */ /* * The routine to do the actual talking */ +void talk() { - register int read_template, sockt_mask; - int read_set, nb; + fd_set read_template, read_set; + int nb; char buf[BUFSIZ]; struct timeval wait; @@ -81,13 +80,14 @@ talk() message("Connection established\007\007\007"); #endif current_line = 0; - sockt_mask = (1<<sockt); /* * Wait on both the other process (sockt_mask) and * standard input ( STDIN_MASK ) */ - read_template = sockt_mask | STDIN_MASK; + FD_ZERO(&read_template); + FD_SET(sockt, &read_template); + FD_SET(fileno(stdin), &read_template); for (;;) { read_set = read_template; wait.tv_sec = A_LONG_TIME; @@ -102,7 +102,7 @@ talk() p_error("Unexpected error from select"); quit(); } - if (read_set & sockt_mask) { + if (FD_ISSET(sockt, &read_set)) { /* There is data on sockt */ nb = read(sockt, buf, sizeof buf); if (nb <= 0) { @@ -111,7 +111,7 @@ talk() } display(&his_win, buf, nb); } - if (read_set & STDIN_MASK) { + if (FD_ISSET(fileno(stdin), &read_set)) { /* * We can't make the tty non_blocking, because * curses's output routines would screw up @@ -125,13 +125,11 @@ talk() } } -extern int errno; -extern int sys_nerr; - /* * p_error prints the system error message on the standard location * on the screen and then exits. (i.e. a curses version of perror) */ +void p_error(string) char *string; { @@ -147,6 +145,7 @@ p_error(string) /* * Display string in the standard location */ +void message(string) char *string; { diff --git a/usr.bin/talk/look_up.c b/usr.bin/talk/look_up.c index d1c06d227da..9550026f8fb 100644 --- a/usr.bin/talk/look_up.c +++ b/usr.bin/talk/look_up.c @@ -1,4 +1,4 @@ -/* $OpenBSD: look_up.c,v 1.3 1996/06/26 05:40:24 deraadt Exp $ */ +/* $OpenBSD: look_up.c,v 1.4 1998/04/28 22:13:29 pjanzen Exp $ */ /* $NetBSD: look_up.c,v 1.3 1994/12/09 02:14:21 jtc Exp $ */ /* @@ -38,20 +38,18 @@ #if 0 static char sccsid[] = "@(#)look_up.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: look_up.c,v 1.3 1996/06/26 05:40:24 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: look_up.c,v 1.4 1998/04/28 22:13:29 pjanzen Exp $"; #endif /* not lint */ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <protocols/talkd.h> +#include "talk.h" #include <errno.h> +#include <unistd.h> #include "talk_ctl.h" -#include "talk.h" /* * See if the local daemon has an invitation for us. */ +int check_local() { CTL_RESPONSE response; @@ -99,11 +97,10 @@ check_local() /* * Look for an invitation on 'machine' */ +int look_for_invite(rp) CTL_RESPONSE *rp; { - struct in_addr machine_addr; - current_state = "Checking for invitation on caller's machine"; ctl_transact(his_machine_addr, msg, LOOK_UP, rp); /* the switch is for later options, such as multiple invitations */ diff --git a/usr.bin/talk/msgs.c b/usr.bin/talk/msgs.c index ba8b141e47f..3a7086deab0 100644 --- a/usr.bin/talk/msgs.c +++ b/usr.bin/talk/msgs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msgs.c,v 1.2 1996/06/26 05:40:25 deraadt Exp $ */ +/* $OpenBSD: msgs.c,v 1.3 1998/04/28 22:13:30 pjanzen Exp $ */ /* $NetBSD: msgs.c,v 1.3 1994/12/09 02:14:22 jtc Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)msgs.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: msgs.c,v 1.2 1996/06/26 05:40:25 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: msgs.c,v 1.3 1998/04/28 22:13:30 pjanzen Exp $"; #endif /* not lint */ /* @@ -46,10 +46,10 @@ static char rcsid[] = "$OpenBSD: msgs.c,v 1.2 1996/06/26 05:40:25 deraadt Exp $" * if we are slow connecting. */ +#include "talk.h" #include <sys/time.h> #include <signal.h> #include <stdio.h> -#include "talk.h" #define MSG_INTERVAL 4 @@ -57,11 +57,13 @@ char *current_state; int current_line = 0; void -disp_msg() +disp_msg(dummy) + int dummy; { message(current_state); } +void start_msgs() { struct itimerval itimer; @@ -73,6 +75,7 @@ start_msgs() setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0); } +void end_msgs() { struct itimerval itimer; diff --git a/usr.bin/talk/talk.c b/usr.bin/talk/talk.c index 4e0839d2ec2..f7be4c67dfe 100644 --- a/usr.bin/talk/talk.c +++ b/usr.bin/talk/talk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: talk.c,v 1.2 1996/06/26 05:40:26 deraadt Exp $ */ +/* $OpenBSD: talk.c,v 1.3 1998/04/28 22:13:31 pjanzen Exp $ */ /* $NetBSD: talk.c,v 1.3 1994/12/09 02:14:25 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)talk.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: talk.c,v 1.2 1996/06/26 05:40:26 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: talk.c,v 1.3 1998/04/28 22:13:31 pjanzen Exp $"; #endif /* not lint */ #include "talk.h" @@ -63,6 +63,7 @@ static char rcsid[] = "$OpenBSD: talk.c,v 1.2 1996/06/26 05:40:26 deraadt Exp $" * Modified to run under 4.1c by Peter Moore 3/17/83 */ +int main(argc, argv) int argc; char *argv[]; diff --git a/usr.bin/talk/talk.h b/usr.bin/talk/talk.h index 99ef7e28e7c..cb173917fbe 100644 --- a/usr.bin/talk/talk.h +++ b/usr.bin/talk/talk.h @@ -1,4 +1,4 @@ -/* $OpenBSD: talk.h,v 1.2 1996/06/26 05:40:26 deraadt Exp $ */ +/* $OpenBSD: talk.h,v 1.3 1998/04/28 22:13:32 pjanzen Exp $ */ /* $NetBSD: talk.h,v 1.3 1994/12/09 02:14:27 jtc Exp $ */ /* @@ -36,7 +36,12 @@ * @(#)talk.h 8.1 (Berkeley) 6/6/93 */ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <protocols/talkd.h> #include <curses.h> +#include <string.h> extern int sockt; extern int curses_initialized; @@ -59,3 +64,30 @@ typedef struct xwin { extern xwin_t my_win; extern xwin_t his_win; extern WINDOW *line_win; + +void announce_invite __P((void)); +int check_local __P((void)); +void ctl_transact __P((struct in_addr, CTL_MSG, int, CTL_RESPONSE *)); +void display __P((xwin_t *, char *, int)); +void disp_msg __P((int)); +void end_msgs __P((void)); +void get_addrs __P((char *, char *)); +void get_names __P((int, char **)); +void init_display __P((void)); +void invite_remote __P((void)); +int look_for_invite __P((CTL_RESPONSE *)); +int max __P((int, int)); +void message __P((char *)); +void open_ctl __P((void)); +void open_sockt __P((void)); +void print_addr __P((struct sockaddr_in)); +void p_error __P((char *)); +void quit __P((void)); +int readwin __P((WINDOW *, int, int)); +void re_invite __P((int)); +void send_delete __P((void)); +void set_edit_chars __P((void)); +void sig_sent __P((int)); +void start_msgs __P((void)); +void talk __P((void)); +void xscroll __P((xwin_t *, int)); |