Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/isdn minor KNFs
details: https://anonhg.NetBSD.org/src/rev/3533012af6a8
branches: trunk
changeset: 552913:3533012af6a8
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Oct 06 09:43:27 2003 +0000
description:
minor KNFs
diffstat:
usr.sbin/isdn/daicctl/istat.c | 38 +-
usr.sbin/isdn/daicctl/main.c | 48 +-
usr.sbin/isdn/daicctl/xlog.c | 42 +-
usr.sbin/isdn/dtmfdecode/dtmfdecode.c | 4 +-
usr.sbin/isdn/isdnd/alias.c | 34 +-
usr.sbin/isdn/isdnd/controller.c | 136 +-
usr.sbin/isdn/isdnd/curses.c | 238 ++--
usr.sbin/isdn/isdnd/dial.c | 24 +-
usr.sbin/isdn/isdnd/exec.c | 74 +-
usr.sbin/isdn/isdnd/fsm.c | 34 +-
usr.sbin/isdn/isdnd/holiday.c | 32 +-
usr.sbin/isdn/isdnd/isdnd.h | 4 +-
usr.sbin/isdn/isdnd/log.c | 26 +-
usr.sbin/isdn/isdnd/main.c | 400 +++---
usr.sbin/isdn/isdnd/monitor.c | 68 +-
usr.sbin/isdn/isdnd/msghdl.c | 394 +++---
usr.sbin/isdn/isdnd/pcause.c | 48 +-
usr.sbin/isdn/isdnd/process.c | 38 +-
usr.sbin/isdn/isdnd/rates.c | 166 +-
usr.sbin/isdn/isdnd/rc_config.c | 1866 ++++++++++++++++----------------
usr.sbin/isdn/isdnd/support.c | 288 ++--
usr.sbin/isdn/isdnd/timer.c | 436 +++---
usr.sbin/isdn/isdnmonitor/curses.c | 122 +-
usr.sbin/isdn/isdnmonitor/main.c | 756 ++++++------
usr.sbin/isdn/isdntel/alias.c | 26 +-
usr.sbin/isdn/isdntel/display.c | 156 +-
usr.sbin/isdn/isdntel/files.c | 18 +-
usr.sbin/isdn/isdntel/main.c | 38 +-
usr.sbin/isdn/isdntelctl/main.c | 52 +-
usr.sbin/isdn/isdntrace/1tr6.c | 960 ++++++++--------
usr.sbin/isdn/isdntrace/pcause_1tr6.c | 172 +-
usr.sbin/isdn/isdntrace/pcause_q850.c | 418 +++---
usr.sbin/isdn/isdntrace/q921.c | 58 +-
usr.sbin/isdn/isdntrace/q931.c | 1172 ++++++++++----------
usr.sbin/isdn/isdntrace/q931_util.c | 316 ++--
usr.sbin/isdn/isdntrace/q932_fac.c | 790 ++++++------
usr.sbin/isdn/isdntrace/trace.c | 442 +++---
usr.sbin/isdn/isdntrace/unknownl3.c | 18 +-
38 files changed, 4976 insertions(+), 4976 deletions(-)
diffs (truncated from 15544 to 300 lines):
diff -r 1e5140c70d80 -r 3533012af6a8 usr.sbin/isdn/daicctl/istat.c
--- a/usr.sbin/isdn/daicctl/istat.c Mon Oct 06 09:18:41 2003 +0000
+++ b/usr.sbin/isdn/daicctl/istat.c Mon Oct 06 09:43:27 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: istat.c,v 1.3 2002/04/14 11:41:43 martin Exp $ */
+/* $NetBSD: istat.c,v 1.4 2003/10/06 09:43:27 itojun Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -130,31 +130,31 @@
ok = 0;
if (r.Id) {
- switch(r.sin[1]) {
+ switch (r.sin[1]) {
case 0:
- printf("Any Service Task");
- break;
+ printf("Any Service Task");
+ break;
case 1:
- printf("Voice Task");
- break;
+ printf("Voice Task");
+ break;
case 2:
- printf("a/b Task");
- break;
+ printf("a/b Task");
+ break;
case 3:
- printf("X.21 Task");
- break;
+ printf("X.21 Task");
+ break;
case 4:
- printf("Fax G4 Task");
- break;
+ printf("Fax G4 Task");
+ break;
case 5:
- printf("Videotex Task");
- break;
+ printf("Videotex Task");
+ break;
case 7:
- printf("Transparent Data Task");
- break;
+ printf("Transparent Data Task");
+ break;
case 9:
- printf("Teletex 64 Task");
- break;
+ printf("Teletex 64 Task");
+ break;
}
printf(", Id = %02X, State = %i\n",
r.Id,r.u);
@@ -177,7 +177,7 @@
{
int i;
- for(i = 0; i < ie[0]; i++)
+ for (i = 0; i < ie[0]; i++)
printf(" %02X", ie[i+1]);
}
diff -r 1e5140c70d80 -r 3533012af6a8 usr.sbin/isdn/daicctl/main.c
--- a/usr.sbin/isdn/daicctl/main.c Mon Oct 06 09:18:41 2003 +0000
+++ b/usr.sbin/isdn/daicctl/main.c Mon Oct 06 09:43:27 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.6 2003/10/03 23:27:31 itojun Exp $ */
+/* $NetBSD: main.c,v 1.7 2003/10/06 09:43:27 itojun Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -60,29 +60,29 @@
pthrou = lflag = dflag = xflag = iflag = sflag = vflag = 0;
while ((ch = getopt(argc, argv, "d:xsvlp")) != -1)
- switch(ch) {
- case 'd':
- dnload = optarg;
- dflag = 1;
- break;
- case 's':
- sflag = 1;
- break;
- case 'l':
- lflag = 1;
- break;
- case 'x':
- xflag = 1;
- break;
- case 'v':
- vflag = 1;
- break;
- case 'p':
- pthrou = 1;
- break;
- case '?':
- default:
- usage();
+ switch (ch) {
+ case 'd':
+ dnload = optarg;
+ dflag = 1;
+ break;
+ case 's':
+ sflag = 1;
+ break;
+ case 'l':
+ lflag = 1;
+ break;
+ case 'x':
+ xflag = 1;
+ break;
+ case 'v':
+ vflag = 1;
+ break;
+ case 'p':
+ pthrou = 1;
+ break;
+ case '?':
+ default:
+ usage();
}
argc -= optind;
diff -r 1e5140c70d80 -r 3533012af6a8 usr.sbin/isdn/daicctl/xlog.c
--- a/usr.sbin/isdn/daicctl/xlog.c Mon Oct 06 09:18:41 2003 +0000
+++ b/usr.sbin/isdn/daicctl/xlog.c Mon Oct 06 09:43:27 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xlog.c,v 1.3 2002/04/14 11:41:43 martin Exp $ */
+/* $NetBSD: xlog.c,v 1.4 2003/10/06 09:43:27 itojun Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -143,48 +143,48 @@
case 1:
n = WORD(data, OFF_PAR_L1_LEN);
printf("B-X(%03d) ",n);
- for(i=0; i<n && i<30; i++)
+ for (i=0; i<n && i<30; i++)
printf("%02X ", data[OFF_PAR_L1_I+i]);
- if(n>i) printf(" ...");
+ if (n>i) printf(" ...");
break;
case 2:
n = WORD(data, OFF_PAR_L1_LEN);
printf("B-R(%03d) ", n);
- for(i=0; i<n && i<30; i++)
+ for (i=0; i<n && i<30; i++)
printf("%02X ", data[OFF_PAR_L1_I+i]);
- if(n>i) printf(" ...");
+ if (n>i) printf(" ...");
break;
case 3:
n = WORD(data, OFF_PAR_L1_LEN);
printf("D-X(%03d) ",n);
- for(i=0; i<n && i<38; i++)
+ for (i=0; i<n && i<38; i++)
printf("%02X ", data[OFF_PAR_L1_I+i]);
- if(n>i) printf(" ...");
+ if (n>i) printf(" ...");
break;
case 4:
n = WORD(data, OFF_PAR_L1_LEN);
printf("D-R(%03d) ",n);
- for(i=0; i<n && i<38; i++)
+ for (i=0; i<n && i<38; i++)
printf("%02X ", data[OFF_PAR_L1_I+i]);
- if(n>i) printf(" ...");
+ if (n>i) printf(" ...");
break;
case 5:
n = WORD(data, OFF_PAR_L2_LEN);
printf("SIG-EVENT(%03d)%04X - ", n, WORD(data, OFF_PAR_L2_CODE));
- for(i=0; i<n && i<28; i++)
+ for (i=0; i<n && i<28; i++)
printf("%02X ", data[OFF_PAR_L2_I+i]);
- if(n>i) printf(" ...");
+ if (n>i) printf(" ...");
break;
case 6:
code = WORD(data, OFF_PAR_L2_CODE);
- if(code && code <= 10)
+ if (code && code <= 10)
printf("%s IND",ll_name[code-1]);
else
printf("UNKNOWN LL IND");
break;
case 7:
code = WORD(data, OFF_PAR_L2_CODE);
- if(code && code <= 10)
+ if (code && code <= 10)
printf("%s REQ",ll_name[code-1]);
else
printf("UNKNOWN LL REQ");
@@ -192,9 +192,9 @@
case 8:
n = WORD(data, OFF_PAR_L2_LEN);
printf("DEBUG%04X - ",WORD(data, OFF_PAR_L2_CODE));
- for(i=0; i<n && i<38; i++)
+ for (i=0; i<n && i<38; i++)
printf("%02X ", data[OFF_PAR_L2_I+i]);
- if(n>i) printf(" ...");
+ if (n>i) printf(" ...");
break;
case 9:
printf("MDL-ERROR(%s)",&data[OFF_PAR_TEXT]);
@@ -208,27 +208,27 @@
case 12:
n = WORD(data, OFF_PAR_L1_LEN);
printf("X-X(%03d) ",n);
- for(i=0; i<n && i<30; i++)
+ for (i=0; i<n && i<30; i++)
printf("%02X ", data[OFF_PAR_L1_I+i]);
- if(n>i) printf(" ...");
+ if (n>i) printf(" ...");
break;
case 13:
n = WORD(data, OFF_PAR_L1_LEN);
printf("X-R(%03d) ",n);
- for(i=0; i<n && i<30; i++)
+ for (i=0; i<n && i<30; i++)
printf("%02X ", data[OFF_PAR_L1_I+i]);
- if(n>i) printf(" ...");
+ if (n>i) printf(" ...");
break;
case 14:
code = WORD(data, OFF_PAR_L2_CODE)-1;
- if((code &0x0f)<=10)
+ if ((code &0x0f)<=10)
printf("%s IND",ns_name[code &0x0f]);
else
printf("UNKNOWN NS IND");
break;
case 15:
code = WORD(data, OFF_PAR_L2_CODE)-1;
- if((code & 0x0f)<=10)
+ if ((code & 0x0f)<=10)
printf("%s REQ",ns_name[code &0x0f]);
else
printf("UNKNOWN NS REQ");
diff -r 1e5140c70d80 -r 3533012af6a8 usr.sbin/isdn/dtmfdecode/dtmfdecode.c
--- a/usr.sbin/isdn/dtmfdecode/dtmfdecode.c Mon Oct 06 09:18:41 2003 +0000
+++ b/usr.sbin/isdn/dtmfdecode/dtmfdecode.c Mon Oct 06 09:43:27 2003 +0000
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: dtmfdecode.c,v 1.2 2003/04/06 18:20:14 wiz Exp $
+ * $Id: dtmfdecode.c,v 1.3 2003/10/06 09:43:27 itojun Exp $
*
* $FreeBSD$
*
@@ -114,7 +114,7 @@
/* For each tone */
s = 0;
- for(kk = 0; kk < 8; kk++) {
+ for (kk = 0; kk < 8; kk++) {
/* Turn the crank */
c = (P2 * (x - k[kk])) / FSC;
diff -r 1e5140c70d80 -r 3533012af6a8 usr.sbin/isdn/isdnd/alias.c
--- a/usr.sbin/isdn/isdnd/alias.c Mon Oct 06 09:18:41 2003 +0000
+++ b/usr.sbin/isdn/isdnd/alias.c Mon Oct 06 09:43:27 2003 +0000
@@ -30,7 +30,7 @@
* NOTE: this has to stay in sync with isdntel/alias.c to be able
* to share a common aliasfile!
*
- * $Id: alias.c,v 1.3 2003/10/06 09:18:41 itojun Exp $
+ * $Id: alias.c,v 1.4 2003/10/06 09:43:27 itojun Exp $
*
* $FreeBSD$
*
@@ -62,7 +62,7 @@
firsta = NULL;
- if((fp = fopen(filename, "r")) == NULL)
+ if ((fp = fopen(filename, "r")) == NULL)
{
logit(LL_ERR, "init_alias: error opening aliasfile %s: %s!", filename, strerror(errno));
exit(1);
@@ -70,7 +70,7 @@
while((fgets(buffer, MAXBUFSZ, fp)) != NULL)
{
- if(buffer[0] == '#' || buffer[0] == ' ' ||
+ if (buffer[0] == '#' || buffer[0] == ' ' ||
buffer[0] == '\t' || buffer[0] == '\n')
{
continue;
@@ -94,21 +94,21 @@
*d = '\0';
Home |
Main Index |
Thread Index |
Old Index