--- a/usr/src/lib/libnsl/dial/conn.c Thu Apr 30 13:51:44 2009 -0700
+++ b/usr/src/lib/libnsl/dial/conn.c Thu Apr 30 16:35:44 2009 -0700
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -24,12 +23,10 @@
/* All Rights Reserved */
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "mt.h"
#include "uucp.h"
static char _ProtoSys[40]; /* protocol string from Systems file entry */
@@ -80,12 +77,12 @@
* When a failure occurs, Uerror is set.
*/
+static void sysreset(void);
static int
conn(char *system)
{
int nf, fn = FAIL;
char *flds[F_MAX+1];
- static void sysreset(void);
CDEBUG(4, "conn(%s)\n", system);
Uerror = 0;
@@ -96,7 +93,7 @@
continue;
if (EQUALS(Progname, "uucico")) {
if (chat(nf - F_LOGIN, flds + F_LOGIN, fn, "", "") ==
- SUCCESS) {
+ SUCCESS) {
sysreset();
return (fn); /* successful return */
}
@@ -121,6 +118,8 @@
return (FAIL);
}
+static void devreset(void);
+
/*
* getto - connect to remote machine
*
@@ -137,13 +136,12 @@
int dcf = -1;
int reread = 0;
int tries = 0; /* count of call attempts - for limit purposes */
- static void devreset(void);
CDEBUG(1, "Device Type %s wanted\n", flds[F_TYPE]);
Uerror = 0;
while (tries < TRYCALLS) {
if ((status = rddev(flds[F_TYPE], dev, devbuf, D_MAX)) ==
- FAIL) {
+ FAIL) {
if (tries == 0 || ++reread >= TRYCALLS)
break;
devreset();
@@ -193,7 +191,7 @@
dev[D_CLASS] = flds[F_CLASS];
return (SUCCESS);
} else if (EQUALS(flds[F_CLASS], "Any") ||
- EQUALS(flds[F_CLASS], dev[D_CLASS]))
+ EQUALS(flds[F_CLASS], dev[D_CLASS]))
return (SUCCESS);
else
return (FAIL);
@@ -217,7 +215,7 @@
while (getdevline(buf, BUFSIZ)) {
if (buf[0] == ' ' || buf[0] == '\t' || buf[0] == '\n' ||
- buf[0] == '\0' || buf[0] == '#')
+ buf[0] == '\0' || buf[0] == '#')
continue;
na = getargs(buf, dev, devcount);
ASSERT(na >= D_CALLER, "BAD LINE", buf, na);
@@ -314,7 +312,7 @@
continue;
/* check if requested Mytype device type */
if ((Mytype != CNULL) &&
- (!EQUALSN(flds[F_TYPE], Mytype, strlen(Mytype)))) {
+ (!EQUALSN(flds[F_TYPE], Mytype, strlen(Mytype)))) {
DEBUG(7, "Skipping entry in '%s'", currsys());
DEBUG(7, " - type (%s) not wanted.\n", flds[F_TYPE]);
continue;
@@ -555,8 +553,8 @@
CDEBUG(4, "Received hangup\n%s", "");
if (clear_hup(dcf) != SUCCESS) {
- CDEBUG(4, "Unable to clear hup on device\n%s", "");
- return (FAIL);
+ CDEBUG(4, "Unable to clear hup on device\n%s", "");
+ return (FAIL);
}
return (SUCCESS);
}
@@ -676,7 +674,7 @@
case 'm': /* no modem control - clear CLOCAL */
FLUSH();
CDEBUG(5, ")\n%s CLOCAL ",
- (*sptr == 'M' ? "set" : "clear"));
+ (*sptr == 'M' ? "set" : "clear"));
if ((*Ioctl)(fn, TCGETA, &ttybuf) != 0) {
/*EMPTY*/
CDEBUG(5,
@@ -876,7 +874,7 @@
s++;
if ((sscanf(s, "%d-%d", &t__low, &t__high) < 2) ||
- (t__low == t__high))
+ (t__low == t__high))
return (1);
/* 0000 crossover? */