Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/tip constify and warns = 3
details: https://anonhg.NetBSD.org/src/rev/d13676c71a4d
branches: trunk
changeset: 565945:d13676c71a4d
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 23 22:11:44 2004 +0000
description:
constify and warns = 3
diffstat:
usr.bin/tip/Makefile | 3 +-
usr.bin/tip/acu.c | 8 +++---
usr.bin/tip/aculib/biz22.c | 17 +++++++------
usr.bin/tip/aculib/courier.c | 14 +++++-----
usr.bin/tip/aculib/df.c | 18 +++++++-------
usr.bin/tip/aculib/hayes.c | 8 +++---
usr.bin/tip/aculib/t3000.c | 14 +++++-----
usr.bin/tip/aculib/v3451.c | 22 +++++++++--------
usr.bin/tip/aculib/v831.c | 10 ++++----
usr.bin/tip/aculib/ventel.c | 8 +++---
usr.bin/tip/cmds.c | 54 +++++++++++++++++++++++--------------------
usr.bin/tip/log.c | 8 +++---
usr.bin/tip/remote.c | 21 ++++++++--------
usr.bin/tip/tip.c | 53 ++++++++++++++++++++++--------------------
usr.bin/tip/tip.h | 32 +++++++++++++-------------
usr.bin/tip/uucplock.c | 28 +++++++++++-----------
usr.bin/tip/value.c | 21 ++++++++--------
usr.bin/tip/vars.c | 10 ++++---
18 files changed, 182 insertions(+), 167 deletions(-)
diffs (truncated from 1258 to 300 lines):
diff -r 3ecdebde8cd0 -r d13676c71a4d usr.bin/tip/Makefile
--- a/usr.bin/tip/Makefile Fri Apr 23 21:52:17 2004 +0000
+++ b/usr.bin/tip/Makefile Fri Apr 23 22:11:44 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 1997/11/22 07:28:39 lukem Exp $
+# $NetBSD: Makefile,v 1.12 2004/04/23 22:11:44 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
#
# Files are:
@@ -31,6 +31,7 @@
# explicitly to remcap.c if not 1024
# CONNECT enable ~C command (connect pgm to remote)
+WARNS=3
PROG= tip
CPPFLAGS+=-I${.CURDIR} \
-DDEFBR=1200 -DDEFFS=BUFSIZ -DACULOG -DPRISTINE -DCONNECT \
diff -r 3ecdebde8cd0 -r d13676c71a4d usr.bin/tip/acu.c
--- a/usr.bin/tip/acu.c Fri Apr 23 21:52:17 2004 +0000
+++ b/usr.bin/tip/acu.c Fri Apr 23 22:11:44 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acu.c,v 1.8 2003/08/07 11:16:16 agc Exp $ */
+/* $NetBSD: acu.c,v 1.9 2004/04/23 22:11:44 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)acu.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: acu.c,v 1.8 2003/08/07 11:16:16 agc Exp $");
+__RCSID("$NetBSD: acu.c,v 1.9 2004/04/23 22:11:44 christos Exp $");
#endif /* not lint */
#include "tip.h"
@@ -62,7 +62,7 @@
* for a single host acting as a rotary (in the order
* found in the file).
*/
-char *
+const char *
connect()
{
char *cp = PN;
@@ -170,7 +170,7 @@
void
disconnect(reason)
- char *reason;
+ const char *reason;
{
if (!conflag) {
diff -r 3ecdebde8cd0 -r d13676c71a4d usr.bin/tip/aculib/biz22.c
--- a/usr.bin/tip/aculib/biz22.c Fri Apr 23 21:52:17 2004 +0000
+++ b/usr.bin/tip/aculib/biz22.c Fri Apr 23 22:11:44 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: biz22.c,v 1.8 2003/08/07 11:16:21 agc Exp $ */
+/* $NetBSD: biz22.c,v 1.9 2004/04/23 22:11:44 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)biz22.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: biz22.c,v 1.8 2003/08/07 11:16:21 agc Exp $");
+__RCSID("$NetBSD: biz22.c,v 1.9 2004/04/23 22:11:44 christos Exp $");
#endif /* not lint */
#include "tip.h"
@@ -44,9 +44,9 @@
static int btimeout = 0;
static jmp_buf timeoutbuf;
-static int biz_dialer __P((char *, char *));
-static int cmd __P((char *));
-static int detect __P((char *));
+static int biz_dialer __P((char *, const char *));
+static int cmd __P((const char *));
+static int detect __P((const char *));
static void sigALRM __P((int));
/*
@@ -56,7 +56,8 @@
*/
static int
biz_dialer(num, mod)
- char *num, *mod;
+ char *num;
+ const char *mod;
{
int connected = 0;
char cbuf[40];
@@ -148,7 +149,7 @@
static int
cmd(s)
- char *s;
+ const char *s;
{
sig_t f;
char c;
@@ -170,7 +171,7 @@
static int
detect(s)
- char *s;
+ const char *s;
{
sig_t f;
char c;
diff -r 3ecdebde8cd0 -r d13676c71a4d usr.bin/tip/aculib/courier.c
--- a/usr.bin/tip/aculib/courier.c Fri Apr 23 21:52:17 2004 +0000
+++ b/usr.bin/tip/aculib/courier.c Fri Apr 23 22:11:44 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: courier.c,v 1.12 2003/08/07 11:16:21 agc Exp $ */
+/* $NetBSD: courier.c,v 1.13 2004/04/23 22:11:44 christos Exp $ */
/*
* Copyright (c) 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)courier.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: courier.c,v 1.12 2003/08/07 11:16:21 agc Exp $");
+__RCSID("$NetBSD: courier.c,v 1.13 2004/04/23 22:11:44 christos Exp $");
#endif /* not lint */
/*
@@ -52,12 +52,12 @@
static int cour_connect __P((void));
static void cour_nap __P((void));
static void cour_napx __P((int));
-static int cour_swallow __P((char *));
+static int cour_swallow __P((const char *));
static int coursync __P((void));
#ifdef DEBUG
static void cour_verbose_read __P((void));
#endif
-static void cour_write __P((int, char *, int));
+static void cour_write __P((int, const char *, int));
static void sigALRM __P((int));
int
@@ -150,7 +150,7 @@
static int
cour_swallow(match)
- char *match;
+ const char *match;
{
sig_t f;
char c;
@@ -188,7 +188,7 @@
}
struct baud_msg {
- char *msg;
+ const char *msg;
int baud;
} baud_msg[] = {
{ "", B300 },
@@ -321,7 +321,7 @@
static void
cour_write(fd, cp, n)
int fd;
- char *cp;
+ const char *cp;
int n;
{
diff -r 3ecdebde8cd0 -r d13676c71a4d usr.bin/tip/aculib/df.c
--- a/usr.bin/tip/aculib/df.c Fri Apr 23 21:52:17 2004 +0000
+++ b/usr.bin/tip/aculib/df.c Fri Apr 23 22:11:44 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: df.c,v 1.6 2003/08/07 11:16:22 agc Exp $ */
+/* $NetBSD: df.c,v 1.7 2004/04/23 22:11:44 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)df.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: df.c,v 1.6 2003/08/07 11:16:22 agc Exp $");
+__RCSID("$NetBSD: df.c,v 1.7 2004/04/23 22:11:44 christos Exp $");
#endif /* not lint */
/*
@@ -71,11 +71,11 @@
{
int f = FD;
struct termios cntrl;
- int speed = 0;
+ int spd = 0;
char c = '\0';
#if __GNUC__ /* XXX pacify gcc */
- (void)&speed;
+ (void)&spd;
#endif
tcgetattr(f, &cntrl);
@@ -94,8 +94,8 @@
int st = TIOCM_ST; /* secondary Transmit flag */
tcgetattr(f, &cntrl);
- speed = cfgetospeed(&cntrl);
- if (speed != B1200) { /* must dial at 1200 baud */
+ spd = cfgetospeed(&cntrl);
+ if (spd != B1200) { /* must dial at 1200 baud */
cfsetospeed(&cntrl, B1200);
cfsetispeed(&cntrl, B1200);
tcsetattr(f, TCSAFLUSH, &cntrl);
@@ -113,9 +113,9 @@
write(f, num, strlen(num));
read(f, &c, 1);
#ifdef TIOCMSET
- if (df03 && speed != B1200) {
- cfsetospeed(&cntrl, speed);
- cfsetispeed(&cntrl, speed);
+ if (df03 && spd != B1200) {
+ cfsetospeed(&cntrl, spd);
+ cfsetispeed(&cntrl, spd);
tcsetattr(f, TCSAFLUSH, &cntrl);
}
#endif
diff -r 3ecdebde8cd0 -r d13676c71a4d usr.bin/tip/aculib/hayes.c
--- a/usr.bin/tip/aculib/hayes.c Fri Apr 23 21:52:17 2004 +0000
+++ b/usr.bin/tip/aculib/hayes.c Fri Apr 23 22:11:44 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hayes.c,v 1.9 2003/08/07 11:16:22 agc Exp $ */
+/* $NetBSD: hayes.c,v 1.10 2004/04/23 22:11:44 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)hayes.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: hayes.c,v 1.9 2003/08/07 11:16:22 agc Exp $");
+__RCSID("$NetBSD: hayes.c,v 1.10 2004/04/23 22:11:44 christos Exp $");
#endif /* not lint */
/*
@@ -76,7 +76,7 @@
static int state = IDLE;
static void error_rep __P((char));
-static char gobble __P((char *));
+static char gobble __P((const char *));
static void goodbye __P((void));
static int hay_sync __P((void));
static void sigALRM __P((int));
@@ -173,7 +173,7 @@
static char
gobble(match)
- char *match;
+ const char *match;
{
char c;
sig_t f;
diff -r 3ecdebde8cd0 -r d13676c71a4d usr.bin/tip/aculib/t3000.c
--- a/usr.bin/tip/aculib/t3000.c Fri Apr 23 21:52:17 2004 +0000
+++ b/usr.bin/tip/aculib/t3000.c Fri Apr 23 22:11:44 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t3000.c,v 1.10 2003/08/07 11:16:22 agc Exp $ */
+/* $NetBSD: t3000.c,v 1.11 2004/04/23 22:11:44 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)t3000.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: t3000.c,v 1.10 2003/08/07 11:16:22 agc Exp $");
+__RCSID("$NetBSD: t3000.c,v 1.11 2004/04/23 22:11:44 christos Exp $");
#endif /* not lint */
/*
@@ -53,9 +53,9 @@
static int t3000_connect __P((void));
static void t3000_nap __P((void));
static void t3000_napx __P((int));
-static int t3000_swallow __P((char *));
+static int t3000_swallow __P((const char *));
static int t3000_sync __P((void));
-static void t3000_write __P((int, char *, int));
+static void t3000_write __P((int, const char *, int));
int
t3000_dialer(num, acu)
@@ -144,7 +144,7 @@
static int
t3000_swallow(match)
- char *match;
+ const char *match;
Home |
Main Index |
Thread Index |
Old Index