aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/history.x
blob: 9c79965b42eb16fd75413b468ebbd4b3f320b09f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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