aboutsummaryrefslogtreecommitdiff
path: root/pkg/system/help/prmodname.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/system/help/prmodname.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/system/help/prmodname.x')
-rw-r--r--pkg/system/help/prmodname.x35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkg/system/help/prmodname.x b/pkg/system/help/prmodname.x
new file mode 100644
index 00000000..dbf2b939
--- /dev/null
+++ b/pkg/system/help/prmodname.x
@@ -0,0 +1,35 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "help.h"
+
+# PR_MODNAME -- Print the module name header "pakname.modname". Omit the
+# package name if it begins with an underscore, unless there is no module
+# name.
+
+procedure pr_modname (ctrl, pakname, modname)
+
+pointer ctrl # help control parameters
+char pakname[ARB] # package name
+char modname[ARB] # module name
+
+pointer sp, lbuf
+
+begin
+ call smark (sp)
+ call salloc (lbuf, SZ_LINE, TY_CHAR)
+
+ if (pakname[1] != EOS || modname[1] != EOS) {
+ call houtput (ctrl, "\n")
+ if (pakname[1] == '_' && modname[1] != EOS) {
+ call sprintf (Memc[lbuf], SZ_LINE, "%s:\n")
+ call pargstr (modname)
+ } else {
+ call sprintf (Memc[lbuf], SZ_LINE, "%s.%s:\n")
+ call pargstr (pakname)
+ call pargstr (modname)
+ }
+ call houtput (ctrl, Memc[lbuf])
+ }
+
+ call sfree (sp)
+end