diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/system/help/t_hdbexamine.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/system/help/t_hdbexamine.x')
-rw-r--r-- | pkg/system/help/t_hdbexamine.x | 35 |
1 files changed, 35 insertions, 0 deletions
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 <syserr.h> +include <error.h> +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 |