diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-12-18 21:23:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-12-18 21:23:47 (GMT) |
commit | 2cc77fb13283a1fb2330293fd0d7326b5569ec4c (patch) | |
tree | a4cd0d4bb2516e89a05f2bc0ca288cb792d48991 | |
parent | 404238ca7e941ab1baf288c6b14b1f5acdec0643 (diff) | |
download | tcl-2cc77fb13283a1fb2330293fd0d7326b5569ec4c.zip tcl-2cc77fb13283a1fb2330293fd0d7326b5569ec4c.tar.gz tcl-2cc77fb13283a1fb2330293fd0d7326b5569ec4c.tar.bz2 |
Formatting cleanup.
-rw-r--r-- | doc/Access.3 | 73 | ||||
-rw-r--r-- | doc/AddErrInfo.3 | 12 | ||||
-rw-r--r-- | doc/GetTime.3 | 4 | ||||
-rw-r--r-- | doc/ListObj.3 | 12 | ||||
-rw-r--r-- | doc/Notifier.3 | 18 | ||||
-rw-r--r-- | doc/Object.3 | 6 | ||||
-rw-r--r-- | doc/ObjectType.3 | 4 | ||||
-rw-r--r-- | doc/PkgRequire.3 | 6 | ||||
-rw-r--r-- | doc/SplitList.3 | 6 | ||||
-rw-r--r-- | doc/StaticPkg.3 | 6 | ||||
-rw-r--r-- | doc/StringObj.3 | 16 | ||||
-rw-r--r-- | doc/TclZlib.3 | 4 |
12 files changed, 83 insertions, 84 deletions
diff --git a/doc/Access.3 b/doc/Access.3 index c464caa..6ee1f26 100644 --- a/doc/Access.3 +++ b/doc/Access.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: Access.3,v 1.9 2004/10/07 14:44:31 dkf Exp $ +'\" RCS: @(#) $Id: Access.3,v 1.10 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_Access 3 8.1 Tcl "Tcl Library Procedures" @@ -25,52 +25,49 @@ int .AP char *path in Native name of the file to check the attributes of. .AP int mode in -Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK, -W_OK and X_OK request checking whether the file exists and has read, -write and execute permissions, respectively. F_OK just requests -checking for the existence of the file. +Mask consisting of one or more of \fBR_OK\fR, \fBW_OK\fR, \fBX_OK\fR and +\fBF_OK\fR. \fBR_OK\fR, \fBW_OK\fR and \fBX_OK\fR request checking whether the +file exists and has read, write and execute permissions, respectively. +\fBF_OK\fR just requests a check for the existence of the file. .AP "struct stat" *statPtr out The structure that contains the result. .BE - .SH DESCRIPTION .PP -As of Tcl 8.4, the object-based APIs \fBTcl_FSAccess\fR and -\fBTcl_FSStat\fR should be used in preference to \fBTcl_Access\fR and -\fBTcl_Stat\fR, wherever possible. +As of Tcl 8.4, the object-based APIs \fBTcl_FSAccess\fR and \fBTcl_FSStat\fR +should be used in preference to \fBTcl_Access\fR and \fBTcl_Stat\fR, wherever +possible. Those functions also support Tcl's virtual filesystem layer, which +these do not. +.SS "OBSOLETE FUNCTIONS" .PP -There are two reasons for calling \fBTcl_Access\fR and \fBTcl_Stat\fR -rather than calling system level functions \fBaccess\fR and \fBstat\fR -directly. First, the Windows implementation of both functions fixes -some bugs in the system level calls. Second, both \fBTcl_Access\fR -and \fBTcl_Stat\fR (as well as \fBTcl_OpenFileChannelProc\fR) hook -into a linked list of functions. This allows the possibility to reroute -file access to alternative media or access methods. +There are two reasons for calling \fBTcl_Access\fR and \fBTcl_Stat\fR rather +than calling system level functions \fBaccess\fR and \fBstat\fR directly. +First, the Windows implementation of both functions fixes some bugs in the +system level calls. Second, both \fBTcl_Access\fR and \fBTcl_Stat\fR (as well +as \fBTcl_OpenFileChannelProc\fR) hook into a linked list of functions. This +allows the possibility to reroute file access to alternative media or access +methods. .PP -\fBTcl_Access\fR checks whether the process would be allowed to read, -write or test for existence of the file (or other file system object) -whose name is pathname. If pathname is a symbolic link on Unix, -then permissions of the file referred by this symbolic link are -tested. +\fBTcl_Access\fR checks whether the process would be allowed to read, write or +test for existence of the file (or other file system object) whose name is +\fIpath\fR. If \fIpath\fR is a symbolic link on Unix, then permissions of the +file referred by this symbolic link are tested. .PP -On success (all requested permissions granted), zero is returned. On -error (at least one bit in mode asked for a permission that is denied, -or some other error occurred), -1 is returned. +On success (all requested permissions granted), zero is returned. On error (at +least one bit in mode asked for a permission that is denied, or some other +error occurred), -1 is returned. .PP -\fBTcl_Stat\fR fills the stat structure \fIstatPtr\fR with information -about the specified file. You do not need any access rights to the -file to get this information but you need search rights to all -directories named in the path leading to the file. The stat structure -includes info regarding device, inode (always 0 on Windows), -privilege mode, nlink (always 1 on Windows), user id (always 0 on -Windows), group id (always 0 on Windows), rdev (same as device on -Windows), size, last access time, last modification time, and creation -time. +\fBTcl_Stat\fR fills the stat structure \fIstatPtr\fR with information about +the specified file. You do not need any access rights to the file to get this +information but you need search rights to all directories named in the path +leading to the file. The stat structure includes info regarding device, inode +(always 0 on Windows), privilege mode, nlink (always 1 on Windows), user id +(always 0 on Windows), group id (always 0 on Windows), rdev (same as device on +Windows), size, last access time, last modification time, and creation time. .PP -If \fIpath\fR exists, \fBTcl_Stat\fR returns 0 and the stat structure -is filled with data. Otherwise, -1 is returned, and no stat info is -given. - +If \fIpath\fR exists, \fBTcl_Stat\fR returns 0 and the stat structure is +filled with data. Otherwise, -1 is returned, and no stat info is given. .SH KEYWORDS stat, access - +.SH "SEE ALSO" +Tcl_FSAccess(3), Tcl_FSStat(3) diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index ae136ce..9462b37 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.24 2008/12/15 18:33:24 dgp Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.25 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_AddErrorInfo 3 8.5 Tcl "Tcl Library Procedures" @@ -83,7 +83,6 @@ Pointer to first character in command that generated the error .AP int commandLength in Number of bytes in command; -1 means use all bytes up to first null byte .BE - .SH DESCRIPTION .PP The \fBTcl_SetReturnOptions\fR and \fBTcl_GetReturnOptions\fR @@ -119,7 +118,7 @@ retrieve the stack trace when script evaluation returns .CS int code = Tcl_Eval(interp, script); if (code == TCL_ERROR) { - Tcl_Obj *options = Tcl_GetReturnOptions(interp, code); + Tcl_Obj *options = \fBTcl_GetReturnOptions\fR(interp, code); Tcl_Obj *key = Tcl_NewStringObj("-errorinfo", -1); Tcl_Obj *stackTrace; Tcl_IncrRefCount(key); @@ -146,7 +145,7 @@ if ((objc % 2) == 0) { /* explicit result argument */ objc--; Tcl_SetObjResult(interp, objv[objc]); } -return Tcl_SetReturnOptions(interp, Tcl_NewListObj(objc-1, objv+1)); +return \fBTcl_SetReturnOptions\fR(interp, Tcl_NewListObj(objc-1, objv+1)); .CE .PP (It is not really implemented that way. Internal access @@ -302,9 +301,8 @@ The global variables \fBerrorInfo\fR and \fBerrorCode\fR are not modified by \fBTcl_ResetResult\fR so they continue to hold a record of information about the most recent error seen in an interpreter. - .SH "SEE ALSO" -Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_Interp, Tcl_ResetResult, Tcl_SetErrno - +Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_Interp(3), Tcl_ResetResult(3), +Tcl_SetErrno(3) .SH KEYWORDS error, object, object result, stack, trace, variable diff --git a/doc/GetTime.3 b/doc/GetTime.3 index 6927c5e..be6c1ba 100644 --- a/doc/GetTime.3 +++ b/doc/GetTime.3 @@ -46,8 +46,8 @@ structure has the following definition: .PP .CS typedef struct Tcl_Time { - long sec; - long usec; + long \fIsec\fR; + long \fIusec\fR; } \fBTcl_Time\fR; .CE .PP diff --git a/doc/ListObj.3 b/doc/ListObj.3 index 070e1b6..6215fc2 100644 --- a/doc/ListObj.3 +++ b/doc/ListObj.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: ListObj.3,v 1.12 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: ListObj.3,v 1.13 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_ListObj 3 8.0 Tcl "Tcl Library Procedures" @@ -222,7 +222,7 @@ referenced by the array of object pointers \fIobjv\fR just before the element \fIindex\fR of the list referenced by \fIlistPtr\fR: .PP .CS -result = Tcl_ListObjReplace(interp, listPtr, index, 0, +result = \fBTcl_ListObjReplace\fR(interp, listPtr, index, 0, objc, objv); .CE .PP @@ -231,9 +231,9 @@ referenced by the array \fIobjv\fR to the end of the list \fIlistPtr\fR: .PP .CS -result = Tcl_ListObjLength(interp, listPtr, &length); +result = \fBTcl_ListObjLength\fR(interp, listPtr, &length); if (result == TCL_OK) { - result = Tcl_ListObjReplace(interp, listPtr, length, 0, + result = \fBTcl_ListObjReplace\fR(interp, listPtr, length, 0, objc, objv); } .CE @@ -243,10 +243,10 @@ by simply calling \fBTcl_ListObjReplace\fR with a NULL \fIobjvPtr\fR: .PP .CS -result = Tcl_ListObjReplace(interp, listPtr, first, count, +result = \fBTcl_ListObjReplace\fR(interp, listPtr, first, count, 0, NULL); .CE .SH "SEE ALSO" -Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult +Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_GetObjResult(3) .SH KEYWORDS append, index, insert, internal representation, length, list, list object, list type, object, object type, replace, string representation diff --git a/doc/Notifier.3 b/doc/Notifier.3 index 74aa77b..8239d8d 100644 --- a/doc/Notifier.3 +++ b/doc/Notifier.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Notifier.3,v 1.24 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: Notifier.3,v 1.25 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Notifier 3 8.1 Tcl "Tcl Library Procedures" @@ -552,14 +552,14 @@ structure has the following layout: .PP .CS typedef struct Tcl_NotifierProcs { - Tcl_SetTimerProc *setTimerProc; - Tcl_WaitForEventProc *waitForEventProc; - Tcl_CreateFileHandlerProc *createFileHandlerProc; - Tcl_DeleteFileHandlerProc *deleteFileHandlerProc; - Tcl_InitNotifierProc *initNotifierProc; - Tcl_FinalizeNotifierProc *finalizeNotifierProc; - Tcl_AlertNotifierProc *alertNotifierProc; - Tcl_ServiceModeHookProc *serviceModeHookProc; + Tcl_SetTimerProc *\fIsetTimerProc\fR; + Tcl_WaitForEventProc *\fIwaitForEventProc\fR; + Tcl_CreateFileHandlerProc *\fIcreateFileHandlerProc\fR; + Tcl_DeleteFileHandlerProc *\fIdeleteFileHandlerProc\fR; + Tcl_InitNotifierProc *\fIinitNotifierProc\fR; + Tcl_FinalizeNotifierProc *\fIfinalizeNotifierProc\fR; + Tcl_AlertNotifierProc *\fIalertNotifierProc\fR; + Tcl_ServiceModeHookProc *\fIserviceModeHookProc\fR; } \fBTcl_NotifierProcs\fR; .CE .PP diff --git a/doc/Object.3 b/doc/Object.3 index 00b4cec..9992653 100644 --- a/doc/Object.3 +++ b/doc/Object.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: Object.3,v 1.22 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: Object.3,v 1.23 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_Obj 3 8.5 Tcl "Tcl Library Procedures" @@ -334,8 +334,8 @@ by inserting \fIobjc-3\fR new elements before \fIindex\fR. .PP .CS listPtr = objv[1]; -if (Tcl_IsShared(listPtr)) { - listPtr = Tcl_DuplicateObj(listPtr); +if (\fBTcl_IsShared\fR(listPtr)) { + listPtr = \fBTcl_DuplicateObj\fR(listPtr); } result = Tcl_ListObjReplace(interp, listPtr, index, 0, (objc-3), &(objv[3])); diff --git a/doc/ObjectType.3 b/doc/ObjectType.3 index 30158ce..9803615 100644 --- a/doc/ObjectType.3 +++ b/doc/ObjectType.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: ObjectType.3,v 1.20 2008/07/27 22:18:21 nijtmans Exp $ +'\" RCS: @(#) $Id: ObjectType.3,v 1.21 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures" @@ -164,7 +164,7 @@ replace it with a new one or reset the \fItypePtr\fR member to NULL. The \fIsetFromAnyProc\fR member may be set to NULL, if the routines making use of the internal representation have no need to derive that internal representation from an arbitrary string value. However, in -this case, passing a pointer to the type to Tcl_ConvertToType() will +this case, passing a pointer to the type to \fBTcl_ConvertToType\fR will lead to a panic, so to avoid this possibility, the type should \fInot\fR be registered. .SS "THE UPDATESTRINGPROC FIELD" diff --git a/doc/PkgRequire.3 b/doc/PkgRequire.3 index 61f368c..38b2ef1 100644 --- a/doc/PkgRequire.3 +++ b/doc/PkgRequire.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: PkgRequire.3,v 1.11 2006/10/18 18:46:59 dgp Exp $ +'\" RCS: @(#) $Id: PkgRequire.3,v 1.12 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures" @@ -61,7 +61,6 @@ Number of requirements. .AP Tcl_Obj* objv[] in Array of requirements. .BE - .SH DESCRIPTION .PP These procedures provide C-level interfaces to Tcl's package and @@ -93,6 +92,7 @@ functions. \fBTcl_PkgRequireProc\fR is the form of \fBpackage require\fR handling multiple requirements. The other forms are present for backward compatibility and translate their invokations to this form. - .SH KEYWORDS package, present, provide, require, version +.SH "SEE ALSO" +package(n), Tcl_StaticPackage(3) diff --git a/doc/SplitList.3 b/doc/SplitList.3 index 73ff969..b57911b 100644 --- a/doc/SplitList.3 +++ b/doc/SplitList.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SplitList.3,v 1.16 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: SplitList.3,v 1.17 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_SplitList 3 8.0 Tcl "Tcl Library Procedures" @@ -87,7 +87,7 @@ int argc, code; char *string; char **argv; \&... -code = Tcl_SplitList(interp, string, &argc, &argv); +code = \fBTcl_SplitList\fR(interp, string, &argc, &argv); .CE .PP Then you should eventually free the storage with a call like the @@ -186,3 +186,5 @@ the length of string \fIsrc\fR is specified by the \fIlength\fR argument, and the string may contain embedded nulls. .SH KEYWORDS backslash, convert, element, list, merge, split, strings +.SH "SEE ALSO" +Tcl_GetListFromObj(3) diff --git a/doc/StaticPkg.3 b/doc/StaticPkg.3 index 975b961..4a194dc 100644 --- a/doc/StaticPkg.3 +++ b/doc/StaticPkg.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: StaticPkg.3,v 1.11 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: StaticPkg.3,v 1.12 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_StaticPackage 3 7.5 Tcl "Tcl Library Procedures" @@ -31,7 +31,7 @@ Procedure to invoke to incorporate this package into a trusted interpreter. .AP Tcl_PackageInitProc *safeInitProc in Procedure to call to incorporate this package into a safe interpreter -(one that will execute untrusted scripts). NULL means the package +(one that will execute untrusted scripts). NULL means the package cannot be used in safe interpreters. .BE .SH DESCRIPTION @@ -68,3 +68,5 @@ be returned as the result of the \fBload\fR command that caused the initialization procedure to be invoked. .SH KEYWORDS initialization procedure, package, static linking +.SH "SEE ALSO" +load(n), package(n), Tcl_PkgRequire(3) diff --git a/doc/StringObj.3 b/doc/StringObj.3 index 5e08d8e..f8e6552 100644 --- a/doc/StringObj.3 +++ b/doc/StringObj.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: StringObj.3,v 1.29 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: StringObj.3,v 1.30 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures" @@ -277,7 +277,7 @@ command. The actual command procedure for \fBformat\fR is little more than .PP .CS -Tcl_Format(interp, Tcl_GetString(objv[1]), objc-2, objv+2); +\fBTcl_Format\fR(interp, \fBTcl_GetString\fR(objv[1]), objc-2, objv+2); .CE .PP The \fIobjc\fR Tcl_Obj values in \fIobjv\fR are formatted into a string @@ -292,9 +292,9 @@ is non-NULL. of \fBTcl_Format\fR with functionality equivalent to: .PP .CS -Tcl_Obj *newPtr = Tcl_Format(interp, format, objc, objv); +Tcl_Obj *newPtr = \fBTcl_Format\fR(interp, format, objc, objv); if (newPtr == NULL) return TCL_ERROR; -Tcl_AppendObjToObj(objPtr, newPtr); +\fBTcl_AppendObjToObj\fR(objPtr, newPtr); return TCL_OK; .CE .PP @@ -306,7 +306,7 @@ functionality is needed. .CS char buf[SOME_SUITABLE_LENGTH]; sprintf(buf, format, ...); -Tcl_NewStringObj(buf, -1); +\fBTcl_NewStringObj\fR(buf, -1); .CE .PP but with greater convenience and no need to @@ -325,7 +325,7 @@ this example usage, \fIx\fR is of type \fBlong\fR. .PP .CS long x = 5; -Tcl_Obj *objPtr = Tcl_ObjPrintf("Value is %d", x); +Tcl_Obj *objPtr = \fBTcl_ObjPrintf\fR("Value is %d", x); .CE .PP If the value of \fIformat\fR contains internal inconsistencies or invalid @@ -336,7 +336,7 @@ specifier formats, the formatted string result produced by of \fBTcl_ObjPrintf\fR with functionality equivalent to .PP .CS -Tcl_AppendObjToObj(objPtr, Tcl_ObjPrintf(format, ...)); +\fBTcl_AppendObjToObj\fR(objPtr, \fBTcl_ObjPrintf\fR(format, ...)); .CE .PP but with greater convenience and efficiency when the appending @@ -377,7 +377,7 @@ removal was added to make the output of the \fBconcat\fR command cleaner-looking. \fBTcl_ConcatObj\fR returns a pointer to a newly-created object whose ref count is zero. .SH "SEE ALSO" -Tcl_NewObj, Tcl_IncrRefCount, Tcl_DecrRefCount, format, sprintf +Tcl_NewObj(3), Tcl_IncrRefCount(3), Tcl_DecrRefCount(3), format(n), sprintf(3) .SH KEYWORDS append, internal representation, object, object type, string object, string type, string representation, concat, concatenate, unicode diff --git a/doc/TclZlib.3 b/doc/TclZlib.3 index 103f2e8..4018cf0 100644 --- a/doc/TclZlib.3 +++ b/doc/TclZlib.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: TclZlib.3,v 1.1 2008/12/13 17:36:34 dkf Exp $ +'\" RCS: @(#) $Id: TclZlib.3,v 1.2 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH TclZlib 3 8.6 Tcl "Tcl Built-In Commands" @@ -120,7 +120,7 @@ result. Note that the \fIdictObj\fR parameter is only used when the bytes. Typical usage is: .PP .CS -checksum = Tcl_ZlibCRC32(Tcl_ZlibCRC32(0,NULL,0), data, length); +checksum = \fBTcl_ZlibCRC32\fR(\fBTcl_ZlibCRC32\fR(0,NULL,0), data, length); .CE .PP \fBTcl_ZlibStreamInit\fR creates a compressing or decompressing stream that is |