summaryrefslogtreecommitdiffstats
path: root/generic/tclIOSock.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-07-19 22:45:18 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-07-19 22:45:18 (GMT)
commit393e4ad337bfb7cbc972d974b4e9e2218e583738 (patch)
tree4e7c3ae05e6138f9ffebd641bafc3b8f6e5a8de1 /generic/tclIOSock.c
parenteef397f7b3a6573ff3515eb563eb75feb4ff0fa6 (diff)
downloadtcl-393e4ad337bfb7cbc972d974b4e9e2218e583738.zip
tcl-393e4ad337bfb7cbc972d974b4e9e2218e583738.tar.gz
tcl-393e4ad337bfb7cbc972d974b4e9e2218e583738.tar.bz2
Getting more systematic about style
Diffstat (limited to 'generic/tclIOSock.c')
-rw-r--r--generic/tclIOSock.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index 8a1a94c..366d0ab 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -1,14 +1,14 @@
-/*
+/*
* tclIOSock.c --
*
* Common routines used by all socket based channel types.
*
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
*
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOSock.c,v 1.8 2004/04/06 22:25:53 dgp Exp $
+ * RCS: @(#) $Id: tclIOSock.c,v 1.9 2005/07/19 22:45:35 dkf Exp $
*/
#include "tclInt.h"
@@ -18,14 +18,13 @@
*
* TclSockGetPort --
*
- * Maps from a string, which could be a service name, to a port.
- * Used by socket creation code to get port numbers and resolve
- * registered service names to port numbers.
+ * Maps from a string, which could be a service name, to a port. Used by
+ * socket creation code to get port numbers and resolve registered
+ * service names to port numbers.
*
* Results:
- * A standard Tcl result. On success, the port number is returned
- * in portPtr. On failure, an error message is left in the interp's
- * result.
+ * A standard Tcl result. On success, the port number is returned in
+ * portPtr. On failure, an error message is left in the interp's result.
*
* Side effects:
* None.
@@ -48,7 +47,7 @@ TclSockGetPort(interp, string, proto, portPtr)
/*
* Don't bother translating 'proto' to native.
*/
-
+
native = Tcl_UtfToExternalDString(NULL, string, -1, &ds);
sp = getservbyname(native, proto); /* INTL: Native. */
Tcl_DStringFree(&ds);
@@ -61,8 +60,8 @@ TclSockGetPort(interp, string, proto, portPtr)
return TCL_ERROR;
}
if (*portPtr > 0xFFFF) {
- Tcl_AppendResult(interp, "couldn't open socket: port number too high",
- (char *) NULL);
+ Tcl_AppendResult(interp, "couldn't open socket: port number too high",
+ (char *) NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -106,3 +105,11 @@ TclSockMinimumBuffers(sock, size)
}
return TCL_OK;
}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * fill-column: 78
+ * End:
+ */