From be39ab9fdbaba118ece1dcc3e064c8452fcdd277 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 16 Nov 2016 16:30:46 +0100 Subject: the manual generator (generator-docs.tes) has been cleaned up and is now called tedoc.tes * some code simplifications * it now supports command line arguments via getopt.tes. * the -C flag enabled C/C++ mode. By default tedoc parses SciTECO code which means it can be used to document macro packages as well. * Therefore it is installed as a separate tool now. It may be used as a Groff preprocessor for third-party macro authors to generate (wo)man pages. * there's a man page tedoc.tes(1) * The troff placeholder macro is now called ".TEDOC". * Help topics can now be specified after the starting comment /*$ or !*$. Topics have been defined for all built-in commands. --- doc/generate-docs.tes | 153 -------------------------------------------------- 1 file changed, 153 deletions(-) delete mode 100755 doc/generate-docs.tes (limited to 'doc/generate-docs.tes') diff --git a/doc/generate-docs.tes b/doc/generate-docs.tes deleted file mode 100755 index ee4820c..0000000 --- a/doc/generate-docs.tes +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/sciteco -m -! ./generate-docs.tes ! - -! - Preprocess a manpage template, inserting a SciTECO command reference. - - The .COMMANDS request is replaced with Troff markup generated from code - comments in . - - The comments support a small but powerful markup for documenting - TECO commands: - * comments start with /*$ - * all lines until first empty line are command syntax descriptions - * text followed by "--" is a short description - * variable values and characters of syntactic significance should be - detected automatically - * alternatives are denoted by "|" - * every line is an alternative - * return values may be specified after "->" - * the remaining text is the verbose command description - * denotes a variable from the syntax description - * empty lines introduce paragraphs - * lines beginning with "-" are unordered lists - * lines beginning with numbers and dot ("1.", "2.", etc.) are - ordered lists - * the above transformations are only preprocessing, so that - Troff requests, escapes and tman macros may also be used. -! - -@[format_header]{ - fd--S .U.f :L"S.|Z'U.t Q.f,Q.tXa Q.f,Q.tD I - - ebQ#tm I\# GENERATED FROM Q.#sc (\.#sc): -.SS Qa -a-10"N I - ' eq.[header] -j -j qa"Sq.tj|.,q.txa.,q.td i -.SCITECO_TOPIC "Qa" -.B Qa -'> -j -j\(->;> -j .,q.txa .,q.td eqa eq.[header]i -.IR Qa -> -jjj -j 0a-10"=d' -zj-a-10"=-d' - ebQ#tm g.[header]i -. - -} - -@[format_body]{ - i.LP - - jj - ! set margin for list paragraphs ! - j 0U.n< - Z-.-3"<1;' - .,.+3:S.LP"S Q.n">0L I.RE - 0U.n' | .,.+3:S.IP"S Q.n"=0L I.RS - %.n' ' ' - :L; - > Q.n"> ZJ I -.RE ' - j;-di --s<-di -.I > - jj - ebQ#tm g.ci -. -. - -} - -! process command-line options ! -LR 0X#ou 2LR 0X#tm EBQ#tm EB L -[.f - <:L;R 0X.f EBQ.f EB L> -].f --EF - -I\# -\# AUTOGENERATED FROM Q#tm -\# DO NOT EDIT MANUALLY!!! -\# - - -! find insertion point ! -FS -.COMMANDS - - - -< -< - ! extract comment ! - 2EB EQ* HX.#sc 2EB - s/*$; .-3u.#sc s*/ q.#sc+3,.-2x.ceq.c - ! q.#sc= ! - - j - j<0a-13"=df>'0a-10"=df>'0a- "=df>'0a- "=df>';> - zj<-a-13"=-df>'-a-10"=-df>'-a- "=-df>'-a- "=-df>';> - - ! extract header ! - h:fd - -"Fzj'0,.x.[header]0,.d - - eq.[header] - :M[format_header] - eq.c - :M[format_body] -> -EF -Q*-1"=1;' -> - -EWQ#ou -EX -- cgit v1.2.3