Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/talk ANSIfy + __dead
details: https://anonhg.NetBSD.org/src/rev/69a711eebd05
branches: trunk
changeset: 769332:69a711eebd05
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Sep 06 18:32:03 2011 +0000
description:
ANSIfy + __dead
diffstat:
usr.bin/talk/ctl.c | 9 +++----
usr.bin/talk/ctl_transact.c | 10 ++-----
usr.bin/talk/display.c | 20 +++++-----------
usr.bin/talk/get_addrs.c | 7 ++---
usr.bin/talk/get_names.c | 8 ++----
usr.bin/talk/init_disp.c | 13 +++++-----
usr.bin/talk/invite.c | 17 ++++++-------
usr.bin/talk/io.c | 12 ++++-----
usr.bin/talk/msgs.c | 11 ++++-----
usr.bin/talk/talk.c | 10 ++-----
usr.bin/talk/talk.h | 54 ++++++++++++++++++++++----------------------
11 files changed, 73 insertions(+), 98 deletions(-)
diffs (truncated from 491 to 300 lines):
diff -r 2328f2b7a04f -r 69a711eebd05 usr.bin/talk/ctl.c
--- a/usr.bin/talk/ctl.c Tue Sep 06 18:31:44 2011 +0000
+++ b/usr.bin/talk/ctl.c Tue Sep 06 18:32:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ctl.c,v 1.8 2009/04/13 23:43:36 lukem Exp $ */
+/* $NetBSD: ctl.c,v 1.9 2011/09/06 18:32:03 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)ctl.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: ctl.c,v 1.8 2009/04/13 23:43:36 lukem Exp $");
+__RCSID("$NetBSD: ctl.c,v 1.9 2011/09/06 18:32:03 joerg Exp $");
#endif /* not lint */
/*
@@ -64,7 +64,7 @@
CTL_MSG msg;
void
-open_sockt()
+open_sockt(void)
{
socklen_t length;
@@ -113,8 +113,7 @@
/* print_addr is a debug print routine */
void
-print_addr(addr)
- struct sockaddr_in addr;
+print_addr(struct sockaddr_in addr)
{
int i;
diff -r 2328f2b7a04f -r 69a711eebd05 usr.bin/talk/ctl_transact.c
--- a/usr.bin/talk/ctl_transact.c Tue Sep 06 18:31:44 2011 +0000
+++ b/usr.bin/talk/ctl_transact.c Tue Sep 06 18:32:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ctl_transact.c,v 1.10 2009/04/13 23:43:36 lukem Exp $ */
+/* $NetBSD: ctl_transact.c,v 1.11 2011/09/06 18:32:03 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)ctl_transact.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: ctl_transact.c,v 1.10 2009/04/13 23:43:36 lukem Exp $");
+__RCSID("$NetBSD: ctl_transact.c,v 1.11 2011/09/06 18:32:03 joerg Exp $");
#endif /* not lint */
#include "talk.h"
@@ -52,11 +52,7 @@
* of time
*/
void
-ctl_transact(target, tmsg, type, rp)
- struct in_addr target;
- CTL_MSG tmsg;
- int type;
- CTL_RESPONSE *rp;
+ctl_transact(struct in_addr target, CTL_MSG tmsg, int type, CTL_RESPONSE *rp)
{
struct pollfd set[1];
int nready, cc;
diff -r 2328f2b7a04f -r 69a711eebd05 usr.bin/talk/display.c
--- a/usr.bin/talk/display.c Tue Sep 06 18:31:44 2011 +0000
+++ b/usr.bin/talk/display.c Tue Sep 06 18:32:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: display.c,v 1.8 2009/04/13 23:43:36 lukem Exp $ */
+/* $NetBSD: display.c,v 1.9 2011/09/06 18:32:03 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)display.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: display.c,v 1.8 2009/04/13 23:43:36 lukem Exp $");
+__RCSID("$NetBSD: display.c,v 1.9 2011/09/06 18:32:03 joerg Exp $");
#endif /* not lint */
/*
@@ -55,8 +55,7 @@
* a argument of the form --foo at least once.
*/
int
-max(a,b)
- int a, b;
+max(int a, int b)
{
return (a > b ? a : b);
@@ -67,10 +66,7 @@
* characters while we are at it.
*/
void
-display(win, text, size)
- xwin_t *win;
- char *text;
- int size;
+display(xwin_t *win, char *text, int size)
{
int i;
char cch;
@@ -163,9 +159,7 @@
* Read the character at the indicated position in win
*/
int
-readwin(win, line, col)
- WINDOW *win;
- int line, col;
+readwin(WINDOW *win, int line, int col)
{
int oldline, oldcol;
int c;
@@ -182,9 +176,7 @@
* so that the current position is obvious
*/
void
-xscroll(win, flag)
- xwin_t *win;
- int flag;
+xscroll(xwin_t *win, int flag)
{
if (flag == -1) {
diff -r 2328f2b7a04f -r 69a711eebd05 usr.bin/talk/get_addrs.c
--- a/usr.bin/talk/get_addrs.c Tue Sep 06 18:31:44 2011 +0000
+++ b/usr.bin/talk/get_addrs.c Tue Sep 06 18:32:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: get_addrs.c,v 1.9 2011/08/31 16:24:58 plunky Exp $ */
+/* $NetBSD: get_addrs.c,v 1.10 2011/09/06 18:32:03 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)get_addrs.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: get_addrs.c,v 1.9 2011/08/31 16:24:58 plunky Exp $");
+__RCSID("$NetBSD: get_addrs.c,v 1.10 2011/09/06 18:32:03 joerg Exp $");
#endif /* not lint */
#include "talk.h"
@@ -45,8 +45,7 @@
#include "talk_ctl.h"
void
-get_addrs(my_machine_name, his_machine_name)
- const char *my_machine_name, *his_machine_name;
+get_addrs(const char *my_machine_name, const char *his_machine_name)
{
struct hostent *hp;
struct servent *sp;
diff -r 2328f2b7a04f -r 69a711eebd05 usr.bin/talk/get_names.c
--- a/usr.bin/talk/get_names.c Tue Sep 06 18:31:44 2011 +0000
+++ b/usr.bin/talk/get_names.c Tue Sep 06 18:32:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: get_names.c,v 1.14 2009/04/13 23:43:36 lukem Exp $ */
+/* $NetBSD: get_names.c,v 1.15 2011/09/06 18:32:03 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)get_names.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: get_names.c,v 1.14 2009/04/13 23:43:36 lukem Exp $");
+__RCSID("$NetBSD: get_names.c,v 1.15 2011/09/06 18:32:03 joerg Exp $");
#endif /* not lint */
#include "talk.h"
@@ -51,9 +51,7 @@
* Determine the local and remote user, tty, and machines
*/
void
-get_names(argc, argv)
- int argc;
- char *argv[];
+get_names(int argc, char *argv[])
{
char hostname[MAXHOSTNAMELEN + 1];
const char *his_name, *my_name;
diff -r 2328f2b7a04f -r 69a711eebd05 usr.bin/talk/init_disp.c
--- a/usr.bin/talk/init_disp.c Tue Sep 06 18:31:44 2011 +0000
+++ b/usr.bin/talk/init_disp.c Tue Sep 06 18:32:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_disp.c,v 1.11 2003/08/07 11:16:04 agc Exp $ */
+/* $NetBSD: init_disp.c,v 1.12 2011/09/06 18:32:03 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)init_disp.c 8.2 (Berkeley) 2/16/94";
#endif
-__RCSID("$NetBSD: init_disp.c,v 1.11 2003/08/07 11:16:04 agc Exp $");
+__RCSID("$NetBSD: init_disp.c,v 1.12 2011/09/06 18:32:03 joerg Exp $");
#endif /* not lint */
/*
@@ -56,7 +56,7 @@
* and build the various windows.
*/
void
-init_display()
+init_display(void)
{
struct sigaction sa;
@@ -99,7 +99,7 @@
* connection are the three edit characters.
*/
void
-set_edit_chars()
+set_edit_chars(void)
{
char buf[3];
int cc;
@@ -127,8 +127,7 @@
}
void
-sig_sent(dummy)
- int dummy;
+sig_sent(int dummy)
{
message("Connection closing. Exiting");
@@ -139,7 +138,7 @@
* All done talking...hang up the phone and reset terminal thingy's
*/
void
-quit()
+quit(void)
{
if (curses_initialized) {
diff -r 2328f2b7a04f -r 69a711eebd05 usr.bin/talk/invite.c
--- a/usr.bin/talk/invite.c Tue Sep 06 18:31:44 2011 +0000
+++ b/usr.bin/talk/invite.c Tue Sep 06 18:32:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: invite.c,v 1.8 2009/04/13 23:43:36 lukem Exp $ */
+/* $NetBSD: invite.c,v 1.9 2011/09/06 18:32:03 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)invite.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: invite.c,v 1.8 2009/04/13 23:43:36 lukem Exp $");
+__RCSID("$NetBSD: invite.c,v 1.9 2011/09/06 18:32:03 joerg Exp $");
#endif /* not lint */
#include "talk.h"
@@ -57,11 +57,11 @@
* These are used to delete the
* invitations.
*/
-int local_id, remote_id;
-jmp_buf invitebuf;
+static int local_id, remote_id;
+static jmp_buf invitebuf;
void
-invite_remote()
+invite_remote(void)
{
int new_sockt;
struct itimerval itimer;
@@ -117,8 +117,7 @@
* Routine called on interrupt to re-invite the callee
*/
void
-re_invite(dummy)
- int dummy;
+re_invite(int dummy)
{
message("Ringing your party again");
@@ -146,7 +145,7 @@
* Transmit the invitation and process the response
*/
void
-announce_invite()
+announce_invite(void)
{
CTL_RESPONSE response;
@@ -167,7 +166,7 @@
* Tell the daemon to remove your invitation
*/
void
-send_delete()
+send_delete(void)
Home |
Main Index |
Thread Index |
Old Index