⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fconfigure.n

📁 linux系统下的音频通信
💻 N
字号:
'\" '\" Copyright (c) 1995-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\"'\" SCCS: @(#) fconfigure.n 1.23 96/04/16 08:20:07'\".so man.macros.TH fconfigure n 7.5 Tcl "Tcl Built-In Commands".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEfconfigure \- Set and get options on a channel.SH SYNOPSIS.nf\fBfconfigure \fIchannelId\fR\fBfconfigure \fIchannelId\fR \fIname\fR\fBfconfigure \fIchannelId\fR \fIname value \fR?\fIname value ...\fR?.fi.BE.SH DESCRIPTION.PPThe \fBfconfigure\fR command sets and retrieves options for channels.\fIChannelId\fR identifies the channel for which to set or query an option.If no \fIname\fR or \fIvalue\fR arguments are supplied, the commandreturns a list containing alternating option names and values for the channel.If \fIname\fR is supplied but no \fIvalue\fR then the command returnsthe current value of the given option.If one or more pairs of \fIname\fR and \fIvalue\fR are supplied, thecommand sets each of the named options to the corresponding \fIvalue\fR;in this case the return value is an empty string..PPThe options described below are supported for all channels. In addition,each channel type may add options that only it supports. See the manualentry for the command that creates each type of channels for the optionsthat that specific type of channel supports. For example, see the manualentry for the \fBsocket\fR command for its additional options..TP\fB\-blocking\fR \fIboolean\fRThe \fB\-blocking\fR option determines whether I/O operations on thechannel can cause the process to block indefinitely.The value of the option must be a proper boolean value.Channels are normally in blocking mode;  if a channel is placed intononblocking mode it will affect the operation of the \fBgets\fR,\fBread\fR, \fBputs\fR, \fBflush\fR, and \fBclose\fR commands;see the documentation for those commands for details.For nonblocking mode to work correctly, the application must beusing the Tcl event loop (e.g. by calling \fBTcl_DoOneEvent\fR orinvoking the \fBvwait\fR command)..TP\fB\-buffering\fR \fInewValue\fRIf \fInewValue\fR is \fBfull\fR then the I/O system will buffer outputuntil its internal buffer is full or until the \fBflush\fR command isinvoked. If \fInewValue\fR is \fBline\fR, then the I/O system willautomatically flush output for the channel whenever a newline characteris output. If \fInewValue\fR is \fBnone\fR, the I/O system will flushautomatically after every output operation.The default is for \fB\-buffering\fR to be set to \fBfull\fR except forchannels that connect to terminal-like devices; for these channels theinitial setting is \fBline\fR..TP\fB\-buffersize\fR \fInewSize\fR\fINewvalue\fR must be an integer; its value is used to set the size ofbuffers, in bytes, subsequently allocated for this channel to store inputor output. \fINewvalue\fR must be between ten and one million, allowingbuffers of ten to one million bytes in size..TP\fB\-eofchar\fR \fIchar\fR.TP\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fRThis option supports DOS file systems that use Control-z (\ex1a) asan end of file marker.If \fIchar\fR is not an empty string, then this character signalsend of file when it is encountered during input.For output, the end of file character is output whenthe channel is closed.If \fIchar\fR is the empty string, then there is no specialend of file character marker.For read-write channels, a two-element list specifiesthe end of file marker for input and output, respectively.As a convenience, when setting the end-of-file characterfor a read-write channelyou can specify a single value that will apply to both reading and writing.When querying the end-of-file character of a read-write channel,a two-element list will always be returned.The default value for \fB\-eofchar\fR is the empty string in allcases except for files under Windows.  In that case the \fB\-eofchar\fRis Control-z (\ex1a) for reading and the empty string for writing..TP\fB\-translation\fR \fImode\fR.TP\fB\-translation\fR \fB{\fIinMode outMode\fB}\fRIn Tcl scripts the end of a line is always represented using asingle newline character (\en).However, in actual files and devices the end of a line may berepresented differently on different platforms, or even fordifferent devices on the same platform.  For example, under UNIXnewlines are used in files, whereas carriage-return-linefeedsequences are normally used in network connections.On input (i.e., with \fBgets\fP and \fBread\fP)the Tcl I/O system automatically translates the external end-of-linerepresentation into newline characters.Upon output (i.e., with \fBputs\fP),the I/O system translates newlines to the externalend-of-line representation.The default translation mode, \fBauto\fP, handles all the commoncases automatically, but the \fB\-translation\fR option providesexplicit control over the end of line translations..RS.PPThe value associated with \fB\-translation\fR is a single item forread-only and write-only channels.The value is a two-element list for read-write channels;the read translation mode is the first element of the list,and the write translation mode is the second element.As a convenience, when setting the translation mode for a read-write channelyou can specify a single value that will apply to both reading and writing.When querying the translation mode of a read-write channel,a two-element list will always be returned.The following values are currently supported:.TP\fBauto\fRAs the input translation mode, \fBauto\fR treats any of newline (\fBlf\fP),carriage return (\fBcr\fP), or carriage return followed by a newline (\fBcrlf\fP)as the end of line representation.  The end of line representation caneven change from line-to-line, and all cases are translated to a newline.As the output translation mode, \fBauto\fR chooses a platform specificrepresentation; for sockets on all platforms Tclchooses \fBcrlf\fR, for all Unix flavors, it chooses \fBlf\fR, for theMacintosh platform it chooses \fBcr\fR and for the various flavors ofWindows it chooses \fBcrlf\fR.The default setting for \fB\-translation\fR is \fBauto\fR for bothinput and output..TP\fBbinary\fRNo end-of-line translations are performed.  This is nearly identical to\fBlf\fP mode, except that in addition \fBbinary\fP mode also sets theend of file character to the empty string, which disables it.See the description of\fB\-eofchar\fP for more information..TP\fBcr\fRThe end of a line in the underlying file or device is representedby a single carriage return character.As the input translation mode, \fBcr\fP mode converts carriage returnsto newline characters.As the output translation mode, \fBcr\fP modetranslates newline characters to carriage returns.This mode is typically used on Macintosh platforms..TP\fBcrlf\fRThe end of a line in the underlying file or device is representedby a carriage return character followed by a linefeed character.As the input translation mode, \fBcrlf\fP mode convertscarriage-return-linefeed sequencesto newline characters.As the output translation mode, \fBcrlf\fP modetranslates newline characters tocarriage-return-linefeed sequences.This mode is typically used on Windows platforms and for networkconnections..TP\fBlf\fRThe end of a line in the underlying file or device is representedby a single newline (linefeed) character.In this mode no translations occur during either input or output.This mode is typically used on UNIX platforms..RE.PP.SH "SEE ALSO"close(n), flush(n), gets(n), puts(n), read(n), socket(n).SH KEYWORDSblocking, buffering, carriage return, end of line, flushing, linemode,newline, nonblocking, platform, translation

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -