From 24d0b67b098a13c2edcff0d7c858563d5c3d1833 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 6 Feb 2001 19:21:47 +0000 Subject: [PATCH] add command docs and update cvar docs for qf-server and qf-client-x11 for beta7. Others will be forthcoming. --- cmd.php | 62 +++++++++++++++++++++++++++++++++++++++++++++++ documentation.php | 24 +++++++++++++++--- 2 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 cmd.php diff --git a/cmd.php b/cmd.php new file mode 100644 index 0000000..d288193 --- /dev/null +++ b/cmd.php @@ -0,0 +1,62 @@ + + $pageName = "CVAR Documentation for " . $program; + $focused = "none"; // Dock icon name to gets a border + require("parts/preamble.php"); // Load most of document +?> + +' . $name . '' . $description . ''; + } + + function printArray ($cmd_list, $program) + { + tableBoxHeader ('black', tableHeadColor); + tableTitle ("cmds available in " . $program, 2, tableHeadColor); + + printRow ('name', 'description'); + + $description = ''; + while (list (, $cmd) = each ($cmd_list)) { + $pos = strpos ($cmd, ' :'); + if ($pos > 0) { + if ($description) { + printRow ($name, $description); + $description = ''; + } + $name = trim (substr ($cmd, 0, $pos - 1)); + } else { + if ($description) { + $description = $description . '
' . trim ($cmd); + } else { + $description = trim ($cmd); + } + } + } + if ($description) { + printRow ($name, $description); + $description = ''; + } + + tableBoxFooter (); + } + + function printCmdlist ($program) + { + $cmd_list = file ('doc/' . $program . '-cmd.txt'); + printArray ($cmd_list, $program); + } + + if (strchr ($program, '.') || strchr ($program, '/') || !is_file ('doc/' . $program . '-cmd.txt')) { + echo 'no such program.'; + } else { + printCmdlist ($program); + } +?> + + diff --git a/documentation.php b/documentation.php index b1a28f6..c4c69ab 100644 --- a/documentation.php +++ b/documentation.php @@ -4,10 +4,8 @@ require("parts/preamble.php"); // Load most of document ?> -

cvar documentation

-