diff options
-rw-r--r-- | doc/file.n | 38 | ||||
-rw-r--r-- | tools/man2help2.tcl | 18 | ||||
-rw-r--r-- | tools/man2tcl.c | 9 |
3 files changed, 42 insertions, 23 deletions
@@ -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: file.n,v 1.17 2002/05/08 12:29:01 davygrvy Exp $ +'\" RCS: @(#) $Id: file.n,v 1.18 2002/05/08 23:48:23 davygrvy Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -226,21 +226,19 @@ under Windows or AppleScript on the Macintosh. .TP \fBfile normalize \fIname\fR . -Returns a unique normalised path representation for the file-system -object (file, directory, link, etc), whose string value can be used as -a unique identifier for it. A normalized path is one which has all -'../', './' removed. Also it is one which is in the ``standard'' -format for the native platform. On MacOS, Unix, this means the -segments leading up to the path must be free of symbolic links/aliases -(but the very last path component may be a symbolic link), and on -Windows it also means means we want the long form (when running Win -NT/2000/XP) or the short form (when running Win 95/98) with that form's -case-dependence (which gives us a unique, case-dependent path). The -one exception concerning the last link in the path is necessary, -because Tcl or the user may wish to operate on the actual symbolic link -itself (for example 'file delete', 'file rename', 'file copy' are -defined to operate on symbolic links, not on the things that they point -to). +Returns a unique normalised path representation for the file-system +object (file, directory, link, etc), whose string value can be used as +a unique identifier for it. A normalized path is one which has all '../', './' +removed. Also it is one which is in the ``standard'' format for the native +platform. On MacOS, Unix, this means the segments leading up to the path +must be free of symbolic links/aliases (but the very last path component +may be a symbolic link), and on Windows it also means means we want the +long form (when running Win NT/2000/XP) or the short form (when running Win +95/98) with that form's case-dependence (which gives us a unique, +case-dependent path). The one exception concerning the last link in the +path is necessary, because Tcl or the user may wish to operate on the +actual symbolic link itself (for example 'file delete', 'file rename', 'file copy' +are defined to operate on symbolic links, not on the things that they point to). .PP Note that this means normalized paths are different on old Windows operating systems (95/98) and new Windows operating systems @@ -355,10 +353,10 @@ the second element may be null. For example the native files have a first element 'native', and a second element which is a platform-specific type name for the file's system (e.g. 'NTFS', 'FAT', etc), or possibly the empty string if no further information is available or if this -is not implemented. A generic virtual file system might return the list -'vfs ftp' to represent a file on a remote ftp site mounted as a virtual -filesystem through an extension called 'vfs'. If the file does not -belong to any filesystem, an error is generated. +is not implemented. A generic virtual file system might return the +list 'vfs ftp' to represent a file on a remote ftp site mounted as a +virtual filesystem through an extension called 'vfs'. If the file does +not belong to any filesystem, an error is generated. .TP \fBfile tail \fIname\fR . diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl index 875f9a6..0b70fec 100644 --- a/tools/man2help2.tcl +++ b/tools/man2help2.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: man2help2.tcl,v 1.10 2002/05/08 12:20:15 davygrvy Exp $ +# RCS: @(#) $Id: man2help2.tcl,v 1.11 2002/05/08 23:48:13 davygrvy Exp $ # # Global variables used by these scripts: @@ -684,6 +684,22 @@ proc char {name} { } +# macro2 -- +# +# This procedure handles macros that are invoked with a leading "'" +# character instead of space. Right now it just generates an +# error diagnostic. +# +# Arguments: +# name - The name of the macro (without the "."). +# args - Any additional arguments to the macro. + +proc macro2 {name args} { + puts stderr "Unknown macro: '$name [join $args " "]" +} + + + # SHmacro -- # # Subsection head; handles the .SH macro. diff --git a/tools/man2tcl.c b/tools/man2tcl.c index 4a56ff8..f7e5356 100644 --- a/tools/man2tcl.c +++ b/tools/man2tcl.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: man2tcl.c,v 1.6 2002/05/08 12:20:15 davygrvy Exp $ + * RCS: @(#) $Id: man2tcl.c,v 1.7 2002/05/08 23:48:13 davygrvy Exp $ */ static char sccsid[] = "@(#) man2tcl.c 1.3 95/08/12 17:34:08"; @@ -142,7 +142,7 @@ main(argc, argv) exit(1); } - if (line[0] == '.') { + if ((line[0] == '.') || (line[0] == '\'')) { /* * This line is a macro invocation. */ @@ -201,6 +201,11 @@ DoMacro(line) if (writeOutput) { printf("macro"); } + if (*line != '.') { + if (writeOutput) { + printf("2"); + } + } /* * Parse the arguments to the macro (including the name), in order. |