aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/history.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /noao/twodspec/multispec/history.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/twodspec/multispec/history.x')
-rw-r--r--noao/twodspec/multispec/history.x29
1 files changed, 29 insertions, 0 deletions
diff --git a/noao/twodspec/multispec/history.x b/noao/twodspec/multispec/history.x
new file mode 100644
index 00000000..9c79965b
--- /dev/null
+++ b/noao/twodspec/multispec/history.x
@@ -0,0 +1,29 @@
+include <time.h>
+include "ms.h"
+
+# HISTORY - Add a dated comment string to the MULTISPEC database.
+
+procedure history (ms, comment)
+
+pointer ms
+char comment[ARB]
+
+char time_string[SZ_TIME]
+
+long clktime()
+
+begin
+ # Get the clock time and convert to a date string.
+ call cnvdate (clktime(0), time_string, SZ_TIME)
+
+ # Append the following to the comment block:
+ # (date string)(: )(comment string)(newline)
+
+ call strcat (time_string, COMMENT(ms,1), SZ_MS_COMMENTS)
+ call strcat (": ", COMMENT(ms,1), SZ_MS_COMMENTS)
+ call strcat (comment, COMMENT(ms,1), SZ_MS_COMMENTS)
+ call strcat ("\n", COMMENT(ms,1), SZ_MS_COMMENTS)
+
+ # Write the updated comment block to the database.
+ call mspcomments (ms)
+end