diff options
Diffstat (limited to 'noao/digiphot/daophot/daolib/dpapheader.x')
-rw-r--r-- | noao/digiphot/daophot/daolib/dpapheader.x | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/noao/digiphot/daophot/daolib/dpapheader.x b/noao/digiphot/daophot/daolib/dpapheader.x new file mode 100644 index 00000000..898f9dab --- /dev/null +++ b/noao/digiphot/daophot/daolib/dpapheader.x @@ -0,0 +1,56 @@ +# DP_APHEADER -- Copy the text database column headers to another file. +# Consider placing this simple routine in the pttables library at some point. + +procedure dp_apheader (in, out) + +int in # input file descriptor +int out # output file descriptor + +pointer sp, line +int getline() + +begin + call smark (sp) + call salloc (line, SZ_LINE, TY_CHAR) + + while (getline (in, Memc[line]) != EOF) { + if (Memc[line] != '#') + break + if (Memc[line+1] == 'N') + break + call putline (out, Memc[line]) + } + + call seek (in, BOF) + + call sfree (sp) +end + + +# DP_APBANNER -- Copy the text database keyword definitions to another file. +# Consider placing this simple routine in the pttables library at some point. + + +procedure dp_apbanner (in, out) + +int in # input file descriptor +int out # output file descriptor + +pointer sp, line +int getline() + +begin + call smark (sp) + call salloc (line, SZ_LINE, TY_CHAR) + + while (getline (in, Memc[line]) != EOF) { + if (Memc[line] != '#') + break + if (Memc[line+1] == 'K') + next + call putline (out, Memc[line]) + } + call seek (in, BOF) + + call sfree (sp) +end |