diff options
author | davygrvy <davygrvy@noemail.net> | 2002-05-08 23:48:13 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@noemail.net> | 2002-05-08 23:48:13 (GMT) |
commit | 51df18c1b5017b9710b18ba924bf411f61441d45 (patch) | |
tree | c3de028e22f014e9a284725e17d0cad17908618f /tools | |
parent | d5cdfc650e5ba95f1ae83bf5d7ba545229c56232 (diff) | |
download | tcl-51df18c1b5017b9710b18ba924bf411f61441d45.zip tcl-51df18c1b5017b9710b18ba924bf411f61441d45.tar.gz tcl-51df18c1b5017b9710b18ba924bf411f61441d45.tar.bz2 |
Thanks to Peter Spjuth <peter.spjuth@space.se>, again. My prior fix for
single-quote macro mis-understanding was wrong. Reverted to reimpliment
the 'macro2' proc which handles single-quote macros and restored file.n text
arrangement to avoid single-quotes on the first line.
FossilOrigin-Name: 59ac3ed2d0477d5e2a6654fd0ff3630d86479f82
Diffstat (limited to 'tools')
-rw-r--r-- | tools/man2help2.tcl | 18 | ||||
-rw-r--r-- | tools/man2tcl.c | 9 |
2 files changed, 24 insertions, 3 deletions
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. |