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/xtools/inlfit/ingtitle.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/xtools/inlfit/ingtitle.x')
-rw-r--r-- | pkg/xtools/inlfit/ingtitle.x | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkg/xtools/inlfit/ingtitle.x b/pkg/xtools/inlfit/ingtitle.x new file mode 100644 index 00000000..8b9fd877 --- /dev/null +++ b/pkg/xtools/inlfit/ingtitle.x @@ -0,0 +1,49 @@ +include <pkg/gtools.h> + +# ING_TITLE -- Write out the time stamp and the title of the current fit. + +procedure ing_title (in, file, gt) + +pointer in # pointer to the inlfit structure (not used yet) +char file[ARB] # arbitrary file name +pointer gt # pointer to the gtools structure + +int fd, sfd +pointer sp, str +int open(), stropen(), fscan() +long clktime() + +begin + if (file[1] == EOS) + return + fd = open (file, APPEND, TEXT_FILE) + + call smark (sp) + call salloc (str, SZ_LINE, TY_CHAR) + + # Put time stamp in. + call cnvtime (clktime(0), Memc[str], SZ_LINE) + call fprintf (fd, "\n#%s\n") + call pargstr (Memc[str]) + + # Print plot title. + call gt_gets (gt, GTTITLE, Memc[str], SZ_LINE) + sfd = stropen (Memc[str], SZ_LINE, READ_ONLY) + while (fscan (sfd) != EOF) { + call gargstr (Memc[str], SZ_LINE) + call fprintf (fd, "#%s\n") + call pargstr (Memc[str]) + } + call fprintf (fd, "\n") + call strclose (sfd) + + # Print fit units. + #call gt_gets (gt, GTYUNITS, Memc[str], SZ_LINE) + #if (Memc[str] != EOS) { + #call fprintf (fd, "fit_units %s\n") + #call pargstr (Memc[str]) + #} + + call sfree (sp) + call close (fd) +end |