summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-07-04 13:51:29 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-07-04 13:51:29 (GMT)
commit76681ff9cf616e99686fb280dc3e3f2b891334d9 (patch)
tree9bcbc80ca6ba9e03dde14bb4067b70f6a669b2f0 /doc
parent726415ce000fd8fd519c61d004b3fb673977ef50 (diff)
downloadtcl-76681ff9cf616e99686fb280dc3e3f2b891334d9.zip
tcl-76681ff9cf616e99686fb280dc3e3f2b891334d9.tar.gz
tcl-76681ff9cf616e99686fb280dc3e3f2b891334d9.tar.bz2
Fixing some minor nroff misuses
Diffstat (limited to 'doc')
-rw-r--r--doc/StdChannels.331
-rw-r--r--doc/exec.n71
-rw-r--r--doc/fconfigure.n4
-rw-r--r--doc/info.n24
4 files changed, 59 insertions, 71 deletions
diff --git a/doc/StdChannels.3 b/doc/StdChannels.3
index 73a5776..63d0e8b 100644
--- a/doc/StdChannels.3
+++ b/doc/StdChannels.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: StdChannels.3,v 1.9 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: StdChannels.3,v 1.10 2007/07/04 13:51:29 dkf Exp $
'\"
.so man.macros
.TH "Standard Channels" 3 7.5 Tcl "Tcl Library Procedures"
@@ -28,8 +28,7 @@ output and the other for error messages.
.PP
Tcl generalizes this concept in a cross-platform way and
exposes standard channels to the script level.
-
-.SH APIs
+.SS "APPLICATION PROGRAMMING INTERFACES"
.PP
The public API procedures dealing directly with standard channels are
\fBTcl_GetStdChannel\fR and \fBTcl_SetStdChannel\fR. Additional public
@@ -51,9 +50,11 @@ Windows NT service.)
A single standard channel is initialized when it is explicitly
specified in a call to \fBTcl_SetStdChannel\fR. The states of the
other standard channels are unaffected.
-.sp
+.RS
+.PP
Missing platform-specific standard channels do not matter here. This
approach is not available at the script level.
+.RE
.TP
2)
All uninitialized standard channels are initialized to
@@ -69,9 +70,7 @@ when information about any standard channel is requested with a call
to \fBTcl_GetStdChannel\fR, or with a call to \fBTcl_GetChannel\fR
which specifies one of the standard names (\fBstdin\fR, \fBstdout\fR
and \fBstderr\fR).
-.RE
-.sp
-.RS
+.PP
In case of missing platform-specific standard channels, the Tcl
standard channels are considered as initialized and then immediately
closed. This means that the first three Tcl channels then opened by
@@ -82,14 +81,13 @@ the application are designated as the Tcl standard channels.
All uninitialized standard channels are initialized to
platform-specific default values when a user-requested channel is
registered with \fBTcl_RegisterChannel\fR.
-.sp
+.PP
In case of unavailable platform-specific standard channels the channel
whose creation caused the initialization of the Tcl standard channels
is made a normal channel. The next three Tcl channels opened by the
application are designated as the Tcl standard channels. In other
words, of the first four Tcl channels opened by the application the
second to fourth are designated as the Tcl standard channels.
-.PP
.SH "RE-INITIALIZATION OF TCL STANDARD CHANNELS"
.PP
Once a Tcl standard channel is initialized through one of the methods
@@ -103,21 +101,20 @@ channel, too. If more than one Tcl standard channel was closed
that slot was not initialized before. It is this behavior which
enables an application to employ method 1 of initialization, i.e. to
create and designate their own Tcl standard channels.
-
-.SH tclsh
+.SH "SHELL-SPECIFIC DETAILS"
+.SS tclsh
.PP
-The Tcl shell (or rather \fBTcl_Main\fR) uses method 2 to initialize
+The Tcl shell (or rather the function \fBTcl_Main\fR, which forms the
+core of the shell's implementation) uses method 2 to initialize
the standard channels.
-
-.SH wish
+.SS wish
.PP
-The windowing shell (or rather \fBTk_MainEx\fR) uses method 1 to
+The windowing shell (or rather the function \fBTk_MainEx\fR, which
+forms the core of the shell's implementation) uses method 1 to
initialize the standard channels (See \fBTk_InitConsoleChannels\fR)
on non-Unix platforms. On Unix platforms, \fBTk_MainEx\fR implicitly
uses method 2 to initialize the standard channels.
-
.SH "SEE ALSO"
Tcl_CreateChannel(3), Tcl_RegisterChannel(3), Tcl_GetChannel(3), Tcl_GetStdChannel(3), Tcl_SetStdChannel(3), Tk_InitConsoleChannels(3), tclsh(1), wish(1), Tcl_Main(3), Tk_MainEx(3)
-
.SH KEYWORDS
standard channels
diff --git a/doc/exec.n b/doc/exec.n
index cd965b2..a646f79 100644
--- a/doc/exec.n
+++ b/doc/exec.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: exec.n,v 1.15 2006/12/04 23:13:20 dkf Exp $
+'\" RCS: @(#) $Id: exec.n,v 1.16 2007/07/04 13:51:29 dkf Exp $
'\"
.so man.macros
.TH exec n 8.5 Tcl "Tcl Built-In Commands"
@@ -185,7 +185,6 @@ If the name contains a slash then it must refer to an executable
reachable from the current directory.
No ``glob'' expansion or other shell-like substitutions
are performed on the arguments to commands.
-
.SH "PORTABILITY ISSUES"
.TP
\fBWindows\fR (all versions)
@@ -196,12 +195,13 @@ application will hang and a 32-bit application will return immediately with
end-of-file. When either type of application writes to a socket, the
information is instead sent to the console, if one is present, or is
discarded.
-.sp
+.RS
+.PP
The Tk console text widget does not provide real standard IO capabilities.
Under Tk, when redirecting from standard input, all applications will see an
immediate end-of-file; information redirected to standard output or standard
error will be discarded.
-.sp
+.PP
Either forward or backward slashes are accepted as path separators for
arguments to Tcl commands. When executing an application, the path name
specified for the application may also contain forward or backward slashes
@@ -212,12 +212,12 @@ path name with forward slashes will not automatically be converted to use
the backslash character. If an argument contains forward slashes as the
path separator, it may or may not be recognized as a path name, depending on
the program.
-.sp
+.PP
Additionally, when calling a 16-bit DOS or Windows 3.X application, all path
names must use the short, cryptic, path format (e.g., using ``applba~1.def''
instead of ``applbakery.default''), which can be obtained with the
\fBfile attributes $fileName -shortname\fR command.
-.sp
+.PP
Two or more forward or backward slashes in a row in a path refer to a
network path. For example, a simple concatenation of the root directory
\fBc:/\fR with a subdirectory \fB/windows/system\fR will yield
@@ -226,25 +226,29 @@ point called \fBsystem\fR on the machine called \fBwindows\fR (and the
\fBc:/\fR is ignored), and is not equivalent to \fBc:/windows/system\fR,
which describes a directory on the current computer. The \fBfile join\fR
command should be used to concatenate path components.
-.sp
-.RS
+.PP
Note that there are two general types of Win32 console applications:
.RS
-1) CLI -- CommandLine Interface, simple stdio exchange. \fBnetstat.exe\fR for
+.TP
+1) CLI
+.
+CommandLine Interface, simple stdio exchange. \fBnetstat.exe\fR for
example.
-.br
-2) TUI -- Textmode User Interface, any application that accesses the console
+.TP
+2) TUI
+.
+Textmode User Interface, any application that accesses the console
API for doing such things as cursor movement, setting text color, detecting
key presses and mouse movement, etc. An example would be \fBtelnet.exe\fR
from Windows 2000. These types of applications are not common in a windows
environment, but do exist.
.RE
+.PP
\fBexec\fR will not work well with TUI applications when a console is not
present, as is done when launching applications under wish. It is desirable
to have console applications hidden and detached. This is a designed-in
limitation as \fBexec\fR wants to communicate over pipes. The Expect
extension addresses this issue when communicating with a TUI application.
-.sp
.RE
.TP
\fBWindows NT\fR
@@ -255,26 +259,23 @@ the name as it was specified. Then, in order, \fB.com\fR, \fB.exe\fR, and
for the longer name. If a directory name was not specified as part of the
application name, the following directories are automatically searched in
order when attempting to locate the application:
-.sp
-.RS
.RS
+.IP \(bu
The directory from which the Tcl executable was loaded.
-.br
+.IP \(bu
The current directory.
-.br
+.IP \(bu
The Windows NT 32-bit system directory.
-.br
+.IP \(bu
The Windows NT 16-bit system directory.
-.br
+.IP \(bu
The Windows NT home directory.
-.br
+.IP \(bu
The directories listed in the path.
-.RE
-.sp
+.PP
In order to execute shell built-in commands like \fBdir\fR and \fBcopy\fR,
the caller must prepend the desired command with ``\fBcmd.exe /c\0\fR''
because built-in commands are not implemented using executables.
-.sp
.RE
.TP
\fBWindows 9x\fR
@@ -285,31 +286,29 @@ the name as it was specified. Then, in order, \fB.com\fR, \fB.exe\fR, and
for the longer name. If a directory name was not specified as part of the
application name, the following directories are automatically searched in
order when attempting to locate the application:
-.sp
-.RS
.RS
+.IP \(bu
The directory from which the Tcl executable was loaded.
-.br
+.IP \(bu
The current directory.
-.br
+.IP \(bu
The Windows 9x system directory.
-.br
+.IP \(bu
The Windows 9x home directory.
-.br
+.IP \(bu
The directories listed in the path.
-.RE
-.sp
+.PP
In order to execute shell built-in commands like \fBdir\fR and \fBcopy\fR,
the caller must prepend the desired command with ``\fBcommand.com /c\0\fR''
because built-in commands are not implemented using executables.
-.sp
+.PP
Once a 16-bit DOS application has read standard input from a console and
then quit, all subsequently run 16-bit DOS applications will see the
standard input as already closed. 32-bit applications do not have this
problem and will run correctly, even after a 16-bit DOS application thinks
that standard input is closed. There is no known workaround for this bug
at this time.
-.sp
+.PP
Redirection between the \fBNUL:\fR device and a 16-bit application does not
always work. When redirecting from \fBNUL:\fR, some applications may hang,
others will get an infinite stream of ``0x01'' bytes, and some will actually
@@ -317,7 +316,7 @@ correctly get an immediate end-of-file; the behavior seems to depend upon
something compiled into the application itself. When redirecting greater than
4K or so to \fBNUL:\fR, some applications will hang. The above problems do not
happen with 32-bit applications.
-.sp
+.PP
All DOS 16-bit applications are run synchronously. All standard input from
a pipe to a 16-bit DOS application is collected into a temporary file; the
other end of the pipe must be closed before the 16-bit DOS application
@@ -327,7 +326,7 @@ must terminate before the temporary files are redirected to the next stage
of the pipeline. This is due to a workaround for a Windows 95 bug in the
implementation of pipes, and is how the standard Windows 95 DOS shell
handles pipes itself.
-.sp
+.PP
Certain applications, such as \fBcommand.com\fR, should not be executed
interactively. Applications which directly access the console window,
rather than reading from their standard input and writing to their standard
@@ -337,7 +336,6 @@ console window is not available to them.
.TP
\fBUnix\fR\0\0\0\0\0\0\0
The \fBexec\fR command is fully functional and works as described.
-
.SH "UNIX EXAMPLES"
Here are some examples of the use of the \fBexec\fR command on Unix.
.PP
@@ -379,7 +377,6 @@ this:
.CS
\fBexec\fR ls -l {*}[glob *.tcl]
.CE
-.PP
.SH "WINDOWS EXAMPLES"
Here are some examples of the use of the \fBexec\fR command on Windows.
.PP
@@ -419,9 +416,7 @@ the \fBglob\fR command.) To do that, use this:
.CS
\fBexec\fR {*}[auto_execok dir] *.tcl
.CE
-
.SH "SEE ALSO"
error(n), open(n)
-
.SH KEYWORDS
execute, pipeline, redirection, subprocess
diff --git a/doc/fconfigure.n b/doc/fconfigure.n
index 044b21e..3ce53e0 100644
--- a/doc/fconfigure.n
+++ b/doc/fconfigure.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: fconfigure.n,v 1.17 2006/11/15 09:23:01 dkf Exp $
+'\" RCS: @(#) $Id: fconfigure.n,v 1.18 2007/07/04 13:51:29 dkf Exp $
'\"
.so man.macros
.TH fconfigure n 8.3 Tcl "Tcl Built-In Commands"
@@ -168,8 +168,8 @@ No end-of-line translations are performed. This is nearly identical to
end-of-file character to the empty string (which disables it) and sets the
encoding to \fBbinary\fR (which disables encoding filtering). See the
description of \fB\-eofchar\fR and \fB\-encoding\fR for more information.
-.PP
.RS
+.PP
Internally, i.e. when it comes to the actual behaviour of the
translator this value \fBis\fR identical to \fBlf\fR and is therefore
reported as such when queried. Even if \fBbinary\fR was used to set
diff --git a/doc/info.n b/doc/info.n
index 5b23525..79bc0e0 100644
--- a/doc/info.n
+++ b/doc/info.n
@@ -7,7 +7,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: info.n,v 1.18 2006/11/28 22:20:27 andreas_kupries Exp $
+'\" RCS: @(#) $Id: info.n,v 1.19 2007/07/04 13:51:29 dkf Exp $
'\"
.so man.macros
.TH info n 8.4 Tcl "Tcl Built-In Commands"
@@ -82,7 +82,6 @@ into variable \fIvarname\fR.
Returns \fB1\fR if the variable named \fIvarName\fR exists in the
current context (either as a global or local variable) and has been
defined by being given a value, returns \fB0\fR otherwise.
-
.TP
\fBinfo frame\fR ?\fInumber\fR?
This command provides access to all frames on the stack, even those
@@ -116,17 +115,17 @@ for the command. The recognized values are \fBsource\fR, \fBproc\fR,
\fBeval\fR, and \fBprecompiled\fR.
.RS
.TP
-\fBsource\fR
+\fBsource\fR\0\0\0\0\0\0\0\0
means that the command is found in a script loaded by the \fBsource\fR
command.
.TP
-\fBproc\fR
+\fBproc\fR\0\0\0\0\0\0\0\0
means that the command is found in dynamically created procedure body.
.TP
-\fBeval\fR
+\fBeval\fR\0\0\0\0\0\0\0\0
means that the command is executed by \fBeval\fR or \fBuplevel\fR.
.TP
-\fBprecompiled\fR
+\fBprecompiled\fR\0\0\0\0\0\0\0\0
means that the command is found in a precompiled script (loadable by
the package \fBtbcload\fR), and no further information will be
available.
@@ -163,28 +162,26 @@ definition of the lambda in question.
This entry is present only if the queried frame has a corresponding
frame returned by \fBinfo level\fR. It provides the index of this
frame, relative to the current level (0 and negative numbers).
-.RE
-.sp
-.RS
+.PP
A thing of note is that for procedures statically defined in files the
locations of commands in their bodies will be reported with type
\fBsource\fR and absolute line numbers, and not as type
\fBproc\fR. The same is true for procedures nested in statically
defined procedures, and literal eval scripts in files or statically
defined procedures.
-.sp
+.PP
In contrast, a procedure definition or \fBeval\fR within a dynamically
\fBeval\fRuated environment count linenumbers relative to the start of
their script, even if they would be able to count relative to the
start of the outer dynamic script. That type of number usually makes
more sense.
-.sp
+.PP
A different way of describing this behaviour is that file based
locations are tracked as deeply as possible, and where this is not
possible the lines are counted based on the smallest possible
\fBeval\fR or procedure body, as that scope is usually easier to find
than any dynamic outer scope.
-.sp
+.PP
The syntactic form \fB{expand}\fR is handled like \fBeval\fR. I.e. if it
is given a literal list argument the system tracks the linenumber
within the list words as well, and otherwise all linenumbers are
@@ -321,6 +318,7 @@ been set (e.g. a variable declared but not set by \fBvariable\fR).
.SH EXAMPLE
This command prints out a procedure suitable for saving in a Tcl
script:
+.PP
.CS
proc printProc {procName} {
set result [list proc $procName]
@@ -337,10 +335,8 @@ proc printProc {procName} {
puts [lappend result $formals [\fBinfo body\fR $procName]]
}
.CE
-
.SH "SEE ALSO"
global(n), proc(n)
-
.SH KEYWORDS
command, information, interpreter, level, namespace, procedure, variable