From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- pkg/system/help/t_hdbexamine.x | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pkg/system/help/t_hdbexamine.x (limited to 'pkg/system/help/t_hdbexamine.x') diff --git a/pkg/system/help/t_hdbexamine.x b/pkg/system/help/t_hdbexamine.x new file mode 100644 index 00000000..8046848e --- /dev/null +++ b/pkg/system/help/t_hdbexamine.x @@ -0,0 +1,35 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include +include "help.h" + + +# HDBEXAMINE -- Examine the help database. + +procedure t_hdbexamine() + +pointer sp, helpdb +bool streq(), clgetb() +int envgets() +string s_helpdb "helpdb" + +begin + call smark (sp) + call salloc (helpdb, SZ_HELPDB, TY_CHAR) + + # Fetch the name of the help database file to be examined. If the + # name is "helpdb", the filename is taken from the environment. + + call clgstr (s_helpdb, Memc[helpdb], SZ_HELPDB) + if (streq (Memc[helpdb], s_helpdb)) + if (envgets (s_helpdb, Memc[helpdb], SZ_HELPDB) <= 0) + call syserrs (SYS_ENVNF, s_helpdb) + + # Examine the structure and contents of the database, printing the + # results on the standard output. + + call hdb_examine (STDOUT, Memc[helpdb], clgetb ("verbose")) + + call sfree (sp) +end -- cgit