summaryrefslogtreecommitdiffstats
path: root/tools/man2tcl.c
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2002-05-08 23:48:13 (GMT)
committerdavygrvy <davygrvy@pobox.com>2002-05-08 23:48:13 (GMT)
commite4d8bccf51f328a796680c704d540f721dab6c22 (patch)
treec3de028e22f014e9a284725e17d0cad17908618f /tools/man2tcl.c
parent6ade672c9f623f586985475583d49f6beb561176 (diff)
downloadtcl-e4d8bccf51f328a796680c704d540f721dab6c22.zip
tcl-e4d8bccf51f328a796680c704d540f721dab6c22.tar.gz
tcl-e4d8bccf51f328a796680c704d540f721dab6c22.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.
Diffstat (limited to 'tools/man2tcl.c')
-rw-r--r--tools/man2tcl.c9
1 files changed, 7 insertions, 2 deletions
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.